2021-03-09 14:01:03 +00:00
|
|
|
#!/bin/bash
|
2021-06-22 16:39:03 +00:00
|
|
|
#
|
|
|
|
# AccountFree - Browse and use online services, free of account.
|
|
|
|
# Copyright (C) 2021 Ad5001 <mail@ad5001.eu>
|
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#
|
2021-07-30 23:40:51 +00:00
|
|
|
# This script installs the desktop file & mime type for development environment, linking it directly to run.py.
|
2021-06-22 16:39:03 +00:00
|
|
|
|
2021-03-09 14:01:03 +00:00
|
|
|
APPROOT="$(cd -P "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
2021-03-09 19:37:12 +00:00
|
|
|
echo "Adding desktop file..."
|
2021-07-25 20:17:29 +00:00
|
|
|
sed "s+ROOTFOLDER+$APPROOT/+g" "$APPROOT/linux/logplotter.desktop" > "$APPROOT/linux/logarithmplotter-local.desktop"
|
|
|
|
xdg-desktop-menu install "$APPROOT/linux/logarithmplotter-local.desktop"
|
2021-03-09 19:37:12 +00:00
|
|
|
echo "Installing mime-type..."
|
2021-07-25 20:17:29 +00:00
|
|
|
xdg-mime install "$APPROOT/linux/x-logarithm-plot.xml"
|
|
|
|
echo "Installing icons..."
|
2021-07-30 23:40:51 +00:00
|
|
|
mkdir -p ~/.local/share/icons/hicolor/scalable/mimetypes
|
|
|
|
cp "$APPROOT/linux/application-x-logarithm-plot.svg" ~/.local/share/icons/hicolor/scalable/mimetypes/application-x-logarithm-plot.svg
|
|
|
|
mkdir -p ~/.local/share/icons/hicolor/scalable/apps
|
|
|
|
cp "$APPROOT/logplotter.svg" ~/.local/share/icons/hicolor/scalable/apps/logarithmplotter.svg
|
|
|
|
# xdg-icon-resource does not work with SVG yet. See https://bugs.launchpad.net/ubuntu/+source/xdg-utils/+bug/790449.
|
|
|
|
#xdg-icon-resource install --context mimetypes --novendor "$APPROOT/linux/application-x-logarithm-plot.svg" "application-x-logarithm-plot"
|
|
|
|
#xdg-icon-resource install --context apps --novendor "$APPROOT/logplotter.svg" "logarithmplotter"
|
2021-03-09 14:01:03 +00:00
|
|
|
update-mime-database ~/.local/share/mime/
|
|
|
|
update-icon-caches ~/.local/share/icons/hicolor
|