]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - .travis-script-xonotic.sh
Fix a typo in DrawQ_RotPic which broke it badly.
[xonotic/darkplaces.git] / .travis-script-xonotic.sh
index 9f0e9e49625b3d95975befb823617cfa7ac9f1a6..654ef36eef06fe7c5181eb339105eee0ccce74e9 100755 (executable)
@@ -9,6 +9,8 @@ set -x
 chmod 0600 id_rsa-xonotic
 # ssh-keygen -y -f id_rsa-xonotic
 
+export USRLOCAL="$PWD"/usrlocal
+
 rev=`git rev-parse HEAD`
 
 sftp -oStrictHostKeyChecking=no -i id_rsa-xonotic -P 2222 -b - autobuild-bin-uploader@beta.xonotic.org <<EOF || true
@@ -20,10 +22,10 @@ for os in "$@"; do
   deps=".deps/${os}"
   case "${os}" in
     linux32)
-      chroot="sudo chroot ${PWD}/buildroot.i386"
+      chroot=
       makeflags='STRIP=:
         CC="${CC} -m32 -march=i686 -g1 -I../../../${deps}/include -L../../../${deps}/lib -DSUPPORTIPV6"
-        SDL_CONFIG=sdl2-config
+        SDL_CONFIG=$USRLOCAL/bin/sdl2-config
         DP_LINK_CRYPTO=shared
           LIB_CRYPTO="../../../${deps}/lib/libd0_blind_id.a ../../../${deps}/lib/libgmp.a"
         DP_LINK_CRYPTO_RIJNDAEL=dlopen
@@ -40,7 +42,7 @@ for os in "$@"; do
       chroot=
       makeflags='STRIP=:
         CC="${CC} -m64 -g1 -I../../../${deps}/include -L../../../${deps}/lib -DSUPPORTIPV6"
-        SDL_CONFIG=sdl2-config
+        SDL_CONFIG=$USRLOCAL/bin/sdl2-config
         DP_LINK_CRYPTO=shared
           LIB_CRYPTO="../../../${deps}/lib/libd0_blind_id.a ../../../${deps}/lib/libgmp.a"
         DP_LINK_CRYPTO_RIJNDAEL=dlopen
@@ -55,15 +57,14 @@ for os in "$@"; do
       ;;
     win32)
       chroot=
-      # -mstackrealign works around SDL2-2.0.3 issue that stack is not 16 bytes aligned, breaking SSE.
-      # Please kill once SDL comes to its senses.
+      # Need to use -mstackrealign as nothing guarantees that callbacks from
+      # other Win32 DLLs - including SDL2 - retain 16 bytes alignment.
       makeflags='STRIP=:
         D3D=1
         DP_MAKE_TARGET=mingw
         UNAME=MINGW32
         WIN32RELEASE=1
-        CC="i686-w64-mingw32-gcc -g1 -Wl,--dynamicbase -Wl,--nxcompat -mstackrealign -I../../../${deps}/include -L../../../${deps}/lib -DUSE_WSPIAPI_H -DSUPPORTIPV6"
-       CPUOPTIMIZATIONS="-march=pentium2 -fno-math-errno -ffinite-math-only -fno-rounding-math -fno-signaling-nans -fno-trapping-math"
+        CC="i686-w64-mingw32-gcc -static -g1 -mstackrealign -Wl,--dynamicbase -Wl,--nxcompat -I../../../${deps}/include -L../../../${deps}/lib -DSUPPORTIPV6"
         WINDRES="i686-w64-mingw32-windres"
         SDL_CONFIG="../../../${deps}/bin/sdl2-config"
         DP_LINK_CRYPTO=dlopen
@@ -81,7 +82,7 @@ for os in "$@"; do
         DP_MAKE_TARGET=mingw
         UNAME=MINGW32
         WIN64RELEASE=1
-        CC="x86_64-w64-mingw32-gcc -g1 -Wl,--dynamicbase -Wl,--nxcompat -I../../../${deps}/include -L../../../${deps}/lib -DSUPPORTIPV6"
+        CC="x86_64-w64-mingw32-gcc -static -g1 -Wl,--dynamicbase -Wl,--nxcompat -I../../../${deps}/include -L../../../${deps}/lib -DSUPPORTIPV6"
         WINDRES="x86_64-w64-mingw32-windres"
         SDL_CONFIG="../../../${deps}/bin/sdl2-config"
         DP_LINK_CRYPTO=dlopen
@@ -95,7 +96,7 @@ for os in "$@"; do
     osx)
       chroot=
       makeflags='STRIP=:
-        CC="gcc -g1 -arch x86_64 -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -mmacosx-version-min=10.5 -I../../../${deps}/include -L../../../${deps}/lib -DSUPPORTIPV6"
+        CC="gcc -g1 -arch x86_64 -mmacosx-version-min=10.6 -Wl,-rpath -Wl,@loader_path/../Frameworks -Wl,-rpath -Wl,@loader_path -I../../../${deps}/include -L../../../${deps}/lib -DSUPPORTIPV6"
         SDLCONFIG_MACOSXCFLAGS="-I${PWD}/SDL2.framework/Headers"
         SDLCONFIG_MACOSXLIBS="-F${PWD} -framework SDL2 -framework Cocoa -I${PWD}/SDL2.framework/Headers"
         SDLCONFIG_MACOSXSTATICLIBS="-F${PWD} -framework SDL2 -framework Cocoa -I${PWD}/SDL2.framework/Headers"
@@ -115,15 +116,15 @@ for os in "$@"; do
   )
 
   (
-  trap "${chroot} make -C ${PWD} ${makeflags} clean" EXIT
-  eval "${chroot} make -C ${PWD} ${makeflags} ${maketargets}"
-  for o in $outputs; do
-    src=${o%%:*}
-    dst=${o#*:}
-    sftp -oStrictHostKeyChecking=no -i id_rsa-xonotic -P 2222 -b - autobuild-bin-uploader@beta.xonotic.org <<EOF
+    trap "${chroot} make -C ${PWD} ${makeflags} clean" EXIT
+    eval "${chroot} make -C ${PWD} ${makeflags} ${maketargets}"
+    for o in $outputs; do
+      src=${o%%:*}
+      dst=${o#*:}
+      sftp -oStrictHostKeyChecking=no -i id_rsa-xonotic -P 2222 -b - autobuild-bin-uploader@beta.xonotic.org <<EOF
 put ${src} ${rev}/${dst}
 EOF
-  done
+    done
   )
 
 done