diff --git a/subprojects/extensions-app/data/meson.build b/subprojects/extensions-app/data/meson.build index 0568fafc8..e7bfa9965 100644 --- a/subprojects/extensions-app/data/meson.build +++ b/subprojects/extensions-app/data/meson.build @@ -6,6 +6,7 @@ gnome.compile_resources( install_dir: pkgdatadir ) +desktop_file = app_id + '.desktop' desktopconf = configuration_data() # We substitute in bindir so it works as an autostart # file when built in a non-system prefix @@ -15,17 +16,25 @@ desktopconf.set('prgname', prgname) i18n.merge_file('desktop', input: configure_file( - input: app_id + '.desktop.in.in', - output: app_id + '.desktop.in', + input: desktop_file + '.in.in', + output: desktop_file + '.in', configuration: desktopconf ), - output: app_id + '.desktop', + output: desktop_file, po_dir: po_dir, install: true, install_dir: desktopdir, type: 'desktop' ) +if (desktop_file_validate.found()) + test('Validating ' + desktop_file, + desktop_file_validate, + args: [desktop_file], + workdir: meson.current_build_dir() + ) +endif + configure_file( input: app_id + '.service.in', output: app_id + '.service', diff --git a/subprojects/extensions-app/meson.build b/subprojects/extensions-app/meson.build index e26b5b20d..2c1c5de6e 100644 --- a/subprojects/extensions-app/meson.build +++ b/subprojects/extensions-app/meson.build @@ -37,6 +37,7 @@ servicedir = join_paths(datadir, 'dbus-1', 'services') gjs = find_program('gjs') appstream_util = find_program('appstream-util', required: false) +desktop_file_validate = find_program('desktop-file-validate', required: false) subdir('data') subdir('js')