aboutsummaryrefslogtreecommitdiffstats
path: root/misc/setup
diff options
context:
space:
mode:
authorludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-06-07 13:31:18 +0000
committerludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-06-07 13:31:18 +0000
commitc5f253e8b3c5b8907a568db81586885e0c71f9b5 (patch)
tree94dfcc275c3a22c8c5b96d8e11ab80d49d811a02 /misc/setup
parentea3ae9e586b8fb35e72587ff33ddd759c85954f1 (diff)
downloadioquake3-aero-c5f253e8b3c5b8907a568db81586885e0c71f9b5.tar.gz
ioquake3-aero-c5f253e8b3c5b8907a568db81586885e0c71f9b5.zip
loki-setup: use xdg-desktop-menu instead of loki-setup legacy menu entries
git-svn-id: svn://svn.icculus.org/quake3/trunk@1371 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'misc/setup')
-rwxr-xr-xmisc/setup/doit4
-rwxr-xr-xmisc/setup/install-desktop-files.sh14
-rw-r--r--misc/setup/ioquake3.desktop9
-rwxr-xr-x[-rw-r--r--]misc/setup/preuninstall.sh8
-rw-r--r--misc/setup/setup.xml.in12
5 files changed, 47 insertions, 0 deletions
diff --git a/misc/setup/doit b/misc/setup/doit
index 834cff9..be5a279 100755
--- a/misc/setup/doit
+++ b/misc/setup/doit
@@ -96,6 +96,10 @@ fi
### 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
diff --git a/misc/setup/install-desktop-files.sh b/misc/setup/install-desktop-files.sh
new file mode 100755
index 0000000..5bcb411
--- /dev/null
+++ b/misc/setup/install-desktop-files.sh
@@ -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
diff --git a/misc/setup/ioquake3.desktop b/misc/setup/ioquake3.desktop
new file mode 100644
index 0000000..0ccff3a
--- /dev/null
+++ b/misc/setup/ioquake3.desktop
@@ -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
diff --git a/misc/setup/preuninstall.sh b/misc/setup/preuninstall.sh
index 49e8056..e6a413d 100644..100755
--- a/misc/setup/preuninstall.sh
+++ b/misc/setup/preuninstall.sh
@@ -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
diff --git a/misc/setup/setup.xml.in b/misc/setup/setup.xml.in
index 65dd1b9..a74cb98 100644
--- a/misc/setup/setup.xml.in
+++ b/misc/setup/setup.xml.in
@@ -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 @@ ifelse(HAVE_PPC,yes,dnl
<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>