]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/all/release.subr
Rename Windows builds so that xonotic.exe is 64bit SDL again.
[xonotic/xonotic.git] / misc / tools / all / release.subr
index 960b04416f38380d316fc4c4d07b83fcb861ec1a..00abb09b37e4545dfd5f4df171fe010bdfd6f109 100644 (file)
@@ -131,9 +131,8 @@ case "$cmd" in
                                #   host names are reachable and have a compile
                                #   infrastructure set up:
                                #   - xonotic-build-linux64 (with gcc on x86_64)
-                               #   - xonotic-build-win32 (with i586-mingw32msvc-g++)
-                               #   - xonotic-build-win64 (with amd64-mingw32msvc-g++
-                               #     and amd64-mingw32msvc-g++)
+                               #   - xonotic-build-win32 (with i686-w64-mingw32)
+                               #   - xonotic-build-win64 (with x86_64-w64-mingw32)
                                #   - xonotic-build-osx (with Xcode and SDL.framework)
                                # - AMD Compressonator installed in WINE
                                # - ResEdit installed in WINE
@@ -202,6 +201,55 @@ case "$cmd" in
                )
                ./all each git rev-parse HEAD > Xonotic/misc/git-revisions.txt
                ;;
+       release-compile-run)
+               release_common
+               host=$1
+               buildpath=$2
+               maketargets=$3
+               makeflags=$4
+               srcdir=$5
+               depsdir=$6
+               targetfiles=$7
+               set -x
+               if [ -z "$targetfiles" ]; then
+                       exit
+               fi
+               case " $HOSTS_THAT_ARE_DISABLED " in
+                       *\ $host\ *)
+                               exit
+                               ;;
+               esac
+               case " $HOSTS_THAT_ARE_MYSELF " in
+                       *\ $host\ *)
+                               verbose rsync --delete -zLvaSHP "$srcdir"/ "$buildpath/"
+                               verbose rsync --delete -zLvaSHP misc/logos/icons_ico/xonotic.ico "$buildpath"/darkplaces.ico
+                               verbose rsync --delete -zLvaSHP "$depsdir"/*/ "$buildpath.deps/"
+                               verbose ln -snf "$buildpath.deps" "$buildpath/.deps"
+                               verbose eval make -C "$buildpath" clean $maketargets $makeflags
+                               for f in $targetfiles; do
+                                       verbose mv "$buildpath/${f%:*}" "${f##*:}" || true
+                               done
+                               ;;
+                       *)
+                               verbose rsync --delete -zLvaSHP "$srcdir"/ "$host":"$buildpath/"
+                               verbose rsync --delete -zLvaSHP misc/logos/icons_ico/xonotic.ico "$host":"$buildpath"/darkplaces.ico
+                               verbose rsync --delete -zLvaSHP "$depsdir"/*/ "$host":"$buildpath.deps/"
+                               verbose ssh "$host" "[ -f /etc/profile ] && . /etc/profile; [ -f ~/.profile ] && . ~/.profile; export LC_ALL=C; ln -snf $buildpath.deps $buildpath/.deps && cd $buildpath && nice -`nice` make clean $maketargets $makeflags"
+                               for f in $targetfiles; do
+                                       verbose rsync -zvaSHP "$host:$buildpath/${f%:*}" "${f##*:}" || true
+                               done
+                               ;;
+               esac
+               ;;
+       release-compile)
+               release_common
+               suffix=$1
+               makeflags=$2
+               darkplaces_maketargets=$3
+               darkplaces_files=$4
+               host=xonotic-build-$suffix
+               verbose "$SELF" release-compile-run "$host" /tmp/Darkplaces.build."$suffix" "$darkplaces_maketargets" "$makeflags" "Xonotic/source/darkplaces" "$d0/misc/builddeps/$suffix" "$darkplaces_files"
+               ;;
        release-getbinary)
                release_common
                binary=$1
@@ -219,32 +267,45 @@ case "$cmd" in
                ;;
        release-engine-win32)
                release_common
-               good=true
-               verbose "$SELF" release-getbinary Xonotic/xonotic-x86.exe || good=false
-               verbose "$SELF" release-getbinary Xonotic/xonotic-x86-dedicated.exe || good=false
-               $good
+               #good=true
+               #verbose "$SELF" release-getbinary Xonotic/xonotic-x86.exe || good=false
+               #verbose "$SELF" release-getbinary Xonotic/xonotic-x86-dedicated.exe || good=false
+               #$good
+               verbose "$SELF" release-compile win32 \
+                       'STRIP=: D3D=1 DP_MAKE_TARGET=mingw UNAME=MINGW32 WIN32RELEASE=1 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 DP_LINK_CRYPTO_RIJNDAEL=dlopen DP_LINK_JPEG=dlopen DP_LINK_ODE=dlopen DP_LINK_ZLIB=dlopen' \
+                       release 'darkplaces.exe:Xonotic/xonotic-x86-wgl.exe darkplaces-sdl.exe:Xonotic/xonotic-x86.exe darkplaces-dedicated.exe:Xonotic/xonotic-x86-dedicated.exe'
                ;;
        release-engine-win64)
                release_common
-               good=true
-               verbose "$SELF" release-getbinary Xonotic/xonotic.exe || good=false
-               verbose "$SELF" release-getbinary Xonotic/xonotic-dedicated.exe || good=false
-               $good
+               #good=true
+               #verbose "$SELF" release-getbinary Xonotic/xonotic.exe || good=false
+               #verbose "$SELF" release-getbinary Xonotic/xonotic-dedicated.exe || good=false
+               #$good
+               verbose "$SELF" release-compile win64 \
+                       'STRIP=: D3D=1 DP_MAKE_TARGET=mingw UNAME=MINGW32 WIN64RELEASE=1 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 DP_LINK_CRYPTO_RIJNDAEL=dlopen DP_LINK_JPEG=dlopen DP_LINK_ODE=dlopen DP_LINK_ZLIB=dlopen' \
+                       release 'darkplaces.exe:Xonotic/xonotic-wgl.exe darkplaces-sdl.exe:Xonotic/xonotic.exe darkplaces-dedicated.exe:Xonotic/xonotic-dedicated.exe'
                ;;
        release-engine-osx)
                release_common
-               good=true
-               verbose "$SELF" release-getbinary Xonotic/Xonotic.app/Contents/MacOS/xonotic-osx-sdl-bin || good=false
-               verbose "$SELF" release-getbinary Xonotic/xonotic-osx-dedicated || good=false
-               $good
+               #good=true
+               #verbose "$SELF" release-getbinary Xonotic/Xonotic.app/Contents/MacOS/xonotic-osx-sdl-bin || good=false
+               #verbose "$SELF" release-getbinary Xonotic/xonotic-osx-dedicated || good=false
+               #$good
+               # Note: travis build script also had SDLCONFIG_MACOSX* flags; need to check if they're still needed with osxcross.
+               verbose "$SELF" release-compile osx \
+                       'STRIP=: 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" DP_LINK_CRYPTO=dlopen DP_LINK_CRYPTO_RIJNDAEL=dlopen DP_LINK_JPEG=dlopen DP_LINK_ODE=dlopen DP_LINK_ZLIB=shared' \
+                       'sv-release sdl-release' 'darkplaces-sdl:Xonotic/Xonotic.app/Contents/MacOS/xonotic-osx-sdl-bin darkplaces-dedicated:Xonotic/xonotic-osx-dedicated'
                ;;
        release-engine-linux64)
                release_common
-               good=true
-               verbose "$SELF" release-getbinary Xonotic/xonotic-linux64-sdl || good=false
-               verbose "$SELF" release-getbinary Xonotic/xonotic-linux64-glx || good=false
-               verbose "$SELF" release-getbinary Xonotic/xonotic-linux64-dedicated || good=false
-               $good
+               #good=true
+               #verbose "$SELF" release-getbinary Xonotic/xonotic-linux64-sdl || good=false
+               #verbose "$SELF" release-getbinary Xonotic/xonotic-linux64-glx || good=false
+               #verbose "$SELF" release-getbinary Xonotic/xonotic-linux64-dedicated || good=false
+               #$good
+               verbose "$SELF" release-compile linux64 \
+                       'STRIP=: CC="gcc -m64 -g1 -I../../../.deps/include -L../../../.deps/lib -DSUPPORTIPV6" DP_LINK_CRYPTO=shared LIB_CRYPTO="../../../.deps/lib/libd0_blind_id.a ../../../.deps/lib/libgmp.a" DP_LINK_CRYPTO_RIJNDAEL=dlopen DP_LINK_JPEG=shared LIB_JPEG=/usr/lib/x86_64-linux-gnu/libjpeg.a DP_LINK_ODE=shared CFLAGS_ODE="-DUSEODE -DLINK_TO_LIBODE -DdDOUBLE" LIB_ODE="../../../.deps/lib/libode.a -lstdc++ -pthread" DP_LINK_ZLIB=shared' \
+                       release 'darkplaces-glx:Xonotic/xonotic-linux64-glx darkplaces-sdl:Xonotic/xonotic-linux64-sdl darkplaces-dedicated:Xonotic/xonotic-linux64-dedicated'
                ;;
        release-engine)
                release_common
@@ -253,7 +314,7 @@ case "$cmd" in
                verbose "$SELF" release-engine-linux64 && good=true
                verbose "$SELF" release-engine-win32 && good=true
                verbose "$SELF" release-engine-win64 && good=true
-               verbose "$SELF" release-engine-osx && good=true
+               #verbose "$SELF" release-engine-osx && good=true
                $good
                ;;
        release-maps)
@@ -458,51 +519,49 @@ case "$cmd" in
                pk3stamp=`cat Xonotic/pk3stamp.txt`
                # exe and dll files do not need +x, so this makes them eligible for 7zip compression too
                chmod a-x Xonotic/*.exe Xonotic/*.dll || true
-               for suffix in '' '-noaes'; do
-                       # build the archives
-                       verbose mkzip Xonotic-$stamp-enginesource$suffix.zip \
-                               Xonotic/Makefile \
-                               Xonotic/source/darkplaces/ \
-                               Xonotic/COPYING Xonotic/GPL-2 Xonotic/GPL-3
-                       verbose cp Xonotic-$stamp-enginesource$suffix.zip Xonotic-$stamp-engine$suffix.zip
-                       verbose mkzip Xonotic-$stamp-engine$suffix.zip \
-                               Xonotic/*.dll \
-                               Xonotic/bin32/*.dll \
-                               Xonotic/bin64/*.dll \
-                               Xonotic/*.app \
-                               Xonotic/xonotic-* \
-                               Xonotic/xonotic.exe
-                       verbose cp Xonotic-$stamp-engine$suffix.zip Xonotic-$stamp-common$suffix.zip
-                       verbose mkzip Xonotic-$stamp-common$suffix.zip \
-                               Xonotic/source/d0_blind_id/ \
-                               Xonotic/source/gmqcc/ \
-                               Xonotic/source/qcsrc/ \
-                               Xonotic/Docs \
-                               Xonotic/misc \
-                               Xonotic/gmqcc \
-                               Xonotic/server \
-                               Xonotic/key_0.d0pk \
-                               Xonotic/data/font-unifont-$pk3stamp.pk3 \
-                               Xonotic/data/font-xolonium-$pk3stamp.pk3
-                       verbose cp Xonotic-$stamp-enginesource$suffix.zip Xonotic-$stamp-source$suffix.zip
-                       verbose mkzip Xonotic-$stamp-source$suffix.zip \
-                               Xonotic/source/d0_blind_id/ \
-                               Xonotic/source/gmqcc/ \
-                               Xonotic/source/qcsrc/ \
-                               Xonotic/misc/logos
-                       verbose cp Xonotic-$stamp-common$suffix.zip Xonotic-$stamp$suffix.zip
-                       verbose mkzip0 Xonotic-$stamp$suffix.zip \
-                               Xonotic/data/xonotic-$pk3stamp-data.pk3 \
-                               Xonotic/data/xonotic-$pk3stamp-maps.pk3 \
-                               Xonotic/data/xonotic-$pk3stamp-music.pk3 \
-                               Xonotic/data/xonotic-$pk3stamp-nexcompat.pk3
-                       verbose mv Xonotic-$stamp-common$suffix.zip Xonotic-$stamp-high$suffix.zip
-                       verbose mkzip0 Xonotic-$stamp-high$suffix.zip \
-                               Xonotic/data/xonotic-$pk3stamp-data-high.pk3 \
-                               Xonotic/data/xonotic-$pk3stamp-maps-high.pk3 \
-                               Xonotic/data/xonotic-$pk3stamp-music.pk3 \
-                               Xonotic/data/xonotic-$pk3stamp-nexcompat-high.pk3
-               done
+               # build the archives
+               verbose mkzip Xonotic-$stamp-enginesource.zip \
+                       Xonotic/Makefile \
+                       Xonotic/source/darkplaces/ \
+                       Xonotic/COPYING Xonotic/GPL-2 Xonotic/GPL-3
+               verbose cp Xonotic-$stamp-enginesource.zip Xonotic-$stamp-engine.zip
+               verbose mkzip Xonotic-$stamp-engine.zip \
+                       Xonotic/*.dll \
+                       Xonotic/bin32/*.dll \
+                       Xonotic/bin64/*.dll \
+                       Xonotic/*.app \
+                       Xonotic/xonotic-* \
+                       Xonotic/xonotic.exe
+               verbose cp Xonotic-$stamp-engine.zip Xonotic-$stamp-common.zip
+               verbose mkzip Xonotic-$stamp-common.zip \
+                       Xonotic/source/d0_blind_id/ \
+                       Xonotic/source/gmqcc/ \
+                       Xonotic/source/qcsrc/ \
+                       Xonotic/Docs \
+                       Xonotic/misc \
+                       Xonotic/gmqcc \
+                       Xonotic/server \
+                       Xonotic/key_0.d0pk \
+                       Xonotic/data/font-unifont-$pk3stamp.pk3 \
+                       Xonotic/data/font-xolonium-$pk3stamp.pk3
+               verbose cp Xonotic-$stamp-enginesource.zip Xonotic-$stamp-source.zip
+               verbose mkzip Xonotic-$stamp-source.zip \
+                       Xonotic/source/d0_blind_id/ \
+                       Xonotic/source/gmqcc/ \
+                       Xonotic/source/qcsrc/ \
+                       Xonotic/misc/logos
+               verbose cp Xonotic-$stamp-common.zip Xonotic-$stamp.zip
+               verbose mkzip0 Xonotic-$stamp.zip \
+                       Xonotic/data/xonotic-$pk3stamp-data.pk3 \
+                       Xonotic/data/xonotic-$pk3stamp-maps.pk3 \
+                       Xonotic/data/xonotic-$pk3stamp-music.pk3 \
+                       Xonotic/data/xonotic-$pk3stamp-nexcompat.pk3
+               verbose mv Xonotic-$stamp-common.zip Xonotic-$stamp-high.zip
+               verbose mkzip0 Xonotic-$stamp-high.zip \
+                       Xonotic/data/xonotic-$pk3stamp-data-high.pk3 \
+                       Xonotic/data/xonotic-$pk3stamp-maps-high.pk3 \
+                       Xonotic/data/xonotic-$pk3stamp-music.pk3 \
+                       Xonotic/data/xonotic-$pk3stamp-nexcompat-high.pk3
                verbose mkzip Xonotic-$stamp-mappingsupport.zip \
                        Xonotic/mapping
                verbose mkzip0 Xonotic-$stamp-mappingsupport.zip \