[PATCH 3 of 4] (issue53) Uninstall list-installed if requested
Wald Commits
scm-commit at wald.intevation.org
Mon Aug 4 17:57:18 CEST 2014
# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1407167802 -7200
# Node ID df6f3b1cc41c8b57a82ec7bac9b98135796e3543
# Parent 4dfb6f543a05100d8bb6d87f7470c055de089678
(issue53) Uninstall list-installed if requested.
diff -r 4dfb6f543a05 -r df6f3b1cc41c packaging/trustbridge.nsi
--- 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"
More information about the Trustbridge-commits
mailing list