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:
parent
1cd2f320dc
commit
4c51ac7e79
5 changed files with 74 additions and 45 deletions
|
@ -32,7 +32,7 @@ BUILD_IQMTOOL=1
|
|||
BUILD_IMGTOOL=1
|
||||
|
||||
# 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
|
||||
BUILD_UPDATE=1
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
|
||||
mv_wsfile()
|
||||
{
|
||||
if [ -f "./build/$1" ]; then
|
||||
if [ -f "./build/$1" ]
|
||||
then
|
||||
cp -v "./build/$1" "../../bin/$1"
|
||||
fi
|
||||
}
|
||||
|
||||
if ! [ -x "$(command -v git)" ]; then
|
||||
if ! [ -x "$(command -v git)" ]
|
||||
then
|
||||
printf "'git' is not installed.\n"
|
||||
exit
|
||||
fi
|
||||
|
@ -19,9 +21,11 @@ WS_MAKEFILE=./src/worldspawn/Makefile
|
|||
COMPILE_SYS=$(uname)
|
||||
|
||||
# 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
|
||||
if ! [ -x "$(command -v sysctl)" ]; then
|
||||
if ! [ -x "$(command -v sysctl)" ]
|
||||
then
|
||||
BUILD_PROC=1
|
||||
else
|
||||
BUILD_PROC=$(sysctl -n hw.ncpu)
|
||||
|
@ -30,12 +34,14 @@ else
|
|||
BUILD_PROC=$(nproc)
|
||||
fi
|
||||
|
||||
if [ "$BUILD_DEBUG" -eq 1 ]; then
|
||||
if [ "$BUILD_DEBUG" -eq 1 ]
|
||||
then
|
||||
WS_CFLAGS="-g"
|
||||
fi
|
||||
|
||||
# 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_LDFLAGS="$WS_LDFLAGS -L/usr/local/lib"
|
||||
WS_CC=cc
|
||||
|
@ -49,8 +55,10 @@ fi
|
|||
|
||||
mkdir -p ./bin
|
||||
|
||||
if [ -f "$WS_MAKEFILE" ]; then
|
||||
if [ "$BUILD_UPDATE" -eq 1 ]; then
|
||||
if [ -f "$WS_MAKEFILE" ]
|
||||
then
|
||||
if [ "$BUILD_UPDATE" -eq 1 ]
|
||||
then
|
||||
printf "WorldSpawn is present, updating...\n"
|
||||
cd ./src/worldspawn/
|
||||
git pull
|
||||
|
@ -64,7 +72,8 @@ else
|
|||
cd ./worldspawn
|
||||
fi
|
||||
|
||||
if [ "$BUILD_CLEAN" -eq 1 ]; then
|
||||
if [ "$BUILD_CLEAN" -eq 1 ]
|
||||
then
|
||||
gmake clean
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#!/bin/sh
|
||||
. ./build.cfg
|
||||
|
||||
if ! [ -x "$(command -v svn)" ]; then
|
||||
if ! [ -x "$(command -v svn)" ]
|
||||
then
|
||||
printf "'svn' is not installed.\n"
|
||||
exit
|
||||
fi
|
||||
|
@ -12,9 +13,11 @@ FTE_MAKEFILE=./src/engine/engine/Makefile
|
|||
COMPILE_SYS=$(uname)
|
||||
|
||||
# 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
|
||||
if ! [ -x "$(command -v sysctl)" ]; then
|
||||
if ! [ -x "$(command -v sysctl)" ]
|
||||
then
|
||||
BUILD_PROC=1
|
||||
else
|
||||
BUILD_PROC=$(sysctl -n hw.ncpu)
|
||||
|
@ -23,7 +26,8 @@ else
|
|||
BUILD_PROC=$(nproc)
|
||||
fi
|
||||
|
||||
if [ "$BUILD_DEBUG" -eq 1 ]; then
|
||||
if [ "$BUILD_DEBUG" -eq 1 ]
|
||||
then
|
||||
MAKETARGET=gl-dbg
|
||||
OUTPUT=./debug
|
||||
else
|
||||
|
@ -31,29 +35,29 @@ else
|
|||
OUTPUT=./release
|
||||
fi
|
||||
|
||||
if [ "$BUILD_SDL2" -eq 1 ]; then
|
||||
if [ "$BUILD_SDL2" -eq 1 ]
|
||||
then
|
||||
PLATFORM=SDL2
|
||||
OUTPUT=$OUTPUT/fteqw-glsdl2
|
||||
else
|
||||
if [[ "$COMPILE_SYS" == "CYGWIN_NT-10.0" ]] || [[ "$COMPILE_SYS" == "CYGWIN_NT-6.1-WOW64" ]]; then
|
||||
PLATFORM=win64
|
||||
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
|
||||
if [ "$COMPILE_SYS" = "OpenBSD" ]
|
||||
then
|
||||
PLATFORM=bsd
|
||||
OUTPUT=$OUTPUT/fteqw-gl
|
||||
elif [[ "$COMPILE_SYS" == "FreeBSD" ]]; then
|
||||
elif [ "$COMPILE_SYS" = "FreeBSD" ]
|
||||
then
|
||||
PLATFORM=bsd
|
||||
OUTPUT=$OUTPUT/fteqw-gl
|
||||
elif [[ "$COMPILE_SYS" == "NetBSD" ]]; then
|
||||
elif [ "$COMPILE_SYS" = "NetBSD" ]
|
||||
then
|
||||
PLATFORM=bsd
|
||||
OUTPUT=$OUTPUT/fteqw-gl
|
||||
elif [[ "$COMPILE_SYS" == "Linux" ]]; then
|
||||
elif [ "$COMPILE_SYS" = "Linux" ]
|
||||
then
|
||||
PLATFORM=linux64
|
||||
OUTPUT=$OUTPUT/fteqw-gl64
|
||||
elif [[ "$COMPILE_SYS" == "GNU/Linux" ]]; then
|
||||
elif [ "$COMPILE_SYS" = "GNU/Linux" ]
|
||||
then
|
||||
PLATFORM=linux64
|
||||
OUTPUT=$OUTPUT/fteqw-gl64
|
||||
else
|
||||
|
@ -64,12 +68,15 @@ fi
|
|||
|
||||
mkdir -p ./bin
|
||||
|
||||
if [ -f "$FTE_MAKEFILE" ]; then
|
||||
if [ "$BUILD_UPDATE" -eq 1 ]; then
|
||||
if [ -f "$FTE_MAKEFILE" ]
|
||||
then
|
||||
if [ "$BUILD_UPDATE" -eq 1 ]
|
||||
then
|
||||
printf "Engine is present, updating...\n"
|
||||
cd ./src/engine/
|
||||
|
||||
if [ "$BUILD_ENGINEREVISION" == 0 ]; then
|
||||
if [ "$BUILD_ENGINEREVISION" -eq 0 ]
|
||||
then
|
||||
svn up
|
||||
else
|
||||
svn -r $BUILD_ENGINEREVISION up
|
||||
|
@ -83,7 +90,8 @@ else
|
|||
printf "Engine is NOT present, cloning...\n"
|
||||
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
|
||||
else
|
||||
svn -r $BUILD_ENGINEREVISION checkout https://svn.code.sf.net/p/fteqw/code/trunk engine
|
||||
|
@ -91,12 +99,14 @@ else
|
|||
cd ./engine/engine
|
||||
fi
|
||||
|
||||
if [ "$BUILD_CLEAN" -eq 1 ]; then
|
||||
if [ "$BUILD_CLEAN" -eq 1 ]
|
||||
then
|
||||
gmake clean
|
||||
printf "Cleaned the build directory.\n\n"
|
||||
fi
|
||||
|
||||
if [ "$BUILD_ENGINE_DEPENDENCIES" -eq 1 ]; then
|
||||
if [ "$BUILD_ENGINE_DEPENDENCIES" -eq 1 ]
|
||||
then
|
||||
gmake -j $BUILD_PROC makelibs FTE_TARGET=$PLATFORM
|
||||
printf "Built the static dependencies successfully.\n\n"
|
||||
fi
|
||||
|
@ -113,31 +123,36 @@ gmake -j $BUILD_PROC qcc-rel
|
|||
cp -v ./release/fteqcc ../../../bin/fteqcc
|
||||
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
|
||||
cp -v ./release/imgtool ../../../bin/imgtool
|
||||
printf "Built the imgtool successfully.\n\n"
|
||||
fi
|
||||
|
||||
if [ "$BUILD_SOURCE" -eq 1 ]; then
|
||||
if [ "$BUILD_SOURCE" -eq 1 ]
|
||||
then
|
||||
gmake -j $BUILD_PROC plugins-rel CFLAGS=-DGLQUAKE NATIVE_PLUGINS="hl2"
|
||||
find ./release/ -name 'fteplug_hl2_*.so' -exec cp -prv '{}' '../../../bin/' ';'
|
||||
printf "Built the Source Engine plugin successfully.\n\n"
|
||||
fi
|
||||
|
||||
if [ "$BUILD_BULLET" -eq 1 ]; then
|
||||
if [ "$BUILD_BULLET" -eq 1 ]
|
||||
then
|
||||
gmake -j $BUILD_PROC plugins-rel NATIVE_PLUGINS="bullet"
|
||||
find ./release/ -name 'fteplug_bullet_*.so' -exec cp -prv '{}' '../../../bin/' ';'
|
||||
printf "Built the bullet plugin successfully.\n\n"
|
||||
fi
|
||||
|
||||
if [ "$BUILD_ODE" -eq 1 ]; then
|
||||
if [ "$BUILD_ODE" -eq 1 ]
|
||||
then
|
||||
gmake -j $BUILD_PROC plugins-rel NATIVE_PLUGINS="ode"
|
||||
find ./release/ -name 'fteplug_ode_*.so' -exec cp -prv '{}' '../../../bin/' ';'
|
||||
printf "Built the ode plugin successfully.\n\n"
|
||||
fi
|
||||
|
||||
if [ "$BUILD_FFMPEG" -eq 1 ]; then
|
||||
if [ "$BUILD_FFMPEG" -eq 1 ]
|
||||
then
|
||||
gmake -j $BUILD_PROC plugins-rel NATIVE_PLUGINS="ffmpeg"
|
||||
find ./release/ -name 'fteplug_ffmpeg_*.so' -exec cp -prv '{}' '../../../bin/' ';'
|
||||
printf "Built the ffmpeg plugin successfully.\n\n"
|
||||
|
|
|
@ -15,10 +15,9 @@ fi
|
|||
|
||||
set -e
|
||||
SCRPATH="$( cd "$( dirname $(readlink -nf $0) )" && pwd )"
|
||||
PATH="$SCRPATH"/bin:"$PATH"
|
||||
PATH="$SCRPATH/bin:$PATH"
|
||||
|
||||
if [ -x "$(command -v fteqcc)" ]; then
|
||||
|
||||
# We want to compile a specific game
|
||||
if [ $# -gt 0 ]; then
|
||||
if [ "$BUILD_UPDATE" -eq 1 ]; then
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#!/bin/sh
|
||||
. ./build.cfg
|
||||
|
||||
if ! [ -x "$(command -v git)" ]; then
|
||||
if ! [ -x "$(command -v git)" ]
|
||||
then
|
||||
printf "'git' is not installed.\n"
|
||||
exit
|
||||
fi
|
||||
|
@ -12,9 +13,11 @@ VVM_MAKEFILE=./src/vvmtool/Makefile
|
|||
COMPILE_SYS=$(uname)
|
||||
|
||||
# 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
|
||||
if ! [ -x "$(command -v sysctl)" ]; then
|
||||
if ! [ -x "$(command -v sysctl)" ]
|
||||
then
|
||||
BUILD_PROC=1
|
||||
else
|
||||
BUILD_PROC=$(sysctl -n hw.ncpu)
|
||||
|
@ -25,8 +28,10 @@ fi
|
|||
|
||||
mkdir -p ./bin
|
||||
|
||||
if [ -f "$VVM_MAKEFILE" ]; then
|
||||
if [ "$BUILD_UPDATE" -eq 1 ]; then
|
||||
if [ -f "$VVM_MAKEFILE" ]
|
||||
then
|
||||
if [ "$BUILD_UPDATE" -eq 1 ]
|
||||
then
|
||||
printf "vvmtool is present, updating...\n"
|
||||
cd ./src/vvmtool
|
||||
git pull
|
||||
|
@ -40,7 +45,8 @@ else
|
|||
cd ./vvmtool
|
||||
fi
|
||||
|
||||
if [ "$BUILD_CLEAN" -eq 1 ]; then
|
||||
if [ "$BUILD_CLEAN" -eq 1 ]
|
||||
then
|
||||
gmake clean
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue