Skip to content

Commit

Permalink
Add icestudio.xml and update .desktop and AppRun for text/x-icestudio…
Browse files Browse the repository at this point in the history
… MIME support
  • Loading branch information
lmcapacho committed Jan 8, 2025
1 parent de041fd commit 4fa0a45
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion res/AppImage/icestudio.AppDir/AppRun
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,13 @@ if [ "$INSTALL" == 1 ] ; then

# Install mime type
find "${APPDIR}/usr/share/mime/" -type f -name *xml -exec xdg-mime install $SYSTEM_WIDE --novendor {} \; 2>/dev/null || true
xdg-mime default "$VENDORPREFIX-$DESKTOP_FILE_NAME".desktop text/x-icestudio

# Install the icon files for the mime type; TODO: scalable
ICONS=$(find "${APPDIR}/usr/share/icons/" -wholename "*/mimetypes/*.png" 2>/dev/null || true)
for ICON in $ICONS ; do
ICON_SIZE=$(echo "${ICON}" | rev | cut -d "/" -f 3 | rev | cut -d "x" -f 1)
xdg-icon-resource install --context mimetypes --size ${ICON_SIZE} "${ICON}" $(basename $ICON | sed -e 's/.png//g')
xdg-icon-resource install --context mimetypes --size ${ICON_SIZE} "${ICON}" text-x-icestudio
done

xdg-desktop-menu forceupdate
Expand Down
1 change: 1 addition & 0 deletions res/AppImage/icestudio.AppDir/Icestudio.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ Terminal=false
Type=Application
X-AppImage-BuildId={{icestudioBuildId}}
Categories=Development
MimeType=text/x-icestudio


Binary file modified res/AppImage/icestudio.AppDir/icestudio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions res/AppImage/icestudio.AppDir/usr/share/mime/icestudio.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="text/x-icestudio">
<comment>Icestudio Project</comment>
<comment xml:lang="en">Icestudio Project</comment>
<comment xml:lang="es">Proyecto de Icestudio</comment>
<glob pattern="*.ice"/>
<generic-icon name="text-x-icestudio"/>
</mime-type>
</mime-info>

0 comments on commit 4fa0a45

Please sign in to comment.