fixes, comments, ReserveFile
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1558 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
6002191b2a
commit
76b5d63186
1 changed files with 28 additions and 11 deletions
|
@ -1,54 +1,71 @@
|
||||||
;Install Options Test Script
|
;Install Options Test Script
|
||||||
;Written by Joost Verburg
|
;Written by Joost Verburg
|
||||||
|
|
||||||
!define TEMP1 $R0
|
!define TEMP1 $R0 ;Temp variable
|
||||||
|
|
||||||
;The name of the installer
|
;The name of the installer
|
||||||
Name "Install Options Test"
|
Name "Install Options Test"
|
||||||
|
|
||||||
; The file to write
|
;The file to write
|
||||||
OutFile "Test.exe"
|
OutFile "Test.exe"
|
||||||
|
|
||||||
; The default installation directory
|
;The default installation directory
|
||||||
InstallDir "$PROGRAMFILES\IOTest"
|
InstallDir "$PROGRAMFILES\IOTest"
|
||||||
|
|
||||||
|
;Things that need to be extracted on startup (keep these lines before any File command!)
|
||||||
|
;Use ReserveFile for your own Install Options ini files too!
|
||||||
|
ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
|
||||||
|
ReserveFile "test.ini"
|
||||||
|
|
||||||
|
;Texts on the dialogs
|
||||||
DirText "Choose a directory"
|
DirText "Choose a directory"
|
||||||
LicenseText "A license"
|
LicenseText "A license"
|
||||||
LicenseData "..\..\License.txt"
|
LicenseData "..\..\License.txt"
|
||||||
ComponentText "Choose components"
|
ComponentText "Choose components"
|
||||||
|
|
||||||
|
;Order of pages
|
||||||
Page license
|
Page license
|
||||||
Page custom SetCustom ;Custom page. Install Options gets called in SetCustom,
|
Page custom SetCustom ;Custom page. Install Options gets called in SetCustom.
|
||||||
Page components
|
Page components
|
||||||
Page directory
|
Page directory
|
||||||
Page instfiles
|
Page instfiles
|
||||||
|
|
||||||
Section "Components"
|
Section "Components"
|
||||||
ReadINIStr ${TEMP1} "$PLUGINSDIR\test.nsi" "Field 1" "State"
|
|
||||||
|
;Get Install Options dialog user input
|
||||||
|
|
||||||
|
ReadINIStr ${TEMP1} "$PLUGINSDIR\test.ini" "Field 1" "State"
|
||||||
MessageBox MB_OK "Install X=$R0"
|
MessageBox MB_OK "Install X=$R0"
|
||||||
ReadINIStr ${TEMP1} "$PLUGINSDIR\test.nsi" "Field 2" "State"
|
ReadINIStr ${TEMP1} "$PLUGINSDIR\test.ini" "Field 2" "State"
|
||||||
MessageBox MB_OK "Install Y=$R0"
|
MessageBox MB_OK "Install Y=$R0"
|
||||||
ReadINIStr ${TEMP1} "$PLUGINSDIR\test.nsi" "Field 3" "State"
|
ReadINIStr ${TEMP1} "$PLUGINSDIR\test.ini" "Field 3" "State"
|
||||||
MessageBox MB_OK "Install Z=$R0"
|
MessageBox MB_OK "Install Z=$R0"
|
||||||
ReadINIStr ${TEMP1} "$PLUGINSDIR\test.nsi" "Field 4" "State"
|
ReadINIStr ${TEMP1} "$PLUGINSDIR\test.ini" "Field 4" "State"
|
||||||
MessageBox MB_OK "File=$R0"
|
MessageBox MB_OK "File=$R0"
|
||||||
ReadINIStr ${TEMP1} "$PLUGINSDIR\test.nsi" "Field 5" "State"
|
ReadINIStr ${TEMP1} "$PLUGINSDIR\test.ini" "Field 5" "State"
|
||||||
MessageBox MB_OK "Dir=$R0"
|
MessageBox MB_OK "Dir=$R0"
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Function .onInit
|
Function .onInit
|
||||||
|
|
||||||
;Extract Install Options files
|
;Extract Install Options files
|
||||||
|
;$PLUGINSDIR will automatically be removed when the installer closes
|
||||||
|
|
||||||
Call Initialize_____Plugins
|
Call Initialize_____Plugins
|
||||||
SetDetailsPrint both
|
SetDetailsPrint both
|
||||||
|
|
||||||
File /oname=$PLUGINSDIR\test.nsi "test.nsi"
|
File /oname=$PLUGINSDIR\test.ini "test.ini"
|
||||||
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function SetCustom
|
Function SetCustom
|
||||||
|
|
||||||
|
;Display the Install Options dialog
|
||||||
|
|
||||||
Push ${TEMP1}
|
Push ${TEMP1}
|
||||||
|
|
||||||
InstallOptions::dialog "$PLUGINSDIR\test.nsi"
|
InstallOptions::dialog "$PLUGINSDIR\test.ini"
|
||||||
Pop ${TEMP1}
|
Pop ${TEMP1}
|
||||||
|
|
||||||
StrCmp ${TEMP1} "cancel" "" +3
|
StrCmp ${TEMP1} "cancel" "" +3
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue