Refactor multi-resource UI and transfers

This commit is contained in:
Loïc Wisniewski 2026-08-14 11:54:31 +02:00
commit 8231e165ff
20 changed files with 648 additions and 435 deletions

View file

@ -28,18 +28,15 @@ WAIT_FRAMES="${3:-60}"
RESOLUTION="${4:-1280x720}"
proot-distro login ubuntu -- bash -c "
# A killed run (or a session that ended mid-screenshot) leaves /tmp/.X99-lock
# behind, and Xvfb then refuses to claim :99 - which surfaces much later and
# far less obviously as Godot's 'X11 Display is not available'. Nothing else
# uses :99 here, so a lock with no live Xvfb behind it is always stale.
if ! pgrep -x Xvfb >/dev/null; then
rm -f /tmp/.X99-lock /tmp/.X11-unix/X99
fi
# Display :99 is dedicated to this helper. Clear both a live process left by
# an interrupted capture and its lock/socket before claiming it again.
pkill -x Xvfb >/dev/null 2>&1 || true
rm -f /tmp/.X99-lock /tmp/.X11-unix/X99
Xvfb :99 -screen 0 ${RESOLUTION}x24 &
XVFB_PID=\$!
trap 'kill \$XVFB_PID >/dev/null 2>&1 || true' EXIT
sleep 2
mkdir -p /tmp/xdgrt && chmod 700 /tmp/xdgrt
cd '$PROJECT_DIR'
DISPLAY=:99 XDG_RUNTIME_DIR=/tmp/xdgrt GALLIUM_DRIVER=softpipe '$GODOT_BIN' --rendering-driver opengl3 --rendering-method gl_compatibility --resolution '$RESOLUTION' -s res://tests/_screenshot_tool.gd -- '$SCENE_PATH' '$OUTPUT_PATH' '$WAIT_FRAMES'
kill \$XVFB_PID
DISPLAY=:99 XDG_RUNTIME_DIR=/tmp/xdgrt GALLIUM_DRIVER=softpipe '$GODOT_BIN' --audio-driver Dummy --rendering-driver opengl3 --rendering-method gl_compatibility --resolution '$RESOLUTION' -s res://tests/_screenshot_tool.gd -- '$SCENE_PATH' '$OUTPUT_PATH' '$WAIT_FRAMES'
"