From e27bc437fa99ed5d5a81021df792f4b19730e56c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Tue, 21 Jan 2025 05:34:26 +0100 Subject: [PATCH] geo URI Windows desktop integration --- pkg/windows/gpxsee64.nsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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"