mirror of
https://github.com/odrling/Aegisub
synced 2025-04-11 22:56:02 +02:00
meson: apply manifest on windows
This commit is contained in:
parent
36b75b827d
commit
248785d7ad
@ -258,3 +258,13 @@ aegisub = executable('aegisub', aegisub_src, version_h, acconf,
|
||||
install_dir: bindir,
|
||||
dependencies: deps,
|
||||
win_subsystem: 'windows')
|
||||
|
||||
if host_machine.system() == 'windows'
|
||||
mt_exe = find_program('mt.exe')
|
||||
apply_manifest = find_program(meson.project_source_root() / 'tools/apply-manifest.py')
|
||||
custom_target('apply-manifest',
|
||||
input: aegisub,
|
||||
output: 'applied_manifest',
|
||||
command: [apply_manifest, mt_exe, '@INPUT@'],
|
||||
build_by_default: true)
|
||||
endif
|
||||
|
8
tools/apply-manifest.py
Normal file
8
tools/apply-manifest.py
Normal file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys, subprocess, pathlib, os
|
||||
|
||||
mt_exe, executable = sys.argv[1:]
|
||||
|
||||
subprocess.run([mt_exe, '-manifest', executable + '.manifest', '-outputresource:' + executable + ';1'])
|
||||
pathlib.Path(os.path.join(os.path.dirname(executable), 'applied_manifest')).touch()
|
Loading…
x
Reference in New Issue
Block a user