changeset 1242:e4aff35ef8fd

(issue143) Make uninstallation of nss-installer conditional on Windows
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 24 Sep 2014 17:55:14 +0200
parents 4692f8860a24
children cf5784d2c3a8
files packaging/create-dist-package.sh.in packaging/trustbridge.nsi packaging/win-createpackage.sh.in
diffstat 3 files changed, 35 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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"
--- 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

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