2019-10-06 21:59:40 +02:00
|
|
|
conf_pkg = configuration_data()
|
2017-11-15 19:20:08 +01:00
|
|
|
|
|
|
|
if host_machine.system() == 'windows'
|
2021-05-23 10:37:54 +02:00
|
|
|
installer_setup = find_program(meson.project_source_root() / 'tools/win-installer-setup.ps1')
|
2020-12-22 07:05:02 +01:00
|
|
|
run_target('win-installer',
|
2021-01-30 18:02:18 +01:00
|
|
|
command: [installer_setup, meson.project_build_root(), meson.project_source_root()])
|
2021-05-23 10:37:54 +02:00
|
|
|
portable_setup = find_program(meson.project_source_root() / 'packages/win_installer/portable/create-portable.ps1')
|
|
|
|
run_target('win-portable', command: [portable_setup, meson.project_build_root(), meson.project_source_root()])
|
2017-11-15 19:20:08 +01:00
|
|
|
elif host_machine.system() == 'darwin'
|
2020-11-08 18:33:37 +01:00
|
|
|
fontconfig_conf = run_command('pkg-config', '--variable=confdir', 'fontconfig').stdout().strip()
|
2021-10-12 09:37:49 +02:00
|
|
|
bundle_app_sh = find_program(meson.project_source_root() / 'tools/osx-bundle.sh')
|
2020-11-08 18:33:37 +01:00
|
|
|
run_target('osx-bundle',
|
2021-10-12 09:37:49 +02:00
|
|
|
command: [bundle_app_sh, meson.project_source_root(), meson.project_build_root(), 'wx-config', fontconfig_conf, '',
|
2020-11-08 18:33:37 +01:00
|
|
|
get_option('build_osx_bundle') ? 'TRUE' : 'FALSE'])
|
2021-10-12 09:37:49 +02:00
|
|
|
build_dmg_sh = find_program(meson.project_source_root() / 'tools/osx-dmg.sh')
|
|
|
|
run_target('osx-build-dmg',
|
|
|
|
command: [build_dmg_sh, meson.project_source_root(), meson.project_build_root(), meson.project_version()])
|
2017-11-15 19:20:08 +01:00
|
|
|
else
|
2019-10-06 21:59:40 +02:00
|
|
|
conf_pkg.set('AEGISUB_COMMAND', 'aegisub')
|
|
|
|
|
2019-07-23 02:07:55 +02:00
|
|
|
desktop_template = configure_file(input: 'desktop/aegisub.desktop.template.in',
|
|
|
|
output: 'aegisub.desktop.template',
|
2019-10-06 21:59:40 +02:00
|
|
|
configuration: conf_pkg)
|
2019-07-23 02:07:55 +02:00
|
|
|
|
2019-02-04 15:31:32 +01:00
|
|
|
i18n = import('i18n')
|
|
|
|
i18n.merge_file(input: desktop_template,
|
|
|
|
output: 'aegisub.desktop',
|
|
|
|
type: 'desktop',
|
|
|
|
po_dir: '../po',
|
|
|
|
install: true,
|
2020-11-08 18:33:37 +01:00
|
|
|
install_dir: datadir / 'applications')
|
2017-11-15 19:20:08 +01:00
|
|
|
|
2019-10-06 21:59:40 +02:00
|
|
|
aegisub_logos = ['16x16.png', '22x22.png', '24x24.png', '32x32.png', '48x48.png', '64x64.png', 'scalable.svg']
|
2019-02-12 01:28:58 +01:00
|
|
|
|
2019-10-06 21:59:40 +02:00
|
|
|
foreach s: aegisub_logos
|
|
|
|
dir = s.split('.')[0]
|
|
|
|
ext = s.split('.')[1]
|
|
|
|
install_data('desktop' / dir / 'aegisub.' + ext,
|
2020-11-08 18:33:37 +01:00
|
|
|
install_dir: datadir / 'icons' / 'hicolor' / dir / 'apps')
|
2019-10-06 21:59:40 +02:00
|
|
|
endforeach
|
2023-04-21 16:23:01 +02:00
|
|
|
|
|
|
|
if get_option('build_appimage')
|
|
|
|
install_symlink('AppRun', install_dir: '/', pointing_to: bindir.strip('/') / 'aegisub')
|
|
|
|
install_symlink('.DirIcon', install_dir: '/', pointing_to: datadir.strip('/') / 'icons' / 'hicolor' / 'scalable' / 'apps' / 'aegisub.svg')
|
|
|
|
install_symlink('aegisub.desktop', install_dir: '/', pointing_to: datadir.strip('/') / 'applications' / 'aegisub.desktop')
|
|
|
|
endif
|
2019-10-06 21:59:40 +02:00
|
|
|
endif
|