]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/all/release.subr
Fix typo causing empty directory error
[xonotic/xonotic.git] / misc / tools / all / release.subr
index 6e5e46fb23c679e013871f57d84be019a75a771f..6894f3fd280acce7965045c1fb702576b2ea635c 100644 (file)
@@ -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`
@@ -194,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
                ;;
@@ -288,17 +298,11 @@ case "$cmd" in
                release_common
                verbose "$SELF" release-dlls-compile win64 /tmp/dlls Xonotic/bin64
                ;;
-       release-dlls-clean)
-               release_common
-               verbose misc/buildsrc/dlls.sh clean /tmp/dlls
-               ;;
        release-dlls)
                release_common
-               good=false
                verbose "$SELF" release-dlls-win32
                verbose "$SELF" release-dlls-win64
-               verbose "$SELF" release-dlls-clean
-               $good
+               verbose rm -rf /tmp/dlls
                ;;
        release-engine-win32)
                release_common
@@ -339,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)
@@ -460,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