]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/xonotic-map-compiler-autobuild
autobuild: support overriding map bounds for minimap from mapinfo
[xonotic/xonotic.git] / misc / tools / xonotic-map-compiler-autobuild
index fdde421de67d518704bc81605dc1811b0c041d78..390b82d1d8ff37daf49bf2b94853497b87e8dd8e 100755 (executable)
@@ -8,7 +8,7 @@ url_ssh=xonotic-beta:autobuild-bsp/
 build_cachedir="$HOME/xonotic-map-compiler.cache/"
 screenshot_cachedir="$HOME/xonotic-map-screenshot.cache/"
 build_override="-bsp_timeout 900 -vis_timeout 3600 -light_timeout 14400 -minimap_timeout 900 -scale_timeout 900"
-screenshot_override="9 300 +g_ctf 1"
+screenshot_override="9 600 +g_ctf 1"
 
 getthemap_fail=false
 
@@ -157,7 +157,13 @@ buildthemap()
        t0=`date +%s`
        (
                cd maps
-               ../../../misc/tools/xonotic-map-compiler "$M" `grep ^- "$M.map.options" | cut -d '#' -f 1` $build_override > "$M.log"
+               sz=`grep '^size\>' "$M.mapinfo" 2>/dev/null || true`
+               if [ -n "$sz" ]; then
+                       minimap_override="-minimap + -minmax ${sz#size}"
+               else
+                       minimap_override=
+               fi
+               ../../../misc/tools/xonotic-map-compiler "$M" `grep ^- "$M.map.options" | cut -d '#' -f 1` $build_override $minimap_override > "$M.log"
        )
        t1=`date +%s`
        dt=$(($t1 - $t0))
@@ -198,13 +204,16 @@ screenshotthemap()
        )
        if ! mv ~/.xonotic/data/screenshots "$M-$blobhash"; then
                if [ -n "$IRCSPAM" ]; then
-                       ss2spam "$M" "$url$M-$blobhash/" "$REFNAME" "$HASH" 1 > "maps/$M.ircss"
+                       #ss2spam "$M" "$url$M-$blobhash/" "$REFNAME" "$HASH" 1 > "maps/$M.ircss"
+                       ss2spam "$M" "$url?d" "$REFNAME" "$HASH" 1 > "maps/$M.ircss"
                fi
                return 1
        fi
        if [ -n "$IRCSPAM" ]; then
-               ss2spam "$M" "$url$M-$blobhash/" "$REFNAME" "$HASH" 0 > "maps/$M.ircss"
+               #ss2spam "$M" "$url$M-$blobhash/" "$REFNAME" "$HASH" 0 > "maps/$M.ircss"
+               ss2spam "$M" "$url?d" "$REFNAME" "$HASH" 0 > "maps/$M.ircss"
        fi
+       chmod 1777 "$M-$blobhash"
        ln -snf "../$M-$blobhash" "$M" # from ALL branches, so beware!
        rsync -vaSHP "$M-$blobhash" "$url_ssh"
        rsync -vaSHP "$M" "$url_ssh""latest/"