Fix support for building debug MSI packages

refs #11449
This commit is contained in:
Gunnar Beutner 2016-04-14 14:08:18 +02:00 committed by Gunnar Beutner
parent 7fe6c429dd
commit 0028bf0b8a
3 changed files with 11 additions and 5 deletions

View File

@ -307,7 +307,6 @@ set(CPACK_WIX_UPGRADE_GUID "52F2BEAA-4DF0-4C3E-ABDC-C0F61DE4DF8A")
set(CPACK_WIX_EXTENSIONS "WixUtilExtension")
set(CPACK_WIX_UI_BANNER "${CMAKE_CURRENT_SOURCE_DIR}/icinga-installer/bannrbmp.bmp")
set(CPACK_WIX_UI_DIALOG "${CMAKE_CURRENT_SOURCE_DIR}/icinga-installer/dlgbmp.bmp")
set(CPACK_WIX_PATCH_FILE "${CMAKE_CURRENT_BINARY_DIR}/icinga-installer/icinga2.wixpatch")
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
include(InstallRequiredSystemLibraries)

View File

@ -25,7 +25,7 @@ endforeach(flag_var)
add_executable(icinga-installer icinga-installer.cpp)
set_target_properties (
set_target_properties(
icinga-installer PROPERTIES
FOLDER Bin
OUTPUT_NAME icinga2-installer
@ -34,8 +34,15 @@ set_target_properties (
target_link_libraries(icinga-installer shlwapi)
get_property(ICINGA2_INSTALLER_TARGET TARGET icinga-installer PROPERTY LOCATION_Release)
configure_file(icinga2.wixpatch.cmake ${CMAKE_CURRENT_BINARY_DIR}/icinga2.wixpatch @ONLY)
install(CODE "
set(CPACK_WIX_PATCH_FILE \"\${CMAKE_CURRENT_BINARY_DIR}/icinga-installer/icinga2.wixpatch.\${BUILD_TYPE}\")
")
file(
GENERATE
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/icinga2.wixpatch.$<CONFIG>"
INPUT "${CMAKE_CURRENT_SOURCE_DIR}/icinga2.wixpatch.cmake"
)
set(InstallPath "${CMAKE_INSTALL_SBINDIR}")

View File

@ -7,7 +7,7 @@
<CustomAction Id="XtraInstall" FileKey="CM_FP_sbin.icinga2_installer.exe" ExeCommand="install" Execute="deferred" Impersonate="no" />
<CustomAction Id="XtraUninstall" FileKey="CM_FP_sbin.icinga2_installer.exe" ExeCommand="uninstall" Execute="deferred" Impersonate="no" />
<Binary Id="icinga2_installer" SourceFile="@ICINGA2_INSTALLER_TARGET@" />
<Binary Id="icinga2_installer" SourceFile="$<TARGET_FILE:icinga-installer>" />
<InstallExecuteSequence>
<Custom Action='CheckForUCRT' Before='LaunchConditions'>