mirror of
https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck.git
synced 2024-12-30 11:41:50 +01:00
Added an "Update Proton GE Button"
~command line ready
This commit is contained in:
parent
f99356bdb4
commit
cdcc489daa
@ -296,6 +296,47 @@ get_sd_path() {
|
||||
echo $sd_path
|
||||
}
|
||||
|
||||
#Function For Updating Proton-GE
|
||||
function download_ge_proton() {
|
||||
echo "Downloading GE-Proton using the GitHub API"
|
||||
cd "${logged_in_home}/Downloads/NonSteamLaunchersInstallation"
|
||||
curl -sLOJ "$(curl -s https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases/latest | grep browser_download_url | cut -d\" -f4 | grep .tar.gz)"
|
||||
curl -sLOJ "$(curl -s https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases/latest | grep browser_download_url | cut -d\" -f4 | grep .sha512sum)"
|
||||
sha512sum -c ./*.sha512sum
|
||||
tar -xf GE-Proton*.tar.gz -C "${logged_in_home}/.steam/root/compatibilitytools.d/"
|
||||
proton_dir=$(find "${logged_in_home}/.steam/root/compatibilitytools.d" -maxdepth 1 -type d -name "GE-Proton*" | sort -V | tail -n1)
|
||||
echo "All done :)"
|
||||
}
|
||||
|
||||
function update_proton() {
|
||||
echo "0"
|
||||
echo "# Detecting, Updating and Installing GE-Proton"
|
||||
|
||||
# check to make sure compatabilitytools.d exists and makes it if it doesnt
|
||||
if [ ! -d "${logged_in_home}/.steam/root/compatibilitytools.d" ]; then
|
||||
mkdir -p "${logged_in_home}/.steam/root/compatibilitytools.d"
|
||||
fi
|
||||
|
||||
# Create NonSteamLaunchersInstallation subfolder in Downloads folder
|
||||
mkdir -p "${logged_in_home}/Downloads/NonSteamLaunchersInstallation"
|
||||
|
||||
# Set the path to the Proton directory
|
||||
proton_dir=$(find "${logged_in_home}/.steam/root/compatibilitytools.d" -maxdepth 1 -type d -name "GE-Proton*" | sort -V | tail -n1)
|
||||
|
||||
# Check if GE-Proton is installed
|
||||
if [ -z "$proton_dir" ]; then
|
||||
download_ge_proton
|
||||
else
|
||||
# Check if installed version is the latest version
|
||||
installed_version=$(basename $proton_dir | sed 's/GE-Proton-//')
|
||||
latest_version=$(curl -s https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases/latest | grep tag_name | cut -d '"' -f 4)
|
||||
if [ "$installed_version" != "$latest_version" ]; then
|
||||
download_ge_proton
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# Check which app IDs are installed
|
||||
CheckInstallations
|
||||
CheckInstallationDirectory
|
||||
@ -312,7 +353,7 @@ separate_app_ids=false
|
||||
# Check if any command line arguments were provided
|
||||
if [ ${#args[@]} -eq 0 ]; then
|
||||
# No command line arguments were provided, so display the main zenity window
|
||||
selected_launchers=$(zenity --list --text="Which launchers do you want to download and install?" --checklist --column="$version" --column="Default = one App ID Installation, One Prefix, NonSteamLaunchers - updated the NSLGameScanner.py $live" FALSE "SEPARATE APP IDS - CHECK THIS TO SEPARATE YOUR PREFIX" $epic_games_value "$epic_games_text" $gog_galaxy_value "$gog_galaxy_text" $uplay_value "$uplay_text" $battlenet_value "$battlenet_text" $amazongames_value "$amazongames_text" $eaapp_value "$eaapp_text" $legacygames_value "$legacygames_text" $itchio_value "$itchio_text" $humblegames_value "$humblegames_text" $indiegala_value "$indiegala_text" $rockstar_value "$rockstar_text" $glyph_value "$glyph_text" $minecraft_value "$minecraft_text" $psplus_value "$psplus_text" $vkplay_value "$vkplay_text" FALSE "Fortnite" FALSE "Xbox Game Pass" FALSE "GeForce Now" FALSE "Amazon Luna" FALSE "Netflix" FALSE "Hulu" FALSE "Disney+" FALSE "Amazon Prime Video" FALSE "movie-web" FALSE "Youtube" FALSE "Twitch" --width=800 --height=740 --extra-button="Uninstall" --extra-button="Stop NSLGameScanner" --extra-button="Start Fresh" --extra-button="Move to SD Card")
|
||||
selected_launchers=$(zenity --list --text="Which launchers do you want to download and install?" --checklist --column="$version" --column="Default = one App ID Installation, One Prefix, NonSteamLaunchers - updated the NSLGameScanner.py $live" FALSE "SEPARATE APP IDS - CHECK THIS TO SEPARATE YOUR PREFIX" $epic_games_value "$epic_games_text" $gog_galaxy_value "$gog_galaxy_text" $uplay_value "$uplay_text" $battlenet_value "$battlenet_text" $amazongames_value "$amazongames_text" $eaapp_value "$eaapp_text" $legacygames_value "$legacygames_text" $itchio_value "$itchio_text" $humblegames_value "$humblegames_text" $indiegala_value "$indiegala_text" $rockstar_value "$rockstar_text" $glyph_value "$glyph_text" $minecraft_value "$minecraft_text" $psplus_value "$psplus_text" $vkplay_value "$vkplay_text" FALSE "Fortnite" FALSE "Xbox Game Pass" FALSE "GeForce Now" FALSE "Amazon Luna" FALSE "Netflix" FALSE "Hulu" FALSE "Disney+" FALSE "Amazon Prime Video" FALSE "movie-web" FALSE "Youtube" FALSE "Twitch" --width=800 --height=740 --extra-button="Uninstall" --extra-button="Stop NSLGameScanner" --extra-button="Start Fresh" --extra-button="Move to SD Card" --extra-button="Update Proton-GE")
|
||||
|
||||
# Check if the user clicked the 'Cancel' button or selected one of the extra buttons
|
||||
if [ $? -eq 1 ] || [[ $selected_launchers == "Start Fresh" ]] || [[ $selected_launchers == "Move to SD Card" ]] || [[ $selected_launchers == "Uninstall" ]]; then
|
||||
@ -895,52 +936,15 @@ fi
|
||||
# Massive subshell pipes into `zenity --progress` around L2320 for GUI rendering
|
||||
(
|
||||
|
||||
echo "0"
|
||||
echo "# Detecting, Updating and Installing GE-Proton"
|
||||
#Update Proton GE
|
||||
# Call the function directly
|
||||
update_proton
|
||||
|
||||
# check to make sure compatabilitytools.d exists and makes it if it doesnt
|
||||
if [ ! -d "${logged_in_home}/.steam/root/compatibilitytools.d" ]; then
|
||||
mkdir -p "${logged_in_home}/.steam/root/compatibilitytools.d"
|
||||
# Also call the function when the button is pressed
|
||||
if [[ $options == *"Update Proton-GE"* ]]; then
|
||||
update_proton
|
||||
fi
|
||||
|
||||
# Create NonSteamLaunchersInstallation subfolder in Downloads folder
|
||||
mkdir -p "${logged_in_home}/Downloads/NonSteamLaunchersInstallation"
|
||||
|
||||
# Set the path to the Proton directory
|
||||
proton_dir=$(find "${logged_in_home}/.steam/root/compatibilitytools.d" -maxdepth 1 -type d -name "GE-Proton*" | sort -V | tail -n1)
|
||||
|
||||
# Check if GE-Proton is installed
|
||||
if [ -z "$proton_dir" ]; then
|
||||
# Download GE-Proton using the GitHub API
|
||||
echo "Downloading GE-Proton using the GitHub API"
|
||||
cd "${logged_in_home}/Downloads/NonSteamLaunchersInstallation"
|
||||
curl -sLOJ "$(curl -s https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases/latest | grep browser_download_url | cut -d\" -f4 | grep .tar.gz)"
|
||||
curl -sLOJ "$(curl -s https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases/latest | grep browser_download_url | cut -d\" -f4 | grep .sha512sum)"
|
||||
sha512sum -c ./*.sha512sum
|
||||
tar -xf GE-Proton*.tar.gz -C "${logged_in_home}/.steam/root/compatibilitytools.d/"
|
||||
proton_dir=$(find "${logged_in_home}/.steam/root/compatibilitytools.d" -maxdepth 1 -type d -name "GE-Proton*" | sort -V | tail -n1)
|
||||
echo "All done :)"
|
||||
else
|
||||
# Check if installed version is the latest version
|
||||
installed_version=$(basename $proton_dir | sed 's/GE-Proton-//')
|
||||
latest_version=$(curl -s https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases/latest | grep tag_name | cut -d '"' -f 4)
|
||||
if [ "$installed_version" != "$latest_version" ]; then
|
||||
# Download GE-Proton using the GitHub API
|
||||
echo "Downloading GE-Proton using the GitHub API"
|
||||
cd "${logged_in_home}/Downloads/NonSteamLaunchersInstallation"
|
||||
curl -sLOJ "$(curl -s https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases/latest | grep browser_download_url | cut -d\" -f4 | grep .tar.gz)"
|
||||
curl -sLOJ "$(curl -s https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases/latest | grep browser_download_url | cut -d\" -f4 | grep .sha512sum)"
|
||||
sha512sum -c ./*.sha512sum
|
||||
tar -xf GE-Proton*.tar.gz -C "${logged_in_home}/.steam/root/compatibilitytools.d/"
|
||||
proton_dir=$(find "${logged_in_home}/.steam/root/compatibilitytools.d" -maxdepth 1 -type d -name "GE-Proton*" | sort -V | tail -n1)
|
||||
echo "All done :)"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
echo "10"
|
||||
echo "# Setting files in their place"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user