mirror of
https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck.git
synced 2025-01-21 06:11:12 +01:00
cleaner bnet
This commit is contained in:
parent
5207790fc0
commit
897ae4653b
@ -1903,23 +1903,17 @@ if [[ $options == *"Battle.net"* ]]; then
|
|||||||
echo "Running BATTLE file using Proton with the /passive option"
|
echo "Running BATTLE file using Proton with the /passive option"
|
||||||
"$STEAM_RUNTIME" "$proton_dir/proton" run "$battle_file" Battle.net-Setup.exe --lang=enUS --installpath="C:\Program Files (x86)\Battle.net"
|
"$STEAM_RUNTIME" "$proton_dir/proton" run "$battle_file" Battle.net-Setup.exe --lang=enUS --installpath="C:\Program Files (x86)\Battle.net"
|
||||||
|
|
||||||
# Wait for the process to finish or timeout after a certain number of attempts
|
|
||||||
max_attempts=20
|
|
||||||
attempt=0
|
|
||||||
while true; do
|
while true; do
|
||||||
if pgrep -f "Battle.net.exe" || pgrep -f "BlizzardError.exe" > /dev/null; then
|
if pgrep -f "Battle.net.exe" || pgrep -f "BlizzardError.exe" > /dev/null; then
|
||||||
pkill -f "Battle.net.exe" || pkill -f "BlizzardError.exe"
|
pkill -f "Battle.net.exe" || pkill -f "BlizzardError.exe"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
((attempt++))
|
|
||||||
if [ "$attempt" -ge "$max_attempts" ]; then
|
|
||||||
echo "Timeout: Battle.net process did not terminate."
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Wait for the bnet file to finish running
|
||||||
|
wait
|
||||||
fi
|
fi
|
||||||
wait
|
|
||||||
|
|
||||||
# wait for Google Chrome to finish
|
# wait for Google Chrome to finish
|
||||||
wait
|
wait
|
||||||
|
Loading…
x
Reference in New Issue
Block a user