]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/all/release.subr
Try adding the Luma version builder.
[xonotic/xonotic.git] / misc / tools / all / release.subr
index eb402c2a3b6bd458830f454c6e2a7a3d432bb2d4..5059ed9783d92a7df35c8260e3fa36818670ec20 100644 (file)
@@ -203,113 +203,70 @@ case "$cmd" in
                )
                ./all each git rev-parse HEAD > Xonotic/misc/git-revisions.txt
                ;;
-       release-compile-run)
+       release-getbinary)
                release_common
-               host=$1
-               buildpath=$2
-               maketargets=$3
-               makeflags=$4
-               srcdir=$5
-               depsdir=$6
-               targetfiles=$7
-               set -x
-               if [ -n "$targetfiles" ]; then
-                       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 "$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 "$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
-                       # now rebrand the binaries...
-                       for f in $targetfiles; do
-                               #verbose "$d0/misc/tools/rebrand-darkplaces-engine.sh" "${XONOTIC_BRAND:-$d0/misc/tools/xonotic.brand}" "${f##*:}" || true
-                               case "${f##*:}" in
-                                       Xonotic/xonotic*.exe)
-                                               verbose "$d0/misc/tools/change-icon-of-exe.sh" "$d0/misc/logos/icons_ico/xonotic.ico" "${f##*:}"
-                                               ;;
-                               esac
-                       done
-               fi
-               ;;
-       release-compile)
-               release_common
-               suffix=$1
-               makeflags=$2
-               gmqcc_maketargets=$3
-               gmqcc_files=$4
-               darkplaces_maketargets=$5
-               darkplaces_files=$6
-               host=xonotic-build-$suffix
-               verbose "$SELF" release-compile-run "$host" /tmp/gmqcc.build."$suffix" "$gmqcc_maketargets" "$makeflags" "Xonotic/source/gmqcc" "$d0/misc/builddeps/dp.$suffix" "$gmqcc_files"
-               verbose "$SELF" release-compile-run "$host" /tmp/Darkplaces.build."$suffix" "$darkplaces_maketargets" "$makeflags" "Xonotic/source/darkplaces" "$d0/misc/builddeps/dp.$suffix" "$darkplaces_files"
+               binary=$1
+               basename=${binary##*/}
+               dpname=darkplaces${basename#xonotic}
+               rev=`( cd "$d0/darkplaces" && git rev-parse HEAD )`
+               verbose wget -O "$binary" "http://beta.xonotic.org/autobuild-bin/$rev/$dpname"
+               [ -s "$binary" ] || rm -f "$binary"
+               [ -f "$binary" ]
+               case "$binary" in
+                       Xonotic/*osx*|Xonotic/*linux*)
+                               chmod +x "$binary"
+                               ;;
+               esac
                ;;
        release-engine-win32)
                release_common
-               verbose "$SELF" release-compile win32 \
-                       'STRIP=: DP_MAKE_TARGET=mingw UNAME=MINGW32 CC="i586-mingw32msvc-gcc -g1 -Wl,--dynamicbase -Wl,--nxcompat -I../../../.deps/include -L../../../.deps/lib -DUSE_WSPIAPI_H -DSUPPORTIPV6" WINDRES="i586-mingw32msvc-windres" SDL_CONFIG="../../../.deps/bin/sdl-config" DP_LINK_ZLIB=dlopen DP_LINK_JPEG=dlopen DP_LINK_ODE=dlopen DP_LINK_CRYPTO=dlopen DP_LINK_CRYPTO_RIJNDAEL=dlopen WIN32RELEASE=1 D3D=1' \
-                       gmqcc.exe 'gmqcc.exe:Xonotic/gmqcc/gmqcc.exe' \
-                       release 'darkplaces.exe:Xonotic/xonotic.exe darkplaces-sdl.exe:Xonotic/xonotic-sdl.exe darkplaces-dedicated.exe:Xonotic/xonotic-dedicated.exe'
+               good=true
+               verbose "$SELF" release-getbinary Xonotic/xonotic-x86.exe || good=false
+               verbose "$SELF" release-getbinary Xonotic/xonotic-x86-wgl.exe || good=false
+               verbose "$SELF" release-getbinary Xonotic/xonotic-x86-dedicated.exe || good=false
+               $good
                ;;
        release-engine-win64)
                release_common
-               verbose "$SELF" release-compile win64 \
-                       'STRIP=: DP_MAKE_TARGET=mingw UNAME=MINGW32 CC="amd64-mingw32msvc-gcc -g1 -Wl,--dynamicbase -Wl,--nxcompat -I../../../.deps/include -L../../../.deps/lib -DSUPPORTIPV6" WINDRES="amd64-mingw32msvc-windres" SDL_CONFIG="../../../.deps/bin/sdl-config" DP_LINK_ZLIB=dlopen DP_LINK_JPEG=dlopen DP_LINK_ODE=dlopen DP_LINK_CRYPTO=dlopen DP_LINK_CRYPTO_RIJNDAEL=dlopen WIN64RELEASE=1 D3D=1' \
-                       gmqcc.exe 'gmqcc.exe:Xonotic/gmqcc/gmqcc-x64.exe' \
-                       release 'darkplaces.exe:Xonotic/xonotic-x64.exe darkplaces-sdl.exe:Xonotic/xonotic-x64-sdl.exe darkplaces-dedicated.exe:Xonotic/xonotic-x64-dedicated.exe'
+               good=true
+               verbose "$SELF" release-getbinary Xonotic/xonotic.exe || good=false
+               verbose "$SELF" release-getbinary Xonotic/xonotic-wgl.exe || good=false
+               verbose "$SELF" release-getbinary Xonotic/xonotic-dedicated.exe || good=false
+               $good
                ;;
        release-engine-osx)
                release_common
-               # gcc on OSX is buggy, needs -fno-reorder-blocks for a release build to succeed
-               verbose "$SELF" release-compile osx \
-                       'STRIP=: CC="gcc -g1 -arch i386 -arch ppc -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -I../../../.deps/include -L../../../.deps/lib -fno-reorder-blocks -DSUPPORTIPV6" DP_LINK_ZLIB=shared DP_LINK_JPEG=dlopen DP_LINK_ODE=dlopen DP_LINK_CRYPTO=dlopen DP_LINK_CRYPTO_RIJNDAEL=dlopen' \
-                       gmqcc 'gmqcc:Xonotic/gmqcc/gmqcc.osx' \
-                       'sv-release sdl-release' 'darkplaces-sdl:Xonotic/Xonotic.app/Contents/MacOS/xonotic-osx-sdl-bin darkplaces-dedicated:Xonotic/xonotic-osx-dedicated'
+               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
                ;;
        release-engine-linux32)
                release_common
-               verbose "$SELF" release-compile linux32 \
-                       'STRIP=: CC="gcc -m32 -march=i686 -g1 -I../../../.deps/include -L../../../.deps/lib -DSUPPORTIPV6" LIB_JPEG=../../../.deps/lib/libjpeg.a LIB_CRYPTO="../../../.deps/lib/libd0_blind_id.a ../../../.deps/lib/libgmp.a" DP_LINK_ZLIB=shared DP_LINK_JPEG=dlopen DP_LINK_ODE=dlopen DP_LINK_CRYPTO=shared DP_LINK_CRYPTO_RIJNDAEL=dlopen' \
-                       gmqcc 'gmqcc:Xonotic/gmqcc/gmqcc.linux32' \
-                       release 'darkplaces-glx:Xonotic/xonotic-linux32-glx darkplaces-sdl:Xonotic/xonotic-linux32-sdl darkplaces-dedicated:Xonotic/xonotic-linux32-dedicated'
+               good=true
+               verbose "$SELF" release-getbinary Xonotic/xonotic-linux32-sdl || good=false
+               verbose "$SELF" release-getbinary Xonotic/xonotic-linux32-glx || good=false
+               verbose "$SELF" release-getbinary Xonotic/xonotic-linux32-dedicated || good=false
+               $good
                ;;
        release-engine-linux64)
                release_common
-               verbose "$SELF" release-compile linux64 \
-                       'STRIP=: CC="gcc -m64 -g1 -I../../../.deps/include -L../../../.deps/lib -DSUPPORTIPV6" LIB_JPEG=../../../.deps/lib/libjpeg.a LIB_CRYPTO="../../../.deps/lib/libd0_blind_id.a ../../../.deps/lib/libgmp.a" DP_LINK_ZLIB=shared DP_LINK_JPEG=dlopen DP_LINK_ODE=dlopen DP_LINK_CRYPTO=shared DP_LINK_CRYPTO_RIJNDAEL=dlopen' \
-                       gmqcc 'gmqcc:Xonotic/gmqcc/gmqcc.linux64' \
-                       release 'darkplaces-glx:Xonotic/xonotic-linux64-glx darkplaces-sdl:Xonotic/xonotic-linux64-sdl darkplaces-dedicated:Xonotic/xonotic-linux64-dedicated'
+               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
                ;;
        release-engine)
                release_common
-               verbose "$SELF" release-engine-linux32 &
-               verbose "$SELF" release-engine-linux64 &
-               verbose "$SELF" release-engine-win32 &
-               verbose "$SELF" release-engine-win64 &
-               verbose "$SELF" release-engine-osx &
-               wait %1
-               wait %2
-               wait %3
-               wait %4
-               wait %5
-               wait
+               # TODO report failures here.
+               good=false
+               verbose "$SELF" release-engine-linux32 && good=true
+               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
+               $good
                ;;
        release-maps)
                release_common
@@ -317,7 +274,8 @@ case "$cmd" in
                ;;
        release-qc)
                release_common
-               verbose env GIT_DIR="$d0/data/xonotic-data.pk3dir/.git" make -C Xonotic/source QCC="$d0/Xonotic/gmqcc/gmqcc.linux64" XON_BUILDSYSTEM=1 clean all
+               verbose make -C "$d0/gmqcc" all
+               verbose env GIT_DIR="$d0/data/xonotic-data.pk3dir/.git" make -C Xonotic/source QCC="$d0/gmqcc/gmqcc" XON_BUILDSYSTEM=1 clean all
                ;;
        release-buildpk3-transform-raw)
                release_common
@@ -485,6 +443,7 @@ case "$cmd" in
                                verbose "$d0"/mediasource/gfx/menu/luminos_versionbuilder/versionbuilder "$versionstr"
                                verbose rm background_l2.svg
                        )
+                       verbose "$d0"/mediasource/gfx/luma/render-version.sh "$PWD" "$versionstr"
                fi
                if [ x"$src" = x"data/xonotic-maps.pk3dir" ]; then
                        for X in ../../data/*-????????????????????????????????????????-????????????????????????????????????????.pk3; do
@@ -528,10 +487,10 @@ case "$cmd" in
                ;;
        release-pack)
                release_common
-               verbose "$SELF" release-buildpk3s data/font-nimbussansl.pk3dir  raw ''
+               verbose "$SELF" release-buildpk3s data/font-unifont.pk3dir      raw ''
                verbose "$SELF" release-buildpk3s data/font-xolonium.pk3dir     raw ''
-               verbose "$SELF" release-buildpk3s data/xonotic-data.pk3dir             low '-low' normaldds ''                    webp '-high'
-               verbose "$SELF" release-buildpk3s data/xonotic-maps.pk3dir             low '-low' normaldds '' mapping '-mapping' webp '-high'
+               verbose "$SELF" release-buildpk3s data/xonotic-data.pk3dir             low '-low' normaldds ''                    normal '-high'
+               verbose "$SELF" release-buildpk3s data/xonotic-maps.pk3dir             low '-low' normaldds '' mapping '-mapping' normal '-high'
                verbose "$SELF" release-buildpk3s data/xonotic-music.pk3dir     raw '' low '-low'
                verbose "$SELF" release-buildpk3s data/xonotic-nexcompat.pk3dir                   normaldds ''
                ;;
@@ -552,61 +511,57 @@ 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
-               # let's pass crypto import laws of some nasty countries
-               crypto_libs=`find Xonotic -name \*d0_rijndael\*.so -o -name \*d0_rijndael\*.dylib -o -name \*d0_rijndael\*.dll -o -name \*d0_rijndael\*.c`
-               if [ -n "$crypto_libs" ]; then
-                       verbose mkzip Xonotic-$stamp-crypto.zip \
-                               $crypto_libs \
+               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
-                       rm -f $crypto_libs
-               fi
-               # 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-nimbussansl-$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 cp Xonotic-$stamp-common.zip Xonotic-$stamp-low.zip
-               verbose mkzip0 Xonotic-$stamp-low.zip \
-                       Xonotic/data/xonotic-$pk3stamp-data-low.pk3 \
-                       Xonotic/data/xonotic-$pk3stamp-maps-low.pk3 \
-                       Xonotic/data/xonotic-$pk3stamp-music-low.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
+                       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 cp Xonotic-$stamp-common$suffix.zip Xonotic-$stamp-low$suffix.zip
+                       verbose mkzip0 Xonotic-$stamp-low$suffix.zip \
+                               Xonotic/data/xonotic-$pk3stamp-data-low.pk3 \
+                               Xonotic/data/xonotic-$pk3stamp-maps-low.pk3 \
+                               Xonotic/data/xonotic-$pk3stamp-music-low.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
+                       # let's pass crypto import laws of some nasty countries
+                       find Xonotic -name \*d0_rijndael\*.so -o -name \*d0_rijndael\*.dylib -o -name \*d0_rijndael\*.dll -o -name \*d0_rijndael\*.c -delete
+               done
                verbose mkzip Xonotic-$stamp-mappingsupport.zip \
                        Xonotic/mapping
                verbose mkzip0 Xonotic-$stamp-mappingsupport.zip \