Windows installer - Add entry in App Paths registry key
This patch ensures that both Windows installers (exe, msi) create a registry key under
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.
I successfully tested it as follows:
-
Built 64- and 32-bit versions of Inkscape from upstream/master (before commit 25827d27)
-
For both architectures I built the exe and msi installer
-
Installed Inkscape using each of the installers in the default installation location as well as in a user defined location
-
Checked for the existance of the keys from a command prompt
reg query "HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\inkscape.exe"which results for example in
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\inkscape.exe (Standard) REG_SZ C:\Program Files (x86)\Inkscape\bin\inkscape.exe Path REG_SZ C:\Program Files (x86)\Inkscape\bin\ -
Uninstalled Inkscape and cheched if the keys are removed
So I think this is ok now. Two things remain open:
-
For the msi installer the instructions for writing in the registry is in the file
packaging/wix/file_association.xml. It cannot be placed into a separate file since CPack does not allow to inject code into the same component from different fragment files. I recommend to rename the file, e.g.app_registration.xmlWhat do you think @ede123? -
I am not very happy to have separate entries for the installers (exe installer:
ConfigCPack.cmake, msi installer:file_association.xml). So I think it is really worth to get this directly into CPack. Since this will take a lot of time I recommend to keep this workaround until we might have a more elegant CPack-solution.
Resolves #2255 (closed)
