2002-12-15 19:03:34 +00:00
|
|
|
;InstallOptions Test Script
|
2002-11-01 20:46:42 +00:00
|
|
|
;Written by Joost Verburg
|
2002-12-15 19:03:34 +00:00
|
|
|
;--------------------------
|
2002-08-02 10:01:35 +00:00
|
|
|
|
2002-11-02 12:28:49 +00:00
|
|
|
!define TEMP1 $R0 ;Temp variable
|
2002-08-02 10:01:35 +00:00
|
|
|
|
2002-11-01 20:46:42 +00:00
|
|
|
;The name of the installer
|
2002-12-15 19:03:34 +00:00
|
|
|
Name "InstallOptions Test"
|
2002-08-02 10:01:35 +00:00
|
|
|
|
2002-11-02 12:28:49 +00:00
|
|
|
;The file to write
|
2002-11-01 20:46:42 +00:00
|
|
|
OutFile "Test.exe"
|
2002-08-02 10:01:35 +00:00
|
|
|
|
2003-03-18 15:45:25 +00:00
|
|
|
; Show install details
|
|
|
|
ShowInstDetails show
|
|
|
|
|
2002-11-02 12:28:49 +00:00
|
|
|
;Things that need to be extracted on startup (keep these lines before any File command!)
|
2002-11-24 15:30:13 +00:00
|
|
|
;Only useful for BZIP2 compression
|
2002-12-15 19:03:34 +00:00
|
|
|
;Use ReserveFile for your own InstallOptions INI files too!
|
2002-11-24 15:30:13 +00:00
|
|
|
|
2013-03-07 23:38:25 +00:00
|
|
|
ReserveFile /plugin InstallOptions.dll
|
2002-12-21 16:16:57 +00:00
|
|
|
ReserveFile "test.ini"
|
2002-11-02 12:28:49 +00:00
|
|
|
|
|
|
|
;Order of pages
|
2003-04-14 14:43:02 +00:00
|
|
|
Page custom SetCustom ValidateCustom ": Testing InstallOptions" ;Custom page. InstallOptions gets called in SetCustom.
|
2002-11-01 20:46:42 +00:00
|
|
|
Page instfiles
|
|
|
|
|
|
|
|
Section "Components"
|
2002-11-02 12:28:49 +00:00
|
|
|
|
|
|
|
;Get Install Options dialog user input
|
|
|
|
|
|
|
|
ReadINIStr ${TEMP1} "$PLUGINSDIR\test.ini" "Field 2" "State"
|
2003-03-18 15:45:25 +00:00
|
|
|
DetailPrint "Install X=${TEMP1}"
|
2002-11-02 12:28:49 +00:00
|
|
|
ReadINIStr ${TEMP1} "$PLUGINSDIR\test.ini" "Field 3" "State"
|
2003-03-18 15:45:25 +00:00
|
|
|
DetailPrint "Install Y=${TEMP1}"
|
2002-11-02 12:28:49 +00:00
|
|
|
ReadINIStr ${TEMP1} "$PLUGINSDIR\test.ini" "Field 4" "State"
|
2003-03-18 15:45:25 +00:00
|
|
|
DetailPrint "Install Z=${TEMP1}"
|
2002-11-02 12:28:49 +00:00
|
|
|
ReadINIStr ${TEMP1} "$PLUGINSDIR\test.ini" "Field 5" "State"
|
2003-03-18 15:45:25 +00:00
|
|
|
DetailPrint "File=${TEMP1}"
|
2003-02-14 17:44:10 +00:00
|
|
|
ReadINIStr ${TEMP1} "$PLUGINSDIR\test.ini" "Field 6" "State"
|
2003-03-18 15:45:25 +00:00
|
|
|
DetailPrint "Dir=${TEMP1}"
|
2003-06-10 13:18:07 +00:00
|
|
|
ReadINIStr ${TEMP1} "$PLUGINSDIR\test.ini" "Field 8" "State"
|
|
|
|
DetailPrint "Info=${TEMP1}"
|
2002-11-02 12:28:49 +00:00
|
|
|
|
2002-08-02 10:01:35 +00:00
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
Function .onInit
|
2002-11-02 12:28:49 +00:00
|
|
|
|
2002-12-15 19:03:34 +00:00
|
|
|
;Extract InstallOptions files
|
2002-11-02 12:28:49 +00:00
|
|
|
;$PLUGINSDIR will automatically be removed when the installer closes
|
|
|
|
|
2002-11-10 16:32:46 +00:00
|
|
|
InitPluginsDir
|
2002-12-21 16:16:57 +00:00
|
|
|
File /oname=$PLUGINSDIR\test.ini "test.ini"
|
2002-11-02 12:28:49 +00:00
|
|
|
|
2002-08-02 10:01:35 +00:00
|
|
|
FunctionEnd
|
|
|
|
|
2002-11-01 20:46:42 +00:00
|
|
|
Function SetCustom
|
2002-08-02 10:01:35 +00:00
|
|
|
|
2002-12-15 19:03:34 +00:00
|
|
|
;Display the InstallOptions dialog
|
2003-06-10 13:18:07 +00:00
|
|
|
|
2002-11-09 12:50:00 +00:00
|
|
|
Push ${TEMP1}
|
2002-08-02 10:01:35 +00:00
|
|
|
|
2002-12-15 19:03:34 +00:00
|
|
|
InstallOptions::dialog "$PLUGINSDIR\test.ini"
|
|
|
|
Pop ${TEMP1}
|
|
|
|
|
2002-11-01 20:46:42 +00:00
|
|
|
Pop ${TEMP1}
|
2002-08-02 10:01:35 +00:00
|
|
|
|
2003-03-18 15:45:25 +00:00
|
|
|
FunctionEnd
|
|
|
|
|
2003-04-14 14:43:02 +00:00
|
|
|
Function ValidateCustom
|
|
|
|
|
|
|
|
ReadINIStr ${TEMP1} "$PLUGINSDIR\test.ini" "Field 2" "State"
|
|
|
|
StrCmp ${TEMP1} 1 done
|
|
|
|
|
|
|
|
ReadINIStr ${TEMP1} "$PLUGINSDIR\test.ini" "Field 3" "State"
|
|
|
|
StrCmp ${TEMP1} 1 done
|
|
|
|
|
|
|
|
ReadINIStr ${TEMP1} "$PLUGINSDIR\test.ini" "Field 4" "State"
|
|
|
|
StrCmp ${TEMP1} 1 done
|
|
|
|
MessageBox MB_ICONEXCLAMATION|MB_OK "You must select at least one install option!"
|
|
|
|
Abort
|
|
|
|
|
|
|
|
done:
|
|
|
|
|
2003-06-10 13:18:07 +00:00
|
|
|
FunctionEnd
|