From 32388821e2fedfdfbe080897697c5f6d16357321 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 27 Mar 2024 10:23:46 -0400 Subject: 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 --- Help/release/dev/rel-win-PATH.rst | 6 ++++++ Utilities/Release/WiX/WIX.template.in | 1 + Utilities/Release/WiX/options.wxs | 20 +++++++++++++++++++- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 Help/release/dev/rel-win-PATH.rst diff --git a/Help/release/dev/rel-win-PATH.rst b/Help/release/dev/rel-win-PATH.rst new file mode 100644 index 0000000..f6f70b9 --- /dev/null +++ b/Help/release/dev/rel-win-PATH.rst @@ -0,0 +1,6 @@ +rel-win-PATH +------------ + +* The precompiled Windows ``.msi`` installers provided on + `cmake.org `_, when replacing an existing + installation, now preserve the ``PATH`` modification preference by default. diff --git a/Utilities/Release/WiX/WIX.template.in b/Utilities/Release/WiX/WIX.template.in index f48f782..fb8fa59 100644 --- a/Utilities/Release/WiX/WIX.template.in +++ b/Utilities/Release/WiX/WIX.template.in @@ -46,6 +46,7 @@ + diff --git a/Utilities/Release/WiX/options.wxs b/Utilities/Release/WiX/options.wxs index 2c76bb7..c274d85 100644 --- a/Utilities/Release/WiX/options.wxs +++ b/Utilities/Release/WiX/options.wxs @@ -6,13 +6,31 @@ + + + + + + + _CMAKE_IN_PATH_REG = "#0" + _CMAKE_IN_PATH_REG = "#1" + - ADD_CMAKE_TO_PATH = "0" + 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 + + + + + + + + -- cgit v0.12 From 2e5330591d0df3142ada56c39b5fa15817fb9c0c Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 27 Mar 2024 10:55:09 -0400 Subject: 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 --- Help/release/dev/rel-win-PATH.rst | 6 ++++-- Utilities/Release/WiX/options.wxs | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Help/release/dev/rel-win-PATH.rst b/Help/release/dev/rel-win-PATH.rst index f6f70b9..f4a7360 100644 --- a/Help/release/dev/rel-win-PATH.rst +++ b/Help/release/dev/rel-win-PATH.rst @@ -2,5 +2,7 @@ rel-win-PATH ------------ * The precompiled Windows ``.msi`` installers provided on - `cmake.org `_, when replacing an existing - installation, now preserve the ``PATH`` modification preference by default. + `cmake.org `_, when performing a fresh + installation, now modify the system-wide ``PATH`` by default. + When replacing an existing installation, the ``PATH`` modification + preference is preserved by default. diff --git a/Utilities/Release/WiX/options.wxs b/Utilities/Release/WiX/options.wxs index c274d85..0fd3527 100644 --- a/Utilities/Release/WiX/options.wxs +++ b/Utilities/Release/WiX/options.wxs @@ -4,7 +4,7 @@ - + -- cgit v0.12