example of displaying images and icons
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3882 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
31542c6ea4
commit
98b17e1276
2 changed files with 124 additions and 0 deletions
59
Contrib/InstallOptions/testimgs.nsi
Normal file
59
Contrib/InstallOptions/testimgs.nsi
Normal file
|
@ -0,0 +1,59 @@
|
|||
;InstallOptions Test Script
|
||||
;Written by Joost Verburg
|
||||
;--------------------------
|
||||
|
||||
;The name of the installer
|
||||
Name "InstallOptions Test"
|
||||
|
||||
;The file to write
|
||||
OutFile "Test.exe"
|
||||
|
||||
; Show install details
|
||||
ShowInstDetails show
|
||||
|
||||
;Things that need to be extracted on startup (keep these lines before any File command!)
|
||||
;Only useful for BZIP2 compression
|
||||
;Use ReserveFile for your own InstallOptions INI files too!
|
||||
|
||||
ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
|
||||
ReserveFile "testimgs.ini"
|
||||
ReserveFile "${NSISDIR}\Contrib\Makensisw\toolbar.bmp"
|
||||
ReserveFile "${NSISDIR}\Contrib\Makensisw\toolbar24.bmp"
|
||||
ReserveFile "${NSISDIR}\Contrib\Makensisw\shell.ico"
|
||||
|
||||
;Order of pages
|
||||
Page custom SetCustom "" ": Testing InstallOptions" ;Custom page. InstallOptions gets called in SetCustom.
|
||||
Page instfiles
|
||||
|
||||
Section
|
||||
SectionEnd
|
||||
|
||||
Function .onInit
|
||||
|
||||
;Extract InstallOptions files
|
||||
;$PLUGINSDIR will automatically be removed when the installer closes
|
||||
|
||||
InitPluginsDir
|
||||
File /oname=$PLUGINSDIR\testimgs.ini "testimgs.ini"
|
||||
File /oname=$PLUGINSDIR\image.bmp "${NSISDIR}\Contrib\Makensisw\toolbar.bmp"
|
||||
File /oname=$PLUGINSDIR\image2.bmp "${NSISDIR}\Contrib\Makensisw\toolbar24.bmp"
|
||||
File /oname=$PLUGINSDIR\icon.ico "${NSISDIR}\Contrib\Makensisw\shell.ico"
|
||||
|
||||
;Write image paths to the INI file
|
||||
|
||||
WriteINIStr $PLUGINSDIR\testimgs.ini "Field 2" "Text" $PLUGINSDIR\image.bmp
|
||||
WriteINIStr $PLUGINSDIR\testimgs.ini "Field 3" "Text" $PLUGINSDIR\image2.bmp
|
||||
WriteINIStr $PLUGINSDIR\testimgs.ini "Field 4" "Text" $PLUGINSDIR\image.bmp
|
||||
WriteINIStr $PLUGINSDIR\testimgs.ini "Field 5" "Text" $PLUGINSDIR\image2.bmp
|
||||
WriteINIStr $PLUGINSDIR\testimgs.ini "Field 6" "Text" $PLUGINSDIR\icon.ico
|
||||
;No Text for Field 7 so it'll show the installer's icon
|
||||
|
||||
FunctionEnd
|
||||
|
||||
Function SetCustom
|
||||
|
||||
;Display the InstallOptions dialog
|
||||
InstallOptions::dialog "$PLUGINSDIR\testimgs.ini"
|
||||
Pop $0
|
||||
|
||||
FunctionEnd
|
Loading…
Add table
Add a link
Reference in a new issue