Files
CosmicClash/training/export_linux.sh
T

22 lines
922 B
Bash
Executable File

#!/usr/bin/env bash
# Build the exported Linux training binary from the "Linux Training" preset in
# Game/export_presets.cfg. That preset's custom_features="training" activates
# project.godot's `run/main_scene.training` override, so the resulting binary
# boots straight into training.tscn on its own — official Godot export
# templates have path/scene overrides compiled out, so this can't be done at
# launch time via --scene. Re-run any time training-relevant scripts/scenes
# change — an exported binary is a snapshot, not a live view of the source.
# See TRAINING_LINUX.md.
set -euo pipefail
cd "$(dirname "$0")"
GODOT_VERSION="4.7.1"
GODOT_BIN="${GODOT_BIN:-$HOME/ai-training/godot/Godot_v${GODOT_VERSION}-stable_linux.x86_64}"
OUT="build/CosmicClash.x86_64"
mkdir -p build
"$GODOT_BIN" --headless --path ../Game --export-release "Linux Training" "$(pwd)/$OUT"
chmod +x "$OUT"
echo "Exported: training/$OUT"