mirror of https://github.com/noisymime/Arduino.git
Make metainfo and .desktop files spec compliant
This resolves bug #5890
This commit is contained in:
parent
44c0c7300e
commit
5af7165b40
|
@ -1,8 +1,12 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- See https://wiki.gnome.org/GnomeGoals/AppDataGnomeSoftware -->
|
<!-- See https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html -->
|
||||||
<application>
|
<component type="desktop-application">
|
||||||
<id type="desktop">arduino.desktop</id>
|
<id>cc.arduino.arduinoide.desktop</id>
|
||||||
<licence>CC-BY-SA</licence>
|
<metadata_license>CC-BY-SA-3.0</metadata_license>
|
||||||
|
|
||||||
|
<name>Arduino IDE</name>
|
||||||
|
<summary>Open-source electronics prototyping platform</summary>
|
||||||
|
|
||||||
<description>
|
<description>
|
||||||
<p>
|
<p>
|
||||||
Arduino is an open-source electronics prototyping platform based
|
Arduino is an open-source electronics prototyping platform based
|
||||||
|
@ -15,10 +19,13 @@
|
||||||
to develop and upload code to compatible microcontrollers.
|
to develop and upload code to compatible microcontrollers.
|
||||||
</p>
|
</p>
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<screenshots>
|
<screenshots>
|
||||||
<screenshot type="default" width="624" height="351">http://mavit.fedorapeople.org/appdata/arduino-screenshot.png</screenshot>
|
<screenshot type="default" width="624" height="351">http://mavit.fedorapeople.org/appdata/arduino-screenshot.png</screenshot>
|
||||||
<screenshot width="704" height="396">http://mavit.fedorapeople.org/appdata/arduino-photo.jpg</screenshot>
|
<screenshot width="704" height="396">http://mavit.fedorapeople.org/appdata/arduino-photo.jpg</screenshot>
|
||||||
</screenshots>
|
</screenshots>
|
||||||
|
|
||||||
<url type="homepage">http://www.arduino.cc/</url>
|
<url type="homepage">http://www.arduino.cc/</url>
|
||||||
<updatecontact>arduino.appdata.xml@mavit.org.uk</updatecontact>
|
|
||||||
</application>
|
<update_contact>arduino.appdata.xml@mavit.org.uk</update_contact>
|
||||||
|
</component>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# If called with the "-u" option, it will undo the changes.
|
# If called with the "-u" option, it will undo the changes.
|
||||||
|
|
||||||
# Resource name to use (including vendor prefix)
|
# Resource name to use (including vendor prefix)
|
||||||
RESOURCE_NAME=arduino-arduinoide
|
RESOURCE_NAME=cc.arduino.arduinoide
|
||||||
|
|
||||||
# Get absolute path from which this script file was executed
|
# Get absolute path from which this script file was executed
|
||||||
# (Could be changed to "pwd -P" to resolve symlinks to their target)
|
# (Could be changed to "pwd -P" to resolve symlinks to their target)
|
||||||
|
@ -85,6 +85,9 @@ simple_install_f() {
|
||||||
mkdir -p "${HOME}/.local/share/applications"
|
mkdir -p "${HOME}/.local/share/applications"
|
||||||
cp "${TMP_DIR}/${RESOURCE_NAME}.desktop" "${HOME}/.local/share/applications/"
|
cp "${TMP_DIR}/${RESOURCE_NAME}.desktop" "${HOME}/.local/share/applications/"
|
||||||
|
|
||||||
|
mkdir -p "${HOME}/.local/share/metainfo"
|
||||||
|
cp "${SCRIPT_PATH}/lib/appdata.xml" "${HOME}/.local/share/metainfo/${RESOURCE_NAME}.appdata.xml"
|
||||||
|
|
||||||
# Copy desktop icon if desktop dir exists (was found)
|
# Copy desktop icon if desktop dir exists (was found)
|
||||||
if [ -d "${XDG_DESKTOP_DIR}" ]; then
|
if [ -d "${XDG_DESKTOP_DIR}" ]; then
|
||||||
cp "${TMP_DIR}/${RESOURCE_NAME}.desktop" "${XDG_DESKTOP_DIR}/"
|
cp "${TMP_DIR}/${RESOURCE_NAME}.desktop" "${XDG_DESKTOP_DIR}/"
|
||||||
|
@ -137,14 +140,24 @@ xdg_uninstall_f() {
|
||||||
# Uninstall by simply removing desktop files (fallback), incl. old one
|
# Uninstall by simply removing desktop files (fallback), incl. old one
|
||||||
simple_uninstall_f() {
|
simple_uninstall_f() {
|
||||||
|
|
||||||
|
# delete legacy cruft .desktop file
|
||||||
if [ -f "${HOME}/.local/share/applications/arduino.desktop" ]; then
|
if [ -f "${HOME}/.local/share/applications/arduino.desktop" ]; then
|
||||||
rm "${HOME}/.local/share/applications/arduino.desktop"
|
rm "${HOME}/.local/share/applications/arduino.desktop"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# delete another legacy .desktop file
|
||||||
|
if [ -f "${HOME}/.local/share/applications/arduino-arduinoide.desktop" ]; then
|
||||||
|
rm "${HOME}/.local/share/applications/arduino-arduinoide.desktop"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -f "${HOME}/.local/share/applications/${RESOURCE_NAME}.desktop" ]; then
|
if [ -f "${HOME}/.local/share/applications/${RESOURCE_NAME}.desktop" ]; then
|
||||||
rm "${HOME}/.local/share/applications/${RESOURCE_NAME}.desktop"
|
rm "${HOME}/.local/share/applications/${RESOURCE_NAME}.desktop"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f "${HOME}/.local/share/metainfo/${RESOURCE_NAME}.appdata.xml" ]; then
|
||||||
|
rm "${HOME}/.local/share/metainfo/${RESOURCE_NAME}.appdata.xml"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -f "${XDG_DESKTOP_DIR}/arduino.desktop" ]; then
|
if [ -f "${XDG_DESKTOP_DIR}/arduino.desktop" ]; then
|
||||||
rm "${XDG_DESKTOP_DIR}/arduino.desktop"
|
rm "${XDG_DESKTOP_DIR}/arduino.desktop"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue