]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/all/release.subr
Change gameversion_min logic per xonotic-data.pk3dir!1034 and update xonotic-release...
[xonotic/xonotic.git] / misc / tools / all / release.subr
index a14283338fa8fe7e5b88d4e0fd907c7b8803a9de..99ab788449502c910c9f6afc5e93089176261d25 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`
@@ -273,31 +280,26 @@ case "$cmd" in
                arch=$1
                buildpath=$2
                targetdir=$3
-               mkdir -p "$d0/$targetdir"
-               cd "$d0/misc/buildsrc"
-               verbose ./dlls.sh all "$buildpath" "$arch"
-               verbose mv "$buildpath/out/$arch" "$d0/$targetdir"
-               cd "$d0"
+               mkdir -p "$targetdir"
+               (
+                       cd "misc/buildsrc"
+                       verbose ./dlls.sh all "$buildpath" "$arch"
+               )
+               verbose cp -v $buildpath/out/$arch/* "$targetdir"
                ;;
-    release-dlls-win32)
+       release-dlls-win32)
                release_common
                verbose "$SELF" release-dlls-compile win32 /tmp/dlls Xonotic/bin32
                ;;
-    release-dlls-win64)
+       release-dlls-win64)
                release_common
                verbose "$SELF" release-dlls-compile win64 /tmp/dlls Xonotic/bin64
                ;;
-       release-dlls-clean)
-               release_common
-               verbose $d0/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
@@ -338,7 +340,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)
@@ -459,16 +461,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