]> git.street.me.uk Git - andy/viking.git/blobdiff - win32/installer/viking-installer.nsi
[WINDOWS] Toolbar default to be similar to previous non optional setting.
[andy/viking.git] / win32 / installer / viking-installer.nsi
index cfb2d91d91e66a873a6bdd40a7f02774f7416be5..a3fe94d0d1a2b1f6a2d6f35ca6e114e7d67d0e7b 100644 (file)
@@ -10,7 +10,7 @@ Var name
 ;--------------------------------
 ;Configuration
 ;Needs to be 4 numbers:  W.X.Y.Z
-!define VIKING_VERSION  "1.4.0.0"
+!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,15 +281,12 @@ 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
 
 
 ;--------------------------------
@@ -326,6 +325,9 @@ Section Uninstall
     ; Shortcuts..
     Delete "$DESKTOP\Viking.lnk"
 
+    ; File association
+    ${unregisterExtension} ".vik" "Viking File"
+
     Goto done
 
   cant_uninstall:
@@ -351,6 +353,8 @@ 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_FUNCTION_DESCRIPTION_END