Disable custom executable manifest in vs ghactions workflows
See 1ff6a2d0ae
for the original problem. The fix in that commit was a bad idea, the patch got stale and broke the previous commit.
This commit is contained in:
parent
a637a619c9
commit
3f503bcb1c
20
.github/build.sh
vendored
20
.github/build.sh
vendored
@ -218,23 +218,9 @@ if [[ $PACKAGE_MODE == nolua ]]; then
|
||||
fi
|
||||
if [[ $PACKAGE_MODE == backendvs ]]; then
|
||||
meson_configure+=$'\t'-Dbackend=vs
|
||||
echo "NOTE: patching CREATEPROCESS_MANIFEST_RESOURCE_ID out of powder-res.template.rc"
|
||||
echo "TODO: remove this patch once https://github.com/mesonbuild/meson/pull/12472 makes it into a release"
|
||||
echo "TODO: also remove the relevant note from the building guide"
|
||||
git apply <<PATCH
|
||||
diff --git a/resources/powder-res.template.rc b/resources/powder-res.template.rc
|
||||
index 1dc26c78..2094049f 100644
|
||||
--- a/resources/powder-res.template.rc
|
||||
+++ b/resources/powder-res.template.rc
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
IDI_ICON ICON DISCARDABLE "@ICON_EXE_ICO@"
|
||||
IDI_DOC_ICON ICON DISCARDABLE "@ICON_CPS_ICO@"
|
||||
-CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "@WINUTF8_XML@"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION @DISPLAY_VERSION_MAJOR@,@DISPLAY_VERSION_MINOR@,0,@BUILD_NUM@
|
||||
PATCH
|
||||
# meson 1.2.3 configures vs projects that bring their own manifest, which conflicts with ours
|
||||
# TODO: remove this patch once https://github.com/mesonbuild/meson/pull/12472 makes it into a release that we can use
|
||||
meson_configure+=$'\t'-Dwindows_utf8cp=false
|
||||
fi
|
||||
if [[ $BSH_STATIC_DYNAMIC == static ]]; then
|
||||
meson_configure+=$'\t'-Dstatic=prebuilt
|
||||
|
@ -299,3 +299,9 @@ option(
|
||||
value: true,
|
||||
description: 'Add icon resources to the executable on Windows'
|
||||
)
|
||||
option(
|
||||
'windows_utf8cp',
|
||||
type: 'boolean',
|
||||
value: true,
|
||||
description: 'Ask Windows nicely for UTF-8 as the codepage'
|
||||
)
|
||||
|
@ -33,9 +33,14 @@ endif
|
||||
|
||||
if host_platform == 'windows'
|
||||
windows_icons = get_option('windows_icons')
|
||||
windows_utf8cp = get_option('windows_utf8cp')
|
||||
rc_conf_depends = []
|
||||
rc_conf_depend_files = [
|
||||
'resource.h',
|
||||
]
|
||||
icon_exe_ico_path = ''
|
||||
icon_cps_ico_path = ''
|
||||
winutf8_xml_path = ''
|
||||
if windows_icons
|
||||
make_ico = executable('makeico', sources: 'MakeIco.cpp', native: true)
|
||||
generated_win_icos = {}
|
||||
@ -64,11 +69,18 @@ if host_platform == 'windows'
|
||||
icon_exe_ico_path = join_paths(meson.current_build_dir(), 'icon_exe.ico')
|
||||
icon_cps_ico_path = join_paths(meson.current_build_dir(), 'icon_cps.ico')
|
||||
endif
|
||||
if windows_utf8cp
|
||||
rc_conf_depend_files += [
|
||||
'winutf8.xml',
|
||||
]
|
||||
winutf8_xml_path = join_paths(meson.current_source_dir(), 'winutf8.xml')
|
||||
endif
|
||||
rc_conf_data = configuration_data()
|
||||
rc_conf_data.merge_from(conf_data)
|
||||
rc_conf_data.set('HAVE_ICONS', windows_icons ? 1 : 0)
|
||||
rc_conf_data.set('HAVE_UTF8CP', windows_utf8cp ? 1 : 0)
|
||||
rc_conf_data.set('RESOUCE_H', join_paths(meson.current_source_dir(), 'resource.h'))
|
||||
rc_conf_data.set('WINUTF8_XML', join_paths(meson.current_source_dir(), 'winutf8.xml'))
|
||||
rc_conf_data.set('WINUTF8_XML', winutf8_xml_path)
|
||||
rc_conf_data.set('ICON_EXE_ICO', icon_exe_ico_path)
|
||||
rc_conf_data.set('ICON_CPS_ICO', icon_cps_ico_path)
|
||||
powder_files += windows_mod.compile_resources(
|
||||
@ -78,10 +90,7 @@ if host_platform == 'windows'
|
||||
configuration: rc_conf_data,
|
||||
),
|
||||
depends: rc_conf_depends,
|
||||
depend_files: [
|
||||
'resource.h',
|
||||
'winutf8.xml',
|
||||
],
|
||||
depend_files: rc_conf_depend_files,
|
||||
)
|
||||
elif host_platform == 'darwin'
|
||||
configure_file(
|
||||
|
@ -6,11 +6,14 @@
|
||||
#include <ntdef.h>
|
||||
|
||||
#define HAVE_ICONS @HAVE_ICONS@
|
||||
#define HAVE_UTF8CP @HAVE_UTF8CP@
|
||||
#if HAVE_ICONS
|
||||
IDI_ICON ICON DISCARDABLE "@ICON_EXE_ICO@"
|
||||
IDI_DOC_ICON ICON DISCARDABLE "@ICON_CPS_ICO@"
|
||||
#endif
|
||||
#if HAVE_UTF8CP
|
||||
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "@WINUTF8_XML@"
|
||||
#endif
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION @DISPLAY_VERSION_MAJOR@,@DISPLAY_VERSION_MINOR@,0,@BUILD_NUM@
|
||||
|
Loading…
Reference in New Issue
Block a user