From a18652ed619b4c94c74080b637f446503e2bc605 Mon Sep 17 00:00:00 2001
From: Luis Calle <53507599+TheLeoP@users.noreply.github.com>
Date: Thu, 30 May 2024 23:45:30 -0500
Subject: fix(win-msi): add bin to PATH per-machine after installation (#29099)
#22856 made it possible for the msi installer to perform per-user
installations, which caused problems for users that already had
per-machine installations trying to update (the Windows Installer does
not support major upgrades across installation context, see #22933 and
https://stackoverflow.com/a/15498911). It was then reverted in #22949,
but the scope of the modification to the PATH environment variable was
not reverted.
---
cmake.packaging/WixPatch.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'cmake.packaging')
diff --git a/cmake.packaging/WixPatch.xml b/cmake.packaging/WixPatch.xml
index 1196f4f335..89c47753ce 100644
--- a/cmake.packaging/WixPatch.xml
+++ b/cmake.packaging/WixPatch.xml
@@ -6,7 +6,7 @@
Name='PATH'
Action='set'
Permanent='no'
- System='no'
+ System='yes'
Part='last'
Value='[INSTALL_ROOT]bin'
/>
--
cgit
From 61025c9e7aa41dae11422162a54cc7696f7e783e Mon Sep 17 00:00:00 2001
From: Luis Calle <53507599+TheLeoP@users.noreply.github.com>
Date: Tue, 4 Jun 2024 07:51:35 -0500
Subject: feat(install): mention standard paths, XDG vars in Windows installer
#29101
fix #25207
The `.wxs` files were copied from
- cmake repo (BSD 3-Clause License)
https://github.com/Kitware/CMake/blob/master/Utilities/Release/WiX/install_dir.wxs
- wix repo [Microsoft Reciprocal License](https://github.com/wixtoolset/wix3/blob/b40e9a32c24033e11b77baf2c91a704382f898ed/LICENSE.TXT))
https://github.com/wixtoolset/wix3/blob/b40e9a32c24033e11b77baf2c91a704382f898ed/src/ext/UIExtension/wixlib/WixUI_InstallDir.wxs
---
cmake.packaging/CMakeLists.txt | 4 ++
cmake.packaging/CustomInstallDirDlg.wxs | 41 +++++++++++++++
cmake.packaging/WixUI_CustomInstallDir.wxs | 81 ++++++++++++++++++++++++++++++
3 files changed, 126 insertions(+)
create mode 100644 cmake.packaging/CustomInstallDirDlg.wxs
create mode 100644 cmake.packaging/WixUI_CustomInstallDir.wxs
(limited to 'cmake.packaging')
diff --git a/cmake.packaging/CMakeLists.txt b/cmake.packaging/CMakeLists.txt
index 645215ec92..7dd3f211f3 100644
--- a/cmake.packaging/CMakeLists.txt
+++ b/cmake.packaging/CMakeLists.txt
@@ -39,6 +39,10 @@ if(WIN32)
set(CPACK_WIX_PROGRAM_MENU_FOLDER "${CPACK_PACKAGE_NAME}")
set(CPACK_PACKAGE_EXECUTABLES "nvim" "Neovim")
+ set(CPACK_WIX_UI_REF "WixUI_CustomInstallDir")
+ list(APPEND CPACK_WIX_EXTRA_SOURCES ${CMAKE_CURRENT_LIST_DIR}/WixUI_CustomInstallDir.wxs)
+ list(APPEND CPACK_WIX_EXTRA_SOURCES ${CMAKE_CURRENT_LIST_DIR}/CustomInstallDirDlg.wxs)
+
# We use a wix patch to add further options to the installer.
# See: https://cmake.org/cmake/help/v3.7/module/CPackWIX.html#variable:CPACK_WIX_PATCH_FILE
list(APPEND CPACK_WIX_EXTENSIONS WixUtilExtension)
diff --git a/cmake.packaging/CustomInstallDirDlg.wxs b/cmake.packaging/CustomInstallDirDlg.wxs
new file mode 100644
index 0000000000..73864cec0b
--- /dev/null
+++ b/cmake.packaging/CustomInstallDirDlg.wxs
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cmake.packaging/WixUI_CustomInstallDir.wxs b/cmake.packaging/WixUI_CustomInstallDir.wxs
new file mode 100644
index 0000000000..8015758771
--- /dev/null
+++ b/cmake.packaging/WixUI_CustomInstallDir.wxs
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+ "1"]]>
+
+ 1
+
+ NOT Installed
+ Installed AND PATCH
+
+ 1
+ LicenseAccepted = "1"
+
+ 1
+ 1
+ NOT WIXUI_DONTVALIDATEPATH
+ "1"]]>
+ WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"
+ 1
+ 1
+
+ NOT Installed
+ Installed AND NOT PATCH
+ Installed AND PATCH
+
+ 1
+
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
--
cgit
From 88f07d6ca4a6d423fa10949e85941f50ba9596e0 Mon Sep 17 00:00:00 2001
From: Alexander Mnich <56564725+a-mnich@users.noreply.github.com>
Date: Mon, 12 Aug 2024 21:11:40 +0200
Subject: fix(win-msi): set installer scope to machine #29895
Problem:
The windows installer did not have the AllUsers property which leads to
the installer being misidentified as per user installer.
Currently the installer already requires administrative privileges and
installs into the system-wide ProgramFiles directory, but the start menu
entry and uninstaller registration are created only for the current user.
Issue: #29885
https://cmake.org/cmake/help/latest/cpack_gen/wix.html#variable:CPACK_WIX_INSTALL_SCOPE
Solution:
With setting CPACK_WIX_INSTALL_SCOPE to "perMachine" the generated msi
installer includes the Property ALLUSERS=1.
Additionally the start menu entries and uninstaller registration will be
created for all users.
---
cmake.packaging/CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
(limited to 'cmake.packaging')
diff --git a/cmake.packaging/CMakeLists.txt b/cmake.packaging/CMakeLists.txt
index 7dd3f211f3..8c158c39dc 100644
--- a/cmake.packaging/CMakeLists.txt
+++ b/cmake.packaging/CMakeLists.txt
@@ -38,6 +38,7 @@ if(WIN32)
# Create start menu and desktop shortcuts
set(CPACK_WIX_PROGRAM_MENU_FOLDER "${CPACK_PACKAGE_NAME}")
set(CPACK_PACKAGE_EXECUTABLES "nvim" "Neovim")
+ set(CPACK_WIX_INSTALL_SCOPE "perMachine")
set(CPACK_WIX_UI_REF "WixUI_CustomInstallDir")
list(APPEND CPACK_WIX_EXTRA_SOURCES ${CMAKE_CURRENT_LIST_DIR}/WixUI_CustomInstallDir.wxs)
--
cgit