From 5af7165b408e53e1e19fc19fea98cf649570a148 Mon Sep 17 00:00:00 2001 From: Matthias Klumpp Date: Fri, 20 Jan 2017 23:54:31 +0100 Subject: [PATCH 1/2] Make metainfo and .desktop files spec compliant This resolves bug #5890 --- build/linux/dist/appdata.xml | 19 +++++++++++++------ build/linux/dist/install.sh | 15 ++++++++++++++- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/build/linux/dist/appdata.xml b/build/linux/dist/appdata.xml index 410f4b646..ea48c62d3 100644 --- a/build/linux/dist/appdata.xml +++ b/build/linux/dist/appdata.xml @@ -1,8 +1,12 @@ - - - arduino.desktop - CC-BY-SA + + + cc.arduino.arduinoide.desktop + CC-BY-SA-3.0 + + Arduino IDE + Open-source electronics prototyping platform +

Arduino is an open-source electronics prototyping platform based @@ -15,10 +19,13 @@ to develop and upload code to compatible microcontrollers.

+ http://mavit.fedorapeople.org/appdata/arduino-screenshot.png http://mavit.fedorapeople.org/appdata/arduino-photo.jpg + http://www.arduino.cc/ - arduino.appdata.xml@mavit.org.uk -
+ + arduino.appdata.xml@mavit.org.uk + diff --git a/build/linux/dist/install.sh b/build/linux/dist/install.sh index c78081869..141fe52bf 100755 --- a/build/linux/dist/install.sh +++ b/build/linux/dist/install.sh @@ -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 # 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 + 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 From e54553a53dfc6524aa72f4e17a55c994c7c38933 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Sun, 22 Jan 2017 20:44:07 +0100 Subject: [PATCH 2/2] Add more fields to the AppStream metainfo file --- build/linux/dist/appdata.xml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/build/linux/dist/appdata.xml b/build/linux/dist/appdata.xml index ea48c62d3..dc0c5937d 100644 --- a/build/linux/dist/appdata.xml +++ b/build/linux/dist/appdata.xml @@ -3,6 +3,7 @@ cc.arduino.arduinoide.desktop CC-BY-SA-3.0 + Arduino LLC Arduino IDE Open-source electronics prototyping platform @@ -21,11 +22,21 @@ - http://mavit.fedorapeople.org/appdata/arduino-screenshot.png - http://mavit.fedorapeople.org/appdata/arduino-photo.jpg + + https://mavit.fedorapeople.org/appdata/arduino-screenshot.png + The Arduino IDE showing a simple example program + + + https://mavit.fedorapeople.org/appdata/arduino-photo.jpg + Arduino hardware being connected to a breadboard + http://www.arduino.cc/ + https://www.arduino.cc/en/Guide/HomePage + https://github.com/arduino/Arduino/issues + https://github.com/arduino/Arduino/tree/master/arduino-core/src/processing/app/i18n + https://www.arduino.cc/en/Main/Contribute arduino.appdata.xml@mavit.org.uk