2023-04-17 23:50:18 +02:00
|
|
|
mime_types = []
|
|
|
|
|
|
|
|
|
|
# image-rs
|
|
|
|
|
mime_types += [
|
|
|
|
|
'image/jpeg',
|
|
|
|
|
'image/png',
|
|
|
|
|
'image/gif',
|
|
|
|
|
'image/webp',
|
|
|
|
|
'image/tiff',
|
|
|
|
|
# TGA
|
|
|
|
|
'image/x-tga',
|
|
|
|
|
# DDS
|
|
|
|
|
'image/vnd-ms.dds',
|
|
|
|
|
'image/x-dds',
|
|
|
|
|
'image/bmp',
|
|
|
|
|
# .ico
|
|
|
|
|
'image/vnd.microsoft.icon',
|
|
|
|
|
# HDR
|
|
|
|
|
'image/vnd.radiance',
|
|
|
|
|
# OpenEXR
|
|
|
|
|
'image/x-exr',
|
|
|
|
|
# PNM
|
|
|
|
|
'image/x-portable-bitmap',
|
|
|
|
|
'image/x-portable-graymap',
|
|
|
|
|
'image/x-portable-pixmap',
|
|
|
|
|
'image/x-portable-anymap',
|
|
|
|
|
# Qoi's MIME type is being worked on.
|
|
|
|
|
# See: https://github.com/phoboslab/qoi/issues/167
|
|
|
|
|
'image/x-qoi',
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
# SVG
|
|
|
|
|
mime_types += [
|
|
|
|
|
'image/svg+xml',
|
|
|
|
|
'image/svg+xml-compressed',
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
# HEIF
|
|
|
|
|
mime_types += [
|
|
|
|
|
'image/avif',
|
|
|
|
|
'image/heic',
|
|
|
|
|
]
|
|
|
|
|
|
2023-07-24 16:30:52 +02:00
|
|
|
# JXL
|
|
|
|
|
mime_types += [
|
|
|
|
|
'image/jxl',
|
|
|
|
|
]
|
|
|
|
|
|
2023-04-17 23:50:18 +02:00
|
|
|
conf.set('MIME_TYPES', ';'.join(mime_types) + ';')
|
|
|
|
|
|
2020-12-26 02:05:34 -08:00
|
|
|
desktop_file = i18n.merge_file(
|
|
|
|
|
input: configure_file(
|
2021-09-28 17:44:26 -07:00
|
|
|
input: 'org.gnome.Loupe.desktop.in.in',
|
|
|
|
|
output: 'org.gnome.Loupe.desktop.in',
|
2020-12-26 02:05:34 -08:00
|
|
|
configuration: conf,
|
|
|
|
|
),
|
|
|
|
|
output: '@0@.desktop'.format(app_id),
|
|
|
|
|
type: 'desktop',
|
|
|
|
|
po_dir: '../po',
|
|
|
|
|
install: true,
|
2022-08-05 00:21:23 -04:00
|
|
|
install_dir: iv_datadir / 'applications'
|
2020-12-26 02:05:34 -08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
configure_file(
|
2021-09-28 17:44:26 -07:00
|
|
|
input: 'org.gnome.Loupe.service.in',
|
2020-12-26 02:05:34 -08:00
|
|
|
output: '@0@.service'.format(app_id),
|
|
|
|
|
configuration: conf,
|
|
|
|
|
install: true,
|
2022-08-05 00:21:23 -04:00
|
|
|
install_dir: iv_datadir / 'dbus-1' / 'services'
|
2020-12-26 02:05:34 -08: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: configure_file(
|
2022-10-06 16:22:38 +02:00
|
|
|
input: 'org.gnome.Loupe.metainfo.xml.in.in',
|
|
|
|
|
output: 'org.gnome.Loupe.metainfo.xml.in',
|
2020-12-26 02:05:34 -08:00
|
|
|
configuration: conf,
|
|
|
|
|
),
|
2022-10-06 16:22:38 +02:00
|
|
|
output: '@0@.metainfo.xml'.format(app_id),
|
2020-12-26 02:05:34 -08:00
|
|
|
po_dir: '../po',
|
|
|
|
|
install: true,
|
2022-10-06 16:22:38 +02:00
|
|
|
install_dir: iv_datadir / 'metainfo'
|
2020-12-26 02:05:34 -08:00
|
|
|
)
|
|
|
|
|
|
2023-12-22 04:12:53 +03:00
|
|
|
# Validate Appdata
|
|
|
|
|
appstreamcli = find_program('appstreamcli', required: false)
|
|
|
|
|
if (appstreamcli.found())
|
|
|
|
|
test('Validate metainfo file',
|
|
|
|
|
appstreamcli,
|
|
|
|
|
args: ['validate', '--no-net', appstream_file],
|
|
|
|
|
workdir: meson.current_build_dir()
|
|
|
|
|
)
|
|
|
|
|
endif
|
|
|
|
|
|
2023-04-02 01:39:23 +02:00
|
|
|
subdir('icons')
|
2020-12-26 02:05:34 -08:00
|
|
|
|
2023-12-05 17:24:53 +01:00
|
|
|
# GSchema
|
|
|
|
|
gschema_conf = configuration_data()
|
|
|
|
|
gschema_conf.set('app-id', app_id)
|
|
|
|
|
gschema_conf.set('gettext-package', meson.project_name())
|
|
|
|
|
configure_file(
|
|
|
|
|
input: '@0@.gschema.xml.in'.format(base_id),
|
|
|
|
|
output: '@0@.gschema.xml'.format(app_id),
|
|
|
|
|
configuration: gschema_conf,
|
|
|
|
|
install: true,
|
|
|
|
|
install_dir: iv_datadir / 'glib-2.0' / 'schemas'
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Validate GSchema
|
|
|
|
|
test(
|
|
|
|
|
'validate-gschema', glib_compile_schemas,
|
|
|
|
|
args: [
|
|
|
|
|
'--strict', '--dry-run', meson.current_source_dir()
|
|
|
|
|
]
|
|
|
|
|
)
|
|
|
|
|
|
2023-04-02 01:39:23 +02:00
|
|
|
# Post install
|
2020-12-26 02:05:34 -08:00
|
|
|
|
2023-04-02 01:39:23 +02:00
|
|
|
gnome.post_install()
|