Files

46 lines
2.5 KiB
Bash

# shellcheck shell=bash disable=SC2154 # Shared AGM installer state.
export WINEARCH=win64
export winVer="win10"
if ! command -v python3 >/dev/null; then
alert "Tekken 3" "Install native Linux Python 3, then run this installer again. Windows Python is not required."
exit 1
fi
if [[ "$(uname -m)" != "x86_64" ]]; then
alert "Tekken 3" "This installer currently requires an x86_64 Linux host for the Prism Wine speech bridge."
exit 1
fi
tekkenDiscDir="${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/tekken-3-disc"
if ! mkdir -p "$tekkenDiscDir"; then
alert "Tekken 3" "Could not create the disc-image folder: ${tekkenDiscDir}"
exit 1
fi
alert "Tekken 3 disc image" "Use your own Tekken 3 (USA) PlayStation disc dump. Place these four files together in:\n${tekkenDiscDir}\n\nTekken 3 (USA).cue\nTekken 3 (USA) (Track 1).bin\nTekken 3 (USA) (Track 2).bin\nTekken 3 (USA) (Track 3).bin\n\nThis requires the USA three-track BIN/CUE layout. ISO, CHD, other regions, and a single combined BIN are not supported. Keep the filenames and CUE references intact.\n\nPress OK after placing the files. Missing or incompatible files stop installation. AGM reads the originals without moving them. This folder is outside the download cache." || exit 0
if ! tekkenSetupOutput="$(python3 "${scriptDir}/game-scripts/tekken3_setup.py" validate-disc "$tekkenDiscDir" 2>&1)"; then
alert "Tekken 3 disc image" "$tekkenSetupOutput"
exit 1
fi
# Keep the base executable pinned while resolving the latest stable access mod.
tekkenPortCommit="b6e941378ad03dbd834fef340bd8d90bae6e430b"
if ! tekkenSetupOutput="$(python3 "${scriptDir}/game-scripts/tekken3_setup.py" latest-release 2>&1)"; then
alert "Tekken 3 release" "$tekkenSetupOutput"
exit 1
fi
IFS=$'\t' read -r tekkenModVersion tekkenModUrl tekkenModHash <<< "$tekkenSetupOutput"
if ! download "https://github.com/Muqaddas12/Tekken3-PC/archive/${tekkenPortCommit}.zip" "$tekkenModUrl"; then
alert "Tekken 3 installation" "Could not download the Tekken 3 port or Access ${tekkenModVersion}."
exit 1
fi
install_wine_bottle
if ! tekkenSetupOutput="$(python3 "${scriptDir}/game-scripts/tekken3_setup.py" install \
"$tekkenDiscDir" "${cache}/${tekkenPortCommit}.zip" "${cache}/${tekkenModUrl##*/}" \
"${WINEPREFIX}/drive_c/Program Files/Tekken 3 Access" \
--mod-sha256 "$tekkenModHash" --mod-version "$tekkenModVersion" 2>&1)"; then
alert "Tekken 3 installation" "$tekkenSetupOutput"
exit 1
fi
add_launcher 'c:\Program Files\Tekken 3 Access\Play Tekken 3 Access.exe'