Compare commits

...

38 Commits

Author SHA1 Message Date
Marcus 8cc359e046 missing pkg unzip 2024-01-24 01:16:56 +01:00
Marcus ea5ee0719e add env var NOAPT to disable apt-get during installation 2024-01-24 00:59:00 +01:00
Marcus 1ec3fa80d3 README 2024-01-15 02:39:46 +01:00
Marcus 672e36fd30 README 2024-01-15 02:37:14 +01:00
Marcus a5f6b448d1 README 2024-01-15 02:36:31 +01:00
Marcus 3322febc17 README 2024-01-15 02:35:08 +01:00
Marcus 11750c296f typo 2024-01-15 02:33:46 +01:00
Marcus f7facb03c3 typo 2024-01-15 02:29:34 +01:00
Marcus b87c13197f help text, README 2024-01-15 02:25:58 +01:00
Marcus f99a229d54 update README 2024-01-15 02:17:38 +01:00
Marcus 3f11a9d3b2 useful warning 2024-01-15 02:10:58 +01:00
Marcus ebe5725aca that was dumb 2024-01-15 02:02:41 +01:00
Marcus 6c6cda1711 try to fix 2024-01-15 02:01:49 +01:00
Marcus b9d43233bb a247e139bf fixed it 2024-01-15 01:57:56 +01:00
Marcus 3c38288e6c try to fix 2024-01-15 00:08:43 +01:00
Marcus 3f763bd092 try to fix 2024-01-15 00:06:29 +01:00
Marcus 5f8cea8411 no that was wrong, revert path 2024-01-15 00:03:55 +01:00
Marcus ee97af6be8 new path for 0.19 2024-01-15 00:02:37 +01:00
Marcus a08689ff3c dirty fix 2024-01-14 23:49:51 +01:00
Marcus de235b7e53 fix stuff 2024-01-14 23:11:04 +01:00
Marcus 7020818ff1 temporary fix, latest commit on xas3d-fwgs do not compile 2024-01-14 18:47:00 +01:00
Marcus c12951cf51 add pkg python-is-python3 as waf use /bin/python 2024-01-14 00:49:54 +01:00
Marcus dee3ebce90 typo 2024-01-14 00:44:19 +01:00
Marcus d46a22ef1d switch back to 0.20 fwgs repo, idk why i used the other lol. LD_LIBRARY_PATH fix 2024-01-14 00:30:41 +01:00
Marcus 219e3b1545 quick fix for the new xash3d-fwgs verison 2023-02-11 20:23:58 +01:00
DeltaLima 2a77b4ca48 „install-xash3d.sh“ ändern 2022-09-13 08:23:55 +00:00
Marcus 68e60c48e5 cp -a exits >0 when some symlinks are broken 2022-09-12 00:33:21 +02:00
Marcus efe0458d34 fixed debian packge 2022-09-12 00:27:36 +02:00
Marcus f600afde6f fixed debian packge 2022-09-12 00:25:19 +02:00
Marcus 8a77039b86 typo 2022-09-12 00:11:49 +02:00
Marcus 9f4aa69683 typo 2022-09-12 00:08:18 +02:00
Marcus b0ceece242 typo 2022-09-12 00:02:42 +02:00
Marcus 079d0090ff typo 2022-09-12 00:01:30 +02:00
Marcus 6b8b6fbe2a typo 2022-09-11 23:58:47 +02:00
Marcus be36824eeb typo 2022-09-11 23:58:20 +02:00
Marcus 9149a3a0d7 os specific packages 2022-09-11 23:57:12 +02:00
DeltaLima d94d094c28 „install-xash3d.sh“ ändern 2022-09-11 21:30:00 +00:00
DeltaLima cbeaca2ff5 „install-xash3d.sh“ ändern 2022-09-11 21:18:23 +00:00
2 changed files with 88 additions and 30 deletions

View File

@ -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!

View File

@ -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}"
;;