meson: move executable to the root directory

This commit is contained in:
Ryan 2021-03-27 09:29:37 -04:00
parent 1246534b7b
commit d32ef75cba
4 changed files with 32 additions and 32 deletions

View file

@ -35,7 +35,7 @@ Building:
2. From the Visual Studio "x64 Native Tools Command Prompt", generate the build directory: `meson build -Ddefault_library=static -Db_lto=true` 2. From the Visual Studio "x64 Native Tools Command Prompt", generate the build directory: `meson build -Ddefault_library=static -Db_lto=true`
3. Build with `cd build` and `meson compile` 3. Build with `cd build` and `meson compile`
You should now have a binary at `src/aegisub.exe`. You should now have a binary: `aegisub.exe`.
Installer: Installer:

View file

@ -320,3 +320,26 @@ subdir('libaegisub')
subdir('packages') subdir('packages')
subdir('po') subdir('po')
subdir('src') subdir('src')
aegisub_cpp_pch = ['src/include/agi_pre.h']
aegisub_c_pch = ['src/include/agi_pre_c.h']
aegisub = executable('aegisub', aegisub_src, version_h, acconf,
link_with: [libresrc, libluabins, libaegisub],
include_directories: [libaegisub_inc, libresrc_inc, version_inc, deps_inc],
cpp_pch: aegisub_cpp_pch,
c_pch: aegisub_c_pch,
install: true,
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

View file

@ -19,7 +19,7 @@ Name: "checkforupdates"; Description: "{cm:CheckForUpdates}"; GroupDescription:
[Files] [Files]
; main ; main
DestDir: {app}; Source: "{#BUILD_ROOT}\src\aegisub.exe"; Flags: ignoreversion; Components: main DestDir: {app}; Source: "{#BUILD_ROOT}\aegisub.exe"; Flags: ignoreversion; Components: main
DestDir: {app}; Source: "{#INSTALLER_DIR}\license.txt"; Flags: ignoreversion; Components: main DestDir: {app}; Source: "{#INSTALLER_DIR}\license.txt"; Flags: ignoreversion; Components: main
[Icons] [Icons]

View file

@ -164,18 +164,18 @@ aegisub_src = files(
) )
if host_machine.system() == 'darwin' if host_machine.system() == 'darwin'
aegisub_src += [ aegisub_src += files(
'font_file_lister_coretext.mm', 'font_file_lister_coretext.mm',
'osx/osx_utils.mm', 'osx/osx_utils.mm',
'osx/retina_helper.mm', 'osx/retina_helper.mm',
] )
elif host_machine.system() == 'windows' elif host_machine.system() == 'windows'
aegisub_src += [ aegisub_src += files(
'avisynth_wrap.cpp', 'avisynth_wrap.cpp',
'font_file_lister_gdi.cpp', 'font_file_lister_gdi.cpp',
# 'libass_gdi_fontselect.cpp', # 'libass_gdi_fontselect.cpp',
'video_provider_avs.cpp', 'video_provider_avs.cpp',
] )
if cc.has_header('wingdi.h') if cc.has_header('wingdi.h')
deps += cc.find_library('gdi32', required: true) deps += cc.find_library('gdi32', required: true)
@ -217,11 +217,11 @@ elif host_machine.system() == 'windows'
endif endif
if conf.has('WITH_FONTCONFIG') if conf.has('WITH_FONTCONFIG')
aegisub_src += 'font_file_lister_fontconfig.cpp' aegisub_src += files('font_file_lister_fontconfig.cpp')
endif endif
if conf.has('WITH_CSRI') if conf.has('WITH_CSRI')
aegisub_src += 'subtitles_provider_csri.cpp' aegisub_src += files('subtitles_provider_csri.cpp')
endif endif
opt_src = [ opt_src = [
@ -242,29 +242,6 @@ opt_src = [
foreach opt: opt_src foreach opt: opt_src
if dep_avail.contains(opt[0]) if dep_avail.contains(opt[0])
aegisub_src += opt[1] aegisub_src += files(opt[1])
endif endif
endforeach endforeach
aegisub_cpp_pch = ['include/agi_pre.h']
aegisub_c_pch = ['include/agi_pre_c.h']
aegisub = executable('aegisub', aegisub_src, version_h, acconf,
link_with: [libresrc, libluabins, libaegisub],
include_directories: [libaegisub_inc, libresrc_inc, version_inc, deps_inc],
cpp_pch: aegisub_cpp_pch,
c_pch: aegisub_c_pch,
install: true,
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