]> de.git.xonotic.org Git - xonotic/darkplaces.git/blob - .travis-before_install-xonotic.sh
Fix engine not starting on Windows if linked against SDL > 2.0.5
[xonotic/darkplaces.git] / .travis-before_install-xonotic.sh
1 #!/bin/sh
2
3 set -ex
4
5 export USRLOCAL="$PWD"/usrlocal
6 mkdir "$USRLOCAL"
7
8 for os in "$@"; do
9   git archive --format=tar --remote=git://de.git.xonotic.org/xonotic/xonotic.git \
10     --prefix=".deps/${os}/" master:"misc/builddeps/${os}" | tar xvf -
11
12   case "$os" in
13     linux32)
14       wget https://www.libsdl.org/release/SDL2-2.0.5.tar.gz
15       tar xf SDL2-2.0.5.tar.gz
16       (
17       cd SDL2-2.0.5
18       export CC="gcc -m32"
19       i386 ./configure --enable-static --disable-shared --prefix="$USRLOCAL" || cat config.log
20       i386 make
21       i386 make install
22       )
23       ;;
24     linux64)
25       wget https://www.libsdl.org/release/SDL2-2.0.5.tar.gz
26       tar xf SDL2-2.0.5.tar.gz
27       (
28       cd SDL2-2.0.5
29       ./configure --enable-static --disable-shared --prefix="$USRLOCAL"
30       make
31       make install
32       )
33       ;;
34     win32)
35       git archive --format=tar --remote=git://de.git.xonotic.org/xonotic/xonotic.git \
36         --prefix=".icons/" master:"misc/logos/icons_ico" | tar xvf -
37       mv .icons/xonotic.ico darkplaces.ico
38       ;;
39     win64)
40       git archive --format=tar --remote=git://de.git.xonotic.org/xonotic/xonotic.git \
41         --prefix=".icons/" master:"misc/logos/icons_ico" | tar xvf -
42       mv .icons/xonotic.ico darkplaces.ico
43       ;;
44     osx)
45       git archive --format=tar --remote=git://de.git.xonotic.org/xonotic/xonotic.git \
46         --prefix=SDL2.framework/ master:misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework | tar xvf -
47       ;;
48   esac
49 done
50
51 for X in .deps/*; do
52   rsync --remove-source-files -aL "$X"/*/ "$X"/ || true
53 done