Skip to content

Commit 0b549ef

Browse files
authored
Merge pull request #5892 from ximion/master
Make metainfo and .desktop files spec compliant
2 parents 2e98854 + e54553a commit 0b549ef

File tree

2 files changed

+40
-9
lines changed

2 files changed

+40
-9
lines changed

Diff for: build/linux/dist/appdata.xml

+26-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!-- See https://wiki.gnome.org/GnomeGoals/AppDataGnomeSoftware -->
3-
<application>
4-
<id type="desktop">arduino.desktop</id>
5-
<licence>CC-BY-SA</licence>
2+
<!-- See https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html -->
3+
<component type="desktop-application">
4+
<id>cc.arduino.arduinoide.desktop</id>
5+
<metadata_license>CC-BY-SA-3.0</metadata_license>
6+
<developer_name>Arduino LLC</developer_name>
7+
8+
<name>Arduino IDE</name>
9+
<summary>Open-source electronics prototyping platform</summary>
10+
611
<description>
712
<p>
813
Arduino is an open-source electronics prototyping platform based
@@ -15,10 +20,23 @@
1520
to develop and upload code to compatible microcontrollers.
1621
</p>
1722
</description>
23+
1824
<screenshots>
19-
<screenshot type="default" width="624" height="351">http://mavit.fedorapeople.org/appdata/arduino-screenshot.png</screenshot>
20-
<screenshot width="704" height="396">http://mavit.fedorapeople.org/appdata/arduino-photo.jpg</screenshot>
25+
<screenshot type="default">
26+
<image>https://mavit.fedorapeople.org/appdata/arduino-screenshot.png</image>
27+
<caption>The Arduino IDE showing a simple example program</caption>
28+
</screenshot>
29+
<screenshot>
30+
<image>https://mavit.fedorapeople.org/appdata/arduino-photo.jpg</image>
31+
<caption>Arduino hardware being connected to a breadboard</caption>
32+
</screenshot>
2133
</screenshots>
34+
2235
<url type="homepage">http://www.arduino.cc/</url>
23-
<updatecontact>[email protected]</updatecontact>
24-
</application>
36+
<url type="help">https://www.arduino.cc/en/Guide/HomePage</url>
37+
<url type="bugtracker">https://github.com/arduino/Arduino/issues</url>
38+
<url type="translate">https://github.com/arduino/Arduino/tree/master/arduino-core/src/processing/app/i18n</url>
39+
<url type="donation">https://www.arduino.cc/en/Main/Contribute</url>
40+
41+
<update_contact>[email protected]</update_contact>
42+
</component>

Diff for: build/linux/dist/install.sh

+14-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# If called with the "-u" option, it will undo the changes.
77

88
# Resource name to use (including vendor prefix)
9-
RESOURCE_NAME=arduino-arduinoide
9+
RESOURCE_NAME=cc.arduino.arduinoide
1010

1111
# Get absolute path from which this script file was executed
1212
# (Could be changed to "pwd -P" to resolve symlinks to their target)
@@ -85,6 +85,9 @@ simple_install_f() {
8585
mkdir -p "${HOME}/.local/share/applications"
8686
cp "${TMP_DIR}/${RESOURCE_NAME}.desktop" "${HOME}/.local/share/applications/"
8787

88+
mkdir -p "${HOME}/.local/share/metainfo"
89+
cp "${SCRIPT_PATH}/lib/appdata.xml" "${HOME}/.local/share/metainfo/${RESOURCE_NAME}.appdata.xml"
90+
8891
# Copy desktop icon if desktop dir exists (was found)
8992
if [ -d "${XDG_DESKTOP_DIR}" ]; then
9093
cp "${TMP_DIR}/${RESOURCE_NAME}.desktop" "${XDG_DESKTOP_DIR}/"
@@ -137,14 +140,24 @@ xdg_uninstall_f() {
137140
# Uninstall by simply removing desktop files (fallback), incl. old one
138141
simple_uninstall_f() {
139142

143+
# delete legacy cruft .desktop file
140144
if [ -f "${HOME}/.local/share/applications/arduino.desktop" ]; then
141145
rm "${HOME}/.local/share/applications/arduino.desktop"
142146
fi
143147

148+
# delete another legacy .desktop file
149+
if [ -f "${HOME}/.local/share/applications/arduino-arduinoide.desktop" ]; then
150+
rm "${HOME}/.local/share/applications/arduino-arduinoide.desktop"
151+
fi
152+
144153
if [ -f "${HOME}/.local/share/applications/${RESOURCE_NAME}.desktop" ]; then
145154
rm "${HOME}/.local/share/applications/${RESOURCE_NAME}.desktop"
146155
fi
147156

157+
if [ -f "${HOME}/.local/share/metainfo/${RESOURCE_NAME}.appdata.xml" ]; then
158+
rm "${HOME}/.local/share/metainfo/${RESOURCE_NAME}.appdata.xml"
159+
fi
160+
148161
if [ -f "${XDG_DESKTOP_DIR}/arduino.desktop" ]; then
149162
rm "${XDG_DESKTOP_DIR}/arduino.desktop"
150163
fi

0 commit comments

Comments
 (0)