Skip to content

Commit 2438339

Browse files
committed
Windows MSI build: run light.exe with -sval if $ICINGA2_NO_MSI_VALIDATION is set
This is equivalent to "setting <SuppressValidation>true</SuppressValidation> in your WiX MSBuild project" not to require a CI/CD service to run as an admin. https://wixtoolset.org/docs/tools/validation/#errors-running-validation
1 parent f96e7c6 commit 2438339

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,11 @@ set(CPACK_WIX_PATCH_FILE "${CMAKE_CURRENT_BINARY_DIR}/icinga-installer/icinga2.w
509509
set(CPACK_WIX_EXTENSIONS "WixUtilExtension" "WixNetFxExtension")
510510
set(CPACK_WIX_INSTALL_SCOPE NONE)
511511

512+
if(DEFINED ENV{ICINGA2_NO_MSI_VALIDATION})
513+
# https://wixtoolset.org/docs/tools/validation/#errors-running-validation
514+
set(CPACK_WIX_LIGHT_EXTRA_FLAGS "-sval")
515+
endif()
516+
512517
set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION "sbin")
513518
set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
514519
include(InstallRequiredSystemLibraries)

0 commit comments

Comments
 (0)