[PATCH] (issue143) Make uninstallation of nss-installer conditional on Windows

Wald Commits scm-commit at wald.intevation.org
Wed Sep 24 17:55:28 CEST 2014


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1411574114 -7200
# Node ID e4aff35ef8fd43e58e4bbdf15f7d08a5bc5089df
# Parent  4692f8860a24bb749818a9b01c6f53f26d824943
(issue143) Make uninstallation of nss-installer conditional on Windows

diff -r 4692f8860a24 -r e4aff35ef8fd packaging/create-dist-package.sh.in
--- a/packaging/create-dist-package.sh.in	Wed Sep 24 17:50:23 2014 +0200
+++ b/packaging/create-dist-package.sh.in	Wed Sep 24 17:55:14 2014 +0200
@@ -59,6 +59,10 @@
 cd $TMPDIR/windows
 for file in `find * -name \*.exe`; do
     echo File \"\${files_dir}\${path_sep}$file\" >> $TMPDIR/resources/filelist_in.nsh
+    if [ "$file" = "trustbridge-nss-installer.exe" ]; then
+        # The nss installer is handled specially on uninstallation.
+        continue
+    fi
     echo Delete \"\$INSTDIR\\$file\" >> $TMPDIR/resources/filelist_un.nsh
 done
 cd $TMPDIR/windows/doc
diff -r 4692f8860a24 -r e4aff35ef8fd packaging/trustbridge.nsi
--- a/packaging/trustbridge.nsi	Wed Sep 24 17:50:23 2014 +0200
+++ b/packaging/trustbridge.nsi	Wed Sep 24 17:55:14 2014 +0200
@@ -272,17 +272,35 @@
 !ifdef WRITE_UNINSTALLER
 Section "Uninstall"
   StrCmp "$douninstcertificates" "TRUE" 0 skip_certs
-    ExpandEnvStrings $0 %LOCALAPPDATA%
-    nsExec::ExecToLog '"$INSTDIR\trustbridge-certificate-installer.exe" "list=$0\BSI\TrustBridge\list-installed.txt" "choices=uninstall"'
-    Delete "$0\BSI\TrustBridge\list*.txt"
-    Delete "$0\BSI\TrustBridge\SW*.exe"
-    RmDir "$0\BSI\TrustBridge"
-    RmDir "$0\BSI"
-    ExpandEnvStrings $0 %APPDATA%
-    Delete "$0\BSI\TrustBridge.ini"
-    RmDir "$0\BSI"
+  ExpandEnvStrings $0 %LOCALAPPDATA%
+  nsExec::ExecToLog '"$INSTDIR\trustbridge-certificate-installer.exe" "list=$0\BSI\TrustBridge\list-installed.txt" "choices=uninstall"'
+  Delete "$0\BSI\TrustBridge\list*.txt"
+  Delete "$0\BSI\TrustBridge\SW*.exe"
+  RmDir "$0\BSI\TrustBridge"
+  RmDir "$0\BSI"
+  ExpandEnvStrings $0 %APPDATA%
+  Delete "$0\BSI\TrustBridge.ini"
+  RmDir "$0\BSI"
 
+  UserInfo::GetAccountType
+  pop $0
+  ${If} $0 == "admin"
+      MessageBox MB_ICONINFORMATION|MB_YESNO "\
+      Zertifikate die für andere Nutzer im Zertifikatsspeicher von Firefox und Thunderbird installiert wurden können erst beim nächsten \
+      Login dieser Nutzer deinstalliert werden. \
+      $\r$\n$\r$\n\
+      Die deinstallation der Zertifikate wird von der folgenden Anwendung durchgeführt: $\r$\n '$INSTDIR\trustbridge-nss-installer.exe' $\r$\n$\r$\n\
+      Wenn Zertifikate auch aus den Thunderbird und Firefox Speichern anderer Nutzer deinstalliert werden sollen wählen \
+      sie bitte 'Nein' und löschen Sie den 'trustbridge-nss-installer.exe' manuell nachdem andere Nutzer Gelegenheit hatten sich einzuloggen.$\r$\n \
+      $\r$\n\
+      Soll '$INSTDIR\trustbridge-nss-installer.exe' jetzt entfernt werden?" /SD IDYES IDYES deleteNSSInstaller IDNO dontDeleteNSS
+  ${Else}
+    Delete "$INSTDIR\trustbridge-nss-installer.exe"
+  ${EndIf}
 skip_certs:
+  deleteNSSInstaller:
+    Delete "$INSTDIR\trustbridge-nss-installer.exe"
+dontDeleteNSS:
   !include "filelist_un.nsh"
   Delete "$INSTDIR\Uninstall.exe"
   RMDir "$INSTDIR"
diff -r 4692f8860a24 -r e4aff35ef8fd packaging/win-createpackage.sh.in
--- a/packaging/win-createpackage.sh.in	Wed Sep 24 17:50:23 2014 +0200
+++ b/packaging/win-createpackage.sh.in	Wed Sep 24 17:55:14 2014 +0200
@@ -23,6 +23,10 @@
 cd $TMPDIR
 for file in `find * -name \*.exe`; do
     echo File \"\${files_dir}\${path_sep}$file\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_in.nsh
+    if [ "$file" = "trustbridge-nss-installer.exe" ]; then
+        # The nss installer is handled specially on uninstallation.
+        continue
+    fi
     echo Delete \"\$INSTDIR\\$file\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_un.nsh
 done
 cd $TMPDIR/doc


More information about the Trustbridge-commits mailing list