Do not lie as much in the desktop file

This commit is contained in:
Přemysl Eric Janouch 2021-11-18 13:36:31 +01:00
parent 06af1a3cc9
commit f8526d486a
Signed by: p
GPG Key ID: A0420B94F92B9493
2 changed files with 13 additions and 3 deletions

View File

@ -7,5 +7,4 @@ Exec=fastiv %F
Terminal=false Terminal=false
StartupNotify=true StartupNotify=true
Categories=Graphics;2DGraphics;Viewer; Categories=Graphics;2DGraphics;Viewer;
# TODO(p): Generate this list from source files. MimeType=image/png;image/bmp;image/gif;image/jpeg;
MimeType=image/png;image/bmp;image/gif;image/jpeg;image/x-dcraw;image/svg+xml;image/x-xcursor;

View File

@ -30,7 +30,7 @@ configure_file(
configuration : conf, configuration : conf,
) )
executable('fastiv', 'fastiv.c', 'fastiv-view.c', 'fastiv-io.c', exe = executable('fastiv', 'fastiv.c', 'fastiv-view.c', 'fastiv-io.c',
'fastiv-browser.c', 'xdg.c', 'fastiv-browser.c', 'xdg.c',
install : true, install : true,
dependencies : [dependencies]) dependencies : [dependencies])
@ -45,3 +45,14 @@ install_data('fastiv.desktop',
install_dir : get_option('datadir') + '/applications') install_dir : get_option('datadir') + '/applications')
install_data('fastiv.svg', install_data('fastiv.svg',
install_dir : get_option('datadir') + '/icons/hicolor/scalable/apps') install_dir : get_option('datadir') + '/icons/hicolor/scalable/apps')
# TODO(p): Replace this with custom_target().
if not meson.is_cross_build()
meson.add_install_script(
'sh', '-c', '''sed -i "/^MimeType=/{c \\
MimeType=$($1 --list-supported-media-types | tr "\\012" ";")
}" "$MESON_INSTALL_DESTDIR_PREFIX/$2"''',
'sh',
exe.full_path(),
get_option('datadir') + '/applications/fastiv.desktop')
endif