a6a13003c2
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>
20 lines
1.0 KiB
Bash
Executable File
20 lines
1.0 KiB
Bash
Executable File
#!/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" "$@"
|