From 36b75b827d31293302c565f089088c0a5fec6c7c Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 30 Jan 2021 12:02:18 -0500 Subject: [PATCH] meson: fix warnings, cleanup --- meson.build | 4 ---- packages/meson.build | 8 ++++---- src/libresrc/meson.build | 2 +- src/meson.build | 2 +- tools/respack.py | 3 +-- 5 files changed, 7 insertions(+), 12 deletions(-) diff --git a/meson.build b/meson.build index 303266dc3..8b511e94c 100644 --- a/meson.build +++ b/meson.build @@ -46,10 +46,6 @@ endif docdir = prefix / 'doc' dataroot = datadir / 'aegisub' -if host_machine.system() == 'windows' - -endif - # MSVC sets this automatically with -MDd, but it has a different meaning on other platforms if get_option('debug') and host_machine.system() != 'windows' add_project_arguments('-D_DEBUG', language: 'cpp') diff --git a/packages/meson.build b/packages/meson.build index d2298cd27..4a7d79a65 100644 --- a/packages/meson.build +++ b/packages/meson.build @@ -1,15 +1,15 @@ conf_pkg = configuration_data() if host_machine.system() == 'windows' - installer_setup = find_program(meson.source_root() / 'tools/win-installer-setup.ps1', ) + installer_setup = find_program(meson.project_source_root() / 'tools/win-installer-setup.ps1', ) run_target('win-installer', - command: [installer_setup, meson.build_root(), meson.source_root()]) + command: [installer_setup, meson.project_build_root(), meson.project_source_root()]) elif host_machine.system() == 'darwin' # temporary hack until version.sh generates this properly - run_command('cp', meson.source_root() / 'tools' / 'osx-bundle.sed', meson.build_root()) + run_command('cp', meson.project_source_root() / 'tools' / 'osx-bundle.sed', meson.project_build_root()) fontconfig_conf = run_command('pkg-config', '--variable=confdir', 'fontconfig').stdout().strip() run_target('osx-bundle', - command: ['../tools/osx-bundle.sh', meson.source_root(), meson.build_root(), 'wx-config', fontconfig_conf, '', + command: ['../tools/osx-bundle.sh', meson.project_source_root(), meson.project_build_root(), 'wx-config', fontconfig_conf, '', get_option('build_osx_bundle') ? 'TRUE' : 'FALSE']) else conf_pkg.set('AEGISUB_COMMAND', 'aegisub') diff --git a/src/libresrc/meson.build b/src/libresrc/meson.build index e6189a3ca..d4be467d7 100644 --- a/src/libresrc/meson.build +++ b/src/libresrc/meson.build @@ -1,4 +1,4 @@ -respack = find_program('../../tools/respack.py') +respack = find_program(meson.project_source_root() / 'tools/respack.py') resrc = [ custom_target('bitmap.{cpp,h}', diff --git a/src/meson.build b/src/meson.build index 4a601f41a..d8228f486 100644 --- a/src/meson.build +++ b/src/meson.build @@ -257,4 +257,4 @@ aegisub = executable('aegisub', aegisub_src, version_h, acconf, install: true, install_dir: bindir, dependencies: deps, - gui_app: true) + win_subsystem: 'windows') diff --git a/tools/respack.py b/tools/respack.py index c1c78fb73..9e5902eb5 100755 --- a/tools/respack.py +++ b/tools/respack.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 -import sys -import os +import sys, os manifestfile, cppfile, hfile = sys.argv[1:]