build: bump BUILD_ENGINEREVISION to 6235. Go over the build scripts to be compliant with /bin/dash, a strictly POSIX shell.

This commit is contained in:
Marco Cawthorne 2022-04-25 12:52:35 -07:00
parent 1cd2f320dc
commit 4c51ac7e79
Signed by: eukara
GPG key ID: C196CD8BA993248A
5 changed files with 74 additions and 45 deletions

View file

@ -32,7 +32,7 @@ BUILD_IQMTOOL=1
BUILD_IMGTOOL=1 BUILD_IMGTOOL=1
# Specify which engine revision to build, these are considered 'stable'; 0 = latest # Specify which engine revision to build, these are considered 'stable'; 0 = latest
BUILD_ENGINEREVISION=6224 BUILD_ENGINEREVISION=6235
# Whether or not to run 'git pull' or 'svn up' before building a component # Whether or not to run 'git pull' or 'svn up' before building a component
BUILD_UPDATE=1 BUILD_UPDATE=1

View file

@ -3,12 +3,14 @@
mv_wsfile() mv_wsfile()
{ {
if [ -f "./build/$1" ]; then if [ -f "./build/$1" ]
then
cp -v "./build/$1" "../../bin/$1" cp -v "./build/$1" "../../bin/$1"
fi fi
} }
if ! [ -x "$(command -v git)" ]; then if ! [ -x "$(command -v git)" ]
then
printf "'git' is not installed.\n" printf "'git' is not installed.\n"
exit exit
fi fi
@ -19,9 +21,11 @@ WS_MAKEFILE=./src/worldspawn/Makefile
COMPILE_SYS=$(uname) COMPILE_SYS=$(uname)
# Check how many cores/processors we should use for building # Check how many cores/processors we should use for building
if ! [ -x "$(command -v nproc)" ]; then if ! [ -x "$(command -v nproc)" ]
then
# check if we're on OpenBSD then # check if we're on OpenBSD then
if ! [ -x "$(command -v sysctl)" ]; then if ! [ -x "$(command -v sysctl)" ]
then
BUILD_PROC=1 BUILD_PROC=1
else else
BUILD_PROC=$(sysctl -n hw.ncpu) BUILD_PROC=$(sysctl -n hw.ncpu)
@ -30,12 +34,14 @@ else
BUILD_PROC=$(nproc) BUILD_PROC=$(nproc)
fi fi
if [ "$BUILD_DEBUG" -eq 1 ]; then if [ "$BUILD_DEBUG" -eq 1 ]
then
WS_CFLAGS="-g" WS_CFLAGS="-g"
fi fi
# handle search directories and platform specific libraries # handle search directories and platform specific libraries
if [[ "$COMPILE_SYS" == "OpenBSD" ]]; then if [ "$COMPILE_SYS" = "OpenBSD" ]
then
WS_CFLAGS="$WS_CFLAGS -I/usr/local/include -I/usr/local/include/gtkglext-1.0 -I/usr/local/lib/gtkglext-1.0/include -I/usr/local/include/libxml2/" WS_CFLAGS="$WS_CFLAGS -I/usr/local/include -I/usr/local/include/gtkglext-1.0 -I/usr/local/lib/gtkglext-1.0/include -I/usr/local/include/libxml2/"
WS_LDFLAGS="$WS_LDFLAGS -L/usr/local/lib" WS_LDFLAGS="$WS_LDFLAGS -L/usr/local/lib"
WS_CC=cc WS_CC=cc
@ -49,8 +55,10 @@ fi
mkdir -p ./bin mkdir -p ./bin
if [ -f "$WS_MAKEFILE" ]; then if [ -f "$WS_MAKEFILE" ]
if [ "$BUILD_UPDATE" -eq 1 ]; then then
if [ "$BUILD_UPDATE" -eq 1 ]
then
printf "WorldSpawn is present, updating...\n" printf "WorldSpawn is present, updating...\n"
cd ./src/worldspawn/ cd ./src/worldspawn/
git pull git pull
@ -64,7 +72,8 @@ else
cd ./worldspawn cd ./worldspawn
fi fi
if [ "$BUILD_CLEAN" -eq 1 ]; then if [ "$BUILD_CLEAN" -eq 1 ]
then
gmake clean gmake clean
fi fi

View file

@ -1,7 +1,8 @@
#!/bin/sh #!/bin/sh
. ./build.cfg . ./build.cfg
if ! [ -x "$(command -v svn)" ]; then if ! [ -x "$(command -v svn)" ]
then
printf "'svn' is not installed.\n" printf "'svn' is not installed.\n"
exit exit
fi fi
@ -12,9 +13,11 @@ FTE_MAKEFILE=./src/engine/engine/Makefile
COMPILE_SYS=$(uname) COMPILE_SYS=$(uname)
# Check how many cores/processors we should use for building # Check how many cores/processors we should use for building
if ! [ -x "$(command -v nproc)" ]; then if ! [ -x "$(command -v nproc)" ]
then
# check if we're on OpenBSD then # check if we're on OpenBSD then
if ! [ -x "$(command -v sysctl)" ]; then if ! [ -x "$(command -v sysctl)" ]
then
BUILD_PROC=1 BUILD_PROC=1
else else
BUILD_PROC=$(sysctl -n hw.ncpu) BUILD_PROC=$(sysctl -n hw.ncpu)
@ -23,7 +26,8 @@ else
BUILD_PROC=$(nproc) BUILD_PROC=$(nproc)
fi fi
if [ "$BUILD_DEBUG" -eq 1 ]; then if [ "$BUILD_DEBUG" -eq 1 ]
then
MAKETARGET=gl-dbg MAKETARGET=gl-dbg
OUTPUT=./debug OUTPUT=./debug
else else
@ -31,29 +35,29 @@ else
OUTPUT=./release OUTPUT=./release
fi fi
if [ "$BUILD_SDL2" -eq 1 ]; then if [ "$BUILD_SDL2" -eq 1 ]
then
PLATFORM=SDL2 PLATFORM=SDL2
OUTPUT=$OUTPUT/fteqw-glsdl2 OUTPUT=$OUTPUT/fteqw-glsdl2
else else
if [[ "$COMPILE_SYS" == "CYGWIN_NT-10.0" ]] || [[ "$COMPILE_SYS" == "CYGWIN_NT-6.1-WOW64" ]]; then if [ "$COMPILE_SYS" = "OpenBSD" ]
PLATFORM=win64 then
OUTPUT=$OUTPUT/fteglqw64.exe
elif [[ "$COMPILE_SYS" == "CYGWIN_NT-6.1" ]] || [[ "$COMPILE_SYS" == "CYGWIN_NT-5.1" ]]; then
PLATFORM=win32
OUTPUT=$OUTPUT/fteglqw32.exe
elif [[ "$COMPILE_SYS" == "OpenBSD" ]]; then
PLATFORM=bsd PLATFORM=bsd
OUTPUT=$OUTPUT/fteqw-gl OUTPUT=$OUTPUT/fteqw-gl
elif [[ "$COMPILE_SYS" == "FreeBSD" ]]; then elif [ "$COMPILE_SYS" = "FreeBSD" ]
then
PLATFORM=bsd PLATFORM=bsd
OUTPUT=$OUTPUT/fteqw-gl OUTPUT=$OUTPUT/fteqw-gl
elif [[ "$COMPILE_SYS" == "NetBSD" ]]; then elif [ "$COMPILE_SYS" = "NetBSD" ]
then
PLATFORM=bsd PLATFORM=bsd
OUTPUT=$OUTPUT/fteqw-gl OUTPUT=$OUTPUT/fteqw-gl
elif [[ "$COMPILE_SYS" == "Linux" ]]; then elif [ "$COMPILE_SYS" = "Linux" ]
then
PLATFORM=linux64 PLATFORM=linux64
OUTPUT=$OUTPUT/fteqw-gl64 OUTPUT=$OUTPUT/fteqw-gl64
elif [[ "$COMPILE_SYS" == "GNU/Linux" ]]; then elif [ "$COMPILE_SYS" = "GNU/Linux" ]
then
PLATFORM=linux64 PLATFORM=linux64
OUTPUT=$OUTPUT/fteqw-gl64 OUTPUT=$OUTPUT/fteqw-gl64
else else
@ -64,12 +68,15 @@ fi
mkdir -p ./bin mkdir -p ./bin
if [ -f "$FTE_MAKEFILE" ]; then if [ -f "$FTE_MAKEFILE" ]
if [ "$BUILD_UPDATE" -eq 1 ]; then then
if [ "$BUILD_UPDATE" -eq 1 ]
then
printf "Engine is present, updating...\n" printf "Engine is present, updating...\n"
cd ./src/engine/ cd ./src/engine/
if [ "$BUILD_ENGINEREVISION" == 0 ]; then if [ "$BUILD_ENGINEREVISION" -eq 0 ]
then
svn up svn up
else else
svn -r $BUILD_ENGINEREVISION up svn -r $BUILD_ENGINEREVISION up
@ -83,7 +90,8 @@ else
printf "Engine is NOT present, cloning...\n" printf "Engine is NOT present, cloning...\n"
cd ./src/ cd ./src/
if [ "$BUILD_ENGINEREVISION" == 0 ]; then if [ "$BUILD_ENGINEREVISION" -eq 0 ]
then
svn checkout https://svn.code.sf.net/p/fteqw/code/trunk engine svn checkout https://svn.code.sf.net/p/fteqw/code/trunk engine
else else
svn -r $BUILD_ENGINEREVISION checkout https://svn.code.sf.net/p/fteqw/code/trunk engine svn -r $BUILD_ENGINEREVISION checkout https://svn.code.sf.net/p/fteqw/code/trunk engine
@ -91,12 +99,14 @@ else
cd ./engine/engine cd ./engine/engine
fi fi
if [ "$BUILD_CLEAN" -eq 1 ]; then if [ "$BUILD_CLEAN" -eq 1 ]
then
gmake clean gmake clean
printf "Cleaned the build directory.\n\n" printf "Cleaned the build directory.\n\n"
fi fi
if [ "$BUILD_ENGINE_DEPENDENCIES" -eq 1 ]; then if [ "$BUILD_ENGINE_DEPENDENCIES" -eq 1 ]
then
gmake -j $BUILD_PROC makelibs FTE_TARGET=$PLATFORM gmake -j $BUILD_PROC makelibs FTE_TARGET=$PLATFORM
printf "Built the static dependencies successfully.\n\n" printf "Built the static dependencies successfully.\n\n"
fi fi
@ -113,31 +123,36 @@ gmake -j $BUILD_PROC qcc-rel
cp -v ./release/fteqcc ../../../bin/fteqcc cp -v ./release/fteqcc ../../../bin/fteqcc
printf "Built the QuakeC compiler successfully.\n\n" printf "Built the QuakeC compiler successfully.\n\n"
if [ "$BUILD_IMGTOOL" -eq 1 ]; then if [ "$BUILD_IMGTOOL" -eq 1 ]
then
gmake -j $BUILD_PROC imgtool-rel gmake -j $BUILD_PROC imgtool-rel
cp -v ./release/imgtool ../../../bin/imgtool cp -v ./release/imgtool ../../../bin/imgtool
printf "Built the imgtool successfully.\n\n" printf "Built the imgtool successfully.\n\n"
fi fi
if [ "$BUILD_SOURCE" -eq 1 ]; then if [ "$BUILD_SOURCE" -eq 1 ]
then
gmake -j $BUILD_PROC plugins-rel CFLAGS=-DGLQUAKE NATIVE_PLUGINS="hl2" gmake -j $BUILD_PROC plugins-rel CFLAGS=-DGLQUAKE NATIVE_PLUGINS="hl2"
find ./release/ -name 'fteplug_hl2_*.so' -exec cp -prv '{}' '../../../bin/' ';' find ./release/ -name 'fteplug_hl2_*.so' -exec cp -prv '{}' '../../../bin/' ';'
printf "Built the Source Engine plugin successfully.\n\n" printf "Built the Source Engine plugin successfully.\n\n"
fi fi
if [ "$BUILD_BULLET" -eq 1 ]; then if [ "$BUILD_BULLET" -eq 1 ]
then
gmake -j $BUILD_PROC plugins-rel NATIVE_PLUGINS="bullet" gmake -j $BUILD_PROC plugins-rel NATIVE_PLUGINS="bullet"
find ./release/ -name 'fteplug_bullet_*.so' -exec cp -prv '{}' '../../../bin/' ';' find ./release/ -name 'fteplug_bullet_*.so' -exec cp -prv '{}' '../../../bin/' ';'
printf "Built the bullet plugin successfully.\n\n" printf "Built the bullet plugin successfully.\n\n"
fi fi
if [ "$BUILD_ODE" -eq 1 ]; then if [ "$BUILD_ODE" -eq 1 ]
then
gmake -j $BUILD_PROC plugins-rel NATIVE_PLUGINS="ode" gmake -j $BUILD_PROC plugins-rel NATIVE_PLUGINS="ode"
find ./release/ -name 'fteplug_ode_*.so' -exec cp -prv '{}' '../../../bin/' ';' find ./release/ -name 'fteplug_ode_*.so' -exec cp -prv '{}' '../../../bin/' ';'
printf "Built the ode plugin successfully.\n\n" printf "Built the ode plugin successfully.\n\n"
fi fi
if [ "$BUILD_FFMPEG" -eq 1 ]; then if [ "$BUILD_FFMPEG" -eq 1 ]
then
gmake -j $BUILD_PROC plugins-rel NATIVE_PLUGINS="ffmpeg" gmake -j $BUILD_PROC plugins-rel NATIVE_PLUGINS="ffmpeg"
find ./release/ -name 'fteplug_ffmpeg_*.so' -exec cp -prv '{}' '../../../bin/' ';' find ./release/ -name 'fteplug_ffmpeg_*.so' -exec cp -prv '{}' '../../../bin/' ';'
printf "Built the ffmpeg plugin successfully.\n\n" printf "Built the ffmpeg plugin successfully.\n\n"

View file

@ -15,10 +15,9 @@ fi
set -e set -e
SCRPATH="$( cd "$( dirname $(readlink -nf $0) )" && pwd )" SCRPATH="$( cd "$( dirname $(readlink -nf $0) )" && pwd )"
PATH="$SCRPATH"/bin:"$PATH" PATH="$SCRPATH/bin:$PATH"
if [ -x "$(command -v fteqcc)" ]; then if [ -x "$(command -v fteqcc)" ]; then
# We want to compile a specific game # We want to compile a specific game
if [ $# -gt 0 ]; then if [ $# -gt 0 ]; then
if [ "$BUILD_UPDATE" -eq 1 ]; then if [ "$BUILD_UPDATE" -eq 1 ]; then

View file

@ -1,7 +1,8 @@
#!/bin/sh #!/bin/sh
. ./build.cfg . ./build.cfg
if ! [ -x "$(command -v git)" ]; then if ! [ -x "$(command -v git)" ]
then
printf "'git' is not installed.\n" printf "'git' is not installed.\n"
exit exit
fi fi
@ -12,9 +13,11 @@ VVM_MAKEFILE=./src/vvmtool/Makefile
COMPILE_SYS=$(uname) COMPILE_SYS=$(uname)
# Check how many cores/processors we should use for building # Check how many cores/processors we should use for building
if ! [ -x "$(command -v nproc)" ]; then if ! [ -x "$(command -v nproc)" ]
then
# check if we're on OpenBSD then # check if we're on OpenBSD then
if ! [ -x "$(command -v sysctl)" ]; then if ! [ -x "$(command -v sysctl)" ]
then
BUILD_PROC=1 BUILD_PROC=1
else else
BUILD_PROC=$(sysctl -n hw.ncpu) BUILD_PROC=$(sysctl -n hw.ncpu)
@ -25,8 +28,10 @@ fi
mkdir -p ./bin mkdir -p ./bin
if [ -f "$VVM_MAKEFILE" ]; then if [ -f "$VVM_MAKEFILE" ]
if [ "$BUILD_UPDATE" -eq 1 ]; then then
if [ "$BUILD_UPDATE" -eq 1 ]
then
printf "vvmtool is present, updating...\n" printf "vvmtool is present, updating...\n"
cd ./src/vvmtool cd ./src/vvmtool
git pull git pull
@ -40,7 +45,8 @@ else
cd ./vvmtool cd ./vvmtool
fi fi
if [ "$BUILD_CLEAN" -eq 1 ]; then if [ "$BUILD_CLEAN" -eq 1 ]
then
gmake clean gmake clean
fi fi