Files
chexit a6a13003c2
build / mod (push) Failing after 5m36s
build / game-linux (push) Has been skipped
build / game-macos (push) Has been cancelled
build / game-windows (push) Has been cancelled
build / release (push) Has been cancelled
AirDef: drones and air defence for a Horizon fork
The mod (airdef-mod/), its generated models and sounds, the fork's patches
over upstream Horizon (horizon-patches/, HORIZON_COMMIT), a cross-platform
build/install/run script (tools/airdef.py), CI that builds and releases on
every push (.gitea/workflows/build.yml) and a setup guide (docs/INSTALL.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 19:16:52 +03:00

20 lines
1.0 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/sh
# AirDef: ставит мод и запускает игру (macOS и Linux). Лежит рядом с horizon-client и airdef.hmod.
set -e
HERE="$(cd "$(dirname "$0")" && pwd)"
case "$(uname)" in
Darwin) DATA="$HOME/Library/Application Support" ;;
*) DATA="${XDG_DATA_HOME:-$HOME/.local/share}" ;;
esac
GAME="${HORIZON_HOME:-$DATA/horizon}"
mkdir -p "$GAME/horizon-mods"
cp "$HERE/airdef.hmod" "$GAME/horizon-mods/airdef.hmod"
rm -rf "$GAME/horizon-mods/airdef"
LIST="$GAME/horizon-mods.txt"; touch "$LIST"
grep -v '^mod.airdef:' "$LIST" > "$LIST.tmp" || true; echo 'mod.airdef:true' >> "$LIST.tmp"; mv "$LIST.tmp" "$LIST"
RES="${HORIZON_RESOURCES:-$(ls -d "$DATA/horizon-launcher/versions"/*/.local/horizon-client/26.3 2>/dev/null | sort | tail -1)}"
[ -n "$RES" ] || { echo "Не найдены ресурсы игры: установи Horizon через лаунчер и запусти его один раз"; exit 1; }
xattr -dr com.apple.quarantine "$HERE" 2>/dev/null || true
cd "$GAME"
exec "$HERE/horizon-client" --resources "$RES" "$@"