From 7bd68cf381470642266595392b0dda5eef5ca55d Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 27 Mar 2024 10:13:41 -0400 Subject: 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 --- CMakeCPackOptions.cmake.in | 1 + Utilities/Release/WiX/options.wxs | 18 ++++++++++++++++++ Utilities/Release/WiX/options_dlg.wxs | 14 +++----------- Utilities/Release/WiX/patch_path_env.xml | 11 +++++------ 4 files changed, 27 insertions(+), 17 deletions(-) create mode 100644 Utilities/Release/WiX/options.wxs diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in index e8583b0..cbe73e7 100644 --- a/CMakeCPackOptions.cmake.in +++ b/CMakeCPackOptions.cmake.in @@ -265,6 +265,7 @@ if("${CPACK_GENERATOR}" STREQUAL "WIX") set(CPACK_WIX_EXTRA_SOURCES "@CMake_SOURCE_DIR@/Utilities/Release/WiX/install_dir.wxs" + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/options.wxs" "@CMake_SOURCE_DIR@/Utilities/Release/WiX/options_dlg.wxs" ) diff --git a/Utilities/Release/WiX/options.wxs b/Utilities/Release/WiX/options.wxs new file mode 100644 index 0000000..2c76bb7 --- /dev/null +++ b/Utilities/Release/WiX/options.wxs @@ -0,0 +1,18 @@ + + + + + + + + + + ADD_CMAKE_TO_PATH = "0" + ADD_CMAKE_TO_PATH = "1" + + ADD_CMAKE_TO_PATH = "None" + ADD_CMAKE_TO_PATH = "System" AND ALLUSERS + + ADD_CMAKE_TO_PATH = "User" AND NOT ALLUSERS + + diff --git a/Utilities/Release/WiX/options_dlg.wxs b/Utilities/Release/WiX/options_dlg.wxs index c8f5a7b..4d27d00 100644 --- a/Utilities/Release/WiX/options_dlg.wxs +++ b/Utilities/Release/WiX/options_dlg.wxs @@ -1,7 +1,7 @@ - + @@ -17,18 +17,10 @@ - - - - - - - - - + - + diff --git a/Utilities/Release/WiX/patch_path_env.xml b/Utilities/Release/WiX/patch_path_env.xml index 0e335c4..ba4316d 100644 --- a/Utilities/Release/WiX/patch_path_env.xml +++ b/Utilities/Release/WiX/patch_path_env.xml @@ -1,18 +1,17 @@ + - - ADD_CMAKE_TO_PATH = "System" - + CMAKE_IN_PATH AND ALLUSERS + + - - ADD_CMAKE_TO_PATH = "User" - + CMAKE_IN_PATH AND NOT ALLUSERS -- cgit v0.12