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:
parent
83b95a58bd
commit
4eae4503bf
2 changed files with 46 additions and 1 deletions
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@ DBusActivatable=true
|
|||
Terminal=false
|
||||
Type=Application
|
||||
Categories=GNOME;GTK;Graphics;2DGraphics;RasterGraphics;Viewer;
|
||||
MimeType=image/avif;image/x-dds;image/x-ff;image/heic;image/heif;image/x-exr;image/x-targa;image/x-tga;image/webp;image/bmp;image/gif;image/jpeg;image/jpg;image/pjpeg;image/png;image/tiff;image/x-bmp;image/x-gray;image/x-icb;image/x-ico;image/x-png;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-xbitmap;image/x-xpixmap;image/x-pcx;image/svg+xml;image/svg+xml-compressed;image/vnd.wap.wbmp;image/x-icns;
|
||||
MimeType=@MIME_TYPES@
|
||||
Keywords=Picture;Slideshow;Graphics;Image Viewer;
|
||||
StartupNotify=true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue