Update the mtg arena installer and updater to be compatible with new mod.
This commit is contained in:
1 parent
d9134dd1a5
commit
43102b72b8
4 files changed
+22
-12
No files matched your search
@@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
run_mtga() {
|
||||||
|
local -a launchCommand=(wine)
|
||||||
|
if command -v gamemoderun >/dev/null; then
|
||||||
|
launchCommand=(gamemoderun wine)
|
||||||
|
fi
|
||||||
|
cp "$cache/prism.dll" "$WINEPREFIX/drive_c/Program Files (x86)/Wizards of the Coast/MTGA"
|
||||||
|
"${launchCommand[@]}" "$@" &
|
||||||
|
}
|
||||||
@@ -5,8 +5,9 @@ game="${game:-Magic: The Gathering Arena}"
|
|||||||
|
|
||||||
mtgaVersionUrl="https://mtgarena.downloads.wizards.com/Live/Windows32/version"
|
mtgaVersionUrl="https://mtgarena.downloads.wizards.com/Live/Windows32/version"
|
||||||
accessibleArenaDllUrl="https://github.com/JeanStiletto/AccessibleArena/releases/latest/download/AccessibleArena.dll"
|
accessibleArenaDllUrl="https://github.com/JeanStiletto/AccessibleArena/releases/latest/download/AccessibleArena.dll"
|
||||||
|
accessibleArenaPrismUrl="https://stormgames.wolfe.casa/downloads/prism.dll"
|
||||||
melonLoaderZipUrl="https://github.com/LavaGang/MelonLoader/releases/latest/download/MelonLoader.x64.zip"
|
melonLoaderZipUrl="https://github.com/LavaGang/MelonLoader/releases/latest/download/MelonLoader.x64.zip"
|
||||||
tolkDllUrl="https://stormgames.wolfe.casa/downloads/Tolk.dll"
|
byctrlDllUrl="https://stormgames.wolfe.casa/downloads/byctrl-x64.dll"
|
||||||
|
|
||||||
get_mtga_installer_url() {
|
get_mtga_installer_url() {
|
||||||
local versionJson=""
|
local versionJson=""
|
||||||
@@ -63,17 +64,14 @@ configure_accessible_arena_loader() {
|
|||||||
install_accessible_arena_support() {
|
install_accessible_arena_support() {
|
||||||
local mtgaRoot="$1"
|
local mtgaRoot="$1"
|
||||||
|
|
||||||
if [[ -z "${nvdaControllerClient64Dll:-}" ]]; then
|
rm "$cache/AccessibleArena.dll"
|
||||||
# shellcheck disable=SC2154 # ipfs is sourced through audiogame-manager helpers
|
|
||||||
nvdaControllerClient64Dll="${ipfs[nvdaControllerClient64]}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
download "$accessibleArenaDllUrl" "$melonLoaderZipUrl" "$tolkDllUrl" "$nvdaControllerClient64Dll"
|
download "$accessibleArenaDllUrl" "$melonLoaderZipUrl" "$accessibleArenaPrismUrl" "$byctrlDllUrl" "$nvdaControllerClient64Dll"
|
||||||
|
|
||||||
install_with_progress unzip "Installing MelonLoader..." -d "$mtgaRoot" "${cache}/MelonLoader.x64.zip"
|
install_with_progress unzip "Installing MelonLoader..." -d "$mtgaRoot" "${cache}/MelonLoader.x64.zip"
|
||||||
mkdir -p "${mtgaRoot}/Mods"
|
mkdir -p "${mtgaRoot}/Mods"
|
||||||
install_with_progress cp "Installing Accessible Arena..." "${cache}/AccessibleArena.dll" "${mtgaRoot}/Mods/AccessibleArena.dll"
|
install_with_progress cp "Installing Accessible Arena..." "${cache}/AccessibleArena.dll" "${mtgaRoot}/Mods/AccessibleArena.dll"
|
||||||
install_with_progress cp "Installing screen reader support DLLs..." "${cache}/Tolk.dll" "${cache}/nvdaControllerClient64.dll" "$mtgaRoot"
|
install_with_progress cp "Installing screen reader support DLLs..." "${cache}/prism.dll" "${cache}/byctrl-x64.dll" "$mtgaRoot"
|
||||||
configure_accessible_arena_loader "$mtgaRoot"
|
configure_accessible_arena_loader "$mtgaRoot"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -913,6 +913,10 @@ game_launcher() {
|
|||||||
# shellcheck source=.includes/city-of-division.sh
|
# shellcheck source=.includes/city-of-division.sh
|
||||||
source "${scriptDir}/.includes/city-of-division.sh"
|
source "${scriptDir}/.includes/city-of-division.sh"
|
||||||
run_city_of_division "${game[1]##*\\}"
|
run_city_of_division "${game[1]##*\\}"
|
||||||
|
elif [[ "${wineExec,,}" == "MTGA.exe" ]]; then
|
||||||
|
# shellcheck source=.includes/city-of-division.sh
|
||||||
|
source "${scriptDir}/.includes/magic-the-gathering-arena.sh"
|
||||||
|
run_mtga "${game[1]##*\\}"
|
||||||
else
|
else
|
||||||
# Use direct wine execution instead of 'wine start' to ensure clipboard works
|
# Use direct wine execution instead of 'wine start' to ensure clipboard works
|
||||||
# See: https://bugs.winehq.org/show_bug.cgi?id=50598
|
# See: https://bugs.winehq.org/show_bug.cgi?id=50598
|
||||||
|
|||||||
@@ -24,12 +24,9 @@ source "${0%/*}/../.includes/dialog-interface.sh"
|
|||||||
source "${0%/*}/../.includes/functions.sh"
|
source "${0%/*}/../.includes/functions.sh"
|
||||||
source "${0%/*}/../.includes/bottle.sh"
|
source "${0%/*}/../.includes/bottle.sh"
|
||||||
|
|
||||||
export nvdaControllerClient64Dll="${ipfs[nvdaControllerClient64]}"
|
|
||||||
|
|
||||||
mtgaVersionUrl="https://mtgarena.downloads.wizards.com/Live/Windows32/version"
|
mtgaVersionUrl="https://mtgarena.downloads.wizards.com/Live/Windows32/version"
|
||||||
accessibleArenaDllUrl="https://github.com/JeanStiletto/AccessibleArena/releases/latest/download/AccessibleArena.dll"
|
accessibleArenaDllUrl="https://github.com/JeanStiletto/AccessibleArena/releases/latest/download/AccessibleArena.dll"
|
||||||
melonLoaderZipUrl="https://github.com/LavaGang/MelonLoader/releases/latest/download/MelonLoader.x64.zip"
|
melonLoaderZipUrl="https://github.com/LavaGang/MelonLoader/releases/latest/download/MelonLoader.x64.zip"
|
||||||
tolkDllUrl="https://stormgames.wolfe.casa/downloads/Tolk.dll"
|
|
||||||
|
|
||||||
get_mtga_installer_url() {
|
get_mtga_installer_url() {
|
||||||
local versionJson=""
|
local versionJson=""
|
||||||
@@ -84,12 +81,13 @@ configure_accessible_arena_loader() {
|
|||||||
install_accessible_arena_support() {
|
install_accessible_arena_support() {
|
||||||
local mtgaRoot="$1"
|
local mtgaRoot="$1"
|
||||||
|
|
||||||
download "$accessibleArenaDllUrl" "$melonLoaderZipUrl" "$tolkDllUrl" "$nvdaControllerClient64Dll"
|
rm "$cache/AccessibleArena.dll"
|
||||||
|
|
||||||
|
download "$accessibleArenaDllUrl" "$melonLoaderZipUrl"
|
||||||
|
|
||||||
install_with_progress unzip "Reinstalling MelonLoader..." -d "$mtgaRoot" "${cache}/MelonLoader.x64.zip"
|
install_with_progress unzip "Reinstalling MelonLoader..." -d "$mtgaRoot" "${cache}/MelonLoader.x64.zip"
|
||||||
mkdir -p "${mtgaRoot}/Mods"
|
mkdir -p "${mtgaRoot}/Mods"
|
||||||
install_with_progress cp "Installing Accessible Arena..." "${cache}/AccessibleArena.dll" "${mtgaRoot}/Mods/AccessibleArena.dll"
|
install_with_progress cp "Installing Accessible Arena..." "${cache}/AccessibleArena.dll" "${mtgaRoot}/Mods/AccessibleArena.dll"
|
||||||
install_with_progress cp "Installing screen reader support DLLs..." "${cache}/Tolk.dll" "${cache}/nvdaControllerClient64.dll" "$mtgaRoot"
|
|
||||||
configure_accessible_arena_loader "$mtgaRoot"
|
configure_accessible_arena_loader "$mtgaRoot"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user