X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=misc%2Ftools%2Fall%2Frelease.subr;h=b15141dc860a2949329e101ccde89f60232c8de1;hb=HEAD;hp=97ebb39e115eb5a89474d0905e953a17edbebb16;hpb=4567c6077ced4dc640a9d673916e8aeda8a1238c;p=xonotic%2Fxonotic.git diff --git a/misc/tools/all/release.subr b/misc/tools/all/release.subr index 97ebb39e..b64e0484 100644 --- a/misc/tools/all/release.subr +++ b/misc/tools/all/release.subr @@ -174,12 +174,13 @@ case "$cmd" in verbose date +%Y%m%d > Xonotic/stamp.txt verbose date +%Y%m%d > Xonotic/pk3stamp.txt fi - release_git_extract_dir "." "Xonotic" Docs misc/buildfiles/osx misc/buildsrc misc/logos misc/tools server xonotic-linux-glx.sh xonotic-linux-sdl.sh xonotic-linux-dedicated.sh Makefile key_0.d0pk COPYING GPL-2 GPL-3 + release_git_extract_dir "." "Xonotic" Docs misc/buildfiles/osx misc/logos misc/tools server xonotic-linux-sdl.sh xonotic-linux-dedicated.sh Makefile key_0.d0pk COPYING GPL-2 GPL-3 ( verbose cd Xonotic verbose mkdir data source source/darkplaces source/gmqcc source/d0_blind_id mapping verbose mv misc/buildfiles/osx/* . || true verbose rm -rf misc/buildfiles + verbose rm -rf misc/tools/all ) release_git_extract_dir "darkplaces" "Xonotic/source/darkplaces" . release_git_extract_dir "gmqcc" "Xonotic/source/gmqcc" . @@ -216,6 +217,7 @@ case "$cmd" in depsdir=$6 targetfiles=$7 schroot= + makeflags="$makeflags VCREVISION=$(git -C "$d0/darkplaces" describe --always --dirty='~' 2>/dev/null || echo FIXME)" set -x if [ -z "$targetfiles" ]; then exit @@ -227,7 +229,7 @@ case "$cmd" in esac case " $HOSTS_THAT_ARE_SCHROOT " in *\ $host\ *) - schroot="schroot -c $host --" + schroot="schroot -c $host --preserve-environment --" ;; esac case " $HOSTS_THAT_ARE_MYSELF $HOSTS_THAT_ARE_SCHROOT " in @@ -276,18 +278,48 @@ case "$cmd" in ;; esac ;; + release-libs-compile) + release_common + arch=$1 + makeflags=$2 + host=$3 + ( + verbose cd "$d0/d0_blind_id" + verbose ./autogen.sh + verbose ./configure --enable-static --disable-shared \ + --host="$host" \ + --prefix="$d0/misc/builddeps/$arch/d0_blind_id" + verbose make clean + verbose eval make "$makeflags" + verbose make install + ) + ;; + release-libs-linux64) + release_common + # TODO schroot support for libs so we can LTO this + verbose "$SELF" release-libs-compile linux64 \ + 'CC="gcc -m64"' \ + x86_64-pc-linux-gnu + ;; release-dlls-compile) release_common arch=$1 buildpath=$2 targetdir=$3 - mkdir -p "$targetdir" + verbose mkdir -p "$targetdir" ( - cd "misc/buildsrc" + cd "$d0/misc/buildsrc" verbose ./dlls.sh clean "$buildpath" verbose ./dlls.sh all "$buildpath" "$arch" ) verbose cp -v $buildpath/out/$arch/* "$targetdir" + + # SDL2 + verbose mkdir -p "$d0/misc/builddeps/$arch/" + verbose rsync --delete -avP "$buildpath/pkg/$arch/sdl" "$d0/misc/builddeps/$arch/" + # PKG_CONFIG HACK: avoids needing to modify sdl2-config + verbose printf '#!/bin/sh\nprintf ../../../.deps/lib\n' > "$d0/misc/builddeps/$arch/sdl/libdir_hack.sh" + verbose chmod +x "$d0/misc/builddeps/$arch/sdl/libdir_hack.sh" ;; release-dlls-win32) release_common @@ -297,10 +329,36 @@ case "$cmd" in release_common verbose "$SELF" release-dlls-compile win64 /tmp/dlls Xonotic/bin64 ;; - release-dlls) + release-libs-osx) + release_common + verbose mkdir -p "$d0/misc/builddeps/osx" + ( + verbose cd "$d0/misc/builddeps/osx" + verbose rm -rf sdl SDL2 + verbose wget https://libsdl.org/release/SDL2-2.28.5.dmg + verbose 7z x *.dmg + # 7z still fails to extract working symlinks from any archive format, hackaround: + verbose ln -sf $(cat SDL2/SDL2.framework/Versions/Current) SDL2/SDL2.framework/Versions/Current + verbose ln -sf $(cat SDL2/SDL2.framework/Headers) SDL2/SDL2.framework/Headers + verbose ln -sf $(cat SDL2/SDL2.framework/Resources) SDL2/SDL2.framework/Resources + verbose ln -sf $(cat SDL2/SDL2.framework/SDL2) SDL2/SDL2.framework/SDL2 + # THE HEADERS ARE NOT IN A SUBDIRECTORY CALLED SDL2 + # YET SDL2/ WAS ADDED TO ALL THE INCLUDES, WHY?!? + # OLD VERSIONS WITHOUT IT WORKED + verbose sed -i "s/#include