99be8f1dab
Adds export_presets.cfg (Linux/X11 + Windows Desktop, x86_64) -- didn't exist at all before this, which is why the task got stuck: you can't run godot --export-release without presets already defined, and Godot only auto-generates this file interactively through the editor. Hand-wrote a minimal valid one and verified both platforms actually export and produce real binaries (not just that the command exits 0): - export/linux/agp-game.x86_64 -- confirmed real ELF 64-bit executable via `file` - export/windows/agp-game.exe -- 104MB PE binary scripts/build.sh wraps both exports, documents the exact Godot version + export template requirement, and was run end-to-end (not just written) to confirm it works as a real CI entrypoint would invoke it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
43 lines
1.3 KiB
Bash
Executable File
43 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Headless CI export for Linux and Windows.
|
|
#
|
|
# Requires:
|
|
# - Godot 4.6.2 (the exact version this project + export_presets.cfg were
|
|
# built against; a different Godot minor version's export templates are
|
|
# not guaranteed compatible)
|
|
# - The matching export templates installed at
|
|
# ~/.local/share/godot/export_templates/4.6.2.stable/
|
|
# (download: https://godotengine.org/download/archive/4.6.2-stable/,
|
|
# "Export templates" -- NOT the same as the editor download)
|
|
# - godot on PATH (or set GODOT_BIN below)
|
|
#
|
|
# Usage: scripts/build.sh
|
|
# Output: export/linux/agp-game.x86_64, export/windows/agp-game.exe
|
|
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
|
|
GODOT_BIN="${GODOT_BIN:-godot}"
|
|
if ! command -v "$GODOT_BIN" >/dev/null 2>&1; then
|
|
if [ -x "$HOME/godot/godot" ]; then
|
|
GODOT_BIN="$HOME/godot/godot"
|
|
else
|
|
echo "godot binary not found (checked PATH and ~/godot/godot)." >&2
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
echo "Godot version: $("$GODOT_BIN" --version)"
|
|
|
|
mkdir -p export/linux export/windows
|
|
|
|
echo "=== Exporting Linux/X11 ==="
|
|
"$GODOT_BIN" --headless --path . --export-release "Linux" export/linux/agp-game.x86_64
|
|
|
|
echo "=== Exporting Windows Desktop ==="
|
|
"$GODOT_BIN" --headless --path . --export-release "Windows Desktop" export/windows/agp-game.exe
|
|
|
|
echo ""
|
|
echo "Build artifacts:"
|
|
ls -la export/linux export/windows
|