Install XDG desktop entry for JoinMarketQt

This commit is contained in:
Kristaps Kaupe 2020-06-03 19:08:02 +03:00
parent ebd4a82403
commit cfc4869ac9
No known key found for this signature in database
GPG key ID: D47B1B4232B55437
2 changed files with 20 additions and 1 deletions

View file

@ -276,13 +276,24 @@ joinmarket_install ()
{
reqs=( 'base.txt' )
if [[ ${with_qt} = "1" ]]; then
if [[ ${with_qt} == "1" ]]; then
reqs+=( 'gui.txt' )
fi
for req in ${reqs[@]}; do
pip install -r "requirements/${req}" || return 1
done
if [[ ${with_qt} == "1" ]]; then
if check_exists xdg-open; then
echo "Installing XDG desktop entry"
cp -f "$(dirname "$0")/docs/images/joinmarket_logo.png" \
~/.local/share/icons/
cat "$(dirname "$0")/joinmarket-qt.desktop" | \
sed "s/\\\$JMHOME/$(dirname "$(realpath "$0")" | sed 's/\//\\\//g')/" > \
~/.local/share/applications/joinmarket-qt.desktop
fi
fi
}
parse_flags ()

8
joinmarket-qt.desktop Normal file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Name=JoinMarketQt
Exec=$JMHOME/scripts/joinmarket-qt.sh
Icon=joinmarket_logo