/usr/share/doc/nsis/Examples/gfx.nsi is in nsis-doc 2.46-7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | ; gfx.nsi
;
; This script shows some examples of using all of the new
; graphic related additions introduced in NSIS 2
;
; Written by Amir Szkeley 22nd July 2002
;--------------------------------
!macro BIMAGE IMAGE PARMS
Push $0
GetTempFileName $0
File /oname=$0 "${IMAGE}"
SetBrandingImage ${PARMS} $0
Delete $0
Pop $0
!macroend
;--------------------------------
Name "Graphical effects"
OutFile "gfx.exe"
; Adds an XP manifest to the installer
XPStyle on
; Add branding image to the installer (an image placeholder on the side).
; It is not enough to just add the placeholder, we must set the image too...
; We will later set the image in every pre-page function.
; We can also set just one persistent image in .onGUIInit
AddBrandingImage left 100
; Sets the font of the installer
SetFont "Comic Sans MS" 8
; Just to make it three pages...
SubCaption 0 ": Yet another page..."
SubCaption 2 ": Yet another page..."
LicenseText "License page"
LicenseData "gfx.nsi"
DirText "Lets make a third page!"
; Install dir
InstallDir "${NSISDIR}\Examples"
; Request application privileges for Windows Vista
RequestExecutionLevel user
;--------------------------------
; Pages
Page license licenseImage
Page custom customPage
Page directory dirImage
Page instfiles instImage
;--------------------------------
Section ""
; You can also use the BI_NEXT macro here...
MessageBox MB_YESNO "We can change the branding image from within a section too!$\nDo you want me to change it?" IDNO done
!insertmacro BIMAGE "${NSISDIR}\Contrib\Graphics\Wizard\nsis.bmp" ""
done:
WriteUninstaller uninst.exe
SectionEnd
;--------------------------------
Function licenseImage
!insertmacro BIMAGE "${NSISDIR}\Contrib\Graphics\Header\nsis.bmp" /RESIZETOFIT
MessageBox MB_YESNO 'Would you like to skip the license page?' IDNO no
Abort
no:
FunctionEnd
Function customPage
!insertmacro BIMAGE "${NSISDIR}\Contrib\Graphics\Checks\modern.bmp" /RESIZETOFIT
MessageBox MB_OK 'This is a nice custom "page" with yet another image :P'
#insert install options/start menu/<insert plugin name here> here
FunctionEnd
Function dirImage
!insertmacro BIMAGE "${NSISDIR}\Contrib\Graphics\Header\win.bmp" /RESIZETOFIT
FunctionEnd
Function instImage
!insertmacro BIMAGE "${NSISDIR}\Contrib\Graphics\Wizard\llama.bmp" /RESIZETOFIT
FunctionEnd
;--------------------------------
; Uninstall pages
UninstPage uninstConfirm un.uninstImage
UninstPage custom un.customPage
UninstPage instfiles un.instImage
Function un.uninstImage
!insertmacro BIMAGE "${NSISDIR}\Contrib\Graphics\Checks\modern.bmp" /RESIZETOFIT
FunctionEnd
Function un.customPage
!insertmacro BIMAGE "${NSISDIR}\Contrib\Graphics\Header\win.bmp" /RESIZETOFIT
MessageBox MB_OK 'This is a nice uninstaller custom "page" with yet another image :P'
#insert install options/start menu/<insert plugin name here> here
FunctionEnd
Function un.instImage
!insertmacro BIMAGE "${NSISDIR}\Contrib\Graphics\Wizard\llama.bmp" /RESIZETOFIT
FunctionEnd
;--------------------------------
; Uninstaller
; Another page for uninstaller
UninstallText "Another page..."
Section uninstall
MessageBox MB_OK "Bla"
SectionEnd
|