„install-xash3ds.sh“ ändern
This commit is contained in:
parent
f429a2e2bb
commit
4af75f6379
1 changed files with 15 additions and 5 deletions
|
@ -37,15 +37,17 @@ CLIENT=false
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
echo "= Creating directories ="
|
||||||
XASH3D_BASEDIR=$(pwd)/build
|
XASH3D_BASEDIR=$(pwd)/build
|
||||||
mkdir -p $XASH3D_BASEDIR/result
|
mkdir -p $XASH3D_BASEDIR/result
|
||||||
|
|
||||||
|
|
||||||
|
echo "= Performing apt install ="
|
||||||
sudo dpkg --add-architecture i386
|
sudo dpkg --add-architecture i386
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt-get install -y --no-install-recommends $PACKAGES
|
sudo apt-get install -y --no-install-recommends $PACKAGES
|
||||||
|
|
||||||
|
echo "= Compiling xash3d-fwgs ="
|
||||||
## compile xash3ds
|
## compile xash3ds
|
||||||
# go to build directory
|
# go to build directory
|
||||||
cd $XASH3D_BASEDIR
|
cd $XASH3D_BASEDIR
|
||||||
|
@ -74,13 +76,14 @@ app_update 90 validate
|
||||||
app_update 90 validate
|
app_update 90 validate
|
||||||
quit" > $XASH3D_BASEDIR/steam/hlds.install
|
quit" > $XASH3D_BASEDIR/steam/hlds.install
|
||||||
|
|
||||||
|
echo "= fetching hlds with steamcmd ="
|
||||||
## fetch steamcmd
|
## fetch steamcmd
|
||||||
curl -sL "$steamcmd_url" | tar xzvf -
|
curl -sL "$steamcmd_url" | tar xzvf -
|
||||||
## run half-life download from steam server with steamcmd
|
## run half-life download from steam server with steamcmd
|
||||||
## If grep find Error then fetch the hlds zip from github
|
## If grep find Error then fetch the hlds zip from github
|
||||||
if ./steamcmd.sh +runscript hlds.install | grep Error
|
if ./steamcmd.sh +runscript hlds.install | grep Error
|
||||||
then
|
then
|
||||||
echo "There was an error fetching hlds with steamcmd. Fetching it from github"
|
echo "= !! There was an error fetching hlds with steamcmd. Fetching it from github !! ="
|
||||||
echo $hlds_url
|
echo $hlds_url
|
||||||
## this is just another source you can use instead of steamcmd.
|
## this is just another source you can use instead of steamcmd.
|
||||||
curl -LJO "$hlds_url"
|
curl -LJO "$hlds_url"
|
||||||
|
@ -90,11 +93,18 @@ fi
|
||||||
|
|
||||||
## copy xash3d binaries to result
|
## copy xash3d binaries to result
|
||||||
## place Xash3D binaries in result and overwrite all
|
## place Xash3D binaries in result and overwrite all
|
||||||
|
echo "= copy xash3d binaries to build/result"
|
||||||
cp -R $XASH3D_BASEDIR/xash3d-fwgs/bin/* $XASH3D_BASEDIR/result/
|
cp -R $XASH3D_BASEDIR/xash3d-fwgs/bin/* $XASH3D_BASEDIR/result/
|
||||||
|
|
||||||
touch $XASH3D_BASEDIR/result/valve/listip.cfg
|
touch $XASH3D_BASEDIR/result/valve/listip.cfg
|
||||||
touch $XASH3D_BASEDIR/result/valve/banned.cfg
|
touch $XASH3D_BASEDIR/result/valve/banned.cfg
|
||||||
# it seems that the build actually (21.08.2022) is buggy and does not exec server.cfg by its own
|
# it seems that the build actually (21.08.2022) is buggy and does not exec server.cfg by its own
|
||||||
|
if [ "$1" == "server" ]
|
||||||
|
then
|
||||||
|
echo "= Creating start.sh script for dedicated server in build/result ="
|
||||||
echo "./xash +ip 0.0.0.0 -port $XASHDS_PORT -pingboost 1 -timeout 3 +map boot_camp +exec server.cfg" > $XASH3D_BASEDIR/result/start.sh
|
echo "./xash +ip 0.0.0.0 -port $XASHDS_PORT -pingboost 1 -timeout 3 +map boot_camp +exec server.cfg" > $XASH3D_BASEDIR/result/start.sh
|
||||||
chmod +x $XASH3D_BASEDIR/result/start.sh
|
chmod +x $XASH3D_BASEDIR/result/start.sh
|
||||||
cd $XASH3D_BASEDIR/result
|
fi
|
||||||
|
|
||||||
|
echo "= DONE! If everything went well an no errors occured you can just run your game/server from $XASH3D_BASEDIR/result/ ="
|
||||||
|
echo "= starting server: ./start.sh ; starting game client ./xash3d ="
|
Loading…
Reference in a new issue