2018-11-18 16:33:32 +01:00
#!/bin/bash
2018-12-17 00:53:00 +01:00
. scripts/lib.sh
2018-11-18 16:33:32 +01:00
# Build engine
cd $TRAVIS_BUILD_DIR
export CC = "ccache i686-w64-mingw32-gcc"
export CXX = "ccache i686-w64-mingw32-g++"
2019-06-08 15:36:29 +02:00
export CFLAGS = "-static-libgcc -no-pthread -msse2 -O1 -g -gdwarf-2" # add sse2 to workaround mingw multiple definition of MemoryBarrier bug
2019-03-21 15:47:16 +01:00
export CXXFLAGS = "-static-libgcc -static-libstdc++ -no-pthread -msse2"
2019-03-29 21:32:06 +01:00
export LDFLAGS = "-static-libgcc -static-libstdc++ -no-pthread -Wl,--allow-multiple-definition" # workaround some other mingw bugs
2018-11-18 21:59:23 +01:00
export WINRC = "i686-w64-mingw32-windres"
2019-01-13 14:26:00 +01:00
rm -rf build # clean build directory
2019-04-08 15:54:13 +02:00
./waf configure -s "SDL2_mingw/i686-w64-mingw32/" --build-type= none --prefix= "." --win-style-install -v || die # can't compile VGUI support on MinGW, due to differnet C++ ABI
./waf build -v || die
2018-12-13 01:25:46 +01:00
cp $TRAVIS_BUILD_DIR /SDL2_mingw/i686-w64-mingw32//bin/SDL2.dll . # Install SDL2
2018-12-12 02:49:11 +01:00
cp vgui_support_bin/vgui_support.dll .
2019-04-08 15:54:13 +02:00
./waf install || die
2018-12-12 02:49:11 +01:00
7z a -t7z $TRAVIS_BUILD_DIR /xash3d-mingw.7z -m0= lzma2 -mx= 9 -mfb= 64 -md= 32m -ms= on *.dll *.exe