If the PATH modification choice has not been saved persistently by an
existing installation of CMake, default to modifying the system PATH
environment variable to make our command-line tools available for all
users. This is a common expectation.
Fixes: #21465
Our Windows installer provides an interactive dialog to choose whether
the PATH should be modified. It may also be specified on the `msiexec`
command-line as an `ADD_CMAKE_TO_PATH={0,1}` property. Save the choice
persistently in the Windows Registry and use the same choice by default
in future installations.
Issue: #21465
Add explicit support for passing a `ADD_CMAKE_TO_PATH={0,1}` property to
`msiexec` command-line installations to control the checkbox. Also
preserve compatibility with the old `ADD_CMAKE_TO_PATH={None,System}`
property, which previously controlled the radio button group, by mapping
the values to the checkbox.
Remove the "Add CMake to the system PATH for the current user" option.
It actually added CMake to the installing user's PATH, not the system
PATH, even though CMake is installed to a system location.
Also revise the wording of the desktop shortcut checkbox to match
the style of the PATH checkbox wording.
Issue: #21465
Previously, installers displayed extra text on some Windows versions:
File: [1], Directory: [9], Size [6]
Add an option to our WiX templates to suppress that.
Fixes: #25634
Since commit 5b9da05b7a (Windows: Embed version information into CMake
binaries, 2017-10-25, v3.11.0-rc1~411^2) our binaries have version
information that prevents a `.msi` downgrade from replacing them by
default. Configure the re-install mode:
* a: reinstall all files regardless of version
* m: rewrite all per-machine registry entries
* u: rewrite all per-user registry entries
* s: reinstall shortcuts and icons
Fixes: #19006
Run the `Utilities/Scripts/clang-format.bash` script to update
all our C++ code to a new style defined by `.clang-format`.
Use `clang-format` version 3.8.
* If you reached this commit for a line in `git blame`, re-run the blame
operation starting at the parent of this commit to see older history
for the content.
* See the parent commit for instructions to rebase a change across this
style transition commit.
In `detect_nsis_overwrite.cpp` we include windows.h first, and we must
preserve that. Place the include in an isolated block so that tools
that sort includes do not move it.
Use a custom action to look for Uninstall.exe in the user
selected installation prefix.
Its presence indicates a previous NSIS installation.
Inform the user and request manual resolution of the issue.