r1371 - trunk/misc/setup
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat Jun 7 09:31:18 EDT 2008
Author: ludwig
Date: 2008-06-07 09:31:18 -0400 (Sat, 07 Jun 2008)
New Revision: 1371
Added:
trunk/misc/setup/install-desktop-files.sh
trunk/misc/setup/ioquake3.desktop
Modified:
trunk/misc/setup/doit
trunk/misc/setup/preuninstall.sh
trunk/misc/setup/setup.xml.in
Log:
loki-setup: use xdg-desktop-menu instead of loki-setup legacy menu entries
Modified: trunk/misc/setup/doit
===================================================================
--- trunk/misc/setup/doit 2008-06-05 15:14:07 UTC (rev 1370)
+++ trunk/misc/setup/doit 2008-06-07 13:31:18 UTC (rev 1371)
@@ -96,6 +96,10 @@
### uninstall script
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
install -m 644 $topdir/README image/README
Added: trunk/misc/setup/install-desktop-files.sh
===================================================================
--- trunk/misc/setup/install-desktop-files.sh (rev 0)
+++ trunk/misc/setup/install-desktop-files.sh 2008-06-07 13:31:18 UTC (rev 1371)
@@ -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
Property changes on: trunk/misc/setup/install-desktop-files.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/misc/setup/ioquake3.desktop
===================================================================
--- trunk/misc/setup/ioquake3.desktop (rev 0)
+++ trunk/misc/setup/ioquake3.desktop 2008-06-07 13:31:18 UTC (rev 1371)
@@ -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
Modified: trunk/misc/setup/preuninstall.sh
===================================================================
--- trunk/misc/setup/preuninstall.sh 2008-06-05 15:14:07 UTC (rev 1370)
+++ trunk/misc/setup/preuninstall.sh 2008-06-07 13:31:18 UTC (rev 1371)
@@ -1,2 +1,10 @@
#!/bin/sh
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
Property changes on: trunk/misc/setup/preuninstall.sh
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/misc/setup/setup.xml.in
===================================================================
--- trunk/misc/setup/setup.xml.in 2008-06-05 15:14:07 UTC (rev 1370)
+++ trunk/misc/setup/setup.xml.in 2008-06-07 13:31:18 UTC (rev 1371)
@@ -6,6 +6,8 @@
promptbinaries="yes"
reinstall="yes"
nopromptoverwrite="yes"
+ nomenuitems="yes"
+ postinstall="install-desktop-files.sh"
preuninstall="preuninstall.sh">
<readme>
README
@@ -42,6 +44,16 @@
<help>you need the binaries to play the game</help>
</option>
)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">
shared data
<files>
More information about the quake3-commits
mailing list