mirror of
https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck.git
synced 2024-11-20 08:09:18 +01:00
woops reverted
This commit is contained in:
parent
8c1da149c7
commit
8188d59555
@ -1613,57 +1613,47 @@ 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
|
|
||||||
if [ "$use_separate_appids" = true ]; then
|
|
||||||
appid=Battle.netLauncher
|
|
||||||
else
|
|
||||||
appid=NonSteamLaunchers
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Create app id folder in compatdata folder if it doesn't exist
|
|
||||||
if [ ! -d "$HOME/.local/share/Steam/steamapps/compatdata/$appid" ]; then
|
|
||||||
mkdir -p "$HOME/.local/share/Steam/steamapps/compatdata/$appid"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Change working directory to Proton's
|
# Set the appid for the Battlenet Launcher
|
||||||
cd $proton_dir
|
if [ "$use_separate_appids" = true ]; then
|
||||||
|
appid=Battle.netLauncher
|
||||||
|
else
|
||||||
|
appid=NonSteamLaunchers
|
||||||
|
fi
|
||||||
|
|
||||||
# Set the STEAM_COMPAT_CLIENT_INSTALL_PATH environment variable
|
# Create app id folder in compatdata folder if it doesn't exist
|
||||||
export STEAM_COMPAT_CLIENT_INSTALL_PATH="~/.local/share/Steam"
|
if [ ! -d "$HOME/.local/share/Steam/steamapps/compatdata/$appid" ]; then
|
||||||
|
mkdir -p "$HOME/.local/share/Steam/steamapps/compatdata/$appid"
|
||||||
|
fi
|
||||||
|
|
||||||
# Set the STEAM_COMPAT_DATA_PATH environment variable for Epic Games Launcher
|
# Change working directory to Proton's
|
||||||
export STEAM_COMPAT_DATA_PATH=~/.local/share/Steam/steamapps/compatdata/$appid
|
cd $proton_dir
|
||||||
|
|
||||||
# Download BATTLE file
|
# Set the STEAM_COMPAT_CLIENT_INSTALL_PATH environment variable
|
||||||
if [ ! -f "$battle_file" ]; then
|
export STEAM_COMPAT_CLIENT_INSTALL_PATH="~/.local/share/Steam"
|
||||||
echo "Downloading BATTLE file"
|
|
||||||
wget $battle_url -O $battle_file
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Run the BATTLE file using Proton with the /passive option
|
# Set the STEAM_COMPAT_DATA_PATH environment variable for Epic Games Launcher
|
||||||
echo "Running BATTLE file using Proton with the /passive option"
|
export STEAM_COMPAT_DATA_PATH=~/.local/share/Steam/steamapps/compatdata/$appid
|
||||||
"$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
|
# Download BATTLE file
|
||||||
if pgrep -f "Battle.net.exe" > /dev/null; then
|
if [ ! -f "$battle_file" ]; then
|
||||||
pkill -f "Battle.net.exe"
|
echo "Downloading BATTLE file"
|
||||||
break
|
wget $battle_url -O $battle_file
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Increment the counter variable each time the loop runs
|
# Run the BATTLE file using Proton with the /passive option
|
||||||
((counter++))
|
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" &
|
||||||
|
|
||||||
# Check if the counter has reached a certain value and exit the loop if it has
|
while true; do
|
||||||
if [[ $counter -ge 60 ]]; then
|
if pgrep -f "Battle.net.exe" > /dev/null; then
|
||||||
echo "Timeout: Battle.net.exe process not found after 60 seconds"
|
pkill -f "Battle.net.exe"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
sleep 1
|
||||||
sleep 1
|
done
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user