From 99be8f1dabc2c4555d2d0cee0c5cdd5216791134 Mon Sep 17 00:00:00 2001 From: coder-bot Date: Wed, 19 Aug 2026 15:54:50 +0000 Subject: [PATCH] Write headless Godot export CI script 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 --- export_presets.cfg | 74 ++++++++++++++++++++++++++++++++++++++++++++++ scripts/build.sh | 42 ++++++++++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 export_presets.cfg create mode 100755 scripts/build.sh diff --git a/export_presets.cfg b/export_presets.cfg new file mode 100644 index 0000000..84264f7 --- /dev/null +++ b/export_presets.cfg @@ -0,0 +1,74 @@ +[preset.0] + +name="Linux" +platform="Linux/X11" +runnable=true +advanced_options=false +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="export/linux/agp-game.x86_64" +encryption_include_filters="" +encryption_exclude_filters="" +encrypt_pck=false +encrypt_directory=false +script_export_mode=2 + +[preset.0.options] + +custom_template/debug="" +custom_template/release="" +debug/export_console_wrapper=1 +binary_format/embed_pck=false +texture_format/bptc=true +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false +binary_format/architecture="x86_64" +ssh_remote_deploy/enabled=false + +[preset.1] + +name="Windows Desktop" +platform="Windows Desktop" +runnable=true +advanced_options=false +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="export/windows/agp-game.exe" +encryption_include_filters="" +encryption_exclude_filters="" +encrypt_pck=false +encrypt_directory=false +script_export_mode=2 + +[preset.1.options] + +custom_template/debug="" +custom_template/release="" +debug/export_console_wrapper=1 +binary_format/embed_pck=false +texture_format/bptc=true +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false +binary_format/architecture="x86_64" +codesign/enable=false +application/icon="" +application/console_wrapper_icon="" +application/icon_interpolation=4 +application/file_version="" +application/product_version="" +application/company_name="" +application/product_name="" +application/file_description="" +application/copyright="" +application/trademarks="" +application/export_angle=0 +application/export_d3d12=0 +d3d12/agility_sdk_multizip=0 diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100755 index 0000000..cac6e37 --- /dev/null +++ b/scripts/build.sh @@ -0,0 +1,42 @@ +#!/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 -- 2.52.0