Skip to content

Commit 4914a34

Browse files
committed
build: Fix WiX patch
1 parent ab0fb31 commit 4914a34

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

cmake/build_helpers.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,11 @@ macro(configurePackingResources)
210210
set(CPACK_WIX_UI_BANNER "${PROJECT_SOURCE_DIR}/resources/dist/windows/wix_banner.png")
211211
set(CPACK_WIX_UI_DIALOG "${PROJECT_SOURCE_DIR}/resources/dist/windows/wix_dialog.png")
212212
set(CPACK_WIX_CULTURES "en-US;de-DE;ja-JP;it-IT;pt-BR;zh-CN;zh-TW;ru-RU")
213-
set(CPACK_WIX_PATCH_FILE "${PROJECT_SOURCE_DIR}/resources/dist/windows/wix_patch.xml")
213+
214+
if (NOT MSVC)
215+
set(CPACK_WIX_PATCH_FILE "${PROJECT_SOURCE_DIR}/resources/dist/windows/wix_patch.xml")
216+
endif()
217+
214218
set(CPACK_PACKAGE_INSTALL_DIRECTORY "ImHex")
215219
set_property(INSTALL "$<TARGET_FILE_NAME:main>"
216220
PROPERTY CPACK_START_MENU_SHORTCUTS "ImHex"
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<CPackWiXPatch>
3-
<CPackWiXFragment Id="CM_CP_bin.libwinpthread_1.dll">
4-
<File Id="CM_FP_bin.libwinpthread_1.dll"
5-
CompanionFile="CM_FP_bin.your_main_executable.exe"/>
3+
<!-- libwinpthread has a bogus FILEVERSION field that's hardcoded to 1.0.0.0. Ignore it and always install it-->
4+
<CPackWiXFragment Id="CM_FP_libwinpthread_1.dll">
5+
<File Id="CM_FP_libwinpthread_1.dll"
6+
CompanionFile="CM_FP_imhex.exe"/>
67
</CPackWiXFragment>
78
</CPackWiXPatch>

0 commit comments

Comments
 (0)