diff --git a/pkg/windows/gpxsee64.nsi b/pkg/windows/gpxsee64.nsi index 3e743e22..99591ef5 100644 --- a/pkg/windows/gpxsee64.nsi +++ b/pkg/windows/gpxsee64.nsi @@ -18,6 +18,18 @@ DeleteRegKey HKCR ".${EXT}" !macroend +; URI association +!macro URI_ASSOCIATION_ADD PROTO DESC + WriteRegStr HKCR "${PROTO}" "" "${DESC}" + WriteRegStr HKCR "${PROTO}" "URL Protocol" "" + WriteRegStr HKCR "${PROTO}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,0" + WriteRegStr HKCR "${PROTO}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\"" +!macroend + +!macro URI_ASSOCIATION_REMOVE PROTO + DeleteRegKey HKCR "${PROTO}" +!macroend + ; Translations !macro LOCALIZATION LANG CODE Section "${LANG}" @@ -200,6 +212,8 @@ Section "GPXSee" SEC_APP !insertmacro FILE_ASSOCIATION_ADD "plt" "OziExplorer Track File" 33 !insertmacro FILE_ASSOCIATION_ADD "rte" "OziExplorer Route File" 34 + !insertmacro URI_ASSOCIATION_ADD "geo" "geo URI" + WriteRegStr HKCR "Applications\GPXSee.exe\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\"" WriteRegStr HKCR ".gpx\OpenWithList" "GPXSee.exe" "" WriteRegStr HKCR ".tcx\OpenWithList" "GPXSee.exe" "" @@ -426,6 +440,8 @@ Section "Uninstall" !insertmacro FILE_ASSOCIATION_REMOVE "000" !insertmacro FILE_ASSOCIATION_REMOVE "031" + !insertmacro URI_ASSOCIATION_REMOVE "geo" + DeleteRegValue HKCR ".gpx\OpenWithList" "GPXSee.exe" DeleteRegValue HKCR ".tcx\OpenWithList" "GPXSee.exe" DeleteRegValue HKCR ".kml\OpenWithList" "GPXSee.exe"