2018-11-18 15:33:32 +00:00
#!/bin/bash
2018-12-16 23:53:00 +00:00
. scripts/lib.sh
2018-11-18 15:33:32 +00:00
# Build engine
cd $TRAVIS_BUILD_DIR
export CC = "ccache i686-w64-mingw32-gcc"
export CXX = "ccache i686-w64-mingw32-g++"
export CFLAGS = "-static-libgcc -no-pthread"
export CXXFLAGS = "-static-libgcc -static-libstdc++"
2018-11-18 20:59:23 +00:00
export WINRC = "i686-w64-mingw32-windres"
2019-01-13 13:26:00 +00:00
rm -rf build # clean build directory
2018-12-16 23:53:00 +00:00
./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
2018-12-13 00:25:46 +00:00
cp $TRAVIS_BUILD_DIR /SDL2_mingw/i686-w64-mingw32//bin/SDL2.dll . # Install SDL2
2018-12-12 01:49:11 +00:00
cp vgui_support_bin/vgui_support.dll .
2019-01-13 13:26:00 +00:00
cp build/engine/xash.dll .
cp build/mainui/menu.dll .
cp build/game_launch/xash3d.exe .
2018-12-12 01:49:11 +00:00
7z a -t7z $TRAVIS_BUILD_DIR /xash3d-mingw.7z -m0= lzma2 -mx= 9 -mfb= 64 -md= 32m -ms= on *.dll *.exe