From 2faf4dfcb415f0803793582698618e9fd624f8fb Mon Sep 17 00:00:00 2001 From: Jan Winkler Date: Mon, 8 Mar 2021 18:39:02 +0100 Subject: [PATCH 1/2] Windows MSI installer: Added entry in App Paths registry key Installer creates a key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\inkscape.exe with "default value" entry for path to inkscape.exe and "path" entry for path to directory into which inkscape.exe is installed. Relates to issue inkscape/inkscape#2255 --- CMakeScripts/ConfigCPack.cmake | 2 +- packaging/wix/{file_association.xml => app_registration.xml} | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) rename packaging/wix/{file_association.xml => app_registration.xml} (69%) diff --git a/CMakeScripts/ConfigCPack.cmake b/CMakeScripts/ConfigCPack.cmake index b0f773129b..b755014561 100644 --- a/CMakeScripts/ConfigCPack.cmake +++ b/CMakeScripts/ConfigCPack.cmake @@ -92,7 +92,7 @@ set(CPACK_WIX_PROPERTY_ARPURLUPDATEINFO "${CPACK_PACKAGE_HOMEPAGE_URL}/release") set(CPACK_WIX_ROOT_FEATURE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}") set(CPACK_WIX_LIGHT_EXTRA_FLAGS "-dcl:high") # set high compression -set(CPACK_WIX_PATCH_FILE "${CMAKE_SOURCE_DIR}/packaging/wix/file_association.xml" +set(CPACK_WIX_PATCH_FILE "${CMAKE_SOURCE_DIR}/packaging/wix/app_registration.xml" "${CMAKE_SOURCE_DIR}/packaging/wix/feature_attributes.xml") # DEB (Linux .deb bundle) diff --git a/packaging/wix/file_association.xml b/packaging/wix/app_registration.xml similarity index 69% rename from packaging/wix/file_association.xml rename to packaging/wix/app_registration.xml index b3a95656cd..0ab87aed3a 100644 --- a/packaging/wix/file_association.xml +++ b/packaging/wix/app_registration.xml @@ -10,5 +10,9 @@ + + + + -- GitLab From 748a5b329d444a4f88e7bddb71bb3a0b9dc75a76 Mon Sep 17 00:00:00 2001 From: Jan Winkler Date: Mon, 8 Mar 2021 19:02:21 +0100 Subject: [PATCH 2/2] Windows NSIS installer: Added entry in App Paths registry key Installer creates a key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\inkscape.exe with "default value" entry for path to inkscape.exe and "path" entry for path to directory into which inkscape.exe is installed (Issue #2255). --- CMakeScripts/ConfigCPack.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeScripts/ConfigCPack.cmake b/CMakeScripts/ConfigCPack.cmake index b755014561..5e7ac72d1c 100644 --- a/CMakeScripts/ConfigCPack.cmake +++ b/CMakeScripts/ConfigCPack.cmake @@ -73,10 +73,13 @@ file(TO_NATIVE_PATH "${CMAKE_SOURCE_DIR}/packaging/nsis/fileassoc.nsh" native_pa string(REPLACE "\\" "\\\\" native_path "${native_path}") set(CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS "!include ${native_path}") set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "\ + WriteRegStr SHCTX 'SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\App Paths\\\\inkscape.exe' '' '$INSTDIR\\\\bin\\\\inkscape.exe'\n\ + WriteRegStr SHCTX 'SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\App Paths\\\\inkscape.exe' 'Path' '$INSTDIR\\\\bin'\n\ !insertmacro APP_ASSOCIATE 'svg' 'Inkscape.SVG' 'Scalable Vector Graphics' '$INSTDIR\\\\bin\\\\inkscape.exe,0' 'Open with Inkscape' '$INSTDIR\\\\bin\\\\inkscape.exe \\\"%1\\\"'\n\ !insertmacro APP_ASSOCIATE 'svgz' 'Inkscape.SVGZ' 'Compressed Scalable Vector Graphics' '$INSTDIR\\\\bin\\\\inkscape.exe,0' 'Open with Inkscape' '$INSTDIR\\\\bin\\\\inkscape.exe \\\"%1\\\"'\n\ !insertmacro UPDATEFILEASSOC") set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "\ + DeleteRegKey SHCTX 'SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\App Paths\\\\inkscape.exe'\n\ !insertmacro APP_UNASSOCIATE 'svg' 'Inkscape.SVG'\n\ !insertmacro APP_UNASSOCIATE 'svgz' 'Inkscape.SVGZ'\n\ !insertmacro UPDATEFILEASSOC") -- GitLab