;--------------------------------
;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
!include "Sections.nsh"
!include "WinVer.nsh"
!include "LogicLib.nsh"
+;; http://nsis.sourceforge.net/File_Association
+!include "FileAssociation.nsh"
!include "FileFunc.nsh"
!insertmacro GetParameters
SectionEnd
SectionGroupEnd
+;--------------------------------
+;File association
-
-
-
-
-
-
-
-
+Section $(VIKING_FILE_ASSOCIATION_SECTION_TITLE) SecFileAssociation
+ ${registerExtension} "$INSTDIR\viking.exe" ".vik" "Viking File"
+SectionEnd
;--------------------------------
; Shortcuts..
Delete "$DESKTOP\Viking.lnk"
+ ; File association
+ ${unregisterExtension} ".vik" "Viking File"
+
Goto done
cant_uninstall:
$(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