Mercurial > trustbridge
comparison packaging/trustbridge.nsi @ 859:df6f3b1cc41c
(issue53) Uninstall list-installed if requested.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Mon, 04 Aug 2014 17:56:42 +0200 |
parents | bd9d07c301fd |
children | eee419ad81b8 |
comparison
equal
deleted
inserted
replaced
858:4dfb6f543a05 | 859:df6f3b1cc41c |
---|---|
44 VIAddVersionKey "LegalCopyright" "${copyright}" | 44 VIAddVersionKey "LegalCopyright" "${copyright}" |
45 VIAddVersionKey "FileDescription" "${description}" | 45 VIAddVersionKey "FileDescription" "${description}" |
46 VIAddVersionKey "FileVersion" "${version_number}" | 46 VIAddVersionKey "FileVersion" "${version_number}" |
47 | 47 |
48 Var StartMenuFolder | 48 Var StartMenuFolder |
49 Var douninstcertificates | |
49 Var uninstCertificates | 50 Var uninstCertificates |
50 ;-------------------------------- | 51 ;-------------------------------- |
51 ; General | 52 ; General |
52 | 53 |
53 ; Define Name, File and Installdir of Installer | 54 ; Define Name, File and Installdir of Installer |
101 !insertmacro MUI_PAGE_DIRECTORY | 102 !insertmacro MUI_PAGE_DIRECTORY |
102 !insertmacro MUI_PAGE_INSTFILES | 103 !insertmacro MUI_PAGE_INSTFILES |
103 !insertmacro MUI_PAGE_FINISH | 104 !insertmacro MUI_PAGE_FINISH |
104 | 105 |
105 !ifdef WRITE_UNINSTALLER | 106 !ifdef WRITE_UNINSTALLER |
106 !define MUI_PAGE_CUSTOMFUNCTION_SHOW un.ModifyUnInstfiles | 107 !define MUI_PAGE_CUSTOMFUNCTION_SHOW un.ModifyUnWelcome |
107 !define MUI_PAGE_CUSTOMFUNCTION_LEAVE un.LeaveUnInstfiles | 108 !define MUI_PAGE_CUSTOMFUNCTION_LEAVE un.LeaveUnWelcome |
108 | 109 |
110 !insertmacro MUI_UNPAGE_WELCOME | |
109 !insertmacro MUI_UNPAGE_CONFIRM | 111 !insertmacro MUI_UNPAGE_CONFIRM |
110 !insertmacro MUI_UNPAGE_INSTFILES | 112 !insertmacro MUI_UNPAGE_INSTFILES |
111 | 113 |
112 !define MUI_UNCONFIRMPAGE_TEXT_TOP "HALLO" | 114 Function un.ModifyUnWelcome |
113 Function un.ModifyUnInstfiles | |
114 ${NSD_CreateCheckbox} 120u -18u 50% 12u "Verwaltete Zertifikate entfernen." | 115 ${NSD_CreateCheckbox} 120u -18u 50% 12u "Verwaltete Zertifikate entfernen." |
115 Pop $uninstCertificates | 116 Pop $uninstCertificates |
116 SetCtlColors $uninstCertificates "" ${MUI_BGCOLOR} | 117 SetCtlColors $uninstCertificates "" ${MUI_BGCOLOR} |
117 ;${NSD_Check} $uninstCertificates ; Check it by default | 118 ${NSD_Check} $uninstCertificates ; Check it by default |
118 FunctionEnd | 119 FunctionEnd |
119 | 120 |
120 Function un.LeaveUnInstfiles | 121 Function un.LeaveUnWelcome |
121 ${NSD_GetState} $uninstCertificates $0 | 122 ${NSD_GetState} $uninstCertificates $0 |
123 StrCpy $douninstcertificates "FALSE" | |
122 ${If} $0 <> 0 | 124 ${If} $0 <> 0 |
123 MessageBox mb_ok "Do the uninstall1" | 125 StrCpy $douninstcertificates "TRUE" |
124 ${EndIf} | 126 ${EndIf} |
125 FunctionEnd | 127 FunctionEnd |
126 !endif | 128 !endif |
127 | 129 |
128 !insertmacro MUI_LANGUAGE "German" | 130 !insertmacro MUI_LANGUAGE "German" |
233 | 235 |
234 SectionEnd | 236 SectionEnd |
235 | 237 |
236 !ifdef WRITE_UNINSTALLER | 238 !ifdef WRITE_UNINSTALLER |
237 Section "Uninstall" | 239 Section "Uninstall" |
240 StrCmp "$douninstcertificates" "TRUE" 0 skip_certs | |
241 ExpandEnvStrings $0 %LOCALAPPDATA% | |
242 nsExec::ExecToLog '"$INSTDIR\cinst.exe" "list=$0\BSI\TrustBridge\list-installed.txt" "choices=uninstall"' | |
243 skip_certs: | |
238 RMDir /r "$INSTDIR" ; TODO include uninstall files | 244 RMDir /r "$INSTDIR" ; TODO include uninstall files |
239 ; !include "filelist-un.nsh" | 245 ; !include "filelist-un.nsh" |
240 ; Delete "$INSTDIR\Uninstall.exe" | 246 ; Delete "$INSTDIR\Uninstall.exe" |
241 ; RMDir "$INSTDIR" | 247 ; RMDir "$INSTDIR" |
242 | 248 |