mirror of
https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck.git
synced 2024-12-21 23:31:52 +01:00
fixhang on battlenet
This commit is contained in:
parent
7c5fec856a
commit
8c1da149c7
@ -1613,8 +1613,6 @@ if [[ $options == *"Battle.net"* ]]; then
|
|||||||
# Check if Battlenet Launcher is installed
|
# Check if Battlenet Launcher is installed
|
||||||
if [[ ! -f "$battlenet_path1" ]] && [[ ! -f "$battlenet_path2" ]]; then
|
if [[ ! -f "$battlenet_path1" ]] && [[ ! -f "$battlenet_path2" ]]; then
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Set the appid for the Battlenet Launcher
|
# Set the appid for the Battlenet Launcher
|
||||||
if [ "$use_separate_appids" = true ]; then
|
if [ "$use_separate_appids" = true ]; then
|
||||||
appid=Battle.netLauncher
|
appid=Battle.netLauncher
|
||||||
@ -1636,7 +1634,6 @@ if [[ $options == *"Battle.net"* ]]; then
|
|||||||
# Set the STEAM_COMPAT_DATA_PATH environment variable for Epic Games Launcher
|
# Set the STEAM_COMPAT_DATA_PATH environment variable for Epic Games Launcher
|
||||||
export STEAM_COMPAT_DATA_PATH=~/.local/share/Steam/steamapps/compatdata/$appid
|
export STEAM_COMPAT_DATA_PATH=~/.local/share/Steam/steamapps/compatdata/$appid
|
||||||
|
|
||||||
|
|
||||||
# Download BATTLE file
|
# Download BATTLE file
|
||||||
if [ ! -f "$battle_file" ]; then
|
if [ ! -f "$battle_file" ]; then
|
||||||
echo "Downloading BATTLE file"
|
echo "Downloading BATTLE file"
|
||||||
@ -1647,11 +1644,24 @@ 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" &
|
||||||
|
|
||||||
|
# Add a counter variable to track the number of times the loop runs
|
||||||
|
counter=0
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
if pgrep -f "Battle.net.exe" > /dev/null; then
|
if pgrep -f "Battle.net.exe" > /dev/null; then
|
||||||
pkill -f "Battle.net.exe"
|
pkill -f "Battle.net.exe"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Increment the counter variable each time the loop runs
|
||||||
|
((counter++))
|
||||||
|
|
||||||
|
# Check if the counter has reached a certain value and exit the loop if it has
|
||||||
|
if [[ $counter -ge 60 ]]; then
|
||||||
|
echo "Timeout: Battle.net.exe process not found after 60 seconds"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user