Update NonSteamLaunchers.sh

This commit is contained in:
Roy 2025-04-15 22:14:05 -07:00 committed by GitHub
parent 0f422a9d2a
commit 6ede5a24b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1846,14 +1846,28 @@ function install_gog2 {
# Battle.net specific installation steps
function install_battlenet {
# Terminate any existing Battle.net processes before starting installation
terminate_processes "Battle.net.exe" #"BlizzardError.exe"
# Second installation
# Start the first installation in the background
echo "Starting first installation of Battle.net"
"$STEAM_RUNTIME" "$proton_dir/proton" run "$battle_file" Battle.net-Setup.exe --lang=enUS --installpath="C:\Program Files (x86)\Battle.net" &
first_install_pid=$!
# After first installation, kill wineserver to clean up
pkill wineserver
sleep 1
# Start the second installation process in the background
echo "Starting second installation of Battle.net"
"$STEAM_RUNTIME" "$proton_dir/proton" run "$battle_file" Battle.net-Setup.exe --lang=enUS --installpath="C:\Program Files (x86)\Battle.net" &
second_install_pid=$!
# Wait for both installations to complete
wait $first_install_pid
wait $second_install_pid
# After second installation, kill wineserver again to clean up
pkill wineserver
sleep 1
# After both installations are done, terminate any remaining Battle.net processes
terminate_processes "Battle.net.exe" #"BlizzardError.exe"
}