Files
local_machine/scripts/games/gog/install-ja3-offline.sh
ahauimix 1938b7c743 Expand local_machine docs and automation for connectivity, games, and ops.
Add proxy/VPN/telegram launchd and emergency runbooks; reorganize apps docs;
document JA3 CrossOver runbook and Wine troubleshooting; add GOG/HoMM game
scripts, disk cleanup guides, and gitea push-via-proxy helper. Ignore temp/.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-01 08:12:19 +03:00

65 lines
1.9 KiB
Bash
Executable File
Raw 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.
#!/usr/bin/env bash
# JA3 из GOG offline backup installer — без Galaxy. Inno /VERYSILENT.
set -euo pipefail
GOG_DIR="$(cd "$(dirname "$0")" && pwd)"
GAMES_DIR="$(cd "${GOG_DIR}/.." && pwd)"
# shellcheck source=config.sh
source "${GOG_DIR}/config.sh"
INSTALLER="${1:-}"
LOG="/tmp/ja3-offline-install-${BOTTLE_NAME}.log"
usage() {
cat <<EOF
Использование: bash $0 /path/to/setup_jagged_alliance_3_*.exe
Скачать (Windows offline backup):
https://www.gog.com/account → Jagged Alliance 3 → Download offline backup game installers
Документация: docs/games/JA3_MAC_WITHOUT_GALAXY.md
EOF
}
if [[ -z "${INSTALLER}" || ! -f "${INSTALLER}" ]]; then
usage
exit 1
fi
bash "${GOG_DIR}/emergency-stop.sh"
gog_swap_guard "${GOG_SWAP_MAX_MB:-400}" || exit 1
gog_disk_guard 40 || {
echo "❌ Для JA3 нужно ~40+ GB свободно на Data (игра + установка)."
exit 1
}
export_wine_env_gog
gog_wine_check
# Inno silent (GOG offline installers)
SILENT=(/VERYSILENT /SUPPRESSMSGBOXES /NORESTART)
local_base="$(basename "${INSTALLER}")"
cp -f "${INSTALLER}" "${BOTTLE_DIR}/drive_c/${local_base}"
win="C:\\${local_base}"
echo "Установка JA3 (без Galaxy): ${INSTALLER}"
echo "Лог: ${LOG}"
: >"${LOG}"
cd "${BOTTLE_DIR}/drive_c"
if ! "${WINE64}" "${win}" "${SILENT[@]}" >>"${LOG}" 2>&1; then
echo "❌ Установщик завершился с ошибкой. tail:"
tail -40 "${LOG}"
exit 1
fi
if [[ -f "${BOTTLE_DIR}/drive_c/GOG Games/Jagged Alliance 3/JA3.exe" ]]; then
date -u +"%Y-%m-%dT%H:%M:%SZ" >"${BOTTLE_DIR}/.ja3_installed"
echo ""
echo "OK: JA3 установлен."
echo " Запуск: bash ${GOG_DIR}/run-ja3.sh"
else
echo "⚠️ JA3.exe пока не найден — проверьте лог, возможно нужны ещё offline .exe (DLC/base):"
tail -30 "${LOG}"
exit 1
fi