2021-02-04 19:25:29 +00:00
|
|
|
subdir('icons')
|
|
|
|
# Desktop file
|
|
|
|
desktop_conf = configuration_data()
|
|
|
|
desktop_conf.set('icon', application_id)
|
|
|
|
desktop_file = i18n.merge_file(
|
|
|
|
type: 'desktop',
|
|
|
|
input: configure_file(
|
|
|
|
input: '@0@.desktop.in.in'.format(base_id),
|
|
|
|
output: '@BASENAME@',
|
|
|
|
configuration: desktop_conf
|
|
|
|
),
|
|
|
|
output: '@0@.desktop'.format(application_id),
|
|
|
|
po_dir: podir,
|
|
|
|
install: true,
|
|
|
|
install_dir: datadir / 'applications'
|
|
|
|
)
|
|
|
|
# Validate Desktop file
|
|
|
|
if desktop_file_validate.found()
|
|
|
|
test(
|
|
|
|
'validate-desktop',
|
|
|
|
desktop_file_validate,
|
|
|
|
args: [
|
|
|
|
desktop_file.full_path()
|
|
|
|
]
|
|
|
|
)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Appdata
|
2023-11-25 14:22:22 +00:00
|
|
|
if profile == 'Devel'
|
2023-11-24 11:53:10 +00:00
|
|
|
appstream_version = major_version
|
2023-05-16 11:28:32 +00:00
|
|
|
if pre_release_version != ''
|
2023-11-24 11:53:10 +00:00
|
|
|
appstream_version += '~' + pre_release_version
|
2023-05-16 11:28:32 +00:00
|
|
|
endif
|
2023-11-24 11:53:10 +00:00
|
|
|
appstream_version += '-' + devel_version
|
2023-05-16 11:28:32 +00:00
|
|
|
|
2023-04-29 12:52:35 +00:00
|
|
|
development_release = '''
|
|
|
|
<release version="@0@" type="development" date="@1@">
|
|
|
|
<description>
|
|
|
|
<p>Development release.</p>
|
|
|
|
</description>
|
2023-11-24 14:14:39 +00:00
|
|
|
</release>'''.format(appstream_version, release_date)
|
2023-11-25 14:22:22 +00:00
|
|
|
else
|
|
|
|
development_release = ''
|
2023-04-29 12:52:35 +00:00
|
|
|
endif
|
2021-02-04 19:25:29 +00:00
|
|
|
appdata_conf = configuration_data()
|
|
|
|
appdata_conf.set('app-id', application_id)
|
|
|
|
appdata_conf.set('gettext-package', gettext_package)
|
2023-04-29 12:52:35 +00:00
|
|
|
appdata_conf.set('development-release', development_release)
|
2021-02-04 19:25:29 +00:00
|
|
|
appdata_file = i18n.merge_file(
|
|
|
|
input: configure_file(
|
|
|
|
input: '@0@.metainfo.xml.in.in'.format(base_id),
|
|
|
|
output: '@BASENAME@',
|
|
|
|
configuration: appdata_conf
|
|
|
|
),
|
|
|
|
output: '@0@.metainfo.xml'.format(application_id),
|
|
|
|
po_dir: podir,
|
|
|
|
install: true,
|
|
|
|
install_dir: datadir / 'metainfo'
|
|
|
|
)
|
|
|
|
# Validate Appdata
|
2023-10-03 15:45:29 +00:00
|
|
|
if appstreamcli.found()
|
2021-02-04 19:25:29 +00:00
|
|
|
test(
|
2023-10-03 15:45:29 +00:00
|
|
|
'validate-appdata', appstreamcli,
|
2021-02-04 19:25:29 +00:00
|
|
|
args: [
|
2023-11-27 12:02:56 +00:00
|
|
|
'validate', '--no-net', appdata_file.full_path()
|
2021-02-04 19:25:29 +00:00
|
|
|
]
|
|
|
|
)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# GSchema
|
|
|
|
gschema_conf = configuration_data()
|
|
|
|
gschema_conf.set('app-id', application_id)
|
2023-04-29 13:43:53 +00:00
|
|
|
gschema_conf.set('profile', profile)
|
2021-02-04 19:25:29 +00:00
|
|
|
gschema_conf.set('gettext-package', gettext_package)
|
|
|
|
configure_file(
|
|
|
|
input: '@0@.gschema.xml.in'.format(base_id),
|
|
|
|
output: '@0@.gschema.xml'.format(application_id),
|
|
|
|
configuration: gschema_conf,
|
|
|
|
install: true,
|
|
|
|
install_dir: datadir / 'glib-2.0' / 'schemas'
|
|
|
|
)
|
|
|
|
|
2023-06-22 08:58:56 +00:00
|
|
|
# Validate GSchema
|
2021-02-04 19:25:29 +00:00
|
|
|
if glib_compile_schemas.found()
|
|
|
|
test(
|
|
|
|
'validate-gschema', glib_compile_schemas,
|
|
|
|
args: [
|
|
|
|
'--strict', '--dry-run', meson.current_source_dir()
|
|
|
|
]
|
|
|
|
)
|
|
|
|
endif
|
|
|
|
|
2021-02-15 16:44:07 +00:00
|
|
|
subdir('resources')
|