Windows: Record CMake installation in a stable registry value
Currently it is incredibly difficult to automatically detect that cmake is installed using the windows registry due to the fact that the installer has changed once already, and the path used in-registry for cmake has varied. This suggestion is to simply add a couple of registry keys to make it extremely easy to find out if CMake is installed on a system. This is meant to be used by scripts on windows to find CMake and then run the program. To my knowledge WiX supports writing registry Keys during Install.
For this bug to be resolved, the Installer needs to place the registry keys in the path defined by the CMake Package Registry tutorial. This means the following is supposed to happen.
-
Windows (System Install) needs to specify a key under the registry path
HKEY_LOCAL_MACHINE\Software\Kitware\CMake\
. A good key for this would be to have the key name beInstallLocation
and the value of this key specify where CMake is installed. Most of the time this will be the default valueC:\Program Files (x86)\CMake\
, however if the user changed the location during Install, the value of this key is where the program was installed. -
Windows ( User/Portable Install ) - This is the same as the the Windows System Install, but instead the key is located under the registry path
HKEY_LOCAL_MACHINE\Software\Kitware\CMake\
. -
Non-Windows (System Install) - This does not need to be addressed since most installs outside of windows makes it easy to find cmake since the install location is under the system paths by default.
-
Non-Windows (User/Portable Install) - This is also not an issue since users outside of windows will rarely use this option.