Files
security-game/tools/build_releases.sh
T
zwitschi 28f2a48811
Full build / Import + headless tests (push) Successful in 40s
Full build / Full desktop build + optional release (push) Successful in 5m20s
Add the optional Forward+ desktop HQ build
Package a Forward+ preset with volumetric fog, SDFGI and a volumetric flashlight
for a separate Linux/Windows Desktop HQ zip. Gate the effects on a real
RenderingDevice, tune LATE fog, and adapt local light falloff for Godot 4.7.
Record the Compatibility/Forward+ A/B captures and metrics, add the artifact to
the build/publish scripts, and keep the default Compatibility/Web path
unchanged. Headless 231/231, Python 87/87; exported HQ binary boots with Vulkan.
2026-11-01 19:40:42 +01:00

83 lines
3.0 KiB
Bash
Executable File

#!/usr/bin/env bash
# Build distributable desktop executables with the Godot export pipeline.
#
# Requirements:
# - Godot 4.3 (or the version in project.godot `config/features`) on PATH,
# with export templates installed (see docs/RELEASING.md).
# - Run from the repository root.
#
# Produces:
# build/gig-line-linux-<version>.x86_64
# build/gig-line-windows-<version>.exe
# build/gig-line-macos-<version>.zip
# build/gig-line-web-<version>.zip (Godot web build: static hosting, no threads)
# build/gig-line-desktop-hq-<version>.zip (optional Forward+ Linux/Windows)
#
set -euo pipefail
GODOT="${GODOT:-godot}"
VERSION="$(grep -oP 'config/version="\K[^"]+' project.godot)"
mkdir -p build
# Presets now embed the PCK into a single binary; drop stale .pck leftovers.
rm -f build/*.pck
echo "==> Exporting Linux (x86_64)"
"$GODOT" --headless --export-release "Linux" "build/gig-line-linux-${VERSION}.x86_64"
echo "==> Exporting Windows Desktop"
"$GODOT" --headless --export-release "Windows Desktop" "build/gig-line-windows-${VERSION}.exe"
echo "==> Exporting macOS"
"$GODOT" --headless --export-release "macOS" "build/gig-line-macos-${VERSION}.zip"
echo "==> Exporting Web (no threads, static-hosting friendly)"
rm -rf build/web
mkdir -p build/web
"$GODOT" --headless --export-release "Web" "build/web/index.html"
# Ship the web build as a single zip so it can be downloaded and served as-is.
rm -f "build/gig-line-web-${VERSION}.zip"
if command -v zip >/dev/null 2>&1; then
(cd build/web && zip -q -r "../gig-line-web-${VERSION}.zip" .)
else
python3 - "$PWD/build/web" "$PWD/build/gig-line-web-${VERSION}.zip" <<'PYZIP'
import os, sys, zipfile
src, out = sys.argv[1], sys.argv[2]
with zipfile.ZipFile(out, "w", zipfile.ZIP_DEFLATED) as archive:
for root, _dirs, files in os.walk(src):
for name in files:
path = os.path.join(root, name)
archive.write(path, os.path.relpath(path, src))
PYZIP
fi
echo "==> Packaging optional Desktop HQ build (Forward+)"
HQ_DIR="build/desktop-hq"
rm -rf "$HQ_DIR"
mkdir -p "$HQ_DIR"
cp "build/gig-line-linux-${VERSION}.x86_64" "$HQ_DIR/"
cp "build/gig-line-windows-${VERSION}.exe" "$HQ_DIR/"
cp packaging/desktop_hq/override.cfg "$HQ_DIR/"
cp packaging/desktop_hq/README.txt "$HQ_DIR/"
rm -f "build/gig-line-desktop-hq-${VERSION}.zip"
if command -v zip >/dev/null 2>&1; then
(cd "$HQ_DIR" && zip -q -r "../gig-line-desktop-hq-${VERSION}.zip" .)
else
python3 - "$PWD/$HQ_DIR" "$PWD/build/gig-line-desktop-hq-${VERSION}.zip" <<'PYZIP'
import os, sys, zipfile
src, out = sys.argv[1], sys.argv[2]
with zipfile.ZipFile(out, "w", zipfile.ZIP_DEFLATED) as archive:
for root, _dirs, files in os.walk(src):
for name in files:
path = os.path.join(root, name)
archive.write(path, os.path.relpath(path, src))
PYZIP
fi
rm -rf "$HQ_DIR"
echo ""
echo "Artifacts:"
ls -la build/*"${VERSION}"*
echo ""
echo "Upload to: https://git.allucanget.biz/zwitschi/security-game/releases"
echo "See docs/RELEASING.md for the full release checklist."