From a8cecc3b7ffd66359e85e21ea1678b7839fa3fac Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 6 Jun 2024 10:43:52 -0400 Subject: ci: Update CMake version to 3.30.0-rc1 --- .gitlab/ci/cmake.ps1 | 6 +++--- .gitlab/ci/cmake.sh | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitlab/ci/cmake.ps1 b/.gitlab/ci/cmake.ps1 index f6b5cc7..63417dd 100644 --- a/.gitlab/ci/cmake.ps1 +++ b/.gitlab/ci/cmake.ps1 @@ -1,12 +1,12 @@ $erroractionpreference = "stop" -$version = "3.27.6" +$version = "3.30.0-rc1" if ("$env:PROCESSOR_ARCHITECTURE" -eq "AMD64") { - $sha256sum = "F013A0CCA091AA953F9A60A99292EC7A20AE3F9CEB05CB5C08EBE164097C526F" + $sha256sum = "CA04D12160F4DBBCC2435011E6416EE118960883984C7BCD3EDF1F5D27D23F56" $platform = "windows-x86_64" } elseif ("$env:PROCESSOR_ARCHITECTURE" -eq "ARM64") { - $sha256sum = "980B7E532D77BFB4E5814C76403242C503019F1C0699440220CF2D527C8FF350" + $sha256sum = "0D7FCB6437863CE70AD6412DA79EC35B8ABD835B0935275512CE1FEEED6B7CD3" $platform = "windows-arm64" } else { throw ('unknown PROCESSOR_ARCHITECTURE: ' + "$env:PROCESSOR_ARCHITECTURE") diff --git a/.gitlab/ci/cmake.sh b/.gitlab/ci/cmake.sh index 21da466b..526c338 100755 --- a/.gitlab/ci/cmake.sh +++ b/.gitlab/ci/cmake.sh @@ -2,22 +2,22 @@ set -e -readonly version="3.27.6" +readonly version="3.30.0-rc1" case "$(uname -s)-$(uname -m)" in Linux-x86_64) shatool="sha256sum" - sha256sum="26373a283daa8490d772dc8a179450cd6d391cb2a9db8d4242fe09e361efc42e" + sha256sum="fe625fb078cbfe53cdaa48417a1b87be7fca19de224836e9bf0c15f80696ddd8" platform="linux-x86_64" ;; Linux-aarch64) shatool="sha256sum" - sha256sum="811e5040ad7f3fb4924a875373d2a1a174a01400233a81a638a989157438a5e3" + sha256sum="fad0c4b4562b33922ddd394e1d229bbc3ea941b41ce9f058decda40ea0def0ea" platform="linux-aarch64" ;; Darwin-*) shatool="shasum -a 256" - sha256sum="a66b497289ab8c769b601d93833448eaae985beb762993837a51a79916d12f23" + sha256sum="f927d88d54503b7dbbf31aae063e924806d51cec266293d2c2156fc2701292cd" platform="macos-universal" ;; *) -- cgit v0.12 From f6c2f64d049530c97e8497ee54d817d746d06cdb Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 6 Jun 2024 10:46:12 -0400 Subject: Utilities/Release: Update MSI generation to use WIX 4 --- .gitlab/ci/env_windows_arm64_package.ps1 | 2 +- .gitlab/ci/env_windows_i386_package.ps1 | 2 +- .gitlab/ci/env_windows_x86_64_package.ps1 | 2 +- .gitlab/ci/wix3-env.ps1 | 6 -- .gitlab/ci/wix4-env.ps1 | 7 +++ CMakeCPackOptions.cmake.in | 18 +++--- Utilities/Release/WiX/WIX.template.in | 27 ++++---- .../Release/WiX/cmake_nsis_overwrite_dialog.wxs | 12 +--- Utilities/Release/WiX/custom_action_dll.wxs.in | 2 +- Utilities/Release/WiX/install_dir.wxs | 73 ++++++++++++---------- Utilities/Release/WiX/options.wxs | 20 +++--- Utilities/Release/WiX/options_dlg.wxs | 20 +++--- Utilities/Release/WiX/patch_desktop_shortcut.xml | 4 +- Utilities/Release/WiX/patch_path_env.xml | 6 +- 14 files changed, 101 insertions(+), 100 deletions(-) delete mode 100644 .gitlab/ci/wix3-env.ps1 create mode 100644 .gitlab/ci/wix4-env.ps1 diff --git a/.gitlab/ci/env_windows_arm64_package.ps1 b/.gitlab/ci/env_windows_arm64_package.ps1 index a898007..74c9c2b 100644 --- a/.gitlab/ci/env_windows_arm64_package.ps1 +++ b/.gitlab/ci/env_windows_arm64_package.ps1 @@ -1 +1 @@ -. .gitlab/ci/wix3-env.ps1 +. .gitlab/ci/wix4-env.ps1 diff --git a/.gitlab/ci/env_windows_i386_package.ps1 b/.gitlab/ci/env_windows_i386_package.ps1 index a898007..74c9c2b 100644 --- a/.gitlab/ci/env_windows_i386_package.ps1 +++ b/.gitlab/ci/env_windows_i386_package.ps1 @@ -1 +1 @@ -. .gitlab/ci/wix3-env.ps1 +. .gitlab/ci/wix4-env.ps1 diff --git a/.gitlab/ci/env_windows_x86_64_package.ps1 b/.gitlab/ci/env_windows_x86_64_package.ps1 index a898007..74c9c2b 100644 --- a/.gitlab/ci/env_windows_x86_64_package.ps1 +++ b/.gitlab/ci/env_windows_x86_64_package.ps1 @@ -1 +1 @@ -. .gitlab/ci/wix3-env.ps1 +. .gitlab/ci/wix4-env.ps1 diff --git a/.gitlab/ci/wix3-env.ps1 b/.gitlab/ci/wix3-env.ps1 deleted file mode 100644 index a872b74..0000000 --- a/.gitlab/ci/wix3-env.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -& "$pwsh" -File .gitlab/ci/wix3.ps1 - -$pwdpath = $pwd.Path -Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\wix3;$env:PATH" - -light -help | Select -First 1 diff --git a/.gitlab/ci/wix4-env.ps1 b/.gitlab/ci/wix4-env.ps1 new file mode 100644 index 0000000..f1fe8b6 --- /dev/null +++ b/.gitlab/ci/wix4-env.ps1 @@ -0,0 +1,7 @@ +& "$pwsh" -File .gitlab/ci/wix4.ps1 + +$pwdpath = $pwd.Path +Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\wix4;$env:PATH" +Set-Item -Force -Path "env:WIX_EXTENSIONS" -Value "$pwdpath\.gitlab\wix4" +Write-Host "wix version: $(wix --version)" +Write-Host "wix extensions: $(wix extension list -g)" diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in index cbe73e7..65f266e 100644 --- a/CMakeCPackOptions.cmake.in +++ b/CMakeCPackOptions.cmake.in @@ -206,6 +206,9 @@ if("${CPACK_GENERATOR}" STREQUAL "DragNDrop") endif() if("${CPACK_GENERATOR}" STREQUAL "WIX") + set(CPACK_WIX_VERSION 4) + set(CPACK_WIX_BUILD_EXTRA_FLAGS "") + # Reset CPACK_PACKAGE_VERSION to deal with WiX restriction. # But the file names still use the full CMake_VERSION value: set(CPACK_PACKAGE_FILE_NAME @@ -246,14 +249,7 @@ if("${CPACK_GENERATOR}" STREQUAL "WIX") CPACK_START_MENU_SHORTCUTS "CMake Web Site" ) - set(CPACK_WIX_LIGHT_EXTRA_FLAGS "-dcl:high") - - if(NOT "$ENV{CMAKE_CI_PACKAGE}" STREQUAL "") - # Suppress validation. It does not work without - # an interactive session or an admin account. - # https://github.com/wixtoolset/issues/issues/3968 - list(APPEND CPACK_WIX_LIGHT_EXTRA_FLAGS "-sval") - endif() + list(APPEND CPACK_WIX_BUILD_EXTRA_FLAGS -dcl high) set(CPACK_WIX_UI_BANNER "@CMake_SOURCE_DIR@/Utilities/Release/WiX/ui_banner.jpg" @@ -274,7 +270,7 @@ if("${CPACK_GENERATOR}" STREQUAL "WIX") list(APPEND CPACK_WIX_EXTRA_SOURCES "@CMake_SOURCE_DIR@/Utilities/Release/WiX/cmake_nsis_overwrite_dialog.wxs" ) - list(APPEND CPACK_WIX_CANDLE_EXTRA_FLAGS -dCHECK_NSIS=1) + list(APPEND CPACK_WIX_BUILD_EXTRA_FLAGS -d CHECK_NSIS=1) set(_WIX_CUSTOM_ACTION_MULTI_CONFIG "@CMake_BUILD_WIX_CUSTOM_ACTION_MULTI_CONFIG@") if(_WIX_CUSTOM_ACTION_MULTI_CONFIG) @@ -292,7 +288,7 @@ if("${CPACK_GENERATOR}" STREQUAL "WIX") endif() endif() - set(CPACK_WIX_UI_REF "CMakeUI_InstallDir") + set(CPACK_WIX_UI_REF "CMakeUI_InstallDir_$(sys.BUILDARCHSHORT)") set(CPACK_WIX_PATCH_FILE "@CMake_SOURCE_DIR@/Utilities/Release/WiX/patch_path_env.xml" @@ -308,6 +304,6 @@ if("${CPACK_GENERATOR}" STREQUAL "WIX") list(APPEND CPACK_WIX_PATCH_FILE "@CMake_SOURCE_DIR@/Utilities/Release/WiX/patch_desktop_shortcut.xml" ) - list(APPEND CPACK_WIX_CANDLE_EXTRA_FLAGS -dBUILD_QtDialog=1) + list(APPEND CPACK_WIX_BUILD_EXTRA_FLAGS -d BUILD_QtDialog=1) endif() endif() diff --git a/Utilities/Release/WiX/WIX.template.in b/Utilities/Release/WiX/WIX.template.in index fb8fa59..afbd66f 100644 --- a/Utilities/Release/WiX/WIX.template.in +++ b/Utilities/Release/WiX/WIX.template.in @@ -2,17 +2,22 @@ - + - - - + UpgradeCode="$(var.CPACK_WIX_UPGRADE_GUID)" + ProductCode="$(var.CPACK_WIX_PRODUCT_GUID)" + Scope="perMachine" + InstallerVersion="500" + Language="1033" + Compressed="yes" + > @@ -26,7 +31,7 @@ - ProductIcon.ico + @@ -38,11 +43,11 @@ - + - + @@ -54,5 +59,5 @@ - + diff --git a/Utilities/Release/WiX/cmake_nsis_overwrite_dialog.wxs b/Utilities/Release/WiX/cmake_nsis_overwrite_dialog.wxs index 88335f8..deec0f0 100644 --- a/Utilities/Release/WiX/cmake_nsis_overwrite_dialog.wxs +++ b/Utilities/Release/WiX/cmake_nsis_overwrite_dialog.wxs @@ -1,18 +1,12 @@ - + - 1 + - - Uninstall.exe was detected in your chosen installation prefix. - This indicates a conflicting NSIS based installation of CMake. - - Please uninstall your old CMake installation or choose a different - installation directory. - + diff --git a/Utilities/Release/WiX/custom_action_dll.wxs.in b/Utilities/Release/WiX/custom_action_dll.wxs.in index 64e9762..a39bc0d 100644 --- a/Utilities/Release/WiX/custom_action_dll.wxs.in +++ b/Utilities/Release/WiX/custom_action_dll.wxs.in @@ -1,4 +1,4 @@ - + diff --git a/Utilities/Release/WiX/install_dir.wxs b/Utilities/Release/WiX/install_dir.wxs index d7debde..a13da97 100644 --- a/Utilities/Release/WiX/install_dir.wxs +++ b/Utilities/Release/WiX/install_dir.wxs @@ -1,17 +1,28 @@ - + + - + + + + + + + + + + + + - - + @@ -24,41 +35,39 @@ - 1 - "1"]]> + - 1 + - NOT Installed - Installed AND PATCH + + - 1 - LicenseAccepted = "1" + + - 1 - 1 + + - 1 - 1 - NOT WIXUI_DONTVALIDATEPATH - "1"]]> + + + - 1 - CMAKE_NSIS_OVERWRITE_DETECTED="1" - - 1]]> - 1 - 1 + + + + + + - NOT Installed - Installed AND NOT PATCH - Installed AND PATCH + + + - 1 + - 1 - 1 - 1 + + + @@ -66,7 +75,7 @@ - - + + diff --git a/Utilities/Release/WiX/options.wxs b/Utilities/Release/WiX/options.wxs index 0fd3527..28d4365 100644 --- a/Utilities/Release/WiX/options.wxs +++ b/Utilities/Release/WiX/options.wxs @@ -1,4 +1,4 @@ - + @@ -13,24 +13,24 @@ - _CMAKE_IN_PATH_REG = "#0" - _CMAKE_IN_PATH_REG = "#1" + + - 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 4d27d00..ea2854f 100644 --- a/Utilities/Release/WiX/options_dlg.wxs +++ b/Utilities/Release/WiX/options_dlg.wxs @@ -1,27 +1,27 @@ - + - - + + - 1 + - - - - - + + + + + - + diff --git a/Utilities/Release/WiX/patch_desktop_shortcut.xml b/Utilities/Release/WiX/patch_desktop_shortcut.xml index 8ec2c12..6170d64 100644 --- a/Utilities/Release/WiX/patch_desktop_shortcut.xml +++ b/Utilities/Release/WiX/patch_desktop_shortcut.xml @@ -1,5 +1,3 @@ - - DESKTOP_SHORTCUT_REQUESTED - + diff --git a/Utilities/Release/WiX/patch_path_env.xml b/Utilities/Release/WiX/patch_path_env.xml index ba4316d..bf52b27 100644 --- a/Utilities/Release/WiX/patch_path_env.xml +++ b/Utilities/Release/WiX/patch_path_env.xml @@ -1,8 +1,7 @@ - - CMAKE_IN_PATH AND ALLUSERS + @@ -10,8 +9,7 @@ - - CMAKE_IN_PATH AND NOT ALLUSERS + -- cgit v0.12