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 00000000..8dda0ebe Binary files /dev/null and b/docs/pics/assaultcube.png differ