diff --git a/.install/Klango.sh b/.install/Klango.sh new file mode 100644 index 0000000..4c299e9 --- /dev/null +++ b/.install/Klango.sh @@ -0,0 +1,27 @@ +# shellcheck shell=bash disable=SC2154 # Shared AGM installer state. +export WINEARCH=win64 +export winVer="win10" + +if ! command -v python3 >/dev/null; then + agm_msgbox "Klango" "Klango" "Install native Linux Python 3, then run this installer again. Windows Python is not required." + exit 1 +fi +install_wine_bottle || exit 1 +download "https://klango.online/downloads/klango4/Klango4-4.0.0b1-win.zip" || exit 1 + +# Normalize the Windows ZIP paths and repair directory permissions before Wine +# loads the bundled libraries. Preserve failures through the progress pipeline. +if ! ( + set -o pipefail + install_with_progress python3 "Extracting Klango..." \ + "${scriptDir}/game-scripts/klango-extract.py" \ + "${cache}/Klango4-4.0.0b1-win.zip" "${WINEPREFIX}/drive_c/Program Files/Klango4" +); then + agm_msgbox "Klango" "Klango" "Could not extract Klango and repair its file permissions. No launcher was added." + exit 1 +fi +if [[ ! -s "${WINEPREFIX}/drive_c/Program Files/Klango4/Klango4.exe" ]]; then + agm_msgbox "Klango" "Klango" "Klango4.exe was not installed. No launcher was added." + exit 1 +fi +add_launcher 'c:\Program Files\Klango4\Klango4.exe' diff --git a/.install/Knights of the Old Republic.sh b/.install/Knights of the Old Republic.sh new file mode 100644 index 0000000..e8e2e1f --- /dev/null +++ b/.install/Knights of the Old Republic.sh @@ -0,0 +1,44 @@ +# shellcheck shell=bash disable=SC2154 # AGM supplies cache and game. +export WINEARCH=win64 +export winVer="win10" + +install_wine_bottle +kotorGameDir="${WINEPREFIX}/drive_c/Program Files/${game}" +if [[ ! -f "${kotorGameDir}/swkotor.exe" ]]; then + get_steam "32370" "https://store.steampowered.com/app/32370/STAR_WARS_Knights_of_the_Old_Republic/" +fi +if [[ ! -f "${kotorGameDir}/swkotor.exe" ]]; then + alert "$game" "The Windows game executable was not found at ${kotorGameDir}/swkotor.exe. Install your own Steam or GOG game files there, then try again." + exit 1 +fi + +kotorModVersion="v0.9.1" +kotorModHash="7cfe338c61571535ef0007d486883779c61cd4aac69ec782dbf8af77ae10c714" +kotorModUrl="https://github.com/JeanStiletto/voice-of-the-old-republic/releases/download/${kotorModVersion}/VoiceOfTheOldRepublicInstaller.exe" +if ! download "$kotorModUrl"; then + exit 1 +fi +kotorModFile="${cache}/VoiceOfTheOldRepublicInstaller.exe" +kotorDownloadedHash="$(sha256sum "$kotorModFile")" || exit 1 +if [[ "${kotorDownloadedHash%% *}" != "$kotorModHash" ]]; then + alert "$game" "The accessibility mod installer failed its published SHA-256 check. Remove the cached installer and try again." + exit 1 +fi + +if ! kotorWindowsDir="$(winepath -w "$kotorGameDir")"; then + alert "$game" "Could not convert the game folder to a Windows path." + exit 1 +fi +alert "$game" "The Voice of the Old Republic installer will open. Choose KOTOR 1 and complete its installation. Do not launch the game from the installer's final screen; use Audiogame Manager after it closes. This upstream installer targets Windows, so its Wine behavior is still being tested." +if ! wine "$kotorModFile" --game k1 "$kotorWindowsDir"; then + alert "$game" "The accessibility mod installer failed. Check its log before trying again." + exit 1 +fi +if [[ ! -f "${kotorGameDir}/patches/accessibility.dll" || + ! -f "${kotorGameDir}/patches/prism.dll" || + ! -f "${kotorGameDir}/dinput8.dll" ]]; then + alert "$game" "The accessibility patch files were not installed. Audiogame Manager did not add a launcher." + exit 1 +fi + +add_launcher 'c:\Program Files\Knights of the Old Republic\swkotor.exe' 'export WINEDLLOVERRIDES=dinput8=n,b'