X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=blobdiff_plain;f=misc%2Ftools%2Fall%2Frelease.subr;h=6894f3fd280acce7965045c1fb702576b2ea635c;hp=f3202c2caf21f2ef9f0a4be5babfde6404dbc6bd;hb=975add8a2e50e075479a329ff898da7957403ac4;hpb=dd0d27bf95b3d90d75287d3b740668c746e98697 diff --git a/misc/tools/all/release.subr b/misc/tools/all/release.subr index f3202c2c..6894f3fd 100644 --- a/misc/tools/all/release.subr +++ b/misc/tools/all/release.subr @@ -2,6 +2,13 @@ release_common() { export LC_ALL=C + if [ -z "$MAKEFLAGS" ]; then + ncpus=`getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || echo 1` + if [ $ncpus -gt 1 ]; then + export MAKEFLAGS=-j$ncpus + fi + fi + release_args="$cmd $*" msg "*** $release_args: start" release_starttime=`date +%s` @@ -173,9 +180,12 @@ case "$cmd" in verbose cd Xonotic verbose mkdir data source source/darkplaces source/gmqcc source/d0_blind_id mapping verbose rm -rf misc/builddeps - verbose mv misc/buildfiles/win32 bin32 || true - verbose mv bin32/SDL.dll . || true - verbose mv misc/buildfiles/win64 bin64 || true + #verbose mv bin32/SDL.dll . || true # Leftover? + + # We're going to be building these later + #verbose mv misc/buildfiles/win32 bin32 || true + #verbose mv misc/buildfiles/win64 bin64 || true + verbose mv misc/buildfiles/osx/* . || true verbose rm -rf misc/buildfiles verbose rm -rf misc/pki @@ -191,13 +201,16 @@ case "$cmd" in rm -f Xonotic/key_15.d0pk ( verbose cd Xonotic/mapping - verbose wget http://www.icculus.org/netradiant/files/netradiant-1.5.0-20120301.tar.bz2 - verbose wget http://www.icculus.org/netradiant/files/netradiant-1.5.0-20120301-win32-7z.exe - for X in *-7z.exe; do - 7za x "$X" - rm -f "$X" - done + # bones_was_here: don't ship 10 year old netradiant + # also seems better to update netradiant independently of xonotic versions + #verbose wget http://www.icculus.org/netradiant/files/netradiant-1.5.0-20120301.tar.bz2 + #verbose wget http://www.icculus.org/netradiant/files/netradiant-1.5.0-20120301-win32-7z.exe + #for X in *-7z.exe; do + # 7za x "$X" + # rm -f "$X" + #done # TODO possibly include other tools? + printf "Please find links to NetRadiant builds at https://netradiant.gitlab.io or https://xonotic.org/download\nNetRadiant source available at https://gitlab.com/xonotic/netradiant\n" > NetRadiant\ links.txt ) ./all each git rev-parse HEAD > Xonotic/misc/git-revisions.txt ;; @@ -265,6 +278,32 @@ case "$cmd" in ;; esac ;; + release-dlls-compile) + release_common + arch=$1 + buildpath=$2 + targetdir=$3 + mkdir -p "$targetdir" + ( + cd "misc/buildsrc" + verbose ./dlls.sh all "$buildpath" "$arch" + ) + verbose cp -v $buildpath/out/$arch/* "$targetdir" + ;; + release-dlls-win32) + release_common + verbose "$SELF" release-dlls-compile win32 /tmp/dlls Xonotic/bin32 + ;; + release-dlls-win64) + release_common + verbose "$SELF" release-dlls-compile win64 /tmp/dlls Xonotic/bin64 + ;; + release-dlls) + release_common + verbose "$SELF" release-dlls-win32 + verbose "$SELF" release-dlls-win64 + verbose rm -rf /tmp/dlls + ;; release-engine-win32) release_common #good=true @@ -304,7 +343,7 @@ case "$cmd" in #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' \ + '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=shared 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) @@ -425,16 +464,18 @@ case "$cmd" in # pre-1.0: compatible with any other pre-1.0 verbose sed " s/^set g_xonoticversion [^ ]* /set g_xonoticversion $versionstr /; - s/^gameversion_min [0-9]*/gameversion_min 0/; s/^gameversion_max [0-9]*/gameversion_max 9999/; " < xonotic-common.cfg > xonotic-common.cfg.new + # Following line was included in sed above, ref https://gitlab.com/xonotic/xonotic-data.pk3dir/-/merge_requests/1034 + # s/^gameversion_min [0-9]*/gameversion_min 0/; else # >= 1.0 verbose sed " s/^set g_xonoticversion [^ ]* /set g_xonoticversion $versionstr /; - s/^gameversion_min [0-9]*/gameversion_min $(( ($gv / 100) * 100 - 100 ))/; s/^gameversion_max [0-9]*/gameversion_max $(( ($gv / 100) * 100 + 199 ))/; " < xonotic-common.cfg > xonotic-common.cfg.new + # Following line was included in sed above, ref https://gitlab.com/xonotic/xonotic-data.pk3dir/-/merge_requests/1034 + # s/^gameversion_min [0-9]*/gameversion_min $(( ($gv / 100) * 100 - 100 ))/; fi mv xonotic-common.cfg.new xonotic-common.cfg case "$RELEASETYPE" in @@ -574,6 +615,7 @@ case "$cmd" in release_common verbose "$SELF" release-prepare verbose "$SELF" release-maps + verbose "$SELF" release-dlls verbose "$SELF" release-engine verbose "$SELF" release-qc verbose "$SELF" release-pack