comparison packaging/trustbridge.nsi @ 1325:303de3160a83

(issue163) Move all uninstaller specifics into IFDEF WRITE_UNINSTALLER sections
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 14 Oct 2014 18:33:18 +0200
parents 9f5893faa60b
children c7349696d812
comparison
equal deleted inserted replaced
1324:b6fb5d347023 1325:303de3160a83
16 ; productname_short: Used for the default folder name and such 16 ; productname_short: Used for the default folder name and such
17 ; files_dir: the path to the files 17 ; files_dir: the path to the files
18 18
19 ;-------------------------------- 19 ;--------------------------------
20 ; Includes 20 ; Includes
21 !ifndef WRITE_UNINSTALLER
22 !define MULTIUSER_NOUNINSTALL
23 !endif
24
21 !define MULTIUSER_EXECUTIONLEVEL Highest 25 !define MULTIUSER_EXECUTIONLEVEL Highest
22 !define MULTIUSER_MUI 26 !define MULTIUSER_MUI
23 !define MULTIUSER_INSTALLMODE_COMMANDLINE 27 !define MULTIUSER_INSTALLMODE_COMMANDLINE
24 !define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY "Software\${productname_short}" 28 !define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY "Software\${productname_short}"
25 !define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME "" 29 !define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME ""
47 VIAddVersionKey "LegalCopyright" "${copyright}" 51 VIAddVersionKey "LegalCopyright" "${copyright}"
48 VIAddVersionKey "FileDescription" "${description}" 52 VIAddVersionKey "FileDescription" "${description}"
49 VIAddVersionKey "FileVersion" "${version_number}" 53 VIAddVersionKey "FileVersion" "${version_number}"
50 54
51 Var StartMenuFolder 55 Var StartMenuFolder
52 Var douninstcertificates
53 Var uninstCertificates
54 ;-------------------------------- 56 ;--------------------------------
55 ; General 57 ; General
56 58
57 ; Define Name, File and Installdir of Installer 59 ; Define Name, File and Installdir of Installer
58 Name "${productname}" 60 Name "${productname}"
64 ; Interface Settings 66 ; Interface Settings
65 67
66 ; MUI Images / Icons 68 ; MUI Images / Icons
67 !define MUI_HEADERIMAGE 69 !define MUI_HEADERIMAGE
68 !define MUI_HEADERIMAGE_BITMAP "resources\header-install.bmp" 70 !define MUI_HEADERIMAGE_BITMAP "resources\header-install.bmp"
71 !define MUI_WELCOMEFINISHPAGE_BITMAP "resources\wizard-install.bmp"
72 !define MUI_ICON "resources\install.ico"
73
74 !ifdef WRITE_UNINSTALLER
69 !define MUI_HEADERIMAGE_UNBITMAP "resources\header-uninstall.bmp" 75 !define MUI_HEADERIMAGE_UNBITMAP "resources\header-uninstall.bmp"
70 !define MUI_WELCOMEFINISHPAGE_BITMAP "resources\wizard-install.bmp"
71 !define MUI_UNWELCOMEFINISHPAGE_BITMAP "resources\wizard-uninstall.bmp" 76 !define MUI_UNWELCOMEFINISHPAGE_BITMAP "resources\wizard-uninstall.bmp"
72 !define MUI_ICON "resources\install.ico"
73 !define MUI_UNICON "resources\uninstall.ico" 77 !define MUI_UNICON "resources\uninstall.ico"
78 !define MUI_UNFINISHPAGE_NOAUTOCLOSE
79 !endif
74 80
75 ; MUI welcome page text 81 ; MUI welcome page text
76 !define MUI_WELCOMEPAGE_TITLE "Willkommen zur Installation von TrustBridge ${version_number}" 82 !define MUI_WELCOMEPAGE_TITLE "Willkommen zur Installation von TrustBridge ${version_number}"
77 ;!define MUI_WELCOMEPAGE_TITLE_3LINES 83 ;!define MUI_WELCOMEPAGE_TITLE_3LINES
78 !define MUI_WELCOMEPAGE_TEXT "${productname} ist eine Anwendung \ 84 !define MUI_WELCOMEPAGE_TEXT "${productname} ist eine Anwendung \
79 um Wurzelzertifikate auf ihrem System zu installieren und aktuell zu halten. \ 85 um Wurzelzertifikate auf ihrem System zu installieren und aktuell zu halten. \
80 $\r$\n$\r$\n$\r$\n$\r$\n \ 86 $\r$\n$\r$\n$\r$\n$\r$\n \
81 Achtung: Dies ist eine Testversion!" 87 Achtung: Dies ist eine Testversion!"
82 88
83 !define MUI_FINISHPAGE_NOAUTOCLOSE 89 !define MUI_FINISHPAGE_NOAUTOCLOSE
84 !define MUI_UNFINISHPAGE_NOAUTOCLOSE
85 90
86 !define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX" 91 !define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX"
87 !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\${productname_short}" 92 !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\${productname_short}"
88 !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" 93 !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
89 94
107 !insertmacro MUI_PAGE_DIRECTORY 112 !insertmacro MUI_PAGE_DIRECTORY
108 !insertmacro MUI_PAGE_INSTFILES 113 !insertmacro MUI_PAGE_INSTFILES
109 !insertmacro MUI_PAGE_FINISH 114 !insertmacro MUI_PAGE_FINISH
110 115
111 !ifdef WRITE_UNINSTALLER 116 !ifdef WRITE_UNINSTALLER
117 Var douninstcertificates
118 Var uninstCertificates
112 !define MUI_PAGE_CUSTOMFUNCTION_SHOW un.ModifyUnWelcome 119 !define MUI_PAGE_CUSTOMFUNCTION_SHOW un.ModifyUnWelcome
113 !define MUI_PAGE_CUSTOMFUNCTION_LEAVE un.LeaveUnWelcome 120 !define MUI_PAGE_CUSTOMFUNCTION_LEAVE un.LeaveUnWelcome
114 121
115 !insertmacro MUI_UNPAGE_WELCOME 122 !insertmacro MUI_UNPAGE_WELCOME
116 !insertmacro MUI_UNPAGE_CONFIRM 123 !insertmacro MUI_UNPAGE_CONFIRM
192 DesktopShellRun::Exec "$INSTDIR\trustbridge.exe" 199 DesktopShellRun::Exec "$INSTDIR\trustbridge.exe"
193 FunctionEnd 200 FunctionEnd
194 201
195 ;-------------------------------- 202 ;--------------------------------
196 ; UnInstall Functions 203 ; UnInstall Functions
197 204 !ifdef WRITE_UNINSTALLER
198 Function "un.onInit" 205 Function "un.onInit"
199 !insertmacro MULTIUSER_UNINIT 206 !insertmacro MULTIUSER_UNINIT
200 FunctionEnd 207 FunctionEnd
208 !endif
201 209
202 Section "" 210 Section ""
203 StrCmp $is_update '1' wait_a_bit continue 211 StrCmp $is_update '1' wait_a_bit continue
204 wait_a_bit: 212 wait_a_bit:
205 ; The trustbridge.exe might need some time to close 213 ; The trustbridge.exe might need some time to close

http://wald.intevation.org/projects/trustbridge/