More reboot fixes
authorWerner Koch <wk@gnupg.org>
Tue, 15 Nov 2005 11:15:07 +0000 (11:15 +0000)
committerWerner Koch <wk@gnupg.org>
Tue, 15 Nov 2005 11:15:07 +0000 (11:15 +0000)
ChangeLog
src/Makefile.am
src/inst-gpgol.nsi
src/uninst-gpgee.nsi
src/uninst-gpgol.nsi

index e2879d9..c88109b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,13 @@
 2005-11-15  Werner Koch  <wk@g10code.com>
 
+       * src/Makefile.am (EXTRA_DIST): Add g4wihelp.nsi.
+       (CLEANFILES): Add g4wihelp.dll.
+
        * src/inst-gpgee.nsi: Use RegDLL and UnRegDLL.  Print warning on
        registration failure.  Use move approach for active extension.
+       * src/inst-gpgol.nsi: Ditto.
+       * src/uninst-gpgol.nsi: Use UnRegDLL and allow rebooting.
+       * src/uninst-gpgee.nsi: Ditto.
 
        * src/installer.nsi: Moved inclusion of g4wihelp.nsi after the
        language definitions.
index c3c024b..f1da43d 100644 (file)
 
 EXTRA_DIST = pkg-config $(common_nsi) gpg4win.nsi gpg4win-src.nsi \
        libiconv.def libintl.def  gpg4win-splash.bmp gpg4win-splash.wav \
-       exdll.h g4wihelp.c
+       exdll.h g4wihelp.c g4wihelp.nsi
+
+# Need to clean the dll because we bypassed automake.
+CLEANFILES = g4wihelp.dll 
 
 # Supported source packages.
 gpg4win_spkgs := gnupg libgpg-error gpgme gpgol gpa winpt \
index d4788df..a294470 100644 (file)
@@ -28,14 +28,30 @@ Section "GPGol" SEC_gpgol
 !ifdef SOURCES
   File "${gpg4win_pkg_gpgol}"
 !else
+
+  ClearErrors
+  SetOverwrite try
   File ${prefix}/bin/gpgol.dll
+  SetOverwrite lastused
+  ifErrors 0 +4
+      File /oname=gpgol.dll.tmp ${prefix}/bin/gpgol.dll
+      Rename /REBOOTOK gpgol.dll.tmp gpgol.dll
 
   # Register the DLL.
-  Exec 'regsvr32.exe /s "$INSTDIR\gpgol.dll"'
+  RegDLL "$INSTDIR\gpgol.dll"
+  ifErrors 0 +2
+     MessageBox MB_OK "$(T_GPGol_RegFailed)"
+
 !endif
 SectionEnd
 
 
+LangString T_GPGol_RegFailed ${LANG_ENGLISH} \
+   "Warning: Registration of the GPGol Outlook pluginfailed."
+LangString T_GPGol_RegFailed ${LANG_GERMAN} \
+   "Warnung: Registration des GPGol Outlook Plugin ist fehlgeschlagen. "
+
+
 LangString DESC_SEC_gpgol ${LANG_ENGLISH} \
    "GnuPG for Outlook"
 LangString DESC_SEC_gpgol ${LANG_GERMAN} \
index 8231b79..726fca1 100644 (file)
@@ -30,11 +30,11 @@ Section "-un.gpgee"
   Push "${gpg4win_pkg_gpgee}"
   Call un.SourceDelete
 !else
-  # Unregister the DLL
-  Exec 'regsvr32.exe /s /u "$INSTDIR\GPGee.dll"'
 
-  Delete "$INSTDIR\GPGee.dll"
-  Delete "$INSTDIR\GPGee.DEU"
+  UnRegDLL "$INSTDIR\GPGee.dll"
+
+  Delete /REBOOTOK "$INSTDIR\GPGee.dll"
+  Delete /REBOOTOK "$INSTDIR\GPGee.DEU"
   Delete "$INSTDIR\GPGee.hlp"
 
   Delete "$INSTDIR\share\gpgee\gpl.txt"
index 28639a6..3d7fd3e 100644 (file)
@@ -30,10 +30,9 @@ Section "-un.gpgol"
   Call un.SourceDelete
 !else
 
-  # Unregister the DLL
-  Exec 'regsvr32.exe /s /u "$INSTDIR\gpgol.dll"'
+  UnRegDLL "$INSTDIR\gpgol.dll"
 
-  Delete "$INSTDIR\gpgol.dll"
+  Delete /REBOOTOK "$INSTDIR\gpgol.dll"
   RMDir "$INSTDIR"
 !endif
 SectionEnd