mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 00:14:00 +00:00
feat(*): Add exported Linux binary training path for faster parallel instances
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user