2005-10-20 Marcus Brinkmann <marcus@g10code.de>
authorMarcus Brinkmann <mb@g10code.com>
Thu, 20 Oct 2005 16:38:10 +0000 (16:38 +0000)
committerMarcus Brinkmann <mb@g10code.com>
Thu, 20 Oct 2005 16:38:10 +0000 (16:38 +0000)
* src/gpg4win.nsi: Add start menu support.
* src/inst-sections.nsi: Likewise.
* src/installer.nsi: Likewise.
* src/installer-finish.nsi: Likewise.

ChangeLog
src/gpg4win.nsi
src/inst-sections.nsi
src/installer-finish.nsi
src/installer.nsi

index 97db383..7610334 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2005-10-20  Marcus Brinkmann  <marcus@g10code.de>
 
+       * src/gpg4win.nsi: Add start menu support.
+       * src/inst-sections.nsi: Likewise.
+       * src/installer.nsi: Likewise.
+       * src/installer-finish.nsi: Likewise.
+
        * src/gpg4win.mk.in (GETVAR): Don't quote the first $.
        (STRIP_macro): New macro.
        (SPKG, BPKG): Use it here.
index 9e4f4ab..2d7f00e 100644 (file)
@@ -18,6 +18,7 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
 
 !include "../include/config.nsi"
+!define HAVE_PKG_GPA 1
 
 # The package name and version.  PRETTY_PACKAGE is a user visible name
 # only while PACKAGE is useful for filenames etc.  PROD_VERSION is the
@@ -69,6 +70,7 @@
 
 
 # Now include the generic parts.
+!define HAVE_STARTMENU
 !include "installer.nsi"
 
 
index a1d2bd1..98f03ec 100644 (file)
@@ -141,3 +141,19 @@ FunctionEnd
   !insertmacro MUI_DESCRIPTION_TEXT ${SEC_gnupg} $(DESC_SEC_gnupg)
 !insertmacro MUI_FUNCTION_DESCRIPTION_END
 
+
+# This also must be in a central place.  Also Urgs.
+
+Section "-startmenu"
+!ifdef HAVE_STARTMENU
+!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+    CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
+!ifdef HAVE_PKG_GPA
+    CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\GPA.lnk" \
+       "$INSTDIR\gpa.exe"
+!endif
+    CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" \
+       "$INSTDIR\${PACKAGE}-uninstall.exe"
+!insertmacro MUI_STARTMENU_WRITE_END
+!endif
+SectionEnd
index ce27058..a4470b4 100644 (file)
@@ -37,6 +37,15 @@ SectionEnd
 
 
 Section Uninstall
+!ifdef HAVE_STARTMENU
+!insertmacro MUI_STARTMENU_GETFOLDER ${STARTMENU_FOLDER} $R0
+!ifdef HAVE_PKG_GPA
+  Delete "$SMPROGRAMS\$R0\GPA.lnk"
+!endif
+  Delete "$SMPROGRAMS\$R0\Uninstall.lnk"
+  RMDir "$SMPROGRAMS\$R0"
+!endif
+
   Delete "$INSTDIR\${PACKAGE}-uninstall.exe"
   RMDir "$INSTDIR"
 
index 0b25bf5..2b28a0d 100644 (file)
@@ -112,6 +112,15 @@ VIAddVersionKey "FileVersion" "${PROD_VERSION}"
 !define MUI_PAGE_CUSTOMFUNCTION_SHOW PrintNonAdminWarning
 !insertmacro MUI_PAGE_COMPONENTS
 
+!ifdef HAVE_STARTMENU
+Var STARTMENU_FOLDER
+!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
+!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\GNU\${PRETTY_PACKAGE_SHORT}"
+!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
+
+!insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
+!endif
+
 !insertmacro MUI_PAGE_INSTFILES
 
 !insertmacro MUI_PAGE_FINISH