Switch from GNU/GnuPG to Gpg4win naming
authorAndre Heinecke <aheinecke@intevation.de>
Wed, 26 Aug 2015 14:39:19 +0000 (16:39 +0200)
committerAndre Heinecke <aheinecke@intevation.de>
Wed, 26 Aug 2015 14:39:19 +0000 (16:39 +0200)
* src/gpg4win.nsi: Change install dir.
* src/installer-finish.nsi: Update regkeys and paths.
* src/installer.nsi: Ditto.

src/gpg4win.nsi
src/installer-finish.nsi
src/installer.nsi

index 4f0b599..cce51f6 100644 (file)
 !define COPYRIGHT "Copyright (C) 2008 g10 Code GmbH"
 !define DESCRIPTION "Gpg4win: The GNU Privacy Guard and Tools for Windows"
 
-!define INSTALL_DIR "GnuPG"
+!define INSTALL_DIR "Gpg4win"
 
 !define WELCOME_TITLE_STR "$(T_WelcomeTitleGpg4win)"
 
index 77ace90..86ec2d5 100644 (file)
@@ -181,15 +181,11 @@ no_quick_launch_uninstall:
   # hard to get rid of directories which could have REBOOTOK files.
   RMDir /REBOOTOK "$INSTDIR\bin"
   RMDir /REBOOTOK "$INSTDIR"
-  StrCmp "$INSTDIR" "$PROGRAMFILES\GNU\${INSTALL_DIR}" 0 +2
-  RMDir /REBOOTOK "$PROGRAMFILES\GNU"
 
   # Clean the registry.
-  DeleteRegValue HKLM "Software\GNU\${PRETTY_PACKAGE_SHORT}" \
+  DeleteRegValue HKLM "Software\${PRETTY_PACKAGE_SHORT}" \
         "Install Directory"
-  DeleteRegKey /ifempty HKLM "Software\GNU\${PRETTY_PACKAGE_SHORT}"
-  DeleteRegKey /ifempty HKLM "Software\GNU\GnuPG"
-  DeleteRegKey /ifempty HKLM "Software\GNU"
+  DeleteRegKey /ifempty HKLM "Software\${PRETTY_PACKAGE_SHORT}"
 
   # Remove Windows Add/Remove Programs support.
   DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRETTY_PACKAGE_SHORT}"
index b56acd6..b7ff0dd 100644 (file)
@@ -73,10 +73,10 @@ OutFile "${PACKAGE}-${VERSION}.exe"
 !ifndef INSTALL_DIR
 !define INSTALL_DIR "${PACKAGE}"
 !endif
-InstallDir "$PROGRAMFILES\GNU\${INSTALL_DIR}"
+InstallDir "$PROGRAMFILES\${INSTALL_DIR}"
 
 
-InstallDirRegKey HKLM "Software\GNU\${PRETTY_PACKAGE_SHORT}" \
+InstallDirRegKey HKLM "Software\${PRETTY_PACKAGE_SHORT}" \
        "Install Directory"
 
 
@@ -130,7 +130,7 @@ Var OtherGnuPGDetected
 # Remember the installer language
 
 !define MUI_LANGDLL_REGISTRY_ROOT "HKLM"
-!define MUI_LANGDLL_REGISTRY_KEY "Software\GNU\${PRETTY_PACKAGE_SHORT}"
+!define MUI_LANGDLL_REGISTRY_KEY "Software\${PRETTY_PACKAGE_SHORT}"
 !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
 
 # No Umlaute, please!
@@ -164,7 +164,7 @@ Var STARTMENU_FOLDER
 !define MUI_PAGE_CUSTOMFUNCTION_PRE CheckIfStartMenuWanted
 !define MUI_STARTMENUPAGE_NODISABLE
 !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
-!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\GNU\${PRETTY_PACKAGE_SHORT}"
+!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\${PRETTY_PACKAGE_SHORT}"
 !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
 
 !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
@@ -398,6 +398,8 @@ Function CheckExistingVersion
      MessageBox MB_YESNO "$(T_FoundExistingVersionB)" IDYES leave
      Abort
 
+ # TODO This is the normal update case. Handle more gracefully.
+ # Especially the install path change from 2.x to 3.x
  leave:
 FunctionEnd