Mercurial > trustbridge
diff 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 |
line wrap: on
line diff
--- a/packaging/trustbridge.nsi Mon Aug 04 15:06:33 2014 +0200 +++ b/packaging/trustbridge.nsi Mon Aug 04 17:56:42 2014 +0200 @@ -46,6 +46,7 @@ VIAddVersionKey "FileVersion" "${version_number}" Var StartMenuFolder +Var douninstcertificates Var uninstCertificates ;-------------------------------- ; General @@ -103,24 +104,25 @@ !insertmacro MUI_PAGE_FINISH !ifdef WRITE_UNINSTALLER - !define MUI_PAGE_CUSTOMFUNCTION_SHOW un.ModifyUnInstfiles - !define MUI_PAGE_CUSTOMFUNCTION_LEAVE un.LeaveUnInstfiles + !define MUI_PAGE_CUSTOMFUNCTION_SHOW un.ModifyUnWelcome + !define MUI_PAGE_CUSTOMFUNCTION_LEAVE un.LeaveUnWelcome + !insertmacro MUI_UNPAGE_WELCOME !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES - !define MUI_UNCONFIRMPAGE_TEXT_TOP "HALLO" - Function un.ModifyUnInstfiles + Function un.ModifyUnWelcome ${NSD_CreateCheckbox} 120u -18u 50% 12u "Verwaltete Zertifikate entfernen." Pop $uninstCertificates SetCtlColors $uninstCertificates "" ${MUI_BGCOLOR} - ;${NSD_Check} $uninstCertificates ; Check it by default + ${NSD_Check} $uninstCertificates ; Check it by default FunctionEnd - Function un.LeaveUnInstfiles + Function un.LeaveUnWelcome ${NSD_GetState} $uninstCertificates $0 + StrCpy $douninstcertificates "FALSE" ${If} $0 <> 0 - MessageBox mb_ok "Do the uninstall1" + StrCpy $douninstcertificates "TRUE" ${EndIf} FunctionEnd !endif @@ -235,6 +237,10 @@ !ifdef WRITE_UNINSTALLER Section "Uninstall" + StrCmp "$douninstcertificates" "TRUE" 0 skip_certs + ExpandEnvStrings $0 %LOCALAPPDATA% + nsExec::ExecToLog '"$INSTDIR\cinst.exe" "list=$0\BSI\TrustBridge\list-installed.txt" "choices=uninstall"' +skip_certs: RMDir /r "$INSTDIR" ; TODO include uninstall files ; !include "filelist-un.nsh" ; Delete "$INSTDIR\Uninstall.exe"