Browse Source

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

pull/2/head
Alibek Omarov 6 years ago
parent
commit
e2606cf97f
  1. 6
      scripts/build_linux_engine.sh
  2. 6
      scripts/build_mingw_engine.sh
  3. 6
      scripts/build_osx_engine.sh
  4. 5
      scripts/lib.sh

6
scripts/build_linux_engine.sh

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

6
scripts/build_mingw_engine.sh

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
. scripts/lib.sh
# Build engine # Build engine
cd $TRAVIS_BUILD_DIR cd $TRAVIS_BUILD_DIR
export CC="ccache i686-w64-mingw32-gcc" 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 CFLAGS="-static-libgcc -no-pthread"
export CXXFLAGS="-static-libgcc -static-libstdc++" export CXXFLAGS="-static-libgcc -static-libstdc++"
export WINRC="i686-w64-mingw32-windres" 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 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 -o build-mingw -j2 --verbose ./waf build -j2 --verbose || die
cp $TRAVIS_BUILD_DIR/SDL2_mingw/i686-w64-mingw32//bin/SDL2.dll . # Install SDL2 cp $TRAVIS_BUILD_DIR/SDL2_mingw/i686-w64-mingw32//bin/SDL2.dll . # Install SDL2
cp vgui_support_bin/vgui_support.dll . cp vgui_support_bin/vgui_support.dll .
cp build-mingw/engine/xash.dll . cp build-mingw/engine/xash.dll .

6
scripts/build_osx_engine.sh

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

5
scripts/lib.sh

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