Skip to content
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

Add install of appdata for xdg_install_f #11807

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions build/linux/dist/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ xdg_install_f() {
# Install Arduino mime type
xdg-mime install "${SCRIPT_PATH}/lib/${RESOURCE_NAME}.xml"

mkdir -p "${HOME}/.local/share/metainfo"
cp "${SCRIPT_PATH}/appdata.xml" "${HOME}/.local/share/metainfo/${RESOURCE_NAME}.appdata.xml"

# Install icons for mime type
xdg-icon-resource install --context mimetypes --size 16 "${SCRIPT_PATH}/lib/icons/16x16/apps/arduino.png" text-x-arduino
xdg-icon-resource install --context mimetypes --size 24 "${SCRIPT_PATH}/lib/icons/24x24/apps/arduino.png" text-x-arduino
Expand All @@ -71,7 +74,6 @@ xdg_install_f() {
fi

# Add symlink for arduino so it's in users path
echo "" # Ensure password request message is on new line
if ! ln -s ${SCRIPT_PATH}/arduino /usr/local/bin/arduino; then
echo "Adding symlink failed. Hope that's OK. If not then rerun as root with sudo."
fi
Expand Down Expand Up @@ -112,7 +114,6 @@ simple_install_f() {
fi

# Add symlink for arduino so it's in users path
echo "" # Ensure password request message is on new line
if ! ln -s ${SCRIPT_PATH}/arduino /usr/local/bin/arduino; then
echo "Adding symlink failed. Hope that's OK. If not then rerun as root with sudo."
fi
Expand Down Expand Up @@ -157,8 +158,11 @@ xdg_uninstall_f() {
# Remove Arduino MIME type
xdg-mime uninstall "${SCRIPT_PATH}/lib/${RESOURCE_NAME}.xml"

if [ -f "${HOME}/.local/share/metainfo/${RESOURCE_NAME}.appdata.xml" ]; then
rm "${HOME}/.local/share/metainfo/${RESOURCE_NAME}.appdata.xml"
fi

# Remove symlink for arduino
echo "" # Ensure password request message is on new line
if [ -f /usr/local/bin/arduino ]; then
rm /usr/local/bin/arduino || echo "Removing symlink failed. Hope that's OK. If not then rerun as root with sudo."
fi
Expand Down Expand Up @@ -195,7 +199,6 @@ simple_uninstall_f() {
fi

# Remove symlink for arduino
echo "" # Ensure password request message is on new line
if [ -f /usr/local/bin/arduino ]; then
rm /usr/local/bin/arduino || echo "Removing symlink failed. Hope that's OK. If not then rerun as root with sudo."
fi
Expand Down