„install-xash3ds.sh“ ändern
This commit is contained in:
parent
b2f17c9732
commit
e669104fb6
1 changed files with 18 additions and 10 deletions
|
@ -9,19 +9,27 @@ metamod_url="https://github.com/mittorn/metamod-p/releases/download/1/metamod.so
|
||||||
amxmod_url="http://www.amxmodx.org/release/amxmodx-$amxmod_version-base-linux.tar.gz"
|
amxmod_url="http://www.amxmodx.org/release/amxmodx-$amxmod_version-base-linux.tar.gz"
|
||||||
jk_botti_url="http://koti.kapsi.fi/jukivili/web/jk_botti/jk_botti-$jk_botti_version-release.tar.xz"
|
jk_botti_url="http://koti.kapsi.fi/jukivili/web/jk_botti/jk_botti-$jk_botti_version-release.tar.xz"
|
||||||
|
|
||||||
XASH3D_BASEDIR=$(pwd)/build/xashds
|
XASH3D_BASEDIR=$(pwd)/build
|
||||||
mkdir -p $XASH3D_BASEDIR
|
mkdir -p $XASH3D_BASEDIR/result
|
||||||
|
|
||||||
|
# Prerequisits satisfied?
|
||||||
sudo dpkg --add-architecture i386
|
sudo dpkg --add-architecture i386
|
||||||
apt-get install -y --no-install-recommends build-essential ca-certificates cmake curl git gnupg2 g++-multilib lib32gcc1-s1 libstdc++6:i386 python unzip xz-utils zip
|
apt-get install -y --no-install-recommends build-essential ca-certificates cmake curl git gnupg2 g++-multilib lib32gcc1-s1 libstdc++6:i386 python unzip xz-utils zip
|
||||||
|
|
||||||
|
## compile xash3ds
|
||||||
|
# go to build directory
|
||||||
|
cd $XASH3D_BASEDIR
|
||||||
git clone --recursive https://github.com/FWGS/xash3d
|
git clone --recursive https://github.com/FWGS/xash3d
|
||||||
mkdir -p xash3d/build
|
mkdir -p xash3d/build
|
||||||
|
|
||||||
cd xash3d/build
|
cd xash3d/build
|
||||||
cmake -DXASH_DEDICATED=ON -DCMAKE_C_FLAGS="-m32" -DCMAKE_CXX_FLAGS="-m32" ../
|
cmake -DXASH_DEDICATED=ON -DCMAKE_C_FLAGS="-m32" -DCMAKE_CXX_FLAGS="-m32" ../
|
||||||
make
|
make
|
||||||
mv engine/xash3d XASH3D_BASEDIR/xash3ds
|
mv engine/xash3d $XASH3D_BASEDIR/result/xash3ds
|
||||||
|
|
||||||
|
## get half-life data from steam
|
||||||
|
mkdir -p $XASH3D_BASEDIR/steam
|
||||||
|
cd $XASH3D_BASEDIR/steam
|
||||||
echo "login anonymous
|
echo "login anonymous
|
||||||
force_install_dir ./xashds
|
force_install_dir ./xashds
|
||||||
app_set_config 90 mod valve
|
app_set_config 90 mod valve
|
||||||
|
@ -29,18 +37,18 @@ app_update 90
|
||||||
app_update 90
|
app_update 90
|
||||||
app_update 90 validate
|
app_update 90 validate
|
||||||
app_update 90 validate
|
app_update 90 validate
|
||||||
quit" > ../../build/hlds.install
|
quit" > $XASH3D_BASEDIR/steam/hlds.install
|
||||||
|
|
||||||
cd ../../build
|
|
||||||
curl -sL "$steamcmd_url" | tar xzvf -
|
curl -sL "$steamcmd_url" | tar xzvf -
|
||||||
./steamcmd.sh +runscript hlds.install
|
./steamcmd.sh +runscript hlds.install
|
||||||
|
|
||||||
curl -sLJO "$hlds_url"
|
curl -sLJO "$hlds_url"
|
||||||
unzip "hlds_build_$hlds_build.zip" -d "/opt/steam/hlds_build_$hlds_build"
|
unzip "hlds_build_$hlds_build.zip" -d "/opt/steam/hlds_build_$hlds_build"
|
||||||
mv "hlds_build_$hlds_build/hlds"/* xashds/
|
mv "hlds_build_$hlds_build/hlds"/* $XASH3D_BASEDIR/result/
|
||||||
rm -rf "hlds_build_$hlds_build" "hlds_build_$hlds_build.zip"
|
|
||||||
|
|
||||||
touch $XASH3D_BASEDIR/valve/listip.cfg
|
|
||||||
touch $XASH3D_BASEDIR/valve/banned.cfg
|
|
||||||
|
|
||||||
cd $XASH3D_BASEDIR
|
touch $XASH3D_BASEDIR/result/valve/listip.cfg
|
||||||
|
touch $XASH3D_BASEDIR/result/valve/banned.cfg
|
||||||
|
echo "./xash3ds +ip 0.0.0.0:27015 -pingboost 1" > $XASH3D_BASEDIR/result/start.sh
|
||||||
|
chmod +x $XASH3D_BASEDIR/result/start.sh
|
||||||
|
cd $XASH3D_BASEDIR/result
|
Loading…
Reference in a new issue