From 3c6c3d2e01fe4b234a8e3a9583c2a79eb699fb03 Mon Sep 17 00:00:00 2001 From: ac_stef Date: Tue, 16 Jun 2009 11:42:13 +0000 Subject: [PATCH] linux desktop integration git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4522 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- assaultcube.sh | 3 ++- client_desktop_install.sh | 35 +++++++++++++++++++++++++++++++++++ docs/README.html | 3 --- docs/getstarted.html | 6 ++++-- docs/pics/assaultcube.png | Bin 0 -> 3820 bytes 5 files changed, 41 insertions(+), 6 deletions(-) create mode 100755 client_desktop_install.sh create mode 100644 docs/pics/assaultcube.png diff --git a/assaultcube.sh b/assaultcube.sh index 0a807ecf..9d468047 100755 --- a/assaultcube.sh +++ b/assaultcube.sh @@ -2,7 +2,8 @@ # CUBE_DIR should refer to the directory in which Cube is placed. #CUBE_DIR=~/cube #CUBE_DIR=/usr/local/cube -CUBE_DIR=./ +#CUBE_DIR=./ +CUBE_DIR=$(dirname $(readlink -f "${0}")) # CUBE_OPTIONS contains any command line options you would like to start Cube with. #CUBE_OPTIONS="-f" diff --git a/client_desktop_install.sh b/client_desktop_install.sh new file mode 100755 index 00000000..3e870cd3 --- /dev/null +++ b/client_desktop_install.sh @@ -0,0 +1,35 @@ +#!/bin/sh +# announce the game to modern desktop environments +# (by creating ~/.local/share/applications/assaultcube_svn.desktop and ~/.local/share/icons/assaultcube.png) +# Hint: this script has to be located in the assaultcube base directory to work + +# get Exec target path (CUBE_DIR has to be the full path of the assaultcube base directory) +CUBE_DIR=$(dirname $(readlink -f "${0}")) + +if [ -x ${CUBE_DIR}/assaultcube.sh ] +then + cd ${CUBE_DIR} + mkdir -pv ~/.local/share/applications + mkdir -pv ~/.local/share/icons + cat > ~/.local/share/applications/assaultcube_svn.desktop << EOF_DESKTOPFILE +[Desktop Entry] +Version=1.0 +Encoding=UTF-8 +Name=AssaultCube SVN Test Version +Type=Application +GenericName=First Person Shooter +Icon=assaultcube.png +StartupNotify=false +Categories=Game;ActionGame; +Comment=Fast paced first-person shooter based upon the Cube engine +Comment[pl]=Szybka strzelanka oparta na silniku gry Cube +Comment[de]=Schneller Ego-Shooter basierend auf der Cube-Engine +EOF_DESKTOPFILE + echo "Exec=${CUBE_DIR}/assaultcube.sh" >> ~/.local/share/applications/assaultcube_svn.desktop + cp ${CUBE_DIR}/docs/pics/assaultcube.png ~/.local/share/icons +else + echo "could not find the AssaultCube base directory" + echo "move this script to the AC base directory and start it again" + exit 1 +fi + diff --git a/docs/README.html b/docs/README.html index 95035311..a77c6f6c 100644 --- a/docs/README.html +++ b/docs/README.html @@ -563,6 +563,3 @@ - - - diff --git a/docs/getstarted.html b/docs/getstarted.html index 33b88903..5de77368 100644 --- a/docs/getstarted.html +++ b/docs/getstarted.html @@ -132,7 +132,8 @@ Linux
Download the tarball from Sourceforge. Extract it somewhere where you have permissions - to read/write. + to read/write. If you want to start the game from your desktop application menu, you + have to run client_desktop_install.sh once. @@ -184,6 +185,7 @@ Linux
In a console, change your location (cd) to the main AssaultCube directory and then execute assaultcube.sh. + You can also pick AssaultCube from the 'Games' section of your desktop application menu. @@ -209,7 +211,7 @@ Users of Linux:
Note: Files that AssaultCube writes during the game (such as screenshots, configs - and maps) get saved in the hidden .assaultcube folder in your users home + and maps) get saved in the hidden .assaultcube_v1.1 folder in your users home directory.

diff --git a/docs/pics/assaultcube.png b/docs/pics/assaultcube.png new file mode 100644 index 0000000000000000000000000000000000000000..8dda0ebe92881e64eb23f2b7fc7a889bcfbd8ef7 GIT binary patch literal 3820 zcmV=+ zyWLrt&MtP{PNv&J-Bw(S-EAw|ov>OpRzXG(3@Y(N;0OAEeutx*^Nr~NraSNI zTj8hu&~rV2tD)&UTna!S0D&@Sat^RPY_t>ag|OF+IRymXFy=z0N> zNZ(fJKX)3l#gR;3XpKHN-gre){Q$o+=2uTj%VxpTV*#&(+VjR#H9%z}lsoHB1R8-B zAm|=x^377v0}mHMrL(zzk+e{daK@P9b#U2Xpm&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