]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/xonotic-map-compiler-autobuild
Merge branch 'master' of git://de.git.xonotic.org/xonotic/xonotic
[xonotic/xonotic.git] / misc / tools / xonotic-map-compiler-autobuild
index cede0a22d83cbdf41804b996a86bbd83f5256502..ba99371ac14e7865896d86f3e89eba9cf69c029a 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 1800 -vis_timeout 3600 -light_timeout 14400 -minimap_timeout 900 -scale_timeout 900"
-screenshot_override="9 600 +g_ctf 1"
+screenshot_override="9 900 5 +g_ctf 1"
 
 getthemap_fail=false
 
@@ -163,7 +163,7 @@ buildthemap()
        M=$3
        blobhash=$4
        commithash=$5
-       if HEAD "$url$M-$blobhash.pk3"; then
+       if lwp-request -m HEAD "$url$M-$blobhash.pk3"; then
                continue
        fi
 
@@ -213,7 +213,7 @@ screenshotthemap()
        M=$3
        blobhash=$4
        commithash=$5
-       if HEAD "$url$M-$blobhash/"; then
+       if lwp-request -m HEAD "$url$M-$blobhash/"; then
                continue
        fi
 
@@ -223,16 +223,22 @@ screenshotthemap()
        fi
 
        rm -rf ~/.xonotic
+       mkdir -p ~/.xonotic
        (
                cd ../..
                if [ -n "$DISPLAY" ]; then
-                       misc/tools/xonotic-map-screenshot "$M" $screenshot_override +"scr_screenshot_name \"$M-\""
+                       misc/tools/xonotic-map-screenshot "$M" $screenshot_override $DRIVERFLAGS +"scr_screenshot_name \"$M-\""
                else
-                       #startx "$PWD/misc/tools/xonotic-map-screenshot" "$M" $screenshot_override +"scr_screenshot_name \"$M-\"" -- :8
-                       #startx "$PWD/misc/tools/xonotic-map-screenshot" "$M" $screenshot_override +"scr_screenshot_name \"$M-\"" -gl_driver /usr/local/lib/gallium3d/libGL.so -- /usr/bin/Xvfb :8 -screen 0 1024x768x24
-                       startx "$PWD/misc/tools/xonotic-map-screenshot" "$M" $screenshot_override +"scr_screenshot_name \"$M-\"" -- /usr/bin/Xvfb :8 -screen 0 1024x768x24
+                       case "$DRIVER" in
+                               gl)
+                                       startx "$PWD/misc/tools/xonotic-map-screenshot" "$M" $screenshot_override $DRIVERFLAGS +"scr_screenshot_name \"$M-\"" -- :8
+                                       ;;
+                               soft|*)
+                                       startx "$PWD/misc/tools/xonotic-map-screenshot" "$M" $screenshot_override +"vid_soft 1" $DRIVERFLAGS +"scr_screenshot_name \"$M-\"" -- /usr/bin/Xvfb :8 -screen 0 1024x768x24
+                                       ;;
+                       esac
                fi
-       )
+       ) >~/.xonotic/autoscreenshot.log 2>&1
        if ! mv ~/.xonotic/data/screenshots "$M-$blobhash"; then
                if [ -n "$IRCSPAM" ]; then
                        #ss2spam "$M" "$url$M-$blobhash/" "$REFNAME" "$commithash" 1 > "maps/$M.ircss"
@@ -240,6 +246,7 @@ screenshotthemap()
                fi
                return 1
        fi
+       mv ~/.xonotic/autoscreenshot.log "$M-$blobhash"/ || true
        if [ -n "$IRCSPAM" ]; then
                #ss2spam "$M" "$url$M-$blobhash/" "$REFNAME" "$commithash" 0 > "maps/$M.ircss"
                ss2spam "$M" "$url?d" "$REFNAME" "$commithash" 0 > "maps/$M.ircss"