Files
horizon-airdef/packaging/package.sh
T
Ludovic Marie 601fbb533a Ship horizon-ctl in the release folders
release.yml builds horizon-ctl beside the client (checked for system-only
imports like it), packaging/package.sh copies it from beside the client binary
and refuses to package without it (the macOS folders made by hand go through
the same script), and package_native_client.py adds it to private archives.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 21:59:34 +02:00

23 lines
962 B
Bash
Executable File

#!/usr/bin/env bash
# packaging/package.sh BINARY OUTDIR: a playable Horizon folder with the game
# binary, horizon-ctl (built beside it: cargo build --release -p horizon-client --bins),
# the resource preparation tool and what it compiles, and PLAY.txt.
# It holds none of Minecraft's files: players prepare those from their own copy.
set -euo pipefail
bin=$1
out=$2
repo=$(git -C "$(dirname "$0")" rev-parse --show-toplevel)
rm -rf "$out"
mkdir -p "$out"
git -C "$repo" archive HEAD tools mods/horizon/src/test/java research-lock.json LICENSE | tar -x -C "$out"
cp "$bin" "$out/"
# horizon-ctl, the command line and MCP server that play the game, sits beside the client.
ctl="$(dirname "$bin")/horizon-ctl"
case "$bin" in *.exe) ctl="$ctl.exe" ;; esac
if [ ! -f "$ctl" ]; then
echo "package.sh: $ctl is missing; build it too: cargo build --release -p horizon-client --bins" >&2
exit 1
fi
cp "$ctl" "$out/"
cp "$repo/packaging/PLAY.txt" "$out/PLAY.txt"