data: Generate list of mime types in meson

First, this format is more easy to maintain.
Second, future image decoder dependencies will be
opt-out via build options. This way we can also not
add the mime types in that case.

Closes #125

Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/181>
This commit is contained in:
Sophie Herold 2023-04-17 23:50:18 +02:00 • committed by Marge Bot
parent 83b95a58bd
commit 4eae4503bf
2 changed files with 46 additions and 1 deletions

View file

@ -1,3 +1,48 @@
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',
]
conf.set('MIME_TYPES', ';'.join(mime_types) + ';')
desktop_file = i18n.merge_file(
input: configure_file(
input: 'org.gnome.Loupe.desktop.in.in',