Skip to content

Commit 74e233e

Browse files
committed
Merge topic 'backport-3.29-cpack-wix-scope-default' into release-3.29
0167089 CPack/WiX: Restore default (missing) InstallScope from 3.28 and lower Acked-by: Kitware Robot <[email protected]> Merge-request: !9586
2 parents 20d1f96 + 0167089 commit 74e233e

File tree

3 files changed

+32
-9
lines changed

3 files changed

+32
-9
lines changed

Help/cpack_gen/wix.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ Windows using WiX.
346346
This variable can be optionally set to specify the ``InstallScope``
347347
of the installer:
348348

349-
``perMachine`` (default)
349+
``perMachine``
350350
Create an installer that installs for all users and requires
351351
administrative privileges. Start menu entries created by the
352352
installer are visible to all users.
@@ -357,6 +357,8 @@ Windows using WiX.
357357
``NONE``
358358
Create an installer without any ``InstallScope`` attribute.
359359

360+
This is the default to preserve compatibility with CPack 3.28 and older.
361+
360362
.. deprecated:: 3.29
361363

362364
This value is only for compatibility with the inconsistent behavior used
@@ -365,4 +367,13 @@ Windows using WiX.
365367
but the start menu entry and uninstaller registration are created only
366368
for the current user.
367369

370+
.. warning::
371+
372+
An installation performed by an installer created without any
373+
``InstallScope`` cannot be cleanly updated or replaced by an
374+
installer with an ``InstallScope``. In order to transition
375+
a project's installers from ``NONE`` to ``perMachine``, the
376+
latter installer should be distributed with instructions to
377+
first manually uninstall any older version.
378+
368379
See https://wixtoolset.org/docs/v3/xsd/wix/package/

Help/release/3.29.rst

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -193,13 +193,6 @@ Other Changes
193193
* The :variable:`CPACK_PRODUCTBUILD_DOMAINS` variable now defaults to true.
194194
See policy :policy:`CMP0161`.
195195

196-
* The :cpack_gen:`CPack WIX Generator` now produces WiX MSI installers
197-
that create start menu and uninstall entries for all users by default,
198-
as documented by the :variable:`CPACK_WIX_INSTALL_SCOPE` variable
199-
``perMachine`` value. Previously, without a custom WiX template,
200-
it produced installers that would only create start menu and uninstall
201-
entries for the current user, even though they install for all users.
202-
203196
Updates
204197
=======
205198

@@ -218,3 +211,22 @@ Changes made since CMake 3.29.0 include the following.
218211
* These versions made no changes to documented features or interfaces.
219212
Some implementation updates were made to support ecosystem changes
220213
and/or fix regressions.
214+
215+
3.29.5
216+
------
217+
218+
* The :cpack_gen:`CPack WIX Generator`'s :variable:`CPACK_WIX_INSTALL_SCOPE`
219+
variable, new in 3.29, now defaults to ``NONE``. This restores
220+
compatibility with behavior of 3.28 and below: without a custom WiX
221+
template, it produces installers that only create start menu and
222+
uninstall entries for the current user, even though they install
223+
for all users.
224+
225+
In 3.29.0 through 3.29.4, ``CPACK_WIX_INSTALL_SCOPE`` defaulted to
226+
``perMachine``. This created MSI installers that create start menu
227+
and uninstall entries for all users by default. While this behavior
228+
is better on its own, these installers do not cleanly replace existing
229+
installations created with MSI installers produced by 3.28 and below.
230+
3.29.5 reverts the default for compatibility. Projects may transition
231+
to ``perMachine`` on their own schedule by setting
232+
``CPACK_WIX_INSTALL_SCOPE``.

Modules/Internal/CPack/CPackWIX.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ if(NOT CPACK_WIX_LIGHT_EXECUTABLE)
2020
endif()
2121

2222
if(NOT DEFINED CPACK_WIX_INSTALL_SCOPE)
23-
set(CPACK_WIX_INSTALL_SCOPE "perMachine")
23+
set(CPACK_WIX_INSTALL_SCOPE "NONE")
2424
endif()

0 commit comments

Comments
 (0)