Merge branch 'patch-1' into 'master'
Meson: add tests to validate desktop & appdata files See merge request World/podcasts!89
This commit is contained in:
commit
a6c2666c82
@ -2,7 +2,7 @@ subdir('icons')
|
|||||||
|
|
||||||
desktop_conf = configuration_data()
|
desktop_conf = configuration_data()
|
||||||
desktop_conf.set('icon', application_id)
|
desktop_conf.set('icon', application_id)
|
||||||
i18n.merge_file ('desktop-file',
|
desktop_file = i18n.merge_file ('desktop-file',
|
||||||
type: 'desktop',
|
type: 'desktop',
|
||||||
input: configure_file(
|
input: configure_file(
|
||||||
input: files('org.gnome.Podcasts.desktop.in.in'),
|
input: files('org.gnome.Podcasts.desktop.in.in'),
|
||||||
@ -14,10 +14,20 @@ i18n.merge_file ('desktop-file',
|
|||||||
install: true,
|
install: true,
|
||||||
install_dir: join_paths (datadir, 'applications')
|
install_dir: join_paths (datadir, 'applications')
|
||||||
)
|
)
|
||||||
|
desktop_file_validate = find_program('desktop-file-validate', required: false)
|
||||||
|
if desktop_file_validate.found()
|
||||||
|
test(
|
||||||
|
'validate-desktop',
|
||||||
|
desktop_file_validate,
|
||||||
|
args: [
|
||||||
|
desktop_file.full_path()
|
||||||
|
]
|
||||||
|
)
|
||||||
|
endif
|
||||||
|
|
||||||
appdata_conf = configuration_data()
|
appdata_conf = configuration_data()
|
||||||
appdata_conf.set('appid', application_id)
|
appdata_conf.set('appid', application_id)
|
||||||
i18n.merge_file ('appdata-file',
|
appdata_file = i18n.merge_file ('appdata-file',
|
||||||
input: configure_file(
|
input: configure_file(
|
||||||
input: files('org.gnome.Podcasts.appdata.xml.in.in'),
|
input: files('org.gnome.Podcasts.appdata.xml.in.in'),
|
||||||
output: 'org.gnome.Podcasts.appdata.xml.in',
|
output: 'org.gnome.Podcasts.appdata.xml.in',
|
||||||
@ -28,6 +38,16 @@ i18n.merge_file ('appdata-file',
|
|||||||
install: true,
|
install: true,
|
||||||
install_dir: join_paths (datadir, 'metainfo')
|
install_dir: join_paths (datadir, 'metainfo')
|
||||||
)
|
)
|
||||||
|
appstream_util = find_program('appstream-util', required: false)
|
||||||
|
if appstream_util.found()
|
||||||
|
test(
|
||||||
|
'validate-appdata', appstream_util,
|
||||||
|
args: [
|
||||||
|
'validate-relax', '--nonet', appdata_file.full_path()
|
||||||
|
]
|
||||||
|
)
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
install_data('org.gnome.Podcasts.gschema.xml', install_dir: join_paths(datadir, 'glib-2.0', 'schemas'))
|
install_data('org.gnome.Podcasts.gschema.xml', install_dir: join_paths(datadir, 'glib-2.0', 'schemas'))
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user