Sfoglia il codice sorgente

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
Brad King 1 anno fa
parent
commit
2e5330591d
2 ha cambiato i file con 5 aggiunte e 3 eliminazioni
  1. 4 2
      Help/release/dev/rel-win-PATH.rst
  2. 1 1
      Utilities/Release/WiX/options.wxs

+ 4 - 2
Help/release/dev/rel-win-PATH.rst

@@ -2,5 +2,7 @@ rel-win-PATH
 ------------
 
 * The precompiled Windows ``.msi`` installers provided on
-  `cmake.org <https://cmake.org/download/>`_, when replacing an existing
-  installation, now preserve the ``PATH`` modification preference by default.
+  `cmake.org <https://cmake.org/download/>`_, 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.

+ 1 - 1
Utilities/Release/WiX/options.wxs

@@ -4,7 +4,7 @@
         <Property Id="CMAKE_IN_PATH" Value="Init" />
 
         <!-- Always initialize the checkbox value so it cannot be directly overridden from the command line.  -->
-        <SetProperty Action="Set_CMAKE_IN_PATH_Init"       Id="CMAKE_IN_PATH" After="AppSearch"                    Sequence="first" Value="{}" />
+        <SetProperty Action="Set_CMAKE_IN_PATH_Init"       Id="CMAKE_IN_PATH" After="AppSearch"                    Sequence="first" Value="1" />
 
         <!-- Read the "CMAKE_IN_PATH" checkbox value from the registry, if it was stored previously.
              Properties using RegistrySearch cannot be private, so use a private-looking public name. -->