2020-03-29 14:08:15 +00:00
|
|
|
pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
|
2023-04-08 23:51:54 +00:00
|
|
|
gnome = import('gnome')
|
|
|
|
|
|
|
|
gnome.compile_resources(meson.project_name(),
|
|
|
|
meson.project_name() + '.gresource.xml',
|
|
|
|
gresource_bundle: true,
|
|
|
|
install: true,
|
|
|
|
install_dir: pkgdatadir,
|
|
|
|
)
|
2020-03-29 14:08:15 +00:00
|
|
|
|
2022-08-16 15:10:17 +00:00
|
|
|
if build_machine.system() == 'linux'
|
|
|
|
desktop_file = i18n.merge_file(
|
|
|
|
input: 'io.github.mightycreak.Diffuse.desktop.in',
|
|
|
|
output: 'io.github.mightycreak.Diffuse.desktop',
|
|
|
|
type: 'desktop',
|
|
|
|
po_dir: '../po',
|
|
|
|
install: true,
|
|
|
|
install_dir: join_paths(get_option('datadir'), 'applications')
|
2020-03-29 14:08:15 +00:00
|
|
|
)
|
|
|
|
|
2022-08-16 15:10:17 +00:00
|
|
|
desktop_utils = find_program('desktop-file-validate', required: false)
|
|
|
|
if desktop_utils.found()
|
|
|
|
test('Validate desktop file', desktop_utils,
|
|
|
|
args: [desktop_file]
|
|
|
|
)
|
|
|
|
endif
|
|
|
|
|
|
|
|
appstream_file = i18n.merge_file(
|
|
|
|
input: 'io.github.mightycreak.Diffuse.appdata.xml.in',
|
|
|
|
output: 'io.github.mightycreak.Diffuse.appdata.xml',
|
|
|
|
po_dir: '../po',
|
|
|
|
install: true,
|
|
|
|
install_dir: join_paths(get_option('datadir'), 'appdata')
|
2020-03-29 14:08:15 +00:00
|
|
|
)
|
2022-08-16 15:10:17 +00:00
|
|
|
|
|
|
|
appstream_util = find_program('appstream-util', required: false)
|
|
|
|
if appstream_util.found()
|
|
|
|
test('Validate appstream file', appstream_util,
|
|
|
|
args: ['validate', appstream_file]
|
|
|
|
)
|
|
|
|
endif
|
2020-03-29 14:08:15 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
# Diffuse config file
|
|
|
|
conf = configuration_data()
|
2021-11-28 02:16:35 +00:00
|
|
|
conf.set('LOG_PRINT_OUTPUT', get_option('log_print_output'))
|
|
|
|
conf.set('LOG_PRINT_STACK', get_option('log_print_stack'))
|
|
|
|
conf.set('USE_FLATPAK', get_option('use_flatpak'))
|
2021-11-24 23:55:16 +00:00
|
|
|
conf.set('PKGDATADIR', pkgdatadir)
|
2020-03-29 14:08:15 +00:00
|
|
|
|
|
|
|
configure_file(
|
|
|
|
input: 'diffuserc.in',
|
|
|
|
output: 'diffuserc',
|
|
|
|
configuration: conf,
|
|
|
|
install: true,
|
|
|
|
install_dir: get_option('sysconfdir')
|
|
|
|
)
|
|
|
|
|
|
|
|
# Data files
|
|
|
|
install_subdir('usr/share', install_dir: get_option('datadir'), strip_directory: true)
|
|
|
|
|
|
|
|
subdir('icons')
|