extensions-app: Validate .desktop file during meson test
... if desktop-file-validate is available. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1160
This commit is contained in:
parent
360f5b1642
commit
fbd6beea2c
@ -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',
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user