clean up
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2719 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
680a32c846
commit
cd2eacc81e
1 changed files with 22 additions and 36 deletions
|
@ -1,46 +1,27 @@
|
||||||
; VersionInfo.nsi
|
; UserVars.nsi
|
||||||
;
|
;
|
||||||
; This script shows you how to declare and user VARIABLES.
|
; This script shows you how to declare and user variables.
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
!include "MUI.nsh"
|
|
||||||
|
|
||||||
!define MUI_PRODUCT "User Variables"
|
Name "User Variables Text"
|
||||||
!define MUI_VERSION "1.0"
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Configuration
|
|
||||||
|
|
||||||
;General
|
|
||||||
OutFile "UserVars.exe"
|
OutFile "UserVars.exe"
|
||||||
ShowInstDetails nevershow
|
|
||||||
InstallDir "$PROGRAMFILES\Test UserVars"
|
InstallDir "$PROGRAMFILES\User Variables Test"
|
||||||
|
DirText "Choose a folder to install in which to install the test:" " "
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
;Pages
|
; Declaration of user variables (Var command), allowed charaters for variables names : [a-z][A-Z][0-9] and '_'
|
||||||
|
|
||||||
!insertmacro MUI_PAGE_DIRECTORY
|
|
||||||
!insertmacro MUI_PAGE_INSTFILES
|
|
||||||
|
|
||||||
!insertmacro MUI_UNPAGE_CONFIRM
|
|
||||||
!insertmacro MUI_UNPAGE_INSTFILES
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Languages
|
|
||||||
|
|
||||||
!insertmacro MUI_LANGUAGE "English"
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
; Declaration of User Variables with command DIM, allowed charaters for variables names : [a-z][A-Z][0-9] and '_'
|
|
||||||
|
|
||||||
Var "un.Info" ; this one can only be used in uninstaller methods
|
|
||||||
Var "Name"
|
Var "Name"
|
||||||
Var "Serial"
|
Var "Serial"
|
||||||
|
|
||||||
|
Var "un.Info" ; this one can only be used in the uninstaller
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
;Installer Sections
|
; Installer
|
||||||
|
|
||||||
Section "Dummy Section" SecCopyUI
|
Section "Dummy Section" SecDummy
|
||||||
|
|
||||||
StrCpy $0 "Admin"
|
StrCpy $0 "Admin"
|
||||||
StrCpy "$Name" $0
|
StrCpy "$Name" $0
|
||||||
|
@ -49,18 +30,23 @@ Section "Dummy Section" SecCopyUI
|
||||||
|
|
||||||
CreateDirectory $INSTDIR
|
CreateDirectory $INSTDIR
|
||||||
WriteUninstaller "$INSTDIR\Uninst.exe"
|
WriteUninstaller "$INSTDIR\Uninst.exe"
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
Function un.OnUninstSuccess
|
; Uninstaller
|
||||||
HideWindow
|
|
||||||
MessageBox MB_OK "$un.Info"
|
|
||||||
FunctionEnd
|
|
||||||
|
|
||||||
Section "Uninstall"
|
Section "Uninstall"
|
||||||
|
|
||||||
StrCpy $un.Info "${MUI_PRODUCT} ${MUI_VERSION} uninstalled successfully."
|
StrCpy $un.Info "User variables test uninstalled successfully."
|
||||||
Delete "$INSTDIR\Uninst.exe"
|
Delete "$INSTDIR\Uninst.exe"
|
||||||
RmDir $INSTDIR
|
RmDir $INSTDIR
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
Function un.OnUninstSuccess
|
||||||
|
|
||||||
|
HideWindow
|
||||||
|
MessageBox MB_OK "$un.Info"
|
||||||
|
|
||||||
|
FunctionEnd
|
Loading…
Add table
Add a link
Reference in a new issue