]> git.street.me.uk Git - andy/viking.git/blobdiff - win32/installer/viking-installer.nsi
[WINDOWS] Enable optional install of GPSBabel 1.5.1
[andy/viking.git] / win32 / installer / viking-installer.nsi
index f6e01f0b5be87e739f2e0769a2081eddbd041a4a..9e01fce1975c8b881bf0ce2ab6676e2216ecac65 100644 (file)
@@ -10,7 +10,7 @@ Var name
 ;--------------------------------
 ;Configuration
 ;Needs to be 4 numbers:  W.X.Y.Z
-!define VIKING_VERSION  "1.3.2.1"
+!define VIKING_VERSION  "1.5.0.0"
 
 ;The name var is set in .onInit
 Name $name
@@ -28,6 +28,8 @@ SetDateSave on
 !include "Sections.nsh"
 !include "WinVer.nsh"
 !include "LogicLib.nsh"
+;; http://nsis.sourceforge.net/File_Association
+!include "FileAssociation.nsh"
 
 !include "FileFunc.nsh"
 !insertmacro GetParameters
@@ -279,16 +281,21 @@ SectionGroup /e $(VIKING_SHORTCUTS_SECTION_TITLE) SecShortcuts
   SectionEnd
 SectionGroupEnd
 
+;--------------------------------
+;File association
 
+Section $(VIKING_FILE_ASSOCIATION_SECTION_TITLE) SecFileAssociation
+  ${registerExtension} "$INSTDIR\viking.exe" ".vik" "Viking File"
+SectionEnd
 
-
-
-
-
-
-
-
-
+;--------------------------------
+; GPSBabel Install Section
+;
+Section $(VIKING_GPSBABEL_SECTION_TITLE) SecGPSBabel
+  File "bin\Optional\GPSBabel-1.5.1-Setup.exe"
+  ExecWait '"$INSTDIR\GPSBabel-1.5.1-Setup.exe" /SILENT'
+  Delete "$INSTDIR\GPSBabel-1.5.1-Setup.exe"
+SectionEnd
 
 ;--------------------------------
 ;Uninstaller Section
@@ -326,6 +333,9 @@ Section Uninstall
     ; Shortcuts..
     Delete "$DESKTOP\Viking.lnk"
 
+    ; File association
+    ${unregisterExtension} ".vik" "Viking File"
+
     Goto done
 
   cant_uninstall:
@@ -351,6 +361,10 @@ SectionEnd ; end of uninstall section
         $(VIKING_DESKTOP_SHORTCUT_DESC)
   !insertmacro MUI_DESCRIPTION_TEXT ${SecStartMenuShortcut} \
         $(VIKING_STARTMENU_SHORTCUT_DESC)
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecFileAssociation} \
+        $(VIKING_FILE_ASSOCIATION_DESC)
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecGPSBabel} \
+        $(VIKING_INSTALL_GPSBABEL_DESC)
 
 !insertmacro MUI_FUNCTION_DESCRIPTION_END