Files
local_machine/scripts/games/gog/configure-ja3-d3dmetal.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

38 lines
1.5 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 = DirectX 12. На Apple Silicon канон: Whisky + Game Porting Toolkit (D3DMetal), не DXVK.
set -euo pipefail
GOG_DIR="$(cd "$(dirname "$0")" && pwd)"
# shellcheck source=config.sh
source "${GOG_DIR}/config.sh"
META="${BOTTLE_DIR}/Metadata.plist"
[[ -f "${META}" ]] || {
echo "❌ Нет ${META} — откройте bottle ${BOTTLE_NAME} в Whisky."
exit 1
}
if ! ja3_gptk_available; then
if [[ -d "/Applications/Game Porting Toolkit.app" ]]; then
bash "${GOG_DIR}/install-gptk-whisky.sh"
else
echo "❌ Game Porting Toolkit не установлен."
echo " brew install --cask gcenx/wine/game-porting-toolkit"
echo " bash ${GOG_DIR}/install-gptk-whisky.sh"
exit 1
fi
fi
/usr/libexec/PlistBuddy -c 'Set :graphicsConfig:backend d3dMetal' "${META}" 2>/dev/null || \
/usr/libexec/PlistBuddy -c 'Add :graphicsConfig:backend string d3dMetal' "${META}"
/usr/libexec/PlistBuddy -c 'Set :dxvkConfig:dxvk false' "${META}" 2>/dev/null || true
bash "${GOG_DIR}/force-ja3-d3d11.sh" >/dev/null 2>&1 || true
# С GPTK можно d3d12 — сбросить принудительный d3d11 в LocalStorage при желании:
# perl -i -pe 's/GraphicsApi = "d3d11"/GraphicsApi = "d3d12"/' ...
bash "${GOG_DIR}/prepare-ja3-d3dmetal.sh"
echo "OK: bottle ${BOTTLE_NAME} → Graphics Backend D3DMetal"
echo " Запуск: bash ${GOG_DIR}/run-ja3.sh"
echo " Whisky Run: C:\\GOG Games\\Jagged Alliance 3\\run-ja3.cmd (не JA3.exe — иначе graphics/CommonLua)"