Compare commits
38 Commits
Author | SHA1 | Date |
---|---|---|
Marcus | 8cc359e046 | |
Marcus | ea5ee0719e | |
Marcus | 1ec3fa80d3 | |
Marcus | 672e36fd30 | |
Marcus | a5f6b448d1 | |
Marcus | 3322febc17 | |
Marcus | 11750c296f | |
Marcus | f7facb03c3 | |
Marcus | b87c13197f | |
Marcus | f99a229d54 | |
Marcus | 3f11a9d3b2 | |
Marcus | ebe5725aca | |
Marcus | 6c6cda1711 | |
Marcus | b9d43233bb | |
Marcus | 3c38288e6c | |
Marcus | 3f763bd092 | |
Marcus | 5f8cea8411 | |
Marcus | ee97af6be8 | |
Marcus | a08689ff3c | |
Marcus | de235b7e53 | |
Marcus | 7020818ff1 | |
Marcus | c12951cf51 | |
Marcus | dee3ebce90 | |
Marcus | d46a22ef1d | |
Marcus | 219e3b1545 | |
DeltaLima | 2a77b4ca48 | |
Marcus | 68e60c48e5 | |
Marcus | efe0458d34 | |
Marcus | f600afde6f | |
Marcus | 8a77039b86 | |
Marcus | 9f4aa69683 | |
Marcus | b0ceece242 | |
Marcus | 079d0090ff | |
Marcus | 6b8b6fbe2a | |
Marcus | be36824eeb | |
Marcus | 9149a3a0d7 | |
DeltaLima | d94d094c28 | |
DeltaLima | cbeaca2ff5 |
33
README.md
33
README.md
|
@ -2,15 +2,30 @@
|
|||
|
||||
Origin of this is https://git.la10cy.net/DeltaLima/xash3d-installscript
|
||||
|
||||
This script install an ready to run Half-Life Xash3D Game client or dedicated server under Ubuntu 20.04 and Debian 11 (those i tested so far) by downloading game data from steam directly with the free steamcmd tool from valve.
|
||||
This script install an ready to run Half-Life Xash3D Game client or dedicated server under Debian 11/12 and Ubuntu 20.04 (those i tested so far) by downloading game data from steam directly with the free steamcmd tool from valve.
|
||||
Just run the script and play :)
|
||||
|
||||
```
|
||||
Usage: ./install-xash3d.sh [server|client] [install|update] [0.19|0.20]
|
||||
|
||||
Description: Script to install an Xash3D-FWGS client or Xash3D dedicated server with game data from steamcmd
|
||||
Description: Script to install an Xash3D engine full game client or dedicated server with game data from steamcmd
|
||||
Server tested on Debian 11 ; Client tested on Ubuntu 20.04
|
||||
Origin: https://git.la10cy.net/DeltaLima/xash3ds-installscript
|
||||
Origin: https://git.la10cy.net/DeltaLima/xash3d-installscript
|
||||
|
||||
You can override following variables default values:
|
||||
XASH_INSTALL_DIR, XASH_DS_PORT and XASH_BUILD_DIR
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
1) Install client version 0.20 located in ~/Games/Xash3D where the build directory is as well
|
||||
|
||||
XASH_INSTALL_DIR=~/Games/Xash3D XASH_BUILD_DIR=$XASH_INSTALL_DIR/build ./install-xash3d.sh client install 0.20
|
||||
|
||||
2) Install server version '0.19' into '~/opt/xashds_oldengine'
|
||||
|
||||
XASH_INSTALL_DIR=~/opt/xashds_old ./install-xash3d.sh server update 0.19
|
||||
|
||||
|
||||
Resources we are using:
|
||||
https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
|
||||
|
@ -24,14 +39,16 @@ To install the server run following command in the directory where you checked t
|
|||
./install-xash3ds.sh server install [Version]
|
||||
```
|
||||
|
||||
To install the FULL PLAYABLE client with all game data (steamcmd thx <3) run this
|
||||
To install the FULL PLAYABLE client with all game data (steamcmd thx <3) run
|
||||
|
||||
```
|
||||
./install-xash3ds.sh client install [Version]
|
||||
./install-xash3d.sh client install 0.20
|
||||
```
|
||||
(Version 0.19 is actually broken as client, please use `0.20`)
|
||||
|
||||
Your server or gamefiles (you can run server first and then rerun afterwards with client to get the full package) are in
|
||||
```
|
||||
/path/to/repo/xash3ds-installscript/build/result
|
||||
/path/to/repo/xash3d-installscript/xash3d
|
||||
```
|
||||
|
||||
from there you can run the server
|
||||
|
@ -41,12 +58,12 @@ from there you can run the server
|
|||
|
||||
or the game to have a frag
|
||||
```
|
||||
./xash3d
|
||||
./start-xash3d.sh
|
||||
```
|
||||
|
||||
You can easly update both, client and server (example client):
|
||||
```
|
||||
./install-xash3d.sh client update [Version]
|
||||
./install-xash3d.sh client update 0.20
|
||||
```
|
||||
|
||||
Have a look on my servers at https://HL.LA10CY.NET :) Happy fragging!
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
# include /etc/os-type for distri specific packages
|
||||
. /etc/os-release
|
||||
OS=$ID
|
||||
OS_VER=$VERSION_ID
|
||||
|
||||
## check if variables for installation are predefined otherwise set defaults
|
||||
for xashvar in BUILD_DIR INSTALL_DIR DS_PORT
|
||||
do
|
||||
|
@ -45,13 +50,15 @@ XASH_INSTALL_DIR, XASH_DS_PORT and XASH_BUILD_DIR
|
|||
|
||||
Example:
|
||||
|
||||
1) Install server version '0.19' into '~/opt/xashds_oldengine'
|
||||
|
||||
XASH_INSTALL_DIR=~/opt/xashds_old $0 server install 0.19
|
||||
|
||||
2) Update client version 0.20 located in ~/Games/Xash3D where the build directory is as well
|
||||
1) Install client version 0.20 located in ~/Games/Xash3D where the build directory is as well
|
||||
|
||||
XASH_INSTALL_DIR=~/Games/Xash3D XASH_BUILD_DIR=\$XASH_INSTALL_DIR/build $0 client update 0.20
|
||||
XASH_INSTALL_DIR=~/Games/Xash3D XASH_BUILD_DIR=\$XASH_INSTALL_DIR/build $0 client install 0.20
|
||||
|
||||
2) Install server version '0.19' into '~/opt/xashds_oldengine'
|
||||
|
||||
XASH_INSTALL_DIR=~/opt/xashds_old $0 server update 0.19
|
||||
|
||||
|
||||
Resources we are using:
|
||||
$steamcmd_url
|
||||
|
@ -92,6 +99,8 @@ case $3 in
|
|||
|
||||
"0.20")
|
||||
XASH_GIT_URL="https://github.com/FWGS/xash3d-fwgs"
|
||||
## wtf did i here lol
|
||||
#XASH_GIT_URL="https://github.com/kungfulon/xash3d-fwgs"
|
||||
;;
|
||||
|
||||
*)
|
||||
|
@ -113,20 +122,41 @@ case $2 in
|
|||
esac
|
||||
XASH_INSTALL_MODE=$2
|
||||
|
||||
# client libsdl2-dev:i386 libfreetype6-dev:i386 libfontconfig-dev:i386
|
||||
# both g++-multilib git curl build-essential cmake zip xz-utils libstdc++6:i386 lib32gcc1-s1 gnupg2 gcc-multilib ca-certificates
|
||||
case $OS in
|
||||
debian)
|
||||
PACKAGES_OSSPECIFIC="lib32gcc-s1"
|
||||
;;
|
||||
ubuntu)
|
||||
case $OS_VER in
|
||||
20.04|21.10|22.04)
|
||||
PACKAGES_OSSPECIFIC="lib32gcc-s1"
|
||||
;;
|
||||
*)
|
||||
PACKAGES_OSSPECIFIC="lib32gcc1-s1"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
XASH_APT_PACKAGES="${PACKAGES_OSSPECIFIC} g++-multilib git curl build-essential cmake unzip zip xz-utils libstdc++6:i386 gnupg2 gcc-multilib ca-certificates python-is-python3"
|
||||
case $1 in
|
||||
"client")
|
||||
XASH_APT_PACKAGES+=" libsdl2-dev:i386 libfreetype6-dev:i386 libfontconfig-dev:i386"
|
||||
case $XASH_INSTALL_VERSION in
|
||||
0.19)
|
||||
CMAKE_OPTIONS='-DXASH_DOWNLOAD_DEPENDENCIES=yes -DXASH_STATIC=ON-DXASH_DLL_LOADER=ON -DXASH_VGUI=ON -DMAINUI_USE_STB=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_FLAGS="-m32" -DCMAKE_CXX_FLAGS="-m32"'
|
||||
message warn "!! Client in version 0.19 does not work at the moment! !!"
|
||||
message warn "!! press enter to continue, or STRG+C to abort. !!"
|
||||
read -p "> "
|
||||
CMAKE_OPTIONS='-DXASH_DOWNLOAD_DEPENDENCIES=yes -DXASH_STATIC=ON -DXASH_DLL_LOADER=ON -DXASH_VGUI=ON -DMAINUI_USE_STB=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_FLAGS="-m32" -DCMAKE_CXX_FLAGS="-m32"'
|
||||
;;
|
||||
|
||||
0.20)
|
||||
PACKAGES="git curl build-essential gcc-multilib g++-multilib python python2 libsdl2-dev:i386 libfontconfig-dev:i386 libfreetype6-dev:i386"
|
||||
WAF_OPTIONS="--enable-utils --enable-stb"
|
||||
WAF_OPTIONS="--enable-stb --enable-utils --enable-tests --enable-lto"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
;;
|
||||
"server")
|
||||
case $XASH_INSTALL_VERSION in
|
||||
|
@ -134,8 +164,8 @@ case $1 in
|
|||
CMAKE_OPTIONS='-DXASH_DEDICATED=ON -DCMAKE_C_FLAGS="-m32" -DCMAKE_CXX_FLAGS="-m32"'
|
||||
;;
|
||||
0.20)
|
||||
PACKAGES="build-essential ca-certificates cmake curl git gnupg2 g++-multilib lib32gcc1-s1 libstdc++6:i386 python unzip xz-utils zip"
|
||||
WAF_OPTIONS="-d"
|
||||
|
||||
WAF_OPTIONS="-d --enable-tests --enable-lto"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
@ -161,12 +191,12 @@ then
|
|||
checkerror $?
|
||||
fi
|
||||
|
||||
if [ "$XASH_INSTALL_MODE" == "install" ]
|
||||
if [ "$XASH_INSTALL_MODE" == "install" ] && [ ! $NOAPT ]
|
||||
then
|
||||
message info "Performing apt install"
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt update
|
||||
sudo apt-get install -y --no-install-recommends $PACKAGES
|
||||
sudo apt-get install -y --no-install-recommends $XASH_APT_PACKAGES
|
||||
fi
|
||||
|
||||
message info "Prepare ${YELLOW}${XASH_GIT_DIR}${ENDCOLOR}"
|
||||
|
@ -190,6 +220,8 @@ case $XASH_INSTALL_MODE in
|
|||
;;
|
||||
0.20)
|
||||
cd ${XASH_GIT_DIR}
|
||||
# as of 14.01.2024 master branch does not compile , going back to last known working commit
|
||||
# fixed test "$XASH_INSTALL_TYPE" == "server" && git checkout 0132eb6e44cb4a414d400c9ba42e5b4a94dcb590 # last with xash binary # last compiles 5ac8f63741c25c73ab771fb10211a320031c12dd
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -199,7 +231,9 @@ case $XASH_INSTALL_MODE in
|
|||
case $XASH_INSTALL_VERSION in
|
||||
0.19)
|
||||
cd bin
|
||||
cmake --cmake-clean-cache ../
|
||||
#old cmake from ubuntu 20.04
|
||||
#cmake --cmake-clean-cache ../
|
||||
# cmake --clean-first ../
|
||||
checkerror $?
|
||||
cd ../
|
||||
if [ "$(ls -A bin)" ]
|
||||
|
@ -212,14 +246,15 @@ case $XASH_INSTALL_MODE in
|
|||
cd bin
|
||||
;;
|
||||
0.20)
|
||||
./waf clean
|
||||
checkerror $?
|
||||
#./waf clean
|
||||
#checkerror $?
|
||||
if [ "$(ls -A bin)" ]
|
||||
then
|
||||
rm -Rf bin/*
|
||||
checkerror $?
|
||||
fi
|
||||
checkerror $?
|
||||
#test "$XASH_INSTALL_TYPE" != "server" &&
|
||||
git pull
|
||||
checkerror $?
|
||||
;;
|
||||
|
@ -244,7 +279,7 @@ case $XASH_INSTALL_VERSION in
|
|||
0.20)
|
||||
./waf configure -T release $WAF_OPTIONS
|
||||
checkerror $?
|
||||
./waf -p build
|
||||
./waf build
|
||||
checkerror $?
|
||||
./waf install --destdir=bin/
|
||||
checkerror $?
|
||||
|
@ -287,8 +322,8 @@ quit" > $XASH_BUILD_DIR/steam/hlds.install
|
|||
checkerror $?
|
||||
unzip "hlds_build_$hlds_build.zip" -d "hlds_build_$hlds_build"
|
||||
checkerror $?
|
||||
cp -R "hlds_build_$hlds_build/hlds_build_$hlds_build"/* $XASH_INSTALL_DIR
|
||||
checkerror $?
|
||||
cp -a "hlds_build_$hlds_build/hlds_build_$hlds_build"/* $XASH_INSTALL_DIR
|
||||
#checkerror $?
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -302,6 +337,7 @@ case $XASH_INSTALL_VERSION in
|
|||
case $XASH_INSTALL_TYPE in
|
||||
server)
|
||||
cp -R engine/xash3d $XASH_INSTALL_DIR/xash
|
||||
#cp -R build/xash3d/bin/engine/xash3d $XASH_INSTALL_DIR/xash
|
||||
checkerror $?
|
||||
;;
|
||||
client)
|
||||
|
@ -370,7 +406,7 @@ WantedBy=multi-user.target" > $XASH_INSTALL_DIR/xashds_${XASH_INSTALL_VERSION}_$
|
|||
Name=Xash3D ${XASH_INSTALL_VERSION}
|
||||
GenericName=Half-Life
|
||||
Comment=OpenSource Half-Life Engine
|
||||
Exec=${XASH_INSTALL_DIR}/xash3d
|
||||
Exec=${XASH_INSTALL_DIR}/start-xash3d.sh
|
||||
Icon=${XASH_INSTALL_DIR}/icon-xash-material.ico
|
||||
Terminal=false
|
||||
Type=Application
|
||||
|
@ -378,6 +414,11 @@ StartupNotify=false
|
|||
Categories=Game;
|
||||
X-Desktop-File-Install-Version=0.24" > $XASH_INSTALL_DIR/Xash3D_$(echo ${XASH_INSTALL_VERSION} | sed 's/\.//').desktop
|
||||
checkerror $?
|
||||
echo "#!/bin/sh
|
||||
export LD_LIBRARY_PATH=/lib32:/lib64:/lib:${XASH_INSTALL_DIR}
|
||||
|
||||
${XASH_INSTALL_DIR}/xash3d" > $XASH_INSTALL_DIR/start-xash3d.sh
|
||||
chmod +x $XASH_INSTALL_DIR/start-xash3d.sh
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
@ -391,7 +432,7 @@ case $XASH_INSTALL_MODE in
|
|||
message info "${YELLOW}${XASH_INSTALL_DIR}${ENDCOLOR}"
|
||||
case $XASH_INSTALL_TYPE in
|
||||
client)
|
||||
message info "You can run the game with ${YELLOW}'./xash3d'${ENDCOLOR} from the install location"
|
||||
message info "You can run the game with ${YELLOW}'./start-xash3d.sh'${ENDCOLOR} from the install location"
|
||||
message info "To install the game into your applications menu, run:"
|
||||
message info "${YELLOW}'desktop-file-install --dir=\$HOME/.local/share/applications ${XASH_INSTALL_DIR}/Xash3D_$(echo $XASH_INSTALL_VERSION | sed 's/\.//').desktop'${ENDCOLOR}"
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue