mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-12-12 13:12:07 +00:00
loki-setup: use xdg-desktop-menu instead of loki-setup legacy menu entries
This commit is contained in:
parent
bab9a00838
commit
13de2746ea
5 changed files with 47 additions and 0 deletions
|
@ -96,6 +96,10 @@ fi
|
||||||
### uninstall script
|
### uninstall script
|
||||||
install -m 755 ./preuninstall.sh image/preuninstall.sh
|
install -m 755 ./preuninstall.sh image/preuninstall.sh
|
||||||
|
|
||||||
|
# desktop file handling
|
||||||
|
install -m 755 ./install-desktop-files.sh image/install-desktop-files.sh
|
||||||
|
install -m 755 /usr/bin/xdg-desktop-menu image/xdg-desktop-menu
|
||||||
|
install -m 644 ioquake3.desktop image/ioquake3.desktop.in
|
||||||
|
|
||||||
### README, COPYING and EULA
|
### README, COPYING and EULA
|
||||||
install -m 644 $topdir/README image/README
|
install -m 644 $topdir/README image/README
|
||||||
|
|
14
misc/setup/install-desktop-files.sh
Executable file
14
misc/setup/install-desktop-files.sh
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
if ! test -e "$SETUP_INSTALLPATH"/ioquake3.desktop.in; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
xdg_desktop_menu=`which xdg-desktop-menu 2>/dev/null`
|
||||||
|
if test "x$xdg_desktop_menu" = x; then
|
||||||
|
xdg_desktop_menu=./xdg-desktop-menu
|
||||||
|
fi
|
||||||
|
sed -e "s#^Exec=.*#Exec=$SETUP_INSTALLPATH/ioquake3#" \
|
||||||
|
-e "s#^Icon=.*#Icon=$SETUP_INSTALLPATH/quake3.png#" \
|
||||||
|
< $SETUP_INSTALLPATH/ioquake3.desktop.in \
|
||||||
|
> $SETUP_INSTALLPATH/ioquake3.desktop
|
||||||
|
$xdg_desktop_menu install --novendor $SETUP_INSTALLPATH/ioquake3.desktop
|
9
misc/setup/ioquake3.desktop
Normal file
9
misc/setup/ioquake3.desktop
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=ioquake3
|
||||||
|
Exec=ioquake3
|
||||||
|
Icon=quake3
|
||||||
|
Type=Application
|
||||||
|
Terminal=false
|
||||||
|
Encoding=UTF-8
|
||||||
|
Categories=Game;ActionGame;
|
||||||
|
X-SuSE-translate=false
|
8
misc/setup/preuninstall.sh
Normal file → Executable file
8
misc/setup/preuninstall.sh
Normal file → Executable file
|
@ -1,2 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
rmdir --ignore-fail-on-non-empty demoq3 missionpack >& /dev/null
|
rmdir --ignore-fail-on-non-empty demoq3 missionpack >& /dev/null
|
||||||
|
if test -e "$SETUP_INSTALLPATH"/ioquake3.desktop.in; then
|
||||||
|
xdg_desktop_menu=`which xdg-desktop-menu 2>/dev/null`
|
||||||
|
if test "x$xdg_desktop_menu" = x; then
|
||||||
|
xdg_desktop_menu=./xdg-desktop-menu
|
||||||
|
fi
|
||||||
|
$xdg_desktop_menu uninstall --novendor ioquake3.desktop
|
||||||
|
rm ioquake3.desktop
|
||||||
|
fi
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
promptbinaries="yes"
|
promptbinaries="yes"
|
||||||
reinstall="yes"
|
reinstall="yes"
|
||||||
nopromptoverwrite="yes"
|
nopromptoverwrite="yes"
|
||||||
|
nomenuitems="yes"
|
||||||
|
postinstall="install-desktop-files.sh"
|
||||||
preuninstall="preuninstall.sh">
|
preuninstall="preuninstall.sh">
|
||||||
<readme>
|
<readme>
|
||||||
README
|
README
|
||||||
|
@ -42,6 +44,16 @@ ifelse(HAVE_PPC,yes,dnl
|
||||||
<help>you need the binaries to play the game</help>
|
<help>you need the binaries to play the game</help>
|
||||||
</option>
|
</option>
|
||||||
)dnl
|
)dnl
|
||||||
|
<option install="true">
|
||||||
|
Desktop menu entries
|
||||||
|
<files mode="0755">
|
||||||
|
xdg-desktop-menu
|
||||||
|
</files>
|
||||||
|
<files>
|
||||||
|
ioquake3.desktop.in
|
||||||
|
</files>
|
||||||
|
</option>
|
||||||
|
|
||||||
<option install="true" show="false">
|
<option install="true" show="false">
|
||||||
shared data
|
shared data
|
||||||
<files>
|
<files>
|
||||||
|
|
Loading…
Reference in a new issue