-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Make metainfo and .desktop files spec compliant #5892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- See https://wiki.gnome.org/GnomeGoals/AppDataGnomeSoftware --> | ||
<application> | ||
<id type="desktop">arduino.desktop</id> | ||
<licence>CC-BY-SA</licence> | ||
<!-- See https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html --> | ||
<component type="desktop-application"> | ||
<id>cc.arduino.arduinoide.desktop</id> | ||
<metadata_license>CC-BY-SA-3.0</metadata_license> | ||
<developer_name>Arduino LLC</developer_name> | ||
|
||
<name>Arduino IDE</name> | ||
<summary>Open-source electronics prototyping platform</summary> | ||
|
||
<description> | ||
<p> | ||
Arduino is an open-source electronics prototyping platform based | ||
|
@@ -15,10 +20,23 @@ | |
to develop and upload code to compatible microcontrollers. | ||
</p> | ||
</description> | ||
|
||
<screenshots> | ||
<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 type="default"> | ||
<image>https://mavit.fedorapeople.org/appdata/arduino-screenshot.png</image> | ||
<caption>The Arduino IDE showing a simple example program</caption> | ||
</screenshot> | ||
<screenshot> | ||
<image>https://mavit.fedorapeople.org/appdata/arduino-photo.jpg</image> | ||
<caption>Arduino hardware being connected to a breadboard</caption> | ||
</screenshot> | ||
</screenshots> | ||
|
||
<url type="homepage">http://www.arduino.cc/</url> | ||
<updatecontact>[email protected]</updatecontact> | ||
</application> | ||
<url type="help">https://www.arduino.cc/en/Guide/HomePage</url> | ||
<url type="bugtracker">https://github.com/arduino/Arduino/issues</url> | ||
<url type="translate">https://github.com/arduino/Arduino/tree/master/arduino-core/src/processing/app/i18n</url> | ||
<url type="donation">https://www.arduino.cc/en/Main/Contribute</url> | ||
|
||
<update_contact>[email protected]</update_contact> | ||
</component> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
# If called with the "-u" option, it will undo the changes. | ||
|
||
# Resource name to use (including vendor prefix) | ||
RESOURCE_NAME=arduino-arduinoide | ||
RESOURCE_NAME=cc.arduino.arduinoide | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it gets added later in the script (so the ID can be used by multiple things) |
||
|
||
# Get absolute path from which this script file was executed | ||
# (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" | ||
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) | ||
if [ -d "${XDG_DESKTOP_DIR}" ]; then | ||
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 | ||
simple_uninstall_f() { | ||
|
||
# delete legacy cruft .desktop file | ||
if [ -f "${HOME}/.local/share/applications/arduino.desktop" ]; then | ||
rm "${HOME}/.local/share/applications/arduino.desktop" | ||
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 | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should have a comment stating this was the name used in older scripts (perhaps add an OLD_RESOURCE_NAME var?) |
||
if [ -f "${HOME}/.local/share/applications/${RESOURCE_NAME}.desktop" ]; then | ||
rm "${HOME}/.local/share/applications/${RESOURCE_NAME}.desktop" | ||
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 | ||
rm "${XDG_DESKTOP_DIR}/arduino.desktop" | ||
fi | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should update this to an arduino.cc address (developers mailing list perhaps)? @cmaglie?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I no-longer maintain the Fedora package of Arduino, so certainly wouldn't object to this.