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++"
2019-04-08 13:54:13 +00:00
export CFLAGS = "-static-libgcc -no-pthread -msse2 -msse -mmmx -march=pentium4m -mtune=pentium4m -Ofast -ffast-math -funsafe-math-optimizations -funsafe-loop-optimizations -g -gdwarf-2 -fomit-frame-pointer" # add sse2 to workaround mingw multiple definition of MemoryBarrier bug
2019-03-21 14:47:16 +00:00
export CXXFLAGS = "-static-libgcc -static-libstdc++ -no-pthread -msse2"
2019-03-29 20:32:06 +00:00
export LDFLAGS = "-static-libgcc -static-libstdc++ -no-pthread -Wl,--allow-multiple-definition" # workaround some other mingw bugs
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
2019-04-08 13:54:13 +00: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 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-04-08 13:54:13 +00:00
./waf install || die
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