feat(*): Add exported Linux binary training path for faster parallel instances

This commit is contained in:
Josh Creek
2026-07-28 20:56:14 +01:00
parent 4408ec3ecd
commit 01dbfc7ede
10 changed files with 179 additions and 11 deletions
+18
View File
@@ -20,6 +20,24 @@ if [ ! -x "$GODOT_BIN" ]; then
fi
echo "Godot: $GODOT_BIN"
# Export templates — needed to build the exported training binary
# (export_linux.sh); the editor binary alone can't produce release exports.
TEMPLATES_DIR="$HOME/.local/share/godot/export_templates/${GODOT_VERSION}.stable"
if [ ! -d "$TEMPLATES_DIR" ]; then
echo "Downloading Godot $GODOT_VERSION export templates to $TEMPLATES_DIR"
TMP_DL="$(mktemp -d)"
wget -q "https://github.com/godotengine/godot/releases/download/${GODOT_VERSION}-stable/Godot_v${GODOT_VERSION}-stable_export_templates.tpz" \
-O "$TMP_DL/templates.tpz"
unzip -o -q "$TMP_DL/templates.tpz" -d "$TMP_DL"
mkdir -p "$(dirname "$TEMPLATES_DIR")"
# Single mv creates $TEMPLATES_DIR only on full success — if this script is
# interrupted any earlier, the guard above correctly sees "not installed"
# and retries, instead of finding a half-populated dir and skipping.
mv "$TMP_DL/templates" "$TEMPLATES_DIR"
rm -rf "$TMP_DL"
fi
echo "Export templates: $TEMPLATES_DIR"
# Python env
[ -d .venv ] || python3 -m venv .venv
.venv/bin/pip install -q -r requirements.txt