]> git.street.me.uk Git - andy/viking.git/blobdiff - win32/installer/viking-installer.nsi
[WINDOWS] .vik file registration is automatic, .gpx is optional
[andy/viking.git] / win32 / installer / viking-installer.nsi
index d82fe99850a7247e65708e5b67a07a652e166109..80303808027827197e5fdea34edd164fbe723a32 100644 (file)
@@ -10,7 +10,7 @@ Var name
 ;--------------------------------
 ;Configuration
 ;Needs to be 4 numbers:  W.X.Y.Z
 ;--------------------------------
 ;Configuration
 ;Needs to be 4 numbers:  W.X.Y.Z
-!define VIKING_VERSION  "1.4.1.0"
+!define VIKING_VERSION  "1.5.0.0"
 
 ;The name var is set in .onInit
 Name $name
 
 ;The name var is set in .onInit
 Name $name
@@ -257,6 +257,8 @@ Section $(VIKING_SECTION_TITLE) SecViking
     WriteUninstaller "$INSTDIR\${VIKING_UNINST_EXE}"
     SetOverwrite off
 
     WriteUninstaller "$INSTDIR\${VIKING_UNINST_EXE}"
     SetOverwrite off
 
+    ; Always associate Viking file type
+    ${registerExtension} "$INSTDIR\viking.exe" ".vik" "Viking File"
   done:
 SectionEnd ; end of default Viking section
 
   done:
 SectionEnd ; end of default Viking section
 
@@ -285,9 +287,17 @@ SectionGroupEnd
 ;File association
 
 Section $(VIKING_FILE_ASSOCIATION_SECTION_TITLE) SecFileAssociation
 ;File association
 
 Section $(VIKING_FILE_ASSOCIATION_SECTION_TITLE) SecFileAssociation
-  ${registerExtension} "$INSTDIR\viking.exe" ".vik" "Viking File"
+  ${registerExtension} "$INSTDIR\viking.exe" ".gpx" "GPX File"
 SectionEnd
 
 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
 
 ;--------------------------------
 ;Uninstaller Section
@@ -327,6 +337,7 @@ Section Uninstall
 
     ; File association
     ${unregisterExtension} ".vik" "Viking File"
 
     ; File association
     ${unregisterExtension} ".vik" "Viking File"
+    ${unregisterExtension} ".gpx" "GPX File"
 
     Goto done
 
 
     Goto done
 
@@ -355,6 +366,8 @@ SectionEnd ; end of uninstall section
         $(VIKING_STARTMENU_SHORTCUT_DESC)
   !insertmacro MUI_DESCRIPTION_TEXT ${SecFileAssociation} \
         $(VIKING_FILE_ASSOCIATION_DESC)
         $(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
 
 
 !insertmacro MUI_FUNCTION_DESCRIPTION_END