scripts: stop executing script and print config.log, if waf was failed.

This commit is contained in:
Alibek Omarov 2018-12-17 02:53:00 +03:00
parent cfea381c84
commit e2606cf97f
4 changed files with 17 additions and 6 deletions

View File

@ -2,6 +2,8 @@
# Build custom SDL2
. scripts/lib.sh
cd $TRAVIS_BUILD_DIR/SDL2_src
export CC="ccache gcc -msse2 -march=i686 -m32 -ggdb -O2"
./configure \
@ -29,8 +31,8 @@ make install DESTDIR=$TRAVIS_BUILD_DIR/SDL2_linux
cd $TRAVIS_BUILD_DIR
export CC="ccache gcc"
export CXX="ccache g++"
./waf configure --sdl2=$TRAVIS_BUILD_DIR/SDL2_linux --vgui=$TRAVIS_BUILD_DIR/vgui-dev --build-type=debug --enable-stb
./waf build -j2
./waf configure --sdl2=$TRAVIS_BUILD_DIR/SDL2_linux --vgui=$TRAVIS_BUILD_DIR/vgui-dev --build-type=debug --enable-stb || die
./waf build -j2 || die
# Build AppImage
scripts/build_appimage.sh

View File

@ -1,5 +1,7 @@
#!/bin/bash
. scripts/lib.sh
# Build engine
cd $TRAVIS_BUILD_DIR
export CC="ccache i686-w64-mingw32-gcc"
@ -7,8 +9,8 @@ export CXX="ccache i686-w64-mingw32-g++"
export CFLAGS="-static-libgcc -no-pthread"
export CXXFLAGS="-static-libgcc -static-libstdc++"
export WINRC="i686-w64-mingw32-windres"
./waf configure -o build-mingw --sdl2=$TRAVIS_BUILD_DIR/SDL2_mingw/i686-w64-mingw32/ --disable-vgui --build-type=debug --verbose # can't compile VGUI support on MinGW, due to differnet C++ ABI
./waf build -o build-mingw -j2 --verbose
./waf configure --sdl2=$TRAVIS_BUILD_DIR/SDL2_mingw/i686-w64-mingw32/ --disable-vgui --build-type=debug --verbose || die # can't compile VGUI support on MinGW, due to differnet C++ ABI
./waf build -j2 --verbose || die
cp $TRAVIS_BUILD_DIR/SDL2_mingw/i686-w64-mingw32//bin/SDL2.dll . # Install SDL2
cp vgui_support_bin/vgui_support.dll .
cp build-mingw/engine/xash.dll .

View File

@ -1,5 +1,7 @@
#!/bin/bash
. scripts/lib.sh
# Build engine
cd $TRAVIS_BUILD_DIR
@ -7,8 +9,8 @@ export CC="/usr/bin/clang"
export CXX="/usr/bin/clang++"
export CFLAGS="-m32"
export CXXFLAGS="-m32"
python waf configure --sdl2=~/Library/Frameworks/SDL2.framework/ --vgui=$TRAVIS_BUILD_DIR/vgui-dev --build-type=debug
python waf build -j2
python waf configure --sdl2=~/Library/Frameworks/SDL2.framework/ --vgui=$TRAVIS_BUILD_DIR/vgui-dev --build-type=debug || die
python waf build -j2 || die
# mkdir -p pkg/
# cp engine/libxash.dylib game_launch/xash3d mainui/libxashmenu.dylib vgui_support/libvgui_support.dylib VGUI/vgui-dev-master/lib/vgui.dylib ../scripts/xash3d.sh # pkg/
# cp ~/Library/Frameworks/SDL2.framework/SDL2 pkg/libSDL2.dylib

5
scripts/lib.sh Normal file
View File

@ -0,0 +1,5 @@
die()
{
cat build/config.log
exit 1
}