From 89b32ee83fad49e050ab87ee2aaa374f0b29d720 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Garramu=C3=B1o?= Date: Fri, 16 Aug 2024 14:19:39 -0300 Subject: [PATCH] Fixed Linux install scripts. --- mrv2/etc/Linux/mrv2.desktop.in | 2 +- mrv2/etc/Linux/mrv2.main.desktop.in | 2 +- mrv2/etc/Linux/postinst.in | 3 +-- mrv2/etc/Linux/postrm.in | 16 ++++++++++++---- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/mrv2/etc/Linux/mrv2.desktop.in b/mrv2/etc/Linux/mrv2.desktop.in index 2dad40b9a..fff238b23 100644 --- a/mrv2/etc/Linux/mrv2.desktop.in +++ b/mrv2/etc/Linux/mrv2.desktop.in @@ -2,7 +2,7 @@ Name=mrv2-64 v@mrv2_VERSION@ Comment=Professional Video and Flipbook player Exec=/usr/local/mrv2-v@mrv2_VERSION@-Linux-64/bin/mrv2.sh %F -Icon=/usr/share/icons/hicolor/48x48/apps/mrv2-v@mrv2_VERSION@.png +Icon=/usr/share/icons/hicolor/256x256/apps/mrv2-v@mrv2_VERSION@.png Categories=AudioVideo;Player;Video;Grapics;2DGraphics;RasterGraphics;FLTK; Comment[en_US]=Professional Image Viewer, Video and Audio playback MimeType=audio/opus;audio/x-mp3;audio/x-wav;video/x-theora+ogg;video/x-ogm+ogg;video/x-nsv;video/x-msvideo;video/x-ms-wmv;video/x-ms-wmp;video/x-ms-asf;video/x-mng;video/x-matroska;video/x-flv;video/x-flic;video/x-anim;video/webm;video/wavelet;video/vnd.rn-realvideo;video/vnd.mpegurl;video/vivo;video/quicktime;video/ogg;video/mpeg;video/mp4;video/mp2t;image/x-sgi;image/x-rgb;image/x-exr;image/tiff;image/png;image/jpeg;image/dpx; diff --git a/mrv2/etc/Linux/mrv2.main.desktop.in b/mrv2/etc/Linux/mrv2.main.desktop.in index 9fe079752..e919c6fcc 100644 --- a/mrv2/etc/Linux/mrv2.main.desktop.in +++ b/mrv2/etc/Linux/mrv2.main.desktop.in @@ -2,7 +2,7 @@ Name=mrv2 Comment=Professional Video and Flipbook player Exec=/usr/local/mrv2-v@mrv2_VERSION@-Linux-64/bin/mrv2.sh %F -Icon=/usr/share/icons/hicolor/48x48/apps/mrv2.png +Icon=/usr/share/icons/hicolor/256x256/apps/mrv2.png Categories=AudioVideo;Player;Video;Grapics;2DGraphics;RasterGraphics;FLTK; Comment[en_US]=Professional Image Viewer, Video and Audio playback MimeType=audio/opus;audio/x-mp3;audio/x-wav;video/x-theora+ogg;video/x-ogm+ogg;video/x-nsv;video/x-msvideo;video/x-ms-wmv;video/x-ms-wmp;video/x-ms-asf;video/x-mng;video/x-matroska;video/x-flv;video/x-flic;video/x-anim;video/webm;video/wavelet;video/vnd.rn-realvideo;video/vnd.mpegurl;video/vivo;video/quicktime;video/ogg;video/mpeg;video/mp4;video/mp2t;image/x-sgi;image/x-rgb;image/x-exr;image/tiff;image/png;image/jpeg;image/dpx; diff --git a/mrv2/etc/Linux/postinst.in b/mrv2/etc/Linux/postinst.in index ddcb1cf06..9543ad677 100644 --- a/mrv2/etc/Linux/postinst.in +++ b/mrv2/etc/Linux/postinst.in @@ -73,10 +73,9 @@ ICON_SIZES='16 32 48 64 128 256' for i in $ICON_SIZES; do echo " Installing icon size ${i}x${i}" cp ${sharedir}/icons/hicolor/${i}x${i}/apps/mrv2.png /usr/share/icons/hicolor/${i}x${i}/apps/mrv2-v@mrv2_VERSION@.png + cp ${sharedir}/icons/hicolor/${i}x${i}/apps/mrv2.png /usr/share/icons/hicolor/${i}x${i}/apps/mrv2.png done -cp ${sharedir}/icons/hicolor/32x32/apps/mrv2.png /usr/share/icons/hicolor/32x32/apps/mrv2.png -cp ${sharedir}/icons/hicolor/48x48/apps/mrv2.png /usr/share/icons/hicolor/48x48/apps/mrv2.png # # Copy versioned shortcut to applications and desktop diff --git a/mrv2/etc/Linux/postrm.in b/mrv2/etc/Linux/postrm.in index ea1dad696..6785a9024 100644 --- a/mrv2/etc/Linux/postrm.in +++ b/mrv2/etc/Linux/postrm.in @@ -1,5 +1,8 @@ #!/bin/bash +# Some constants +ICON_SIZES='16 32 48 64 128 256' + # Remove /usr/bin/mrv2 if it is a symlink to our version removed=0 if [[ -L /usr/bin/mrv2 ]]; then @@ -31,8 +34,14 @@ else echo "No suitable version found to create a symbolic link." echo "Removing /usr/share/applications/mrv2.desktop and mrv2.png" rm -f /usr/share/applications/mrv2.desktop - rm -f /usr/share/icons/hicolor/48x48/apps/mrv2.png - rm -f /usr/share/icons/hicolor/32x32/apps/mrv2.png + + # + # Remove all icon sizes + # + for i in $ICON_SIZES; do + icons_dir=${sharedir}/icons/hicolor/${i}x${i}/apps/ + rm -f $icons_dir/mrv2.png + done fi fi @@ -58,9 +67,8 @@ appdir=${sharedir}/applications # # Remove all icon sizes # -ICON_SIZES='16 32 48 64 128 256' for i in $ICON_SIZES; do - icons_dir=${shaderdir}/icons/hicolor/${i}x${i}/apps/ + icons_dir=${sharedir}/icons/hicolor/${i}x${i}/apps/ rm $icons_dir/mrv2-v@mrv2_VERSION@.png done