Commit Graph

23 Commits

Author SHA1 Message Date
Alex Turbov
78e45c2db6 Style: Replace TABs with spaces for indentation in some files
Mark files that must use TABs to indent in the `.gitattributes`.
Use space instead of TABs in sources and some data/test files.
2025-01-12 18:49:25 +04:00
Brad King
f6c2f64d04 Utilities/Release: Update MSI generation to use WIX 4 2024-06-10 11:22:15 -04:00
Brad King
2e5330591d Utilities/Release/WiX: Modify PATH by default when installing on Windows
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
2024-03-29 09:32:27 -04:00
Brad King
32388821e2 Utilities/Release/WiX: Save PATH modification preference persistently
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
2024-03-29 09:32:27 -04:00
Brad King
7bd68cf381 Utilities/Release/WiX: Convert PATH modification preference to checkbox
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
2024-03-28 16:20:04 -04:00
Brad King
d320c76257 Utilities/Release/WiX: Clarify UI options dialog name 2024-03-28 15:19:18 -04:00
Brad King
cde0b7c131 Utilities/Release/WiX: Clarify UI dialog order 2024-03-28 15:19:18 -04:00
Brad King
48d2a7ac62 Utilities/Release/WiX: Backport UI dialog condition fix from WiX 3.11
See WiX issue 4737 and wix3 PR 284.
2024-03-28 15:19:17 -04:00
Brad King
36ae046ed1 Utilities/Release/WiX: Simplify desktop shortcut condition 2024-03-28 15:19:17 -04:00
Brad King
9e831a6211 Utilities/Release/WiX: Simplify specification of CMake registry value 2024-03-28 15:19:17 -04:00
Brad King
68e9454abe Utilities/Release/WiX: Require Windows Installer 5.0
This version comes with Windows 7, the oldest our binaries support.
2024-03-28 15:19:17 -04:00
Brad King
beecda4ddd Utilities/Release: Replace tabs with spaces in WiX input files 2024-03-11 11:59:17 -04:00
Brad King
3ed275bbb6 CPack/WiX: Fix installer status text
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
2024-01-24 15:28:13 -05:00
Dubach, Joev
9dbcfb8fdd MSVC: Recognize -XYZ as well as /XYZ when parsing MS tool command lines
Fixes: #23772
2022-07-27 16:51:15 -04:00
Kitware Robot
ed98209ddc Revise include order using clang-format-6.0
Run the `clang-format.bash` script to update our C and C++ code to a new
include order `.clang-format`.  Use `clang-format` version 6.0.
2019-10-01 12:26:36 -04:00
Alexej Harm
a3cfb66543 Add compatibility with the cl.exe /permissive- compiler option 2019-09-11 15:26:20 +02:00
Brad King
ed54d87789 Configure CMake itself with policies through CMake 3.15
In particular, set `CMP0091` to `NEW` to enable the MSVC runtime library
abstraction so it can be set via `CMAKE_MSVC_RUNTIME_LIBRARY` in the
cache.
2019-08-23 10:55:58 -04:00
Nils Gladitz
7593bdf4e8 CMake: Fix WiX installer downgrades with versioned binaries
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
2019-03-12 09:39:35 -04:00
Nils Gladitz
1b91e010bc Utilities/Release: Store WiX CMake install location in Windows registry 2016-12-05 16:05:19 +01:00
Kitware Robot
d9fd2f5402 Revise C++ coding style using clang-format
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.
2016-05-16 16:05:19 -04:00
Brad King
0e7bca923e Utilities/Release: Stabilize include order in WiX custom action
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.
2016-04-29 10:56:59 -04:00
Nils Gladitz
a12b0f1b19 CMake: Prevent WiX installations over existing NSIS installations
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.
2016-02-09 10:28:57 -05:00
Nils Gladitz
24cdb9df59 CMake: Mimic NSIS options dialog in WiX installer 2015-12-17 15:57:30 +01:00