X-Git-Url: https://git.street.me.uk/andy/viking.git/blobdiff_plain/e70384e0e7d440b201ed59a6e614594e4b70a66c..f570ee2bc0dac52b9bba9a193b7ba48e64f797ed:/win32/installer/viking-installer.nsi?ds=sidebyside diff --git a/win32/installer/viking-installer.nsi b/win32/installer/viking-installer.nsi index 5ad814cb..9e01fce1 100644 --- a/win32/installer/viking-installer.nsi +++ b/win32/installer/viking-installer.nsi @@ -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 @@ -48,8 +50,6 @@ SetDateSave on !define HKLM_APP_PATHS_KEY "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\viking.exe" !define VIKING_UNINST_EXE "viking-uninst.exe" -!define DOWNLOADER_URL "http://downloads.sourceforge.net/viking/" - ;-------------------------------- ;Version resource VIProductVersion "${VIKING_VERSION}" @@ -113,6 +113,7 @@ VIAddVersionKey "FileDescription" "Viking Installer" !insertmacro MUI_LANGUAGE "English" !insertmacro MUI_LANGUAGE "French" + !insertmacro MUI_LANGUAGE "Spanish" ;-------------------------------- ;Translations @@ -280,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 @@ -321,55 +327,15 @@ Section Uninstall cont_uninstall: - RMDir /r "$INSTDIR\etc" - RMDir /r "$INSTDIR\lib" - RMDir /r "$INSTDIR\locale" - RMDir /r "$INSTDIR\share" - Delete "$INSTDIR\AUTHORS.txt" - Delete "$INSTDIR\Changelog.txt" - Delete "$INSTDIR\COPYING_curl.txt" - Delete "$INSTDIR\COPYING_GPL.txt" - Delete "$INSTDIR\freetype6.dll" - Delete "$INSTDIR\gpsbabel.exe" - Delete "$INSTDIR\intl.dll" - Delete "$INSTDIR\libatk-1.0-0.dll" - Delete "$INSTDIR\libcairo-2.dll" - Delete "$INSTDIR\libcurl.dll" - Delete "$INSTDIR\libexif-12.dll" - Delete "$INSTDIR\libexpat.dll" - Delete "$INSTDIR\libexpat-1.dll" - Delete "$INSTDIR\libfontconfig-1.dll" - Delete "$INSTDIR\libgailutil-18.dll" - Delete "$INSTDIR\libgdk_pixbuf-2.0-0.dll" - Delete "$INSTDIR\libgdk-win32-2.0-0.dll" - Delete "$INSTDIR\libgio-2.0-0.dll" - Delete "$INSTDIR\libglib-2.0-0.dll" - Delete "$INSTDIR\libgmodule-2.0-0.dll" - Delete "$INSTDIR\libgobject-2.0-0.dll" - Delete "$INSTDIR\libgthread-2.0-0.dll" - Delete "$INSTDIR\libgtk-win32-2.0-0.dll" - Delete "$INSTDIR\libjpeg-7.dll" - Delete "$INSTDIR\libpango-1.0-0.dll" - Delete "$INSTDIR\libpangocairo-1.0-0.dll" - Delete "$INSTDIR\libpangoft2-1.0-0.dll" - Delete "$INSTDIR\libpangowin32-1.0-0.dll" - Delete "$INSTDIR\libpng12-0.dll" - Delete "$INSTDIR\libtiff-3.dll" - Delete "$INSTDIR\libtiffxx-3.dll" - Delete "$INSTDIR\NEWS.txt" - Delete "$INSTDIR\README.txt" - Delete "$INSTDIR\viking.exe" - Delete "$INSTDIR\viking.pdf" - Delete "$INSTDIR\zlib1.dll" - Delete "$INSTDIR\${VIKING_UNINST_EXE}" - Delete "$INSTDIR\install.log" - - ;Try to remove Viking install dir (only if empty) - RMDir "$INSTDIR" + ;Simply wipe the Viking install dir + RMDir /r "$INSTDIR" ; Shortcuts.. Delete "$DESKTOP\Viking.lnk" + ; File association + ${unregisterExtension} ".vik" "Viking File" + Goto done cant_uninstall: @@ -395,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