From bcdb5f94938600a6b8d71b17c043311fd61da7d8 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Mon, 20 Jan 2025 14:47:05 +0100 Subject: [PATCH] Windows MSI build: run light.exe with -sval in GitLab This is equivalent to "setting true in your WiX MSBuild project" not to require the CI/CD service to run as an admin. https://wixtoolset.org/docs/tools/validation/#errors-running-validation --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e531a0591f..3a4767e17f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -509,6 +509,11 @@ set(CPACK_WIX_PATCH_FILE "${CMAKE_CURRENT_BINARY_DIR}/icinga-installer/icinga2.w set(CPACK_WIX_EXTENSIONS "WixUtilExtension" "WixNetFxExtension") set(CPACK_WIX_INSTALL_SCOPE NONE) +if(DEFINED ENV{GITLAB_CI}) + # https://wixtoolset.org/docs/tools/validation/#errors-running-validation + set(CPACK_WIX_LIGHT_EXTRA_FLAGS "-sval") +endif() + set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION "sbin") set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) include(InstallRequiredSystemLibraries)