2023-08-12 18:47:52 +02:00
#!/usr/bin/env bash
set -x # activate debugging (execution shown)
2023-08-12 20:25:08 +02:00
set -o pipefail # capture error from pipes
# set -eu # exit immediately, undefined vars are errors
2023-05-05 01:30:31 +02:00
2023-08-12 21:06:36 +02:00
# ENVIRONMENT VARIABLES
# $USER
2023-09-01 07:04:17 +02:00
[ [ -n $( logname >/dev/null 2>& 1) ] ] && logged_in_user = $( logname) || logged_in_user = $( whoami)
2023-08-12 21:06:36 +02:00
# $UID
# logged_in_uid=$(id -u "${logged_in_user}")
# $HOME
logged_in_home = $( eval echo " ~ ${ logged_in_user } " )
# TODO: `/tmp` or `mktemp -d` might be a better option (see: EOF)
# $PWD (working directory)
download_dir = " ${ logged_in_home } /Downloads/NonSteamLaunchersInstallation "
# Create a log file in the same directory as the desktop file/.sh file
2023-09-01 07:04:17 +02:00
exec >> " ${ logged_in_home } /Downloads/NonSteamLaunchers-install.log " 2>& 1
2023-08-12 21:06:36 +02:00
# Version number (major.minor)
2023-12-27 07:07:31 +01:00
version = v3.00
2023-05-05 01:30:31 +02:00
2023-08-12 21:09:42 +02:00
# TODO: tighten logic to check whether major/minor version is up-to-date via `-eq`, `-lt`, or `-gt` operators
2023-08-12 21:06:36 +02:00
# Check repo releases via GitHub API then display current stable version
2023-05-03 06:53:41 +02:00
check_for_updates( ) {
# Set the URL to the GitHub API for the repository
local api_url = "https://api.github.com/repos/moraroy/NonSteamLaunchers-On-Steam-Deck/releases/latest"
# Get the latest release tag from the GitHub API
local latest_version = $( curl -s " $api_url " | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' )
# Compare the version number in the script against the latest release tag
if [ " $version " != " $latest_version " ] ; then
2023-05-06 00:24:07 +02:00
# Display a Zenity window to notify the user that a new version is available
zenity --info --text= " A new version is available: $latest_version \nPlease download it from GitHub. " --width= 200 --height= 100
2023-05-03 06:53:41 +02:00
else
2023-05-07 00:06:33 +02:00
echo " You are already running the latest version: $version "
2023-05-03 06:53:41 +02:00
fi
}
2023-06-28 08:03:55 +02:00
# Get the command line arguments
args = ( " $@ " )
# Check if any command line arguments were provided
if [ ${# args [@] } -eq 0 ] ; then
# No command line arguments were provided, so check for updates and display the zenity window if necessary
check_for_updates
fi
2023-06-07 11:26:50 +02:00
# Check if the NonSteamLaunchersInstallation subfolder exists in the Downloads folder
2023-08-12 21:02:52 +02:00
if [ -d " $download_dir " ] ; then
2023-06-07 11:26:50 +02:00
# Delete the NonSteamLaunchersInstallation subfolder
2023-08-12 21:02:52 +02:00
rm -rf " $download_dir "
2023-06-07 11:26:50 +02:00
echo "Deleted NonSteamLaunchersInstallation subfolder"
else
echo "NonSteamLaunchersInstallation subfolder does not exist"
fi
2023-05-03 06:53:41 +02:00
2023-08-12 18:47:52 +02:00
# Game Launchers
2023-05-03 06:53:41 +02:00
2023-08-12 18:47:52 +02:00
# TODO: parameterize hard-coded client versions (cf. 'app-25.6.2')
2023-05-02 14:52:53 +02:00
# Set the paths to the launcher executables
2023-08-12 19:11:01 +02:00
epic_games_launcher_path1 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/Epic Games/Launcher/Portal/Binaries/Win32/EpicGamesLauncher.exe "
epic_games_launcher_path2 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/EpicGamesLauncher/pfx/drive_c/Program Files (x86)/Epic Games/Launcher/Portal/Binaries/Win32/EpicGamesLauncher.exe "
gog_galaxy_path1 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/GOG Galaxy/GalaxyClient.exe "
gog_galaxy_path2 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/GogGalaxyLauncher/pfx/drive_c/Program Files (x86)/GOG Galaxy/GalaxyClient.exe "
origin_path1 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/Origin/Origin.exe "
origin_path2 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/OriginLauncher/pfx/drive_c/Program Files (x86)/Origin/Origin.exe "
uplay_path1 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/Ubisoft/Ubisoft Game Launcher/upc.exe "
uplay_path2 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/UplayLauncher/pfx/drive_c/Program Files (x86)/Ubisoft/Ubisoft Game Launcher/upc.exe "
battlenet_path1 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/Battle.net/Battle.net Launcher.exe "
battlenet_path2 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/Battle.netLauncher/pfx/drive_c/Program Files (x86)/Battle.net/Battle.net Launcher.exe "
eaapp_path1 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files/Electronic Arts/EA Desktop/EA Desktop/EADesktop.exe "
eaapp_path2 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/TheEAappLauncher/pfx/drive_c/Program Files/Electronic Arts/EA Desktop/EA Desktop/EADesktop.exe "
amazongames_path1 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/users/steamuser/AppData/Local/Amazon Games/App/Amazon Games.exe "
amazongames_path2 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/AmazonGamesLauncher/pfx/drive_c/users/steamuser/AppData/Local/Amazon Games/App/Amazon Games.exe "
itchio_path1 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/users/steamuser/AppData/Local/itch/app-25.6.2/itch.exe "
itchio_path2 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/itchioLauncher/pfx/drive_c/users/steamuser/AppData/Local/itch/app-25.6.2/itch.exe "
legacygames_path1 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files/Legacy Games/Legacy Games Launcher/Legacy Games Launcher.exe "
legacygames_path2 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/LegacyGamesLauncher/pfx/drive_c/Program Files/Legacy Games/Legacy Games Launcher/Legacy Games Launcher.exe "
humblegames_path1 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files/Humble App/Humble App.exe "
humblegames_path2 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/HumbleGamesLauncher/pfx/drive_c/Program Files/Humble App/Humble App.exe "
indiegala_path1 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files/IGClient/IGClient.exe "
indiegala_path2 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/IndieGalaLauncher/pfx/drive_c/Program Files/IGClient/IGClient.exe "
rockstar_path1 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files/Rockstar Games/Launcher/Launcher.exe "
rockstar_path2 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/RockstarGamesLauncher/pfx/drive_c/Program Files/Rockstar Games/Launcher/Launcher.exe "
glyph_path1 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/Glyph/GlyphClient.exe "
glyph_path2 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/GlyphLauncher/pfx/drive_c/Program Files (x86)/Glyph/GlyphClient.exe "
minecraft_path1 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/Minecraft Launcher/MinecraftLauncher.exe "
minecraft_path2 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/MinecraftLauncher/pfx/drive_c/Program Files (x86)/Minecraft Launcher/MinecraftLauncher.exe "
psplus_path1 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/PlayStationPlus/pspluslauncher.exe "
psplus_path2 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/PlaystationPlusLauncher/pfx/drive_c/Program Files (x86)/PlayStationPlus/pspluslauncher.exe "
dmm_path1 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files/DMMGamePlayer/DMMGamePlayer.exe "
dmm_path2 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/DMMGameLauncher/pfx/drive_c/Program Files/DMMGamePlayer/DMMGamePlayer.exe "
2023-11-24 15:52:03 +01:00
vkplay_path1 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/users/steamuser/AppData/Local/GameCenter/GameCenter.exe "
vkplay_path2 = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/VKPlayLauncher/pfx/drive_c/users/steamuser/AppData/Local/GameCenter/GameCenter.exe "
2023-05-05 01:30:31 +02:00
2023-08-12 18:47:52 +02:00
# Chrome File Path
# chrome_installpath="/app/bin/chrome"
2023-07-12 10:21:19 +02:00
chrome_path = "/usr/bin/flatpak"
chrome_startdir = "\"/usr/bin\""
2023-06-12 13:05:58 +02:00
2023-05-02 14:52:53 +02:00
# Check if Epic Games Launcher is installed
2023-08-12 18:47:52 +02:00
function CheckInstallations {
2023-05-05 13:42:34 +02:00
if [ [ -f " $epic_games_launcher_path1 " ] ] ; then
# Epic Games Launcher is installed in path 1
epic_games_value = "FALSE"
epic_games_text = " Epic Games ===> $epic_games_launcher_path1 "
elif [ [ -f " $epic_games_launcher_path2 " ] ] ; then
# Epic Games Launcher is installed in path 2
2023-05-02 14:52:53 +02:00
epic_games_value = "FALSE"
2023-05-05 13:42:34 +02:00
epic_games_text = " Epic Games ===> $epic_games_launcher_path2 "
2023-05-02 14:52:53 +02:00
else
# Epic Games Launcher is not installed
2023-06-12 13:05:58 +02:00
epic_games_value = "FALSE"
2023-05-02 14:52:53 +02:00
epic_games_text = "Epic Games"
fi
# Check if GOG Galaxy is installed
2023-05-05 13:42:34 +02:00
if [ [ -f " $gog_galaxy_path1 " ] ] ; then
# GOG Galaxy is installed in path 1
gog_galaxy_value = "FALSE"
gog_galaxy_text = " GOG Galaxy ===> $gog_galaxy_path1 "
elif [ [ -f " $gog_galaxy_path2 " ] ] ; then
# GOG Galaxy is installed in path 2
2023-05-02 14:52:53 +02:00
gog_galaxy_value = "FALSE"
2023-05-05 13:42:34 +02:00
gog_galaxy_text = " GOG Galaxy ===> $gog_galaxy_path2 "
2023-05-02 14:52:53 +02:00
else
# GOG Galaxy is not installed
2023-06-12 13:05:58 +02:00
gog_galaxy_value = "FALSE"
2023-05-02 14:52:53 +02:00
gog_galaxy_text = "GOG Galaxy"
fi
# Check if Origin is installed
2023-05-05 13:42:34 +02:00
if [ [ -f " $origin_path1 " ] ] ; then
# Origin is installed in path 1
origin_value = "FALSE"
origin_text = " Origin ===> $origin_path1 "
elif [ [ -f " $origin_path2 " ] ] ; then
# Origin is installed in path 2
2023-05-02 14:52:53 +02:00
origin_value = "FALSE"
2023-05-05 13:42:34 +02:00
origin_text = " Origin ===> $origin_path2 "
2023-05-02 14:52:53 +02:00
else
# Origin is not installed
2023-06-12 13:05:58 +02:00
origin_value = "FALSE"
2023-07-24 09:10:27 +02:00
origin_text = "Origin - Broken, Use at own risk"
2023-05-02 14:52:53 +02:00
fi
# Check if Uplay is installed
2023-05-05 13:42:34 +02:00
if [ [ -f " $uplay_path1 " ] ] ; then
# Uplay is installed in path 1
uplay_value = "FALSE"
2023-11-05 02:44:02 +01:00
uplay_text = " Ubisoft Connect ===> $uplay_path1 "
2023-05-05 13:42:34 +02:00
elif [ [ -f " $uplay_path2 " ] ] ; then
# Uplay is installed in path 2
2023-05-02 14:52:53 +02:00
uplay_value = "FALSE"
2023-11-05 02:44:02 +01:00
uplay_text = " Ubisoft Connect ===> $uplay_path2 "
2023-05-02 14:52:53 +02:00
else
# Uplay is not installed
2023-06-12 13:05:58 +02:00
uplay_value = "FALSE"
2023-11-05 02:44:02 +01:00
uplay_text = "Ubisoft Connect"
2023-05-02 14:52:53 +02:00
fi
# Check if Battle.net is installed
2023-05-05 13:42:34 +02:00
if [ [ -f " $battlenet_path1 " ] ] ; then
# Battle.net is installed in path 1
battlenet_value = "FALSE"
battlenet_text = " Battle.net ===> $battlenet_path1 "
elif [ [ -f " $battlenet_path2 " ] ] ; then
# Battle.net is installed in path 2
2023-05-02 14:52:53 +02:00
battlenet_value = "FALSE"
2023-05-05 13:42:34 +02:00
battlenet_text = " Battle.net ===> $battlenet_path2 "
2023-05-02 14:52:53 +02:00
else
# Battle.net is not installed
2023-06-12 13:05:58 +02:00
battlenet_value = "FALSE"
2023-05-02 14:52:53 +02:00
battlenet_text = "Battle.net"
fi
# Check if EA App is installed
2023-05-05 13:42:34 +02:00
if [ [ -f " $eaapp_path1 " ] ] ; then
# EA App is installed in path 1
2023-05-02 14:52:53 +02:00
eaapp_value = "FALSE"
2023-05-05 13:42:34 +02:00
eaapp_text = " EA App ===> $eaapp_path1 "
elif [ [ -f " $eaapp_path2 " ] ] ; then
# EA App is installed in path 2
eaapp_value = "FALSE"
eaapp_text = " EA App ===> $eaapp_path2 "
2023-05-02 14:52:53 +02:00
else
2023-05-05 13:42:34 +02:00
# EA App is not installed
eaapp_value = "FALSE"
eaapp_text = "EA App"
2023-05-02 14:52:53 +02:00
fi
# Check if Amazon Games is installed
2023-05-05 13:42:34 +02:00
if [ [ -f " $amazongames_path1 " ] ] ; then
# Amazon Games is installed in path 1
amazongames_value = "FALSE"
amazongames_text = " Amazon Games ===> $amazongames_path1 "
elif [ [ -f " $amazongames_path2 " ] ] ; then
# Amazon Games is installed in path 2
2023-05-02 14:52:53 +02:00
amazongames_value = "FALSE"
2023-05-05 13:42:34 +02:00
amazongames_text = " Amazon Games ===> $amazongames_path2 "
2023-05-02 14:52:53 +02:00
else
# Amazon Games is not installed
2023-06-12 13:05:58 +02:00
amazongames_value = "FALSE"
2023-05-02 14:52:53 +02:00
amazongames_text = "Amazon Games"
fi
# Check if itch.io is installed
2023-05-05 13:42:34 +02:00
if [ [ -f " $itchio_path1 " ] ] ; then
# itch.io is installed in path 1
itchio_value = "FALSE"
itchio_text = " itch.io ===> $itchio_path1 "
elif [ [ -f " $itchio_path2 " ] ] ; then
# itch.io is installed in path 2
2023-05-02 14:52:53 +02:00
itchio_value = "FALSE"
2023-05-05 13:42:34 +02:00
itchio_text = " itch.io ===> $itchio_path2 "
2023-05-02 14:52:53 +02:00
else
# itch.io is not installed
2023-06-12 13:05:58 +02:00
itchio_value = "FALSE"
2023-05-02 14:52:53 +02:00
itchio_text = "itch.io"
fi
2023-05-03 06:15:40 +02:00
# Check if Legacy Games Launcher is installed
2023-05-05 13:42:34 +02:00
if [ [ -f " $legacygames_path1 " ] ] ; then
# Legacy Games is installed in path 1
2023-05-03 06:15:40 +02:00
legacygames_value = "FALSE"
2023-05-05 13:42:34 +02:00
legacygames_text = " Legacy Games ===> $legacygames_path1 "
elif [ [ -f " $legacygames_path2 " ] ] ; then
# Legacy Games is installed in path 2
legacygames_value = "FALSE"
legacygames_text = " Legacy Games ===> $legacygames_path2 "
2023-05-03 06:15:40 +02:00
else
2023-05-05 13:42:34 +02:00
# Legacy Games is not installed
2023-06-12 13:05:58 +02:00
legacygames_value = "FALSE"
2023-05-17 01:27:45 +02:00
legacygames_text = "Legacy Games - Broken, Use at own risk"
2023-05-03 06:15:40 +02:00
fi
2023-05-02 14:52:53 +02:00
2023-05-06 00:24:07 +02:00
# Check if Humble Games Launcher is installed
if [ [ -f " $humblegames_path1 " ] ] ; then
2023-05-07 09:39:25 +02:00
# Humble Games is installed in path 1 on local drive
2023-05-06 00:24:07 +02:00
humblegames_value = "FALSE"
humblegames_text = " Humble Games Collection ===> $humblegames_path1 "
elif [ [ -f " $humblegames_path2 " ] ] ; then
2023-05-07 09:39:25 +02:00
# Humble Games is installed in path 2 on local drive
2023-05-06 00:24:07 +02:00
humblegames_value = "FALSE"
humblegames_text = " Humble Games Collection ===> $humblegames_path2 "
else
# Humble Games is not installed
2023-06-12 13:05:58 +02:00
humblegames_value = "FALSE"
2023-06-05 01:05:10 +02:00
humblegames_text = "Humble Games Collection - Use Desktop Mode to sign in, then launch Game Mode"
2023-05-06 00:24:07 +02:00
fi
2023-05-09 12:50:48 +02:00
# Check if indiegala is installed
if [ [ -f " $indiegala_path1 " ] ] ; then
# indiegala is installed in path 1 on local drive
indiegala_value = "FALSE"
indiegala_text = " IndieGala ===> $indiegala_path1 "
elif [ [ -f " $indiegala_path2 " ] ] ; then
# indiegala is installed in path 2 on local drive
indiegala_value = "FALSE"
indiegala_text = " IndieGala ===> $indiegala_path2 "
else
# indiegala is not installed
2023-06-12 13:05:58 +02:00
indiegala_value = "FALSE"
2023-05-09 12:50:48 +02:00
indiegala_text = "IndieGala"
fi
2023-05-10 04:32:41 +02:00
# Check if Rockstar is installed
if [ [ -f " $rockstar_path1 " ] ] ; then
# Rockstar is installed in path 1 on local drive
rockstar_value = "FALSE"
rockstar_text = " Rockstar Games Launcher ===> $rockstar_path1 "
elif [ [ -f " $rockstar_path2 " ] ] ; then
# Rockstar is installed in path 2 on local drive
rockstar_value = "FALSE"
rockstar_text = " Rockstar Games Launcher ===> $rockstar_path2 "
else
# Rockstar is not installed
2023-06-12 13:05:58 +02:00
rockstar_value = "FALSE"
2023-05-10 04:32:41 +02:00
rockstar_text = "Rockstar Games Launcher"
2023-06-03 00:20:17 +02:00
fi
# Check if Glyph is installed
if [ [ -f " $glyph_path1 " ] ] ; then
# Glyph is installed in path 1 on local drive
glyph_value = "FALSE"
glyph_text = " Glyph Launcher ===> $glyph_path1 "
elif [ [ -f " $glyph_path2 " ] ] ; then
# Glyph is installed in path 2 on local drive
glyph_value = "FALSE"
glyph_text = " Glyph Launcher ===> $glyph_path2 "
else
# Glyph is not installed
2023-06-12 13:05:58 +02:00
glyph_value = "FALSE"
2023-06-03 00:20:17 +02:00
glyph_text = "Glyph Launcher"
2023-06-04 08:17:16 +02:00
fi
# Check if Minecraft is installed
if [ [ -f " $minecraft_path1 " ] ] ; then
# Minecraft is installed in path 1 on local drive
minecraft_value = "FALSE"
minecraft_text = " Minecraft ===> $minecraft_path1 "
elif [ [ -f " $minecraft_path2 " ] ] ; then
# Minecraft is installed in path 2 on local drive
minecraft_value = "FALSE"
minecraft_text = " Minecraft ===> $minecraft_path2 "
else
# Minecraft is not installed
2023-06-12 13:05:58 +02:00
minecraft_value = "FALSE"
2023-06-04 08:17:16 +02:00
minecraft_text = "Minecraft - Close black screen to continue installation"
2023-07-12 10:21:19 +02:00
fi
2023-05-07 09:39:25 +02:00
2023-07-12 10:21:19 +02:00
# Check if PlaystationPlus is installed
if [ [ -f " $psplus_path1 " ] ] ; then
# PlaystationPlus is installed in path 1 on local drive
psplus_value = "FALSE"
psplus_text = " Playstation Plus ===> $psplus_path1 "
elif [ [ -f " $psplus_path2 " ] ] ; then
# PlaystationPlus is installed in path 2 on local drive
psplus_value = "FALSE"
psplus_text = " Playstation Plus ===> $psplus_path2 "
else
# PlaystationPlus is not installed
psplus_value = "FALSE"
psplus_text = "Playstation Plus"
fi
# Check if DMM Player is installed
if [ [ -f " $dmm_path1 " ] ] ; then
# DMM Player is installed in path 1 on local drive
dmm_value = "FALSE"
dmm_text = " DMM Games ===> $dmm_path1 "
elif [ [ -f " $dmm_path2 " ] ] ; then
# DMM Player is installed in path 2 on local drive
dmm_value = "FALSE"
dmm_text = " DMM Games ===> $dmm_path2 "
else
# DMM Player is not installed
dmm_value = "FALSE"
2023-11-20 08:41:43 +01:00
dmm_text = "DMM Games - Broken, Use at own risk"
2023-11-24 15:52:03 +01:00
fi
# Check if VK Play is installed
if [ [ -f " $vkplay_path1 " ] ] ; then
# VK Play is installed in path 1 on local drive
vkplay_value = "FALSE"
vkplay_text = " VK Play ===> $vkplay_path1 "
elif [ [ -f " $vkplay_path2 " ] ] ; then
# VK Play is installed in path 2 on local drive
vkplay_value = "FALSE"
vkplay_text = " VK Play ===> $vkplay_path2 "
else
# VK Play is not installed
vkplay_value = "FALSE"
vkplay_text = "VK Play"
2023-07-12 10:21:19 +02:00
fi }
2023-05-09 12:50:48 +02:00
2023-08-12 18:47:52 +02:00
# Verify launchers are installed
2023-05-07 09:39:25 +02:00
function CheckInstallationDirectory {
# Check if NonSteamLaunchers is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers " ] ] ; then
2023-05-07 09:39:25 +02:00
# NonSteamLaunchers is installed
nonsteamlauncher_move_value = "TRUE"
else
# NonSteamLaunchers is not installed
nonsteamlauncher_move_value = "FALSE"
fi
# Check if EpicGamesLauncher is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/EpicGamesLauncher " ] ] ; then
2023-05-07 09:39:25 +02:00
# EpicGamesLauncher is installed
epicgameslauncher_move_value = "TRUE"
else
# EpicGamesLauncher is not installed
epicgameslauncher_move_value = "FALSE"
fi
# Check if GogGalaxyLauncher is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/GogGalaxyLauncher " ] ] ; then
2023-05-07 09:39:25 +02:00
# GogGalaxyLauncher is installed
goggalaxylauncher_move_value = "TRUE"
else
# GogGalaxyLauncher is not installed
goggalaxylauncher_move_value = "FALSE"
fi
# Check if OriginLauncher is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/OriginLauncher " ] ] ; then
2023-05-07 09:39:25 +02:00
# OriginLauncher is installed
originlauncher_move_value = "TRUE"
else
# OriginLauncher is not installed
originlauncher_move_value = "FALSE"
fi
# Check if UplayLauncher is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/UplayLauncher " ] ] ; then
2023-05-07 09:39:25 +02:00
# UplayLauncher is installed
uplaylauncher_move_value = "TRUE"
else
# UplayLauncher is not installed
uplaylauncher_move_value = "FALSE"
fi
# Check if Battle.netLauncher is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/Battle.netLauncher " ] ] ; then
2023-05-07 09:39:25 +02:00
# Battle.netLauncher is installed
battlenetlauncher_move_value = "TRUE"
else
# Battle.netLauncher is not installed
battlenetlauncher_move_value = "FALSE"
fi
# Check if TheEAappLauncher is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/TheEAappLauncher " ] ] ; then
2023-05-07 09:39:25 +02:00
# TheEAappLauncher is installed
eaapplauncher_move_value = "TRUE"
else
# TheEAappLauncher is not installed
eaapplauncher_move_value = "FALSE"
fi
# Check if AmazonGamesLauncher is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/AmazonGamesLauncher " ] ] ; then
2023-05-07 09:39:25 +02:00
# AmazonGamesLauncher is installed
amazongameslauncher_move_value = "TRUE"
else
# AmazonGamesLauncher is not installed
amazongameslauncher_move_value = "FALSE"
fi
# Check if itchioLauncher is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/itchioLauncher " ] ] ; then
2023-05-07 09:39:25 +02:00
# itchioLauncher is installed
itchiolauncher_move_value = "TRUE"
else
# itchioLauncher is not installed
itchiolauncher_move_value = "FALSE"
fi
# Check if LegacyGamesLauncher is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/LegacyGamesLauncher " ] ] ; then
2023-05-07 09:39:25 +02:00
# LegacyGamesLauncher is installed
legacygameslauncher_move_value = "TRUE"
else
# LegacyGamesLauncher is not installed
legacygameslauncher_move_value = "FALSE"
fi
# Check if HumbleGamesLauncher is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/HumbleGamesLauncher " ] ] ; then
2023-05-07 09:39:25 +02:00
# HumbleGamesLauncher is installed
humblegameslauncher_move_value = "TRUE"
else
# HumbleGamesLauncher is not installed
humblegameslauncher_move_value = "FALSE"
fi
2023-05-02 14:52:53 +02:00
2023-05-09 12:50:48 +02:00
# Check if indiegala is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/IndieGalaLauncher " ] ] ; then
2023-05-09 12:50:48 +02:00
# indiegalaLauncher is installed
indiegalalauncher_move_value = "TRUE"
else
# indiegalaLauncher is not installed
indiegalalauncher_move_value = "FALSE"
fi
2023-05-10 04:32:41 +02:00
# Check if rockstar is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/RockstarGamesLauncher " ] ] ; then
2023-05-10 04:32:41 +02:00
# rockstar games launcher is installed
rockstargameslauncher_move_value = "TRUE"
else
# rockstar games launcher is not installed
rockstargameslauncher_move_value = "FALSE"
2023-06-03 00:20:17 +02:00
fi
2023-08-12 18:47:52 +02:00
2023-06-03 00:20:17 +02:00
# Check if Glyph is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/GlyphLauncher " ] ] ; then
2023-06-03 00:20:17 +02:00
# Glyph is installed
glyphlauncher_move_value = "TRUE"
else
# Glyph is not installed
glyphlauncher_move_value = "FALSE"
2023-06-04 08:17:16 +02:00
fi
# Check if Minecraft is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/MinecraftLauncher " ] ] ; then
2023-06-04 08:17:16 +02:00
# Minecraft is installed
minecraftlauncher_move_value = "TRUE"
else
# Minecraft is not installed
minecraftlauncher_move_value = "FALSE"
2023-07-12 10:21:19 +02:00
fi
2023-08-12 18:47:52 +02:00
# TODO: `pspluslauncher_move_value` is unused (SC2034)
2023-07-12 10:21:19 +02:00
# Check if PlaystationPlus is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/PlaystationPlusLauncher " ] ] ; then
2023-07-12 10:21:19 +02:00
# PlaystationPlus is installed
pspluslauncher_move_value = "TRUE"
else
# PlaystationPlus is not installed
pspluslauncher_move_value = "FALSE"
fi
2023-05-02 14:52:53 +02:00
2023-07-12 10:21:19 +02:00
# Check if DMM Player is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/DMMGameLauncher " ] ] ; then
2023-07-12 10:21:19 +02:00
# DMM Player is installed
dmmlauncher_move_value = "TRUE"
else
# DMM Player is not installed
dmmlauncher_move_value = "FALSE"
2023-11-24 15:52:03 +01:00
fi
# Check if VK Play is installed
if [ [ -d " ${ logged_in_home } / .local/share/Steam/steamapps/compatdata/VKPlayLauncher " ] ] ; then
# VK Play is installed
vkplaylauncher_move_value = "TRUE"
else
# VK Play is not installed
vkplay_move_value = "FALSE"
2023-07-12 10:21:19 +02:00
fi }
2023-05-02 14:52:53 +02:00
2023-05-07 09:39:25 +02:00
# Check which app IDs are installed
CheckInstallations
CheckInstallationDirectory
2023-06-28 08:03:55 +02:00
# Get the command line arguments
args = ( " $@ " )
2023-07-12 10:21:19 +02:00
# Initialize an array to store the custom websites
custom_websites = ( )
2023-08-09 10:09:45 +02:00
# Initialize a variable to store whether the "Separate App IDs" option is selected or not
separate_app_ids = false
2023-06-28 08:03:55 +02:00
# Check if any command line arguments were provided
if [ ${# args [@] } -eq 0 ] ; then
2023-08-01 04:43:15 +02:00
# No command line arguments were provided, so display the main zenity window
2023-11-24 15:52:03 +01:00
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" FALSE "SEPARATE APP IDS - CHECK THIS TO SEPARATE YOUR PREFIX'S" $epic_games_value " $epic_games_text " $gog_galaxy_value " $gog_galaxy_text " $uplay_value " $uplay_text " $origin_value " $origin_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 " $dmm_value " $dmm_text " $vkplay_value " $vkplay_text " FALSE "Xbox Game Pass" FALSE "GeForce Now" FALSE "Amazon Luna" FALSE "Netflix" FALSE "Hulu" FALSE "Disney+" FALSE "Amazon Prime Video" FALSE "Youtube" FALSE "Twitch" --width= 535 --height= 740 --extra-button= "Uninstall" --extra-button= "Find Games" --extra-button= "Start Fresh" --extra-button= "Move to SD Card" )
2023-07-12 10:21:19 +02:00
2023-08-01 04:43:15 +02:00
# 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" ] ] || [ [ $selected_launchers = = "Find Games" ] ] ; then
# The user clicked the 'Cancel' button or selected one of the extra buttons, so skip prompting for custom websites
custom_websites = ( )
else
# The user did not click the 'Cancel' button or select one of the extra buttons, so prompt for custom websites
custom_websites_str = $( zenity --entry --title= "Shortcut Creator" --text= "Enter custom websites that you want shortcuts for, separated by commas. Leave blank and press ok if you dont want any. E.g. myspace.com, limewire.com, my.screenname.aol.com" )
# Split the custom_websites_str variable into an array using ',' as the delimiter
IFS = ',' read -ra custom_websites <<< " $custom_websites_str "
fi
2023-06-28 08:03:55 +02:00
else
# Command line arguments were provided, so set the value of the options variable using the command line arguments
2023-08-09 10:09:45 +02:00
# Initialize an array to store the selected launchers
selected_launchers = ( )
for arg in " ${ args [@] } " ; do
if [ [ " $arg " = ~ ^https?:// ] ] ; then
# Check if the arg is not an empty string before adding it to the custom_websites array
if [ -n " $arg " ] ; then
custom_websites += ( " $arg " )
fi
else
selected_launchers += ( " $arg " )
fi
done
2023-08-12 20:25:08 +02:00
# TODO: error handling for unbound variable $selected_launchers_str on line 564
2023-08-09 10:09:45 +02:00
# Convert the selected_launchers array to a string by joining its elements with a `|` delimiter.
selected_launchers_str = $( IFS = "|" ; echo " ${ selected_launchers [*] } " )
2023-08-12 19:11:01 +02:00
# TODO: SC2199
2023-08-09 10:09:45 +02:00
# Check if the `SEPARATE APP IDS - CHECK THIS TO SEPARATE YOUR PREFIX'S` option was included in the `selected_launchers` variable. If this option was included, set the value of the `separate_app_ids` variable to `true`, indicating that separate app IDs should be used. Otherwise, set it to `false`.
if [ [ " ${ selected_launchers [@] } " = ~ "SEPARATE APP IDS - CHECK THIS TO SEPARATE YOUR PREFIX'S" ] ] ; then
separate_app_ids = true
else
separate_app_ids = false
fi
2023-06-28 08:03:55 +02:00
fi
2023-08-12 18:47:52 +02:00
# TODO: SC2145
2023-07-12 10:21:19 +02:00
# Print the selected launchers and custom websites
echo " Selected launchers: $selected_launchers "
2023-08-09 10:09:45 +02:00
echo " Selected launchers: $selected_launchers_str "
2023-07-12 10:21:19 +02:00
echo " Custom websites: ${ custom_websites [@] } "
2023-08-09 10:09:45 +02:00
echo " Separate App IDs: $separate_app_ids "
2023-07-12 10:21:19 +02:00
# Set the value of the options variable
2023-08-09 10:09:45 +02:00
if [ ${# args [@] } -eq 0 ] ; then
# No command line arguments were provided, so set the value of the options variable using the selected_launchers variable
options = " $selected_launchers "
else
# Command line arguments were provided, so set the value of the options variable using the selected_launchers_str variable
options = " $selected_launchers_str "
fi
2023-05-02 14:52:53 +02:00
# Check if the cancel button was clicked
2023-07-12 10:21:19 +02:00
if [ $? -eq 1 ] && [ [ $options != "Start Fresh" ] ] && [ [ $options != "Move to SD Card" ] ] && [ [ $options != "Uninstall" ] ] && [ [ $options != "Find Games" ] ] ; then
2023-05-02 14:52:53 +02:00
# The cancel button was clicked
echo "The cancel button was clicked"
2023-04-27 13:19:15 +02:00
exit 1
fi
2023-04-27 02:15:25 +02:00
2023-07-12 10:21:19 +02:00
# Check if no options were selected and no custom website was provided
if [ -z " $options " ] && [ -z " $custom_websites " ] ; then
# No options were selected and no custom website was provided
zenity --error --text= "No options were selected and no custom website was provided. The script will now exit." --width= 200 --height= 150
2023-05-05 01:30:31 +02:00
exit 1
fi
2023-05-02 14:52:53 +02:00
2023-04-27 13:19:15 +02:00
# Check if the user selected to use separate app IDs
2023-08-01 04:43:15 +02:00
if [ [ $options = = *"SEPARATE APP IDS - CHECK THIS TO SEPARATE YOUR PREFIX'S" * ] ] ; then
2023-04-27 13:19:15 +02:00
# User selected to use separate app IDs
use_separate_appids = true
else
# User did not select to use separate app IDs
use_separate_appids = false
2023-04-27 02:15:25 +02:00
fi
2023-05-02 14:52:53 +02:00
# Check if the user selected both Origin and EA App
if [ [ $options = = *"Origin" * ] ] && [ [ $options = = *"EA App" * ] ] && [ " $use_separate_appids " = false ] ; then
# User selected both Origin and EA App without selecting separate app IDs
zenity --error --text= "You cannot select both Origin and EA App at the same time unless you select separate app IDs." --width= 200 --height= 150
exit 1
fi
# Check if Origin is already installed
if [ [ -f " $origin_path1 " ] ] || [ [ -f " $origin_path2 " ] ] ; then
# Origin is installed
if [ [ $options = = *"EA App" * ] ] && [ " $use_separate_appids " = false ] ; then
# User selected EA App without selecting separate app IDs
zenity --error --text= "You cannot install EA App because Origin is already installed. Please select separate app IDs if you want to install both." --width= 200 --height= 150
exit 1
fi
fi
# Check if EA App is already installed
if [ [ -f " $eaapp_path1 " ] ] || [ [ -f " $eaapp_path2 " ] ] ; then
# EA App is installed
if [ [ $options = = *"Origin" * ] ] && [ " $use_separate_appids " = false ] ; then
# User selected Origin without selecting separate app IDs
zenity --error --text= "You cannot install Origin because EA App is already installed. Please select separate app IDs if you want to install both." --width= 200 --height= 150
exit 1
fi
fi
2023-08-09 10:09:45 +02:00
# Define the StartFreshFunction
function StartFreshFunction {
# Define the path to the compatdata directory
2023-08-12 19:11:01 +02:00
compatdata_dir = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata "
2023-11-20 08:41:43 +01:00
# Define the path to the other directory
other_dir = " ${ logged_in_home } /.local/share/Steam/steamapps/shadercache/ "
2023-08-01 04:43:15 +02:00
2023-08-09 10:09:45 +02:00
# Define an array of original folder names
2023-11-24 15:52:03 +01:00
folder_names = ( "EpicGamesLauncher" "GogGalaxyLauncher" "UplayLauncher" "OriginLauncher" "Battle.netLauncher" "TheEAappLauncher" "AmazonGamesLauncher" "itchioLauncher" "LegacyGamesLauncher" "HumbleGamesLauncher" "IndieGalaLauncher" "RockstarGamesLauncher" "GlyphLauncher" "MinecraftLauncher" "PlaystationPlusLauncher" "DMMGameLauncher" "VKPlayLauncher" )
2023-08-01 04:43:15 +02:00
2023-11-20 08:41:43 +01:00
# Define an array of app IDs
2023-11-27 07:44:36 +01:00
app_ids = ( "3772819390" "4294900670" "4063097571" "3786021133" "3448088735" "3923904787" "3440562512" "2948446662" "3303169468" "3595505624" "4272271078" "3259996605" "2588786779" "4090616647" "3494943831" )
2023-11-20 08:41:43 +01:00
2023-08-09 10:09:45 +02:00
# Iterate over each folder name in the folder_names array
for folder in " ${ folder_names [@] } " ; do
# Check if the folder exists
2023-08-12 18:47:52 +02:00
if [ -e " ${ compatdata_dir } / ${ folder } " ] ; then
2023-08-09 10:09:45 +02:00
# Check if the folder is a symbolic link
2023-08-12 18:47:52 +02:00
if [ -L " ${ compatdata_dir } / ${ folder } " ] ; then
2023-08-01 04:43:15 +02:00
# Get the path of the target of the symbolic link
2023-08-12 18:47:52 +02:00
target_path = $( readlink -f " ${ compatdata_dir } / ${ folder } " )
2023-08-01 04:43:15 +02:00
# Delete the target of the symbolic link
rm -rf " $target_path "
# Delete the symbolic link
2023-08-12 18:47:52 +02:00
unlink " ${ compatdata_dir } / ${ folder } "
2023-08-01 04:43:15 +02:00
else
2023-08-09 10:09:45 +02:00
# Delete the folder
2023-08-12 18:47:52 +02:00
# shellcheck disable=SC2115
rm -rf " ${ compatdata_dir } / ${ folder } "
2023-08-01 04:43:15 +02:00
fi
fi
2023-08-09 10:09:45 +02:00
done
2023-11-20 08:41:43 +01:00
# Iterate over each app ID in the app_ids array
for app_id in " ${ app_ids [@] } " ; do
# Check if the folder exists
if [ -e " ${ other_dir } / ${ app_id } " ] ; then
# Check if the folder is a symbolic link
if [ -L " ${ other_dir } / ${ app_id } " ] ; then
# Get the path of the target of the symbolic link
target_path = $( readlink -f " ${ other_dir } / ${ app_id } " )
# Delete the target of the symbolic link
rm -rf " $target_path "
# Delete the symbolic link
unlink " ${ other_dir } / ${ app_id } "
else
# Delete the folder
# shellcheck disable=SC2115
rm -rf " ${ other_dir } / ${ app_id } "
fi
fi
done
2023-08-09 10:09:45 +02:00
# Check if the NonSteamLaunchers folder exists
if [ -e " $compatdata_dir /NonSteamLaunchers " ] ; then
# Check if the NonSteamLaunchers folder is a symbolic link
if [ -L " $compatdata_dir /NonSteamLaunchers " ] ; then
# Get the path of the target of the symbolic link
target_path = $( readlink -f " $compatdata_dir /NonSteamLaunchers " )
# Delete the target of the symbolic link
rm -rf " $target_path "
# Delete the symbolic link
unlink " $compatdata_dir /NonSteamLaunchers "
else
# Delete the NonSteamLaunchers folder
rm -rf " $compatdata_dir /NonSteamLaunchers "
fi
fi
2023-08-01 04:43:15 +02:00
2023-08-09 10:09:45 +02:00
# Iterate over each folder in the compatdata directory
for folder_path in " $compatdata_dir " /*; do
# Check if the current item is a folder
if [ -d " $folder_path " ] ; then
# Check if the folder is empty
if [ -z " $( ls -A " $folder_path " ) " ] ; then
# Delete the empty folder
rmdir " $folder_path "
echo " Deleted empty folder: $( basename " $folder_path " ) "
2023-08-02 06:46:34 +02:00
fi
2023-08-09 10:09:45 +02:00
fi
done
2023-08-12 18:47:52 +02:00
# TODO: declare array and use find/for loop to avoid duplicate `rm` processes
2023-08-09 10:09:45 +02:00
rm -rf "/run/media/mmcblk0p1/NonSteamLaunchers/"
rm -rf "/run/media/mmcblk0p1/EpicGamesLauncher/"
rm -rf "/run/media/mmcblk0p1/GogGalaxyLauncher/"
rm -rf "/run/media/mmcblk0p1/OriginLauncher/"
rm -rf "/run/media/mmcblk0p1/UplayLauncher/"
rm -rf "/run/media/mmcblk0p1/Battle.netLauncher/"
rm -rf "/run/media/mmcblk0p1/TheEAappLauncher/"
rm -rf "/run/media/mmcblk0p1/AmazonGamesLauncher/"
rm -rf "/run/media/mmcblk0p1/LegacyGamesLauncher/"
rm -rf "/run/media/mmcblk0p1/itchioLauncher/"
rm -rf "/run/media/mmcblk0p1/HumbleGamesLauncher/"
rm -rf "/run/media/mmcblk0p1/IndieGalaLauncher/"
rm -rf "/run/media/mmcblk0p1/RockstarGamesLauncher/"
rm -rf "/run/media/mmcblk0p1/GlyphLauncher/"
rm -rf "/run/media/mmcblk0p1/MinecraftLauncher/"
rm -rf "/run/media/mmcblk0p1/PlaystationPlusLauncher/"
rm -rf "/run/media/mmcblk0p1/DMMGameLauncher/"
2023-11-24 15:52:03 +01:00
rm -rf "/run/media/mmcblk0p1/VKPlayLauncher/"
2023-08-12 21:02:52 +02:00
rm -rf ${ logged_in_home } /Downloads/NonSteamLaunchersInstallation
2023-08-09 10:09:45 +02:00
# Exit the script with exit code 0 to indicate success
exit 0
}
# Check if the Start Fresh button was clicked or if the Start Fresh option was passed as a command line argument
if [ [ $options = = "Start Fresh" ] ] || [ [ $selected_launchers = = "Start Fresh" ] ] ; then
# The Start Fresh button was clicked or the Start Fresh option was passed as a command line argument
if [ ${# args [@] } -eq 0 ] ; then
# No command line arguments were provided, so display the zenity window
2023-11-20 08:41:43 +01:00
if zenity --question --text= "aaahhh it always feels good to start fresh :) but...This will delete the App ID folders you installed inside the steamapps/compatdata/ directory as well as the Shader Cache associated with them in the steamapps/shadercache directory. This means anything youve installed (launchers or games) WITHIN THIS SCRIPT will be deleted if you have them there. Everything will be wiped. Are you sure?" --width= 300 --height= 260; then
2023-08-09 10:09:45 +02:00
# The user clicked the "Yes" button, so call the StartFreshFunction
StartFreshFunction
2023-11-20 08:41:43 +01:00
# If the Start Fresh function was called, set an environment variable
if [ " $? " -eq 0 ] ; then
export START_FRESH = true
else
export START_FRESH = false
fi
2023-08-09 10:09:45 +02:00
else
# The user clicked the "No" button, so exit with exit code 0 to indicate success.
exit 0
fi
2023-05-05 13:42:34 +02:00
else
2023-08-09 10:09:45 +02:00
# Command line arguments were provided, so skip displaying the zenity window and directly perform any necessary actions to start fresh by calling the StartFreshFunction
StartFreshFunction
2023-05-05 13:42:34 +02:00
fi
fi
2023-05-17 01:27:45 +02:00
if [ [ $options = = "Uninstall" ] ] ; then
# Check if the cancel button was clicked
# The OK button was not clicked
# Define the launcher options
options = $( zenity --list --checklist \
--title= "Uninstall Launchers" \
--text= "Select the launchers you want to Uninstall..." \
--column= "Select" --column= "This will delete the launcher and all of its games and files." \
2023-06-04 08:17:16 +02:00
--width= 508 --height= 507 \
2023-05-17 01:27:45 +02:00
FALSE "Epic Games" \
FALSE "Gog Galaxy" \
FALSE "Uplay" \
FALSE "Origin" \
FALSE "Battle.net" \
FALSE "EA App" \
FALSE "Amazon Games" \
FALSE "Legacy Games" \
FALSE "itch.io" \
FALSE "Humble Bundle" \
FALSE "IndieGala" \
2023-06-03 00:20:17 +02:00
FALSE "Rockstar Games Launcher" \
2023-06-04 08:17:16 +02:00
FALSE "Glyph Launcher" \
2023-07-12 10:21:19 +02:00
FALSE "Minecraft" \
FALSE "Playstation Plus" \
2023-11-24 15:52:03 +01:00
FALSE "DMM Games" \
FALSE "VK Play" )
2023-05-17 01:27:45 +02:00
if [ [ $options != "" ] ] ; then
# The Uninstall button was clicked
# Add code here to handle the uninstallation of the selected launcher(s)
if [ [ $options = = *"Epic Games" * ] ] ; then
# User selected to uninstall Epic Games Launcher
# Check if Epic Games Launcher was installed using the NonSteamLaunchers prefix
if [ [ -f " $epic_games_launcher_path1 " ] ] ; then
# Epic Games Launcher was installed using the NonSteamLaunchers prefix
# Add code here to run the Epic Games Launcher uninstaller
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/Epic Games "
2023-05-17 01:27:45 +02:00
elif [ [ -f " $epic_games_launcher_path2 " ] ] ; then
# Epic Games Launcher was installed using a separate app ID
# Add code here to delete the EpicGamesLauncher app ID folder
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/EpicGamesLauncher "
2023-05-17 01:27:45 +02:00
fi
fi
if [ [ $options = = *"Gog Galaxy" * ] ] ; then
# User selected to uninstall GOG Galaxy
# Check if GOG Galaxy was installed using the NonSteamLaunchers prefix
if [ [ -f " $gog_galaxy_path1 " ] ] ; then
# GOG Galaxy was installed using the NonSteamLaunchers prefix
# Add code here to run the GOG Galaxy uninstaller
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/GOG Galaxy "
2023-05-17 01:27:45 +02:00
elif [ [ -f " $gog_galaxy_path2 " ] ] ; then
# GOG Galaxy was installed using a separate app ID
# Add code here to delete the GogGalaxyLauncher app ID folder
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/GogGalaxyLauncher "
2023-05-17 01:27:45 +02:00
fi
fi
if [ [ $options = = *"Uplay" * ] ] ; then
# User selected to uninstall Uplay
# Check if Uplay was installed using the NonSteamLaunchers prefix
if [ [ -f " $uplay_path1 " ] ] ; then
# Uplay was installed using the NonSteamLaunchers prefix
# Add code here to run the Uplay uninstaller
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/Ubisoft "
2023-05-17 01:27:45 +02:00
elif [ [ -f " $uplay_path2 " ] ] ; then
# Uplay was installed using a separate app ID
# Add code here to delete the UplayLauncher app ID folder
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/UplayLauncher "
2023-05-17 01:27:45 +02:00
fi
fi
if [ [ $options = = *"Origin" * ] ] ; then
# User selected to uninstall Origin
# Check if Origin was installed using the NonSteamLaunchers prefix
if [ [ -f " $origin_path1 " ] ] ; then
# Origin was installed using the NonSteamLaunchers prefix
# Add code here to run the Origin uninstaller
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/Origin "
2023-05-17 01:27:45 +02:00
elif [ [ -f " $origin_path2 " ] ] ; then
# Origin was installed using a separate app ID
# Add code here to delete the OriginLauncher app ID folder
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/OriginLauncher "
2023-05-17 01:27:45 +02:00
fi
fi
if [ [ $options = = *"Battle.net" * ] ] ; then
# User selected to uninstall Battle.net
# Check if Battle.net was installed using the NonSteamLaunchers prefix
if [ [ -f " $battlenet_path1 " ] ] ; then
# Battle.net was installed using the NonSteamLaunchers prefix
# Add code here to run the Battle.net uninstaller
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/Battle.net "
2023-05-17 01:27:45 +02:00
elif [ [ -f " $battlenet_path2 " ] ] ; then
# Battle.net was installed using a separate app ID
# Add code here to delete the Battle.netLauncher app ID folder
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/Battle.netLauncher "
2023-05-17 01:27:45 +02:00
fi
fi
if [ [ $options = = *"EA App" * ] ] ; then
# User selected to uninstall EA App
# Check if EA App was installed using the NonSteamLaunchers prefix
if [ [ -f " $eaapp_path1 " ] ] ; then
# EA App was installed using the NonSteamLaunchers prefix
# Add code here to run the EA App uninstaller
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files/Electronic Arts "
2023-05-17 01:27:45 +02:00
elif [ [ -f " $eaapp_path2 " ] ] ; then
# EA App was installed using a separate app ID
# Add code here to delete the EALauncher app ID folder
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/TheEAappLauncher "
2023-05-17 01:27:45 +02:00
fi
fi
if [ [ $options = = *"Amazon Games" * ] ] ; then
# User selected to uninstall Amazon Games
# Check if Amazon Games was installed using the NonSteamLaunchers prefix
if [ [ -f " $amazongames_path1 " ] ] ; then
# Amazon Games was installed using the NonSteamLaunchers prefix
# Add code here to run the Amazon Games uninstaller
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/users/steamuser/AppData/Local/Amazon Games "
2023-05-17 01:27:45 +02:00
elif [ [ -f " $amazongames_path2 " ] ] ; then
# Amazon Games was installed using a separate app ID
# Add code here to delete the AmazonGamesLauncher app ID folder
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/AmazonGamesLauncher "
2023-05-17 01:27:45 +02:00
fi
fi
if [ [ $options = = *"Legacy Games" * ] ] ; then
# User selected to uninstall Legacy Games
# Check if Legacy Games was installed using the NonSteamLaunchers prefix
if [ [ -f " $legacygames_path1 " ] ] ; then
# Legacy Games was installed using the NonSteamLaunchers prefix
# Add code here to run the Legacy Games uninstaller
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files/Legacy Games "
2023-05-17 01:27:45 +02:00
elif [ [ -f " $legacygames_path2 " ] ] ; then
# Legacy Games was installed using a separate app ID
# Add code here to delete the LegacyGamesLauncher app ID folder
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/LegacyGamesLauncher "
2023-05-17 01:27:45 +02:00
fi
fi
if [ [ $options = = *"itch.io" * ] ] ; then
# User selected to uninstall Itch.io
# Check if Itch.io was installed using the NonSteamLaunchers prefix
if [ [ -f " $itchio_path1 " ] ] ; then
# Itch.io was installed using the NonSteamLaunchers prefix
# Add code here to run the Itch.io uninstaller
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/users/steamuser/AppData/Local/itch "
2023-05-17 01:27:45 +02:00
elif [ [ -f " $itchio_path2 " ] ] ; then
# Itch.io was installed using a separate app ID
# Add code here to delete the Itch.ioLauncher app ID folder
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/itchioLauncher "
2023-05-17 01:27:45 +02:00
fi
fi
if [ [ $options = = *"Humble Bundle" * ] ] ; then
# User selected to uninstall Humble Bundle
# Check if Humble Bundle was installed using the NonSteamLaunchers prefix
if [ [ -f " $humblegames_path1 " ] ] ; then
# Humble Bundle was installed using the NonSteamLaunchers prefix
# Add code here to run the Humble Bundle uninstaller
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files/Humble App "
2023-05-17 01:27:45 +02:00
elif [ [ -f " $humblegames_path2 " ] ] ; then
# Humble Bundle was installed using a separate app ID
# Add code here to delete the HumbleBundleLauncher app ID folder
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/HumbleGamesLauncher "
2023-05-17 01:27:45 +02:00
fi
fi
if [ [ $options = = *"IndieGala" * ] ] ; then
# User selected to uninstall IndieGala
# Check if IndieGala was installed using the NonSteamLaunchers prefix
if [ [ -f " $indiegala_path1 " ] ] ; then
# IndieGala was installed using the NonSteamLaunchers prefix
# Add code here to run the IndieGala uninstaller
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files/IGClient "
2023-05-17 01:27:45 +02:00
elif [ [ -f " $indiegala_path2 " ] ] ; then
# IndieGala was installed using a separate app ID
# Add code here to delete the IndieGalaLauncher app ID folder
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/IndieGalaLauncher "
2023-05-17 01:27:45 +02:00
fi
fi
if [ [ $options = = *"Rockstar Games Launcher" * ] ] ; then
# User selected to uninstall Rockstar Games
# Check if Rockstar Games was installed using the NonSteamLaunchers prefix
if [ [ -f " $rockstar_path1 " ] ] ; then
# Rockstar Games was installed using the NonSteamLaunchers prefix
# Add code here to run the Rockstar Games uninstaller
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files/Rockstar Games "
2023-05-17 01:27:45 +02:00
elif [ [ -f " $rockstar_path2 " ] ] ; then
# Rockstar Games was installed using a separate app ID
# Add code here to delete the RockstarGamesLauncher app ID folder
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/RockstarGamesLauncher "
2023-05-17 01:27:45 +02:00
fi
fi
2023-06-03 00:20:17 +02:00
if [ [ $options = = *"Glyph Launcher" * ] ] ; then
# User selected to uninstall Glyph
# Check if Glyph was installed using the NonSteamLaunchers prefix
if [ [ -f " $glyph_path1 " ] ] ; then
# Glyph was installed using NonSteamLaunchers prefix
# Add code here to run the Glyph uninstaller
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/Glyph "
2023-06-03 00:20:17 +02:00
elif [ [ -f " $glyph_path2 " ] ] ; then
# Glyph was installed using a separate app ID
# Add code here to delete the GlyphLauncher app ID folder
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/GlyphLauncher "
2023-06-03 00:20:17 +02:00
fi
fi
2023-06-04 08:17:16 +02:00
if [ [ $options = = *"Minecraft" * ] ] ; then
# User selected to uninstall Minecraft
# Check if Minecraft was installed using the NonSteamLaunchers prefix
if [ [ -f " $minecraft_path1 " ] ] ; then
# Minecraft was installed using NonSteamLaunchers prefix
# Add code here to run the Minecraft uninstaller
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/Minecraft Launcher "
2023-06-04 08:17:16 +02:00
elif [ [ -f " $minecraft_path2 " ] ] ; then
# Minecraft was installed using a separate app ID
# Add code here to delete the MinecraftLauncher app ID folder
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/MinecraftLauncher "
2023-06-04 08:17:16 +02:00
fi
fi
2023-07-12 10:21:19 +02:00
if [ [ $options = = *"Playstation Plus" * ] ] ; then
# User selected to uninstall Playstation
# Check if Playstation was installed using the NonSteamLaunchers prefix
if [ [ -f " $psplus_path1 " ] ] ; then
# Playstation was installed using NonSteamLaunchers prefix
# Add code here to run the Playstation uninstaller
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/PlayStationPlus "
2023-07-12 10:21:19 +02:00
elif [ [ -f " $psplus_path2 " ] ] ; then
# Playstation was installed using a separate app ID
# Add code here to delete the PlaystationPlusLauncher app ID folder
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/PlaystationPlusLauncher "
2023-07-12 10:21:19 +02:00
fi
fi
if [ [ $options = = *"DMM Games" * ] ] ; then
# User selected to uninstall DMMGameLauncher
# Check if DMMGameLauncher was installed using the NonSteamLaunchers prefix
if [ [ -f " $dmm_path1 " ] ] ; then
# DMMGameLauncher was installed using NonSteamLaunchers prefix
# Add code here to run the DMMGameLauncher uninstaller
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/DMMGamePlayer "
2023-07-12 10:21:19 +02:00
elif [ [ -f " $dmm_path2 " ] ] ; then
# DMMGameLauncher was installed using a separate app ID
# Add code here to delete the DMMGameLauncher app ID folder
2023-08-12 19:11:01 +02:00
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/DMMGameLauncher "
2023-07-12 10:21:19 +02:00
fi
fi
2023-11-24 15:52:03 +01:00
if [ [ $options = = *"VK Play" * ] ] ; then
# User selected to uninstall VKPlayLauncher
# Check if VKPlayLauncher was installed using the NonSteamLaunchers prefix
if [ [ -f " $vkplay_path1 " ] ] ; then
# VKPlayLauncher was installed using NonSteamLaunchers prefix
# Add code here to run the VKPlayLauncher uninstaller
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/users/steamuser/AppData/Local/GameCenter "
elif [ [ -f " $vkplay_path2 " ] ] ; then
# VKPlayLauncher was installed using a separate app ID
# Add code here to delete the VKPlayLauncher app ID folder
rm -rf " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/VKPlayLauncher "
fi
fi
2023-05-17 01:27:45 +02:00
# Display a message to the user indicating that the operation was successful
zenity --info --text= "The selected launchers have now been deleted." --width= 200 --height= 150
exit
fi
exit
fi
2023-05-07 09:39:25 +02:00
if [ [ $options = = "Move to SD Card" ] ] ; then
# The Move to SD Card button was clicked
# Check which app IDs are installed
# Add similar checks for other app IDs here
CheckInstallationDirectory
2023-11-24 15:52:03 +01:00
move_options = $( zenity --list --text= "Which app IDs do you want to move to the SD card?" --checklist --column= "Select" --column= "App ID" $nonsteamlauncher_move_value "NonSteamLaunchers" $epicgameslauncher_move_value "EpicGamesLauncher" $goggalaxylauncher_move_value "GogGalaxyLauncher" $originlauncher_move_value "OriginLauncher" $uplaylauncher_move_value "UplayLauncher" $battlenetlauncher_move_value "Battle.netLauncher" $eaapplauncher_move_value "TheEAappLauncher" $amazongameslauncher_move_value "AmazonGamesLauncher" $itchiolauncher_move_value "itchioLauncher" $legacygameslauncher_move_value "LegacyGamesLauncher" $humblegameslauncher_move_value "HumbleGamesLauncher" $indiegalalauncher_move_value "IndieGalaLauncher" $rockstargameslauncher_move_value "RockstarGamesLauncher" $glyphlauncher_move_value "GlyphLauncher" $minecraftlauncher_move_value "MinecraftLauncher" $dmmlauncher_move_value "DMMGameLauncher" $vkplaylauncher_move_value "VKPlayLauncher" --width= 335 --height= 524)
2023-05-07 09:39:25 +02:00
# Check if the cancel button was clicked
if [ $? -eq 0 ] ; then
# The OK button was clicked
# Display a message to the user indicating that the operation was successful
zenity --info --text= "The selected directories have been moved to the SD card and symbolic links have been created." --width= 200 --height= 150
fi
# Set the path to the new directory on the SD card
new_dir = "/run/media/mmcblk0p1"
# Check if NonSteamLaunchers is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers " ] ] ; then
2023-08-12 18:47:52 +02:00
# NonSteamLaunchers is installed
2023-08-12 19:11:01 +02:00
original_dir = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers "
2023-05-07 09:39:25 +02:00
else
2023-08-12 18:47:52 +02:00
# NonSteamLaunchers is not installed
original_dir = ""
2023-05-07 09:39:25 +02:00
fi
# Check if the user selected to move NonSteamLaunchers
if [ [ $move_options = = *"NonSteamLaunchers" * ] ] && [ [ -n $original_dir ] ] ; then
2023-08-12 18:47:52 +02:00
# Move the NonSteamLaunchers directory to the SD card
mv " $original_dir " " $new_dir /NonSteamLaunchers "
2023-05-07 09:39:25 +02:00
2023-08-12 18:47:52 +02:00
# Create a symbolic link to the new directory
ln -s " $new_dir /NonSteamLaunchers " " $original_dir "
2023-05-07 09:39:25 +02:00
fi
# Check if EpicGamesLauncher is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/EpicGamesLauncher " ] ] ; then
2023-08-12 18:47:52 +02:00
# EpicGamesLauncher is installed
2023-08-12 19:11:01 +02:00
original_dir = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/EpicGamesLauncher "
2023-05-07 09:39:25 +02:00
else
2023-08-12 18:47:52 +02:00
# EpicGamesLauncher is not installed
original_dir = ""
2023-05-07 09:39:25 +02:00
fi
# Check if the user selected to move EpicGamesLauncher
if [ [ $move_options = = *"EpicGamesLauncher" * ] ] && [ [ -n $original_dir ] ] ; then
2023-08-12 18:47:52 +02:00
# Move the EpicGamesLauncher directory to the SD card
mv " $original_dir " " $new_dir /EpicGamesLauncher "
2023-05-07 09:39:25 +02:00
2023-08-12 18:47:52 +02:00
# Create a symbolic link to the new directory
ln -s " $new_dir /EpicGamesLauncher " " $original_dir "
2023-05-07 09:39:25 +02:00
fi
# Check if GogGalaxyLauncher is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/GogGalaxyLauncher " ] ] ; then
2023-08-12 18:47:52 +02:00
# GogGalaxyLauncher is installed
2023-08-12 19:11:01 +02:00
original_dir = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/GogGalaxyLauncher "
2023-05-07 09:39:25 +02:00
else
2023-08-12 18:47:52 +02:00
# GogGalaxyLauncher is not installed
original_dir = ""
2023-05-07 09:39:25 +02:00
fi
# Check if the user selected to move GogGalaxyLauncher
if [ [ $move_options = = *"GogGalaxyLauncher" * ] ] && [ [ -n $original_dir ] ] ; then
2023-08-12 18:47:52 +02:00
# Move the GogGalaxyLauncher directory to the SD card
mv " $original_dir " " $new_dir /GogGalaxyLauncher "
2023-05-07 09:39:25 +02:00
2023-08-12 18:47:52 +02:00
# Create a symbolic link to the new directory
ln -s " $new_dir /GogGalaxyLauncher " " $original_dir "
2023-05-07 09:39:25 +02:00
fi
# Check if OriginLauncher is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/OriginLauncher " ] ] ; then
2023-08-12 18:47:52 +02:00
# OriginLauncher is installed
2023-08-12 19:11:01 +02:00
original_dir = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/OriginLauncher "
2023-05-07 09:39:25 +02:00
else
2023-08-12 18:47:52 +02:00
# OriginLauncher is not installed
original_dir = ""
2023-05-07 09:39:25 +02:00
fi
# Check if the user selected to move OriginLauncher
if [ [ $move_options = = *"OriginLauncher" * ] ] && [ [ -n $original_dir ] ] ; then
2023-08-12 18:47:52 +02:00
# Move the OriginLauncher directory to the SD card
mv " $original_dir " " $new_dir /OriginLauncher "
2023-05-07 09:39:25 +02:00
2023-08-12 18:47:52 +02:00
# Create a symbolic link to the new directory
ln -s " $new_dir /OriginLauncher " " $original_dir "
2023-05-07 09:39:25 +02:00
fi
# Check if UplayLauncher is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/UplayLauncher " ] ] ; then
2023-08-12 18:47:52 +02:00
# UplayLauncher is installed
2023-08-12 19:11:01 +02:00
original_dir = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/UplayLauncher "
2023-05-07 09:39:25 +02:00
else
2023-08-12 18:47:52 +02:00
# UplayLauncher is not installed
original_dir = ""
2023-05-07 09:39:25 +02:00
fi
# Check if the user selected to move UplayLauncher
if [ [ $move_options = = *"UplayLauncher" * ] ] && [ [ -n $original_dir ] ] ; then
2023-08-12 18:47:52 +02:00
# Move the UplayLauncher directory to the SD card
mv " $original_dir " " $new_dir /UplayLauncher "
2023-05-07 09:39:25 +02:00
2023-08-12 18:47:52 +02:00
# Create a symbolic link to the new directory
ln -s " $new_dir /UplayLauncher " " $original_dir "
2023-05-07 09:39:25 +02:00
fi
# Check if Battle.netLauncher is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/Battle.netLauncher " ] ] ; then
2023-05-07 09:39:25 +02:00
# Battle.netLauncher is installed
2023-08-12 19:11:01 +02:00
original_dir = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/Battle.netLauncher "
2023-05-07 09:39:25 +02:00
else
# Battle.netLauncher is not installed
original_dir = ""
fi
# Check if the user selected to move Battle.netLauncher
if [ [ $move_options = = *"Battle.netLauncher" * ] ] && [ [ -n $original_dir ] ] ; then
# Move the Battle.netLauncher directory to the SD card
mv " $original_dir " " $new_dir /Battle.netLauncher "
# Create a symbolic link to the new directory
ln -s " $new_dir /Battle.netLauncher " " $original_dir "
fi
# Check if TheEAappLauncher is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/TheEAappLauncher " ] ] ; then
2023-05-07 09:39:25 +02:00
# TheEAappLauncher is installed
2023-08-12 19:11:01 +02:00
original_dir = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/TheEAappLauncher "
2023-05-07 09:39:25 +02:00
else
# TheEAappLauncher is not installed
original_dir = ""
fi
# Check if the user selected to move TheEAappLauncher
if [ [ $move_options = = *"TheEAappLauncher" * ] ] && [ [ -n $original_dir ] ] ; then
# Move the TheEAappLauncher directory to the SD card
mv " $original_dir " " $new_dir /TheEAappLauncher "
# Create a symbolic link to the new directory
ln -s " $new_dir /TheEAappLauncher " " $original_dir "
fi
# Check if AmazonGamesLauncher is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/AmazonGamesLauncher " ] ] ; then
2023-05-07 09:39:25 +02:00
# AmazonGamesLauncher is installed
2023-08-12 19:11:01 +02:00
original_dir = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/AmazonGamesLauncher "
2023-05-07 09:39:25 +02:00
else
# AmazonGamesLauncher is not installed
original_dir = ""
fi
# Check if the user selected to move AmazonGamesLauncher
if [ [ $move_options = = *"AmazonGamesLauncher" * ] ] && [ [ -n $original_dir ] ] ; then
# Move the AmazonGamesLauncher directory to the SD card
mv " $original_dir " " $new_dir /AmazonGamesLauncher "
# Create a symbolic link to the new directory
ln -s " $new_dir /AmazonGamesLauncher " " $original_dir "
fi
# Check if itchioLauncher is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/itchioLauncher " ] ] ; then
2023-05-07 09:39:25 +02:00
# itchioLauncher is installed
2023-08-12 19:11:01 +02:00
original_dir = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/itchioLauncher "
2023-05-07 09:39:25 +02:00
else
# itchioLauncher is not installed
original_dir = ""
fi
# Check if the user selected to move itchioLauncher
if [ [ $move_options = = *"itchioLauncher" * ] ] && [ [ -n $original_dir ] ] ; then
# Move the itchioLauncher directory to the SD card
mv " $original_dir " " $new_dir /itchioLauncher "
# Create a symbolic link to the new directory
ln -s " $new_dir /itchioLauncher " " $original_dir "
fi
# Check if LegacyGamesLauncher is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/LegacyGamesLauncher " ] ] ; then
2023-05-07 09:39:25 +02:00
# LegacyGamesLauncher is installed
2023-08-12 19:11:01 +02:00
original_dir = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/LegacyGamesLauncher "
2023-05-07 09:39:25 +02:00
else
# LegacyGamesLauncher is not installed
original_dir = ""
fi
# Check if the user selected to move LegacyGamesLauncher
if [ [ $move_options = = *"LegacyGamesLauncher" * ] ] && [ [ -n $original_dir ] ] ; then
2023-08-12 18:47:52 +02:00
# Move the LegacyGamesLauncher directory to the SD card
mv " $original_dir " " $new_dir /LegacyGamesLauncher "
2023-05-07 09:39:25 +02:00
2023-08-12 18:47:52 +02:00
# Create a symbolic link to the new directory
ln -s " $new_dir /LegacyGamesLauncher " " $original_dir "
2023-05-07 09:39:25 +02:00
fi
# Check if HumbleGamesLauncher is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/HumbleGamesLauncher " ] ] ; then
2023-05-07 09:39:25 +02:00
# HumbleGamesLauncher is installed
2023-08-12 19:11:01 +02:00
original_dir = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/HumbleGamesLauncher "
2023-05-07 09:39:25 +02:00
else
# HumbleGamesLauncher is not installed
original_dir = ""
fi
# Check if the user selected to move HumbleGamesLauncher
if [ [ $move_options = = *"HumbleGamesLauncher" * ] ] && [ [ -n $original_dir ] ] ; then
# Move the HumbleGamesLauncher directory to the SD card
mv " $original_dir " " $new_dir /HumbleGamesLauncher "
# Create a symbolic link to the new directory
ln -s " $new_dir /HumbleGamesLauncher " " $original_dir "
fi
2023-05-09 12:50:48 +02:00
# Check if IndieGalaLauncher is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/IndieGalaLauncher " ] ] ; then
2023-05-09 12:50:48 +02:00
# IndieGalaLauncher is installed
2023-08-12 19:11:01 +02:00
original_dir = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/IndieGalaLauncher "
2023-05-09 12:50:48 +02:00
else
# Indie Gala Launcher is not installed
original_dir = ""
fi
# Check if the user selected to move IndieGalaLauncher
if [ [ $move_options = = *"IndieGalaLauncher" * ] ] && [ [ -n $original_dir ] ] ; then
# Move the Indie GalaLauncher directory to the SD card
mv " $original_dir " " $new_dir /IndieGalaLauncher "
# Create a symbolic link to the new directory
ln -s " $new_dir /IndieGalaLauncher " " $original_dir "
fi
2023-06-03 01:11:14 +02:00
# Check if RockstarGamesLauncher is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/RockstarGamesLauncher " ] ] ; then
2023-06-03 01:11:14 +02:00
# RockstarGamesLauncher is installed
2023-08-12 19:11:01 +02:00
original_dir = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/RockstarGamesLauncher "
2023-06-03 01:11:14 +02:00
else
# Rockstar Games Launcher is not installed
original_dir = ""
fi
2023-05-10 04:32:41 +02:00
# Check if the user selected to move RockstarGamesLauncher
if [ [ $move_options = = *"RockstarGamesLauncher" * ] ] && [ [ -n $original_dir ] ] ; then
# Move the Rockstar Games Launcher directory to the SD card
mv " $original_dir " " $new_dir /RockstarGamesLauncher "
# Create a symbolic link to the new directory
ln -s " $new_dir /RockstarGamesLauncher " " $original_dir "
fi
2023-06-03 00:20:17 +02:00
# Check if Glyph is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/GlyphLauncher " ] ] ; then
2023-06-03 00:20:17 +02:00
# Glyph is installed
2023-08-12 19:11:01 +02:00
original_dir = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/GlyphLauncher "
2023-06-03 00:20:17 +02:00
else
# Glyph is not installed
original_dir = ""
fi
# Check if the user selected to move Glyph
if [ [ $move_options = = *"GlyphLauncher" * ] ] && [ [ -n $original_dir ] ] ; then
# Move the Glyph directory to the SD card
mv " $original_dir " " $new_dir /GlyphLauncher "
# Create a symbolic link to the new directory
ln -s " $new_dir /GlyphLauncher " " $original_dir "
fi
2023-06-04 08:17:16 +02:00
# Check if Minecraft is installed
2023-08-12 19:11:01 +02:00
if [ [ -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/MinecraftLauncher " ] ] ; then
2023-06-04 08:17:16 +02:00
# Minecraft is installed
2023-08-12 19:11:01 +02:00
original_dir = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/MinecraftLauncher "
2023-06-04 08:17:16 +02:00
else
# Minecraft is not installed
original_dir = ""
fi
# Check if the user selected to move Minecraft
if [ [ $move_options = = *"MinecraftLauncher" * ] ] && [ [ -n $original_dir ] ] ; then
# Move the Glyph directory to the SD card
mv " $original_dir " " $new_dir /MinecraftLauncher "
# Create a symbolic link to the new directory
ln -s " $new_dir /MinecraftLauncher " " $original_dir "
fi
2023-07-12 10:21:19 +02:00
# Check if the user selected to move Playstation
if [ [ $move_options = = *"Playstation Plus" * ] ] && [ [ -n $original_dir ] ] ; then
# Move the Playstation directory to the SD card
mv " $original_dir " " $new_dir /PlaystationPlusLauncher "
2023-05-17 01:27:45 +02:00
2023-07-12 10:21:19 +02:00
# Create a symbolic link to the new directory
ln -s " $new_dir /PlaystationPlusLauncher " " $original_dir "
2023-06-10 23:05:24 +02:00
fi
2023-07-12 10:21:19 +02:00
# Check if the user selected to move DMM Games
if [ [ $move_options = = *"DMM Games" * ] ] && [ [ -n $original_dir ] ] ; then
# Move the DMM Games directory to the SD card
mv " $original_dir " " $new_dir /DMMGameLauncher "
2023-06-10 23:05:24 +02:00
2023-07-12 10:21:19 +02:00
# Create a symbolic link to the new directory
ln -s " $new_dir /DMMGameLauncher " " $original_dir "
fi
2023-06-10 23:05:24 +02:00
2023-11-24 15:52:03 +01:00
# Check if the user selected to move VK Play
if [ [ $move_options = = *"VK Play" * ] ] && [ [ -n $original_dir ] ] ; then
# Move the VK Play directory to the SD card
mv " $original_dir " " $new_dir /VKPlayLauncher "
# Create a symbolic link to the new directory
ln -s " $new_dir /VKPlayLauncher " " $original_dir "
fi
2023-08-12 18:47:52 +02:00
# TODO: verfiy non-zero exit is necessary
# ! Why the non-zero return?
2023-07-12 10:21:19 +02:00
# Exit the script
exit 1
fi
2023-06-10 23:05:24 +02:00
# Check if the user clicked the "Find Games" button
if [ [ $options = = "Find Games" ] ] ; then
# The Find Games button was clicked
# Check if the NonSteamLaunchersInstallation directory exists
2023-08-12 21:02:52 +02:00
if [ [ ! -d " $download_dir " ] ] ; then
2023-06-10 23:05:24 +02:00
# The directory does not exist, so create it
2023-08-12 21:02:52 +02:00
mkdir -p " $download_dir "
2023-06-10 23:05:24 +02:00
fi
# Download the latest BoilR from GitHub (Linux version)
2023-08-12 21:02:52 +02:00
mkdir -p " $download_dir "
cd " $download_dir "
2023-10-03 08:35:21 +02:00
wget https://github.com/PhilipK/BoilR/releases/download/v.1.9.4/linux_BoilR
2023-06-10 23:05:24 +02:00
# Add execute permissions to the linux_BoilR file
chmod +x linux_BoilR
2023-08-12 21:19:01 +02:00
# TODO: brittle subshell proces; should ~~create working directory variable~~ [edit: `download_dir`] and launch explicitly with `bash -c "linux_BoilR"`
2023-06-10 23:05:24 +02:00
# Run BoilR from the current directory
./linux_BoilR
# Exit the script
exit
fi
2023-08-12 18:47:52 +02:00
# TODO: probably better to break this subshell into a function that can then be redirected to zenity
# Massive subshell pipes into `zenity --progress` around L2320 for GUI rendering
2023-05-10 04:32:41 +02:00
(
2023-05-02 14:52:53 +02:00
2023-04-27 22:51:00 +02:00
echo "0"
2023-05-12 10:56:42 +02:00
echo "# Detecting, Updating and Installing GE-Proton"
2023-04-27 13:19:15 +02:00
2023-04-30 08:21:01 +02:00
# check to make sure compatabilitytools.d exists and makes it if it doesnt
2023-09-01 07:04:17 +02:00
if [ ! -d " ${ logged_in_home } /.steam/root/compatibilitytools.d " ] ; then
2023-08-12 19:11:01 +02:00
mkdir -p " ${ logged_in_home } /.steam/root/compatibilitytools.d "
2023-04-30 08:21:01 +02:00
fi
2023-04-27 13:19:15 +02:00
# Create NonSteamLaunchersInstallation subfolder in Downloads folder
2023-09-01 07:04:17 +02:00
mkdir -p " ${ logged_in_home } /Downloads/NonSteamLaunchersInstallation "
2023-04-27 13:19:15 +02:00
2023-04-27 02:15:25 +02:00
# Set the path to the Proton directory
2023-09-01 07:04:17 +02:00
proton_dir = $( find " ${ logged_in_home } /.steam/root/compatibilitytools.d " -maxdepth 1 -type d -name "GE-Proton*" | sort -V | tail -n1)
2023-04-27 02:15:25 +02:00
# Check if GE-Proton is installed
if [ -z " $proton_dir " ] ; then
2023-11-20 08:41:43 +01:00
# 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 :)"
2023-04-27 02:15:25 +02:00
else
2023-09-01 07:04:17 +02:00
# Check if installed version is the latest version
installed_version = $( basename $proton_dir | sed 's/GE-Proton-//' )
2023-04-27 02:15:25 +02:00
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
2023-11-20 08:41:43 +01:00
# 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 :)"
2023-04-27 02:15:25 +02:00
fi
2023-11-20 08:41:43 +01:00
#Delete old GE-Proton Versions
for dir in " ${ logged_in_home } /.steam/root/compatibilitytools.d/GE-Proton " *; do
if [ " $dir " != " $proton_dir " ] ; then
rm -rf " $dir "
fi
done
2023-04-27 02:15:25 +02:00
fi
2023-11-20 08:41:43 +01:00
2023-04-27 22:51:00 +02:00
echo "10"
echo "# Setting files in their place"
2023-04-27 02:15:25 +02:00
# Set the appid for the non-Steam game
appid = NonSteamLaunchers
# Set the URL to download the MSI file from
msi_url = https://launcher-public-service-prod06.ol.epicgames.com/launcher/api/installer/download/EpicGamesLauncherInstaller.msi
# Set the path to save the MSI file to
2023-08-12 21:02:52 +02:00
msi_file = ${ logged_in_home } /Downloads/NonSteamLaunchersInstallation/EpicGamesLauncherInstaller.msi
2023-04-27 02:15:25 +02:00
# Set the URL to download the second file from
exe_url = https://webinstallers.gog-statics.com/download/GOG_Galaxy_2.0.exe
# Set the path to save the second file to
2023-08-12 21:02:52 +02:00
exe_file = ${ logged_in_home } /Downloads/NonSteamLaunchersInstallation/GOG_Galaxy_2.0.exe
2023-04-27 02:15:25 +02:00
# Set the URL to download the third file from
ubi_url = https://ubi.li/4vxt9
# Set the path to save the third file to
2023-11-05 02:44:02 +01:00
ubi_file = ${ logged_in_home } /Downloads/NonSteamLaunchersInstallation/UbisoftConnectInstaller.exe
2023-04-27 02:15:25 +02:00
# Set the URL to download the fourth file from
2023-10-31 10:44:05 +01:00
origin_url = https://origin-a.akamaihd.net/Origin-Client-Download/origin/live/OriginThinSetup.exe
2023-04-27 02:15:25 +02:00
# Set the path to save the fourth file to
2023-08-12 21:02:52 +02:00
origin_file = ${ logged_in_home } /Downloads/NonSteamLaunchersInstallation/OriginThinSetup.exe
2023-04-27 02:15:25 +02:00
# Set the URL to download the fifth file from
2023-06-11 07:27:59 +02:00
battle_url = "https://www.battle.net/download/getInstallerForGame?os=win&gameProgram=BATTLENET_APP&version=Live"
2023-04-27 02:15:25 +02:00
# Set the path to save the fifth file to
2023-08-12 21:02:52 +02:00
battle_file = ${ logged_in_home } /Downloads/NonSteamLaunchersInstallation/Battle.net-Setup.exe
2023-04-27 02:15:25 +02:00
2023-04-27 13:19:15 +02:00
# Set the URL to download the sixth file from
amazon_url = https://download.amazongames.com/AmazonGamesSetup.exe
2023-04-27 02:15:25 +02:00
2023-04-27 13:19:15 +02:00
# Set the path to save the sixth file to
2023-08-12 21:02:52 +02:00
amazon_file = ${ logged_in_home } /Downloads/NonSteamLaunchersInstallation/AmazonGamesSetup.exe
2023-04-27 02:15:25 +02:00
2023-04-27 13:19:15 +02:00
# Set the URL to download the seventh file from
eaapp_url = https://origin-a.akamaihd.net/EA-Desktop-Client-Download/installer-releases/EAappInstaller.exe
# Set the path to save the seventh file to
2023-08-12 21:02:52 +02:00
eaapp_file = ${ logged_in_home } /Downloads/NonSteamLaunchersInstallation/EAappInstaller.exe
2023-04-27 02:15:25 +02:00
2023-04-28 11:01:10 +02:00
# Set the URL to download the eighth file from
itchio_url = https://itch.io/app/download?platform= windows
# Set the path to save the eighth file to
2023-08-12 21:02:52 +02:00
itchio_file = ${ logged_in_home } /Downloads/NonSteamLaunchersInstallation/itch-setup.exe
2023-04-28 11:01:10 +02:00
2023-05-03 06:15:40 +02:00
# Set the URL to download the ninth file from
legacygames_url = https://cdn.legacygames.com/LegacyGamesLauncher/legacy-games-launcher-setup-1.10.0-x64-full.exe
2023-04-28 11:01:10 +02:00
2023-05-03 06:15:40 +02:00
# Set the path to save the ninth file to
2023-08-12 21:02:52 +02:00
legacygames_file = ${ logged_in_home } /Downloads/NonSteamLaunchersInstallation/legacy-games-launcher-setup-1.10.0-x64-full.exe
2023-04-28 11:01:10 +02:00
2023-05-06 00:24:07 +02:00
# Set the URL to download the tenth file from
humblegames_url = https://www.humblebundle.com/app/download
# Set the path to save the tenth file to
2023-08-12 21:02:52 +02:00
humblegames_file = ${ logged_in_home } /Downloads/NonSteamLaunchersInstallation/Humble-App-Setup-1.1.8+411.exe
2023-05-06 00:24:07 +02:00
2023-05-09 12:50:48 +02:00
# Set the URL to download the eleventh file from
indiegala_url = https://content.indiegalacdn.com/common/IGClientSetup.exe
2023-05-06 00:24:07 +02:00
2023-05-09 12:50:48 +02:00
# Set the path to save the eleventh file to
2023-08-12 21:02:52 +02:00
indiegala_file = ${ logged_in_home } /Downloads/NonSteamLaunchersInstallation/IGClientSetup.exe
2023-05-06 00:24:07 +02:00
2023-05-10 04:32:41 +02:00
# Set the URL to download the twelfth file from
rockstar_url = https://gamedownloads.rockstargames.com/public/installer/Rockstar-Games-Launcher.exe
# Set the path to save the twelfth file to
2023-08-12 21:02:52 +02:00
rockstar_file = ${ logged_in_home } /Downloads/NonSteamLaunchersInstallation/Rockstar-Games-Launcher.exe
2023-05-10 04:32:41 +02:00
2023-06-03 00:20:17 +02:00
# Set the URL to download the Glyph Launcher file from
glyph_url = https://glyph.dyn.triongames.com/glyph/live/GlyphInstall.exe
# Set the path to save the Glyph Launcher to
2023-08-12 21:02:52 +02:00
glyph_file = ${ logged_in_home } /Downloads/NonSteamLaunchersInstallation/GlyphInstall.exe
2023-06-03 00:20:17 +02:00
2023-06-04 08:17:16 +02:00
# Set the URL to download the Minecraft Launcher file from
minecraft_url = https://aka.ms/minecraftClientWindows
# Set the path to save the Minecraft Launcher to
2023-08-12 21:02:52 +02:00
minecraft_file = ${ logged_in_home } /Downloads/NonSteamLaunchersInstallation/MinecraftInstaller.msi
2023-06-04 08:17:16 +02:00
2023-07-12 10:21:19 +02:00
# Set the URL to download the Playstation Launcher file from
psplus_url = https://download-psplus.playstation.com/downloads/psplus/pc/latest
# Set the path to save the Playstation Launcher to
2023-08-12 21:02:52 +02:00
psplus_file = ${ logged_in_home } /Downloads/NonSteamLaunchersInstallation/PlayStationPlus-12.2.0.exe
2023-07-12 10:21:19 +02:00
# Set the URL to download the Playstation Launcher file from
dmm_url = https://apidgp-gameplayer.games.dmm.com/archive/latest?app= dgp5win
# Set the path to save the Playstation Launcher to
2023-08-12 21:02:52 +02:00
dmm_file = ${ logged_in_home } /Downloads/NonSteamLaunchersInstallation/DMMGamePlayer-Setup-5.2.16.exe
2023-05-06 00:24:07 +02:00
2023-11-24 15:52:03 +01:00
# Set the URL to download the VK Play Launcher file from
vkplay_url = https://static.gc.vkplay.ru/VKPlayLoader.exe
# Set the path to save the VK Play Launcher to
vkplay_file = ${ logged_in_home } /Downloads/NonSteamLaunchersInstallation/VKPlayLoader.exe
2023-04-27 22:51:00 +02:00
echo "20"
2023-05-09 12:50:48 +02:00
echo "# Creating files & folders"
2023-04-27 22:51:00 +02:00
2023-07-12 10:21:19 +02:00
# Check if the user selected any launchers
if [ -n " $options " ] ; then
# User selected at least one launcher
# Create app id folder in compatdata folder if it doesn't exist and if the user selected to use a single app ID folder
2023-08-12 19:11:01 +02:00
if [ " $use_separate_appids " = false ] && [ ! -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid " ] ; then
mkdir -p " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid "
2023-07-12 10:21:19 +02:00
fi
2023-04-27 02:15:25 +02:00
fi
# Change working directory to Proton's
cd $proton_dir
2023-05-02 14:52:53 +02:00
# Set the STEAM_RUNTIME environment variable
2023-08-12 19:11:01 +02:00
export STEAM_RUNTIME = " ${ logged_in_home } /.steam/root/ubuntu12_32/steam-runtime/run.sh "
2023-05-02 14:52:53 +02:00
2023-04-27 02:15:25 +02:00
# Set the STEAM_COMPAT_CLIENT_INSTALL_PATH environment variable
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_CLIENT_INSTALL_PATH = " ${ logged_in_home } /.local/share/Steam "
2023-04-27 02:15:25 +02:00
# Set the STEAM_COMPAT_DATA_PATH environment variable for the first file
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_DATA_PATH = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ ${ appid } "
2023-05-09 12:50:48 +02:00
2023-04-27 13:19:15 +02:00
wait
2023-04-27 22:51:00 +02:00
echo "30"
2023-05-12 10:56:42 +02:00
echo "# Downloading & Installing Epic Games...please wait..."
2023-04-27 13:19:15 +02:00
# Check if the user selected Epic Games Launcher
2023-05-02 14:52:53 +02:00
if [ [ $options = = *"Epic Games" * ] ] ; then
2023-04-27 13:19:15 +02:00
# User selected Epic Games Launcher
2023-05-02 14:52:53 +02:00
echo "User selected Epic Games"
2023-04-27 13:19:15 +02:00
2023-08-12 18:47:52 +02:00
# Set the appid for the Epic Games Launcher
if [ " $use_separate_appids " = true ] ; then
2023-08-12 19:11:01 +02:00
appid = EpicGamesLauncher
2023-08-12 18:47:52 +02:00
else
2023-08-12 19:11:01 +02:00
appid = NonSteamLaunchers
2023-08-12 18:47:52 +02:00
fi
2023-05-05 01:30:31 +02:00
2023-08-12 18:47:52 +02:00
# Create app id folder in compatdata folder if it doesn't exist
2023-08-12 19:11:01 +02:00
if [ ! -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid " ] ; then
mkdir -p " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid "
2023-08-12 18:47:52 +02:00
fi
2023-04-27 13:19:15 +02:00
2023-08-12 18:47:52 +02:00
# Change working directory to Proton's
cd $proton_dir
2023-05-05 01:30:31 +02:00
2023-08-12 18:47:52 +02:00
# Set the STEAM_COMPAT_CLIENT_INSTALL_PATH environment variable
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_CLIENT_INSTALL_PATH = " ${ logged_in_home } /.local/share/Steam "
2023-05-05 01:30:31 +02:00
2023-08-12 18:47:52 +02:00
# Set the STEAM_COMPAT_DATA_PATH environment variable for Epic Games Launcher
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_DATA_PATH = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ ${ appid } "
2023-05-05 01:30:31 +02:00
2023-08-12 18:47:52 +02:00
# Download MSI file
if [ ! -f " $msi_file " ] ; then
echo "Downloading MSI file"
wget $msi_url -O $msi_file
fi
2023-04-27 13:19:15 +02:00
2023-08-12 18:47:52 +02:00
# Run the MSI file using Proton with the /passive option
echo "Running MSI file using Proton with the /passive option"
" $STEAM_RUNTIME " " $proton_dir /proton " run MsiExec.exe /i " $msi_file " /qn
2023-04-27 13:19:15 +02:00
fi
2023-04-27 02:15:25 +02:00
2023-08-12 18:47:52 +02:00
# TODO: capture PID of each `wait` process to make sure it's not an infinite loop
2023-04-27 13:19:15 +02:00
# Wait for the MSI file to finish running
2023-04-27 02:15:25 +02:00
wait
2023-04-27 22:51:00 +02:00
echo "40"
2023-05-12 10:56:42 +02:00
echo "# Downloading & Installing Gog Galaxy...please wait..."
2023-04-27 22:51:00 +02:00
2023-04-27 13:19:15 +02:00
# Check if the user selected GOG Galaxy
if [ [ $options = = *"GOG Galaxy" * ] ] ; then
# User selected GOG Galaxy
echo "User selected GOG Galaxy"
2023-08-12 18:47:52 +02:00
# Set the appid for the Gog Galaxy 2.0
if [ " $use_separate_appids " = true ] ; then
appid = GogGalaxyLauncher
else
appid = NonSteamLaunchers
fi
2023-05-05 01:30:31 +02:00
2023-08-12 18:47:52 +02:00
# Create app id folder in compatdata folder if it doesn't exist
2023-08-12 19:11:01 +02:00
if [ ! -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid " ] ; then
mkdir -p " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid "
2023-08-12 18:47:52 +02:00
fi
2023-04-27 13:19:15 +02:00
2023-08-12 18:47:52 +02:00
# Change working directory to Proton's
cd " $proton_dir "
2023-04-27 13:19:15 +02:00
2023-08-12 18:47:52 +02:00
# Set the STEAM_COMPAT_CLIENT_INSTALL_PATH environment variable
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_CLIENT_INSTALL_PATH = " ${ logged_in_home } /.local/share/Steam "
2023-04-27 13:19:15 +02:00
2023-08-12 18:47:52 +02:00
# Set the STEAM_COMPAT_DATA_PATH environment variable for Epic Games Launcher
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_DATA_PATH = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ ${ appid } "
2023-04-28 05:34:49 +02:00
2023-08-12 18:47:52 +02:00
# Download EXE file
if [ ! -f " $exe_file " ] ; then
echo "Downloading EXE file"
wget $exe_url -O $exe_file
fi
2023-04-27 13:19:15 +02:00
2023-08-12 18:47:52 +02:00
# Run the EXE file using Proton without the /passive option
echo "Running EXE file using Proton without the /passive option"
" $STEAM_RUNTIME " " $proton_dir /proton " run " $exe_file " &
2023-04-28 05:34:49 +02:00
2023-08-12 18:47:52 +02:00
echo "45"
echo "# Downloading & Installing Gog Galaxy...Please wait..."
2023-04-27 13:19:15 +02:00
2023-08-12 18:47:52 +02:00
# Cancel & Exit the GOG Galaxy Setup Wizard
while true; do
if pgrep -f "GalaxySetup.tmp" > /dev/null; then
pkill -f "GalaxySetup.tmp"
break
fi
sleep 1
done
2023-04-27 13:19:15 +02:00
2023-08-12 18:47:52 +02:00
# Navigate to %LocalAppData%\Temp
2023-08-12 19:11:01 +02:00
cd " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid /pfx/drive_c/users/steamuser/Temp "
2023-05-02 14:52:53 +02:00
2023-08-12 18:47:52 +02:00
# Find the GalaxyInstaller_XXXXX folder and copy it to C:\Downloads
galaxy_installer_folder = $( find . -maxdepth 1 -type d -name "GalaxyInstaller_*" | head -n1)
2023-08-12 21:02:52 +02:00
cp -r " $galaxy_installer_folder " ${ logged_in_home } /Downloads/NonSteamLaunchersInstallation/
2023-05-02 14:52:53 +02:00
2023-08-12 18:47:52 +02:00
# Navigate to the C:\Downloads\GalaxyInstaller_XXXXX folder
2023-08-12 21:02:52 +02:00
cd ${ logged_in_home } /Downloads/NonSteamLaunchersInstallation/" $( basename $galaxy_installer_folder ) "
2023-04-27 13:19:15 +02:00
2023-08-12 18:47:52 +02:00
# Run GalaxySetup.exe with the /VERYSILENT and /NORESTART options
echo "Running GalaxySetup.exe with the /VERYSILENT and /NORESTART options"
" $STEAM_RUNTIME " " $proton_dir /proton " run GalaxySetup.exe /VERYSILENT /NORESTART
2023-04-27 13:19:15 +02:00
2023-08-12 18:47:52 +02:00
# Wait for the EXE file to finish running
wait
else
# Gog Galaxy Launcher is already installed
echo "Gog Galaxy Launcher is already installed"
2023-05-12 10:56:42 +02:00
fi
2023-04-28 05:34:49 +02:00
2023-04-27 13:19:15 +02:00
wait
2023-04-27 22:51:00 +02:00
echo "50"
2023-11-05 02:49:19 +01:00
echo "# Downloading & Installing Ubisoft Connect ...please wait..."
2023-04-27 22:51:00 +02:00
2023-04-27 13:19:15 +02:00
# Check if user selected Uplay
2023-11-05 02:44:02 +01:00
if [ [ $options = = *"Ubisoft Connect" * ] ] ; then
2023-04-27 13:19:15 +02:00
# User selected Uplay
echo "User selected Uplay"
2023-05-03 06:15:40 +02:00
# Set the appid for the Ubisoft Launcher
2023-04-27 13:19:15 +02:00
if [ " $use_separate_appids " = true ] ; then
appid = UplayLauncher
else
appid = NonSteamLaunchers
fi
# Create app id folder in compatdata folder if it doesn't exist
2023-08-12 19:11:01 +02:00
if [ ! -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid " ] ; then
mkdir -p " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid "
2023-04-27 13:19:15 +02:00
fi
# Change working directory to Proton's
cd $proton_dir
# Set the STEAM_COMPAT_CLIENT_INSTALL_PATH environment variable
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_CLIENT_INSTALL_PATH = " ${ logged_in_home } /.local/share/Steam "
2023-04-27 13:19:15 +02:00
# Set the STEAM_COMPAT_DATA_PATH environment variable for Epic Games Launcher
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_DATA_PATH = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ ${ appid } "
2023-04-27 13:19:15 +02:00
# Download UBI file
if [ ! -f " $ubi_file " ] ; then
echo "Downloading UBI file"
2023-11-05 02:44:02 +01:00
wget --no-check-certificate $ubi_url -O $ubi_file
2023-04-27 13:19:15 +02:00
fi
2023-06-12 13:05:58 +02:00
# Run the UBI file using Proton with the /passive option
echo "Running UBI file using Proton with the /passive option"
" $STEAM_RUNTIME " " $proton_dir /proton " run " $ubi_file " /S
2023-04-27 13:19:15 +02:00
fi
2023-04-27 02:15:25 +02:00
2023-04-27 13:19:15 +02:00
# Wait for the UBI file to finish running
2023-04-27 02:15:25 +02:00
wait
2023-04-27 22:51:00 +02:00
echo "60"
2023-05-12 10:56:42 +02:00
echo "# Downloading & Installing Origin...please wait..."
2023-04-27 22:51:00 +02:00
2023-04-27 13:19:15 +02:00
# Check if user selected Origin
if [ [ $options = = *"Origin" * ] ] ; then
# User selected Origin
echo "User selected Origin"
2023-05-02 14:52:53 +02:00
# Set the appid for the Origin Launcher
2023-04-27 13:19:15 +02:00
if [ " $use_separate_appids " = true ] ; then
appid = OriginLauncher
else
appid = NonSteamLaunchers
fi
# Create app id folder in compatdata folder if it doesn't exist
2023-08-12 19:11:01 +02:00
if [ ! -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid " ] ; then
mkdir -p " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid "
2023-04-27 13:19:15 +02:00
fi
# Change working directory to Proton's
cd $proton_dir
# Set the STEAM_COMPAT_CLIENT_INSTALL_PATH environment variable
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_CLIENT_INSTALL_PATH = " ${ logged_in_home } /.local/share/Steam "
2023-04-27 13:19:15 +02:00
# Set the STEAM_COMPAT_DATA_PATH environment variable for Epic Games Launcher
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_DATA_PATH = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ ${ appid } "
2023-04-27 13:19:15 +02:00
# Download ORIGIN file
if [ ! -f " $origin_file " ] ; then
echo "Downloading ORIGIN file"
wget $origin_url -O $origin_file
fi
# Run the ORIGIN file using Proton with the /passive option
echo "Running ORIGIN file using Proton with the /passive option"
2023-05-02 14:52:53 +02:00
" $STEAM_RUNTIME " " $proton_dir /proton " run " $origin_file " /SILENT
2023-04-27 13:19:15 +02:00
# Edit local.xml
2023-08-12 19:11:01 +02:00
sed -i 's|</Settings>| <Setting value="true" key="MigrationDisabled" type="1"/>\n <Setting key="UpdateURL" value="" type="10"/>\n <Setting key="AutoPatchGlobal" value="false" type="1"/>\n <Setting key="AutoUpdate" value="false" type="1"/>\n</Settings>|' " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid /pfx/drive_c/ProgramData/Origin/local.xml "
2023-04-27 13:19:15 +02:00
# Terminate any processes with the name Origin.exe
pkill Origin.exe
2023-07-24 09:10:27 +02:00
# Download version.dll file
2023-08-12 19:11:01 +02:00
if [ ! -f " ${ logged_in_home } /Downloads/NonSteamLaunchersInstallation/version.dll " ] ; then
2023-07-24 09:10:27 +02:00
echo "Downloading version.dll file"
2023-08-12 21:02:52 +02:00
wget https://github.com/p0358/Fuck_off_EA_App/releases/download/v2/version.dll -O ${ logged_in_home } /Downloads/NonSteamLaunchersInstallation/version.dll
2023-07-24 09:10:27 +02:00
fi
# Move version.dll file to desired location
echo "Moving version.dll file to desired location"
2023-08-12 21:02:52 +02:00
mv ${ logged_in_home } /Downloads/NonSteamLaunchersInstallation/version.dll " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid /pfx/drive_c/Program Files (x86)/Origin/ "
2023-07-24 09:10:27 +02:00
2023-04-27 13:19:15 +02:00
# Wait for the ORIGIN file to finish running
wait
fi
wait
2023-04-27 22:51:00 +02:00
echo "70"
2023-05-12 10:56:42 +02:00
echo "# Downloading & Installing Battle.net...please wait..."
2023-04-27 13:19:15 +02:00
# Check if user selected Battle.net
if [ [ $options = = *"Battle.net" * ] ] ; then
# User selected Battle.net
echo "User selected Battle.net"
2023-06-05 20:25:44 +02:00
# Set the appid for the Battlenet Launcher
if [ " $use_separate_appids " = true ] ; then
appid = Battle.netLauncher
else
appid = NonSteamLaunchers
fi
2023-04-27 13:19:15 +02:00
2023-06-05 20:25:44 +02:00
# Create app id folder in compatdata folder if it doesn't exist
2023-08-12 19:11:01 +02:00
if [ ! -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid " ] ; then
mkdir -p " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid "
2023-06-05 20:25:44 +02:00
fi
2023-04-27 13:19:15 +02:00
2023-06-05 20:25:44 +02:00
# Change working directory to Proton's
cd $proton_dir
2023-04-27 13:19:15 +02:00
2023-06-05 20:25:44 +02:00
# Set the STEAM_COMPAT_CLIENT_INSTALL_PATH environment variable
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_CLIENT_INSTALL_PATH = " ${ logged_in_home } /.local/share/Steam "
2023-04-27 02:15:25 +02:00
2023-06-05 20:25:44 +02:00
# Set the STEAM_COMPAT_DATA_PATH environment variable for Epic Games Launcher
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_DATA_PATH = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ ${ appid } "
2023-04-27 13:19:15 +02:00
2023-08-12 18:47:52 +02:00
# Download BATTLE file
2023-06-05 20:25:44 +02:00
if [ ! -f " $battle_file " ] ; then
echo "Downloading BATTLE file"
wget $battle_url -O $battle_file
fi
2023-04-30 14:53:54 +02:00
2023-06-05 20:25:44 +02:00
# Run the BATTLE file using Proton with the /passive option
2023-08-12 18:47:52 +02:00
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"
2023-11-05 03:48:38 +01:00
while true; do
if pgrep -f "Battle.net.exe" > /dev/null; then
pkill -f "Battle.net.exe"
break
fi
sleep 1
done
2023-04-27 13:19:15 +02:00
fi
2023-04-27 02:15:25 +02:00
2023-07-26 06:11:40 +02:00
wait
2023-04-27 02:15:25 +02:00
2023-04-27 22:51:00 +02:00
echo "80"
2023-05-12 10:56:42 +02:00
echo "# Downloading & Installing Amazon Games...please wait..."
2023-04-27 22:51:00 +02:00
2023-04-27 13:19:15 +02:00
# Check if user selected Amazon Games
if [ [ $options = = *"Amazon Games" * ] ] ; then
# User selected Amazon Games
echo "User selected Amazon Games"
2023-04-27 02:15:25 +02:00
2023-04-28 11:01:10 +02:00
# Set the appid for the Amazon Games Launcher
2023-04-27 13:19:15 +02:00
if [ " $use_separate_appids " = true ] ; then
appid = AmazonGamesLauncher
else
appid = NonSteamLaunchers
fi
2023-04-27 02:15:25 +02:00
2023-04-27 13:19:15 +02:00
# Create app id folder in compatdata folder if it doesn't exist
2023-08-12 19:11:01 +02:00
if [ ! -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid " ] ; then
mkdir -p " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid "
2023-04-27 13:19:15 +02:00
fi
# Change working directory to Proton's
cd $proton_dir
2023-04-27 02:15:25 +02:00
2023-04-27 13:19:15 +02:00
# Set the STEAM_COMPAT_CLIENT_INSTALL_PATH environment variable
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_CLIENT_INSTALL_PATH = " ${ logged_in_home } /.local/share/Steam "
2023-04-27 02:15:25 +02:00
2023-05-02 14:52:53 +02:00
# Set the STEAM_COMPAT_DATA_PATH environment variable for Amazon Games Launcher
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_DATA_PATH = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ ${ appid } "
2023-04-27 02:15:25 +02:00
2023-04-27 13:19:15 +02:00
# Download Amazon file
if [ ! -f " $amazon_file " ] ; then
echo "Downloading Amazon file"
wget $amazon_url -O $amazon_file
fi
# Run the Amazon file using Proton with the /passive option
echo "Running Amazon file using Proton with the /passive option"
2023-08-12 18:47:52 +02:00
" $STEAM_RUNTIME " " ${ proton_dir } /proton " run " $amazon_file " &
2023-05-02 14:52:53 +02:00
while true; do
2023-08-12 18:47:52 +02:00
if pgrep -f "Amazon Games.exe" > /dev/null; then
pkill -f "Amazon Games.exe"
break
fi
sleep 1
done
2023-06-12 13:05:58 +02:00
2023-04-27 13:19:15 +02:00
# Wait for the Amazon file to finish running
wait
fi
2023-04-27 02:15:25 +02:00
wait
2023-07-12 10:21:19 +02:00
echo "88"
2023-05-12 10:56:42 +02:00
echo "# Downloading & Installing EA App...please wait..."
2023-04-27 22:51:00 +02:00
2023-04-27 13:19:15 +02:00
# Check if user selected EA App
if [ [ $options = = *"EA App" * ] ] ; then
# User selected EA App
echo "User selected EA App"
2023-04-27 02:15:25 +02:00
2023-04-28 02:14:36 +02:00
# Set the appid for the EA App Launcher
2023-04-27 13:19:15 +02:00
if [ " $use_separate_appids " = true ] ; then
2023-04-28 11:01:10 +02:00
appid = TheEAappLauncher
2023-04-27 13:19:15 +02:00
else
appid = NonSteamLaunchers
fi
# Create app id folder in compatdata folder if it doesn't exist
2023-08-12 19:11:01 +02:00
if [ ! -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid " ] ; then
mkdir -p " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid "
2023-04-27 13:19:15 +02:00
fi
# Change working directory to Proton's
cd $proton_dir
# Set the STEAM_COMPAT_CLIENT_INSTALL_PATH environment variable
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_CLIENT_INSTALL_PATH = " ${ logged_in_home } /.local/share/Steam "
2023-04-27 13:19:15 +02:00
# Set the STEAM_COMPAT_DATA_PATH environment variable for Epic Games Launcher
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_DATA_PATH = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ ${ appid } "
2023-04-27 13:19:15 +02:00
# Download EA App file
if [ ! -f " $eaapp_file " ] ; then
echo "Downloading EA App file"
wget $eaapp_url -O $eaapp_file
fi
# Run the EA App file using Proton with the /passive option
echo "Running EA App file using Proton with the /passive option"
2023-05-02 14:52:53 +02:00
" $STEAM_RUNTIME " " $proton_dir /proton " run " $eaapp_file " /quiet
counter = 0
2023-08-12 18:47:52 +02:00
while true; do
if pgrep -f "EABackgroundService.exe" > /dev/null; then
pkill -f "EABackgroundService.exe"
break
fi
sleep 1
counter = $(( counter + 1 ))
if [ $counter -ge 10 ] ; then
break
fi
done
2023-04-27 13:19:15 +02:00
# Wait for the EA App file to finish running
wait
fi
wait
2023-07-12 10:21:19 +02:00
echo "89"
2023-05-12 10:56:42 +02:00
echo "# Downloading & Installing itch.io...please wait..."
2023-04-28 11:01:10 +02:00
# Check if the user selected itchio Launcher
if [ [ $options = = *"itch.io" * ] ] ; then
# User selected itchio Launcher
echo "User selected itch.io"
# Set the appid for the itchio Launcher
if [ " $use_separate_appids " = true ] ; then
appid = itchioLauncher
else
appid = NonSteamLaunchers
fi
# Create app id folder in compatdata folder if it doesn't exist
2023-08-12 19:11:01 +02:00
if [ ! -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid " ] ; then
mkdir -p " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid "
2023-04-28 11:01:10 +02:00
fi
# Change working directory to Proton's
cd $proton_dir
# Set the STEAM_COMPAT_CLIENT_INSTALL_PATH environment variable
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_CLIENT_INSTALL_PATH = " ${ logged_in_home } /.local/share/Steam "
2023-04-28 11:01:10 +02:00
# Set the STEAM_COMPAT_DATA_PATH environment variable for Epic Games Launcher
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_DATA_PATH = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ ${ appid } "
2023-05-05 01:30:31 +02:00
2023-04-28 11:01:10 +02:00
# Download itchio file
if [ ! -f " $itchio_file " ] ; then
echo "Downloading itchio file"
wget $itchio_url -O $itchio_file
fi
2023-05-05 13:42:34 +02:00
# Run the itchio file using Proton with the /passive option
echo "Running itchio file using Proton with the /passive option"
" $STEAM_RUNTIME " " $proton_dir /proton " run " $itchio_file "
2023-04-28 11:01:10 +02:00
fi
wait
2023-07-12 10:21:19 +02:00
echo "90"
2023-05-12 10:56:42 +02:00
echo "# Downloading & Installing Legacy Games...please wait..."
2023-05-03 06:15:40 +02:00
# Check if user selected Legacy Games
if [ [ $options = = *"Legacy Games" * ] ] ; then
# User selected Legacy Games
echo "User selected Legacy Games"
# Set the appid for the Legacy Games Launcher
if [ " $use_separate_appids " = true ] ; then
appid = LegacyGamesLauncher
else
appid = NonSteamLaunchers
fi
# Create app id folder in compatdata folder if it doesn't exist
2023-08-12 19:11:01 +02:00
if [ ! -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid " ] ; then
mkdir -p " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid "
2023-05-03 06:15:40 +02:00
fi
# Change working directory to Proton's
cd $proton_dir
# Set the STEAM_COMPAT_CLIENT_INSTALL_PATH environment variable
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_CLIENT_INSTALL_PATH = " ${ logged_in_home } /.local/share/Steam "
2023-05-03 06:15:40 +02:00
# Set the STEAM_COMPAT_DATA_PATH environment variable for Legacy Games Launcher
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_DATA_PATH = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ ${ appid } "
2023-05-03 06:15:40 +02:00
# Download Legacy file
if [ ! -f " $legacygames_file " ] ; then
echo "Downloading Legacy file"
wget $legacygames_url -O $legacygames_file
fi
2023-08-12 18:47:52 +02:00
# Run the Legacy file using Proton with the /passive option
echo "Running Legacy file using Proton with the /passive option"
" $STEAM_RUNTIME " " $proton_dir /proton " run " $legacygames_file " /S
2023-05-03 06:15:40 +02:00
fi
2023-08-12 18:47:52 +02:00
2023-05-03 06:15:40 +02:00
# Wait for the Legacy file to finish running
wait
2023-05-06 00:24:07 +02:00
2023-07-12 10:21:19 +02:00
echo "91"
2023-05-12 10:56:42 +02:00
echo "# Downloading & Installing Humble Games Collection...please wait..."
2023-05-06 00:24:07 +02:00
# Check if the user selected Humble Games Launcher
if [ [ $options = = *"Humble Games Collection" * ] ] ; then
# User selected Humble Games Launcher
echo "User selected Humble Games Collection"
2023-08-12 19:11:01 +02:00
if [ [ ! -f " ${ logged_in_home } /.local/share/applications/Humble-scheme-handler.desktop " ] ] ; then
2023-06-04 00:10:04 +02:00
wget https://raw.githubusercontent.com/moraroy/NonSteamLaunchers-On-Steam-Deck/main/humble-app/Humble-scheme-handler.desktop -O /tmp/Humble-scheme-handler.desktop
2023-06-04 00:03:33 +02:00
sed -i " s/APPID/ $appid / " /tmp/Humble-scheme-handler.desktop
2023-08-12 19:11:01 +02:00
desktop-file-install --rebuild-mime-info-cache --dir= ${ logged_in_home } /.local/share/applications /tmp/Humble-scheme-handler.desktop
2023-06-03 23:31:15 +02:00
rm -rf /tmp/Humble-scheme-handler.desktop
fi
2023-08-12 19:11:01 +02:00
if [ [ ! -f " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid /pfx/handle-humble-scheme " ] ] ; then
wget https://raw.githubusercontent.com/moraroy/NonSteamLaunchers-On-Steam-Deck/main/humble-app/handle-humble-scheme -O " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid /pfx/handle-humble-scheme "
sed -i " s/APPID/ $appid / " " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid /pfx/handle-humble-scheme "
chmod +x " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid /pfx/handle-humble-scheme "
2023-06-03 23:31:15 +02:00
fi
2023-05-06 00:24:07 +02:00
2023-08-12 19:11:01 +02:00
if [ [ ! -f " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid /pfx/start-humble.cmd " ] ] ; then
wget https://raw.githubusercontent.com/moraroy/NonSteamLaunchers-On-Steam-Deck/main/humble-app/start-humble.cmd -O " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid /pfx/start-humble.cmd "
2023-06-03 23:31:15 +02:00
fi
2023-05-06 00:24:07 +02:00
2023-08-12 18:47:52 +02:00
# Set the appid for the Humble Games Launcher
if [ " $use_separate_appids " = true ] ; then
appid = HumbleGamesLauncher
else
appid = NonSteamLaunchers
fi
2023-05-06 00:24:07 +02:00
2023-08-12 18:47:52 +02:00
# Create app id folder in compatdata folder if it doesn't exist
2023-08-12 19:11:01 +02:00
if [ ! -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid " ] ; then
mkdir -p " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid "
2023-08-12 18:47:52 +02:00
fi
2023-05-06 00:24:07 +02:00
2023-08-12 18:47:52 +02:00
# Change working directory to Proton's
cd $proton_dir
2023-05-06 00:24:07 +02:00
2023-08-12 18:47:52 +02:00
# Set the STEAM_COMPAT_CLIENT_INSTALL_PATH environment variable
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_CLIENT_INSTALL_PATH = " ${ logged_in_home } /.local/share/Steam "
2023-05-06 00:24:07 +02:00
2023-08-12 18:47:52 +02:00
# Set the STEAM_COMPAT_DATA_PATH environment variable for Humble Games Launcher
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_DATA_PATH = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ ${ appid } "
2023-05-06 00:24:07 +02:00
2023-08-12 18:47:52 +02:00
# Download exe file
if [ ! -f " $humblegames_file " ] ; then
echo "Downloading MSI file"
wget $humblegames_url -O $humblegames_file
fi
2023-05-06 00:24:07 +02:00
2023-08-12 18:47:52 +02:00
# Run the exe file using Proton with the /passive option
echo "Running Exe file using Proton with the /passive option"
" $STEAM_RUNTIME " " $proton_dir /proton " run " $humblegames_file " /S /D= "C:\Program Files\Humble App"
2023-05-06 00:24:07 +02:00
fi
2023-05-09 12:50:48 +02:00
wait
2023-07-12 10:21:19 +02:00
echo "92"
2023-05-12 10:56:42 +02:00
echo "# Downloading & Installing Indie Gala...please wait..."
2023-05-06 00:24:07 +02:00
2023-05-09 12:50:48 +02:00
# Check if user selected indiegala
if [ [ $options = = *"IndieGala" * ] ] ; then
# User selected indiegala
echo "User selected IndieGala"
2023-05-06 00:24:07 +02:00
2023-05-09 12:50:48 +02:00
# Set the appid for the indiegala Launcher
if [ " $use_separate_appids " = true ] ; then
appid = IndieGalaLauncher
else
appid = NonSteamLaunchers
fi
2023-05-06 00:24:07 +02:00
2023-05-09 12:50:48 +02:00
# Create app id folder in compatdata folder if it doesn't exist
2023-08-12 19:11:01 +02:00
if [ ! -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid " ] ; then
mkdir -p " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid "
2023-05-09 12:50:48 +02:00
fi
2023-05-06 00:24:07 +02:00
2023-05-09 12:50:48 +02:00
# Change working directory to Proton's
cd $proton_dir
2023-05-06 00:24:07 +02:00
2023-05-09 12:50:48 +02:00
# Set the STEAM_COMPAT_CLIENT_INSTALL_PATH environment variable
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_CLIENT_INSTALL_PATH = " ${ logged_in_home } /.local/share/Steam "
2023-05-06 00:24:07 +02:00
2023-05-09 12:50:48 +02:00
# Set the STEAM_COMPAT_DATA_PATH environment variable for Legacy Games Launcher
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_DATA_PATH = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ ${ appid } "
2023-05-06 00:24:07 +02:00
2023-05-09 12:50:48 +02:00
# Download indiegala file
if [ ! -f " $indiegala_file " ] ; then
echo "Downloading indiegala file"
wget $indiegala_url -O $indiegala_file
fi
2023-05-06 00:24:07 +02:00
2023-05-09 12:50:48 +02:00
# Run the indiegala file using Proton with the /passive option
echo "Running IndieGala file using Proton with the /passive option"
" $STEAM_RUNTIME " " $proton_dir /proton " run " $indiegala_file " /S
fi
2023-08-12 18:47:52 +02:00
2023-05-09 12:50:48 +02:00
# Wait for the Indie file to finish running
wait
2023-05-06 00:24:07 +02:00
2023-07-12 10:21:19 +02:00
echo "93"
2023-05-10 04:32:41 +02:00
echo "# Downloading & Installing Rockstar Games Launcher...please wait..."
# Check if user selected rockstar games launcher
if [ [ $options = = *"Rockstar Games Launcher" * ] ] ; then
# User selected rockstar games
echo "User selected Rockstar Games Launcher"
2023-05-11 20:30:32 +02:00
2023-08-12 18:47:52 +02:00
# Set the appid for the indiegala Launcher
if [ " $use_separate_appids " = true ] ; then
appid = RockstarGamesLauncher
else
appid = NonSteamLaunchers
fi
2023-05-10 04:32:41 +02:00
2023-08-12 18:47:52 +02:00
# Create app id folder in compatdata folder if it doesn't exist
2023-08-12 19:11:01 +02:00
if [ ! -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid " ] ; then
mkdir -p " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid "
2023-08-12 18:47:52 +02:00
fi
2023-05-10 04:32:41 +02:00
2023-08-12 18:47:52 +02:00
# Change working directory to Proton's
cd $proton_dir
2023-05-06 00:24:07 +02:00
2023-08-12 18:47:52 +02:00
# Set the STEAM_COMPAT_CLIENT_INSTALL_PATH environment variable
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_CLIENT_INSTALL_PATH = " ${ logged_in_home } /.local/share/Steam "
2023-05-10 04:32:41 +02:00
2023-08-12 18:47:52 +02:00
# Set the STEAM_COMPAT_DATA_PATH environment variable for Legacy Games Launcher
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_DATA_PATH = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ ${ appid } "
2023-05-10 04:32:41 +02:00
2023-08-12 18:47:52 +02:00
# Download rockstar games file
if [ ! -f " $rockstar_file " ] ; then
echo "Downloading rockstar file"
wget $rockstar_url -O $rockstar_file
fi
2023-05-10 04:32:41 +02:00
2023-08-12 18:47:52 +02:00
# Run the rockstar file using Proton with the /passive option
echo "Running Rockstar Games Launcher file using Proton with the /passive option"
" $STEAM_RUNTIME " " $proton_dir /proton " run " $rockstar_file "
2023-05-10 04:32:41 +02:00
fi
2023-08-12 18:47:52 +02:00
2023-05-10 04:32:41 +02:00
# Wait for the rockstar file to finish running
wait
2023-05-06 00:24:07 +02:00
2023-07-12 10:21:19 +02:00
echo "94"
2023-06-03 00:20:17 +02:00
echo "# Downloading & Installing Glyph Launcher...please wait..."
# Check if user selected Glyph
if [ [ $options = = *"Glyph Launcher" * ] ] ; then
# User selected Glyph
echo "User selected Glyph Launcher"
2023-08-12 18:47:52 +02:00
# Set the appid for Glyph
if [ " $use_separate_appids " = true ] ; then
appid = GlyphLauncher
else
appid = NonSteamLaunchers
fi
2023-06-03 00:20:17 +02:00
2023-08-12 18:47:52 +02:00
# Create app id folder in compatdata folder if it doesn't exist
2023-08-12 19:11:01 +02:00
if [ ! -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid " ] ; then
mkdir -p " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid "
2023-08-12 18:47:52 +02:00
fi
2023-06-03 00:20:17 +02:00
2023-08-12 18:47:52 +02:00
# Change working directory to Proton's
cd $proton_dir
2023-06-03 00:20:17 +02:00
2023-08-12 18:47:52 +02:00
# Set the STEAM_COMPAT_CLIENT_INSTALL_PATH environment variable
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_CLIENT_INSTALL_PATH = " ${ logged_in_home } /.local/share/Steam "
2023-06-03 00:20:17 +02:00
2023-08-12 18:47:52 +02:00
# Set the STEAM_COMPAT_DATA_PATH environment variable for Legacy Games Launcher
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_DATA_PATH = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ ${ appid } "
2023-06-03 00:20:17 +02:00
2023-08-12 18:47:52 +02:00
# Download Glyph file
if [ ! -f " $glyph_file " ] ; then
echo "Downloading Glyph file"
wget $glyph_url -O $glyph_file
fi
2023-06-03 00:20:17 +02:00
2023-08-12 18:47:52 +02:00
# Run the Glyph file using Proton with the /passive option
echo "Running Glyph Launcher file using Proton with the /passive option"
" $STEAM_RUNTIME " " $proton_dir /proton " run " $glyph_file "
2023-06-03 00:20:17 +02:00
fi
2023-08-12 18:47:52 +02:00
2023-06-03 00:20:17 +02:00
# Wait for the Glyph file to finish running
wait
2023-07-12 10:21:19 +02:00
echo "95"
2023-06-04 08:17:16 +02:00
echo "# Downloading & Installing Minecraft Launcher...please wait..."
# Check if user selected Minecraft
if [ [ $options = = *"Minecraft" * ] ] ; then
# User selected Minecraft
echo "User selected Minecraft"
# Set the appid for Miencraft
if [ " $use_separate_appids " = true ] ; then
appid = MinecraftLauncher
else
appid = NonSteamLaunchers
fi
# Set MinecraftLauncher.exe Variable
2023-08-12 19:11:01 +02:00
minecraftinstall_path = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid /pfx/drive_c/Program Files (x86)/Minecraft Launcher/MinecraftLauncher.exe "
2023-06-04 08:17:16 +02:00
2023-08-12 18:47:52 +02:00
# Create app id folder in compatdata folder if it doesn't exist
2023-08-12 19:11:01 +02:00
if [ ! -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid " ] ; then
mkdir -p " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid "
2023-08-12 18:47:52 +02:00
fi
2023-06-04 08:17:16 +02:00
2023-08-12 18:47:52 +02:00
# Change working directory to Proton's
cd $proton_dir
2023-06-04 08:17:16 +02:00
2023-08-12 18:47:52 +02:00
# Set the STEAM_COMPAT_CLIENT_INSTALL_PATH environment variable
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_CLIENT_INSTALL_PATH = " ${ logged_in_home } /.local/share/Steam "
2023-06-04 08:17:16 +02:00
2023-08-12 18:47:52 +02:00
# Set the STEAM_COMPAT_DATA_PATH environment variable for Legacy Games Launcher
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_DATA_PATH = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ ${ appid } "
2023-06-04 08:17:16 +02:00
2023-08-12 18:47:52 +02:00
# Download Minecraft file
if [ ! -f " $minecraft_file " ] ; then
echo "Downloading Minecraft file"
wget $minecraft_url -O $minecraft_file
fi
2023-06-04 08:17:16 +02:00
2023-08-12 18:47:52 +02:00
# Run the Minecraft file using Proton with the /passive option
echo "Running Minecraft Launcher file using Proton with the /passive option"
" $STEAM_RUNTIME " " $proton_dir /proton " run MsiExec.exe /i " $minecraft_file " /q
2023-06-04 08:17:16 +02:00
2023-08-12 18:47:52 +02:00
if [ -f " $minecraftinstall_path " ] ; then
# Run MinecraftLauncher.exe for the first time
" $STEAM_RUNTIME " " $proton_dir /proton " run " $minecraftinstall_path "
else
echo " Could not find MinecraftLauncher.exe at $minecraftinstall_path "
fi
2023-06-04 08:17:16 +02:00
2023-08-12 18:47:52 +02:00
echo " Minecraft is already installed at $minecraftinstall_path "
2023-06-04 08:17:16 +02:00
fi
# Wait for the Minecraft file to finish running
wait
2023-07-12 10:21:19 +02:00
echo "96"
echo "# Downloading & Installing Playstation Plus...please wait..."
2023-06-12 13:05:58 +02:00
2023-07-12 10:21:19 +02:00
# Check if the user selected Playstation Launcher
if [ [ $options = = *"Playstation Plus" * ] ] ; then
# User selected PlayStation Plus Launcher
echo "User selected PlayStation Plus"
2023-06-12 13:05:58 +02:00
2023-08-12 18:47:52 +02:00
# Set the appid for the PlayStation Plus Launcher
if [ " $use_separate_appids " = true ] ; then
appid = PlaystationPlusLauncher
else
appid = NonSteamLaunchers
fi
2023-06-12 13:05:58 +02:00
2023-08-12 18:47:52 +02:00
# Create app id folder in compatdata folder if it doesn't exist
2023-08-12 19:11:01 +02:00
if [ ! -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid " ] ; then
mkdir -p " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid "
2023-08-12 18:47:52 +02:00
fi
2023-06-12 13:05:58 +02:00
2023-08-12 18:47:52 +02:00
# Change working directory to Proton's
cd $proton_dir
2023-06-19 20:07:49 +02:00
2023-08-12 18:47:52 +02:00
# Set the STEAM_COMPAT_CLIENT_INSTALL_PATH environment variable
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_CLIENT_INSTALL_PATH = " ${ logged_in_home } /.local/share/Steam "
2023-06-19 20:07:49 +02:00
2023-08-12 18:47:52 +02:00
# Set the STEAM_COMPAT_DATA_PATH environment variable for Epic Games Launcher
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_DATA_PATH = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ ${ appid } "
2023-06-12 13:05:58 +02:00
2023-08-12 18:47:52 +02:00
# Download MSI file
if [ ! -f " $psplus_file " ] ; then
echo "Downloading MSI file"
wget $psplus_url -O $psplus_file
fi
2023-06-12 13:05:58 +02:00
2023-08-12 18:47:52 +02:00
# Run the Playstation file using Proton with the /passive option
echo "Running Playstation file using Proton with the /passive option"
" $STEAM_RUNTIME " " $proton_dir /proton " run " $psplus_file " /q
2023-06-12 13:05:58 +02:00
fi
wait
2023-07-12 10:21:19 +02:00
echo "97"
echo "# Downloading & Installing DMM Games...please wait..."
2023-06-10 23:05:24 +02:00
2023-07-12 10:21:19 +02:00
# Check if the user selected DMM Games Launcher
if [ [ $options = = *"DMM Games" * ] ] ; then
# User selected DMM Games Launcher
echo "User selected DMM Games"
2023-06-04 08:17:16 +02:00
2023-08-12 18:47:52 +02:00
# Set the appid for the DMM Games Launcher
if [ " $use_separate_appids " = true ] ; then
appid = DMMGameLauncher
else
appid = NonSteamLaunchers
fi
2023-06-04 08:17:16 +02:00
2023-08-12 18:47:52 +02:00
# Create app id folder in compatdata folder if it doesn't exist
2023-08-12 19:11:01 +02:00
if [ ! -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid " ] ; then
mkdir -p " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid "
2023-08-12 18:47:52 +02:00
fi
2023-06-10 23:05:24 +02:00
2023-08-12 18:47:52 +02:00
# Change working directory to Proton's
cd $proton_dir
2023-06-10 23:05:24 +02:00
2023-08-12 18:47:52 +02:00
# Set the STEAM_COMPAT_CLIENT_INSTALL_PATH environment variable
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_CLIENT_INSTALL_PATH = " ${ logged_in_home } /.local/share/Steam "
2023-06-10 23:05:24 +02:00
2023-08-12 18:47:52 +02:00
# Set the STEAM_COMPAT_DATA_PATH environment variable for Epic Games Launcher
2023-08-12 19:11:01 +02:00
export STEAM_COMPAT_DATA_PATH = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ ${ appid } "
2023-07-12 10:21:19 +02:00
2023-08-12 18:47:52 +02:00
# Download DMM file
if [ ! -f " $dmm_file " ] ; then
echo "Downloading DMM file"
wget $dmm_url -O $dmm_file
fi
2023-07-12 10:21:19 +02:00
2023-08-12 18:47:52 +02:00
# Run the DMM file using Proton with the /passive option
echo "Running DMM file using Proton with the /passive option"
" $STEAM_RUNTIME " " $proton_dir /proton " run " $dmm_file " /q
2023-07-12 10:21:19 +02:00
fi
2023-06-10 23:05:24 +02:00
2023-11-24 15:52:03 +01:00
wait
echo "98"
echo "# Downloading & Installing VK Play...please wait..."
# Check if the user selected VK Play Launcher
if [ [ " $options " = = *"VK Play" * ] ] ; then
# User selected VK Play Launcher
echo "User selected VK Play"
# Set the appid for the VK Play Launcher
if [ " $use_separate_appids " = true ] ; then
2023-11-27 07:44:36 +01:00
appid = VKPlayLauncher
2023-11-24 15:52:03 +01:00
else
2023-11-27 07:44:36 +01:00
appid = NonSteamLaunchers
2023-11-24 15:52:03 +01:00
fi
# Create app id folder in compatdata folder if it doesn't exist
if [ ! -d " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid " ] ; then
mkdir -p " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ $appid "
fi
# Change working directory to Proton's
cd " $proton_dir "
# Set the STEAM_COMPAT_CLIENT_INSTALL_PATH environment variable
export STEAM_COMPAT_CLIENT_INSTALL_PATH = " ${ logged_in_home } /.local/share/Steam "
# Set the STEAM_COMPAT_DATA_PATH environment variable for VK Play Launcher
export STEAM_COMPAT_DATA_PATH = " ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/ ${ appid } "
# Download VK Play file
if [ ! -f " $vkplay_file " ] ; then
echo "Downloading VK Play file"
wget " $vkplay_url " -O " $vkplay_file "
fi
# Run the VK Play file using Proton with the /passive option
echo "Running VK Play file using Proton with the /passive option"
" $STEAM_RUNTIME " " $proton_dir /proton " run " $vkplay_file "
counter = 0
while true; do
if pgrep -f "*GameCenter.exe*" > /dev/null; then
pkill -f "*GameCenter.exe*"
break
fi
sleep 1
counter = $(( counter + 1 ))
if [ $counter -ge 30 ] ; then
break
fi
done
# Wait for the VK Play file to finish running
wait
echo "VK Play Installation is complete."
fi
wait
2023-07-12 10:21:19 +02:00
echo "99"
echo "# Checking if Chrome is installed...please wait..."
# Check if user selected any of the options
if [ [ $options = = *"Netflix" * ] ] || [ [ $options = = *"Xbox Game Pass" * ] ] || [ [ $options = = *"Geforce Now" * ] ] || [ [ $options = = *"Amazon Luna" * ] ] || [ [ $options = = *"Hulu" * ] ] || [ [ $options = = *"Disney+" * ] ] || [ [ $options = = *"Amazon Prime Video" * ] ] || [ [ $options = = *"Youtube" * ] ] ; then
# User selected one of the options
echo "User selected one of the options"
# Check if Google Chrome is already installed
if command -v google-chrome & > /dev/null; then
echo "Google Chrome is already installed"
flatpak --user override --filesystem= /run/udev:ro com.google.Chrome
else
# Install the Flatpak runtime
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
# Install Google Chrome
flatpak install flathub com.google.Chrome
# Run the flatpak --user override command
flatpak --user override --filesystem= /run/udev:ro com.google.Chrome
2023-06-12 13:05:58 +02:00
fi
2023-07-12 10:21:19 +02:00
fi
2023-08-12 18:47:52 +02:00
# wait for Google Chrome to finish
2023-07-12 10:21:19 +02:00
wait
2023-04-27 13:19:15 +02:00
# Delete NonSteamLaunchersInstallation subfolder in Downloads folder
2023-08-12 21:02:52 +02:00
rm -rf " $download_dir "
2023-06-28 08:03:55 +02:00
2023-07-24 09:10:27 +02:00
echo "100"
echo "# Installation Complete - Steam will now restart. Your launchers will be in your library!...Food for thought...do Jedis use Force Compatability?"
2023-04-27 22:51:00 +02:00
) |
zenity --progress \
--title= "Update Status" \
2023-05-17 01:27:45 +02:00
--text= "Starting update...please wait..." --width= 450 --height= 350\
2023-07-24 09:10:27 +02:00
--percentage= 0 --auto-close
2023-04-27 02:15:25 +02:00
2023-05-05 01:30:31 +02:00
wait
2023-08-12 18:47:52 +02:00
# Checking Files For Shortcuts and Setting Directories For Shortcuts
2023-05-05 01:30:31 +02:00
if [ [ -f " $epic_games_launcher_path1 " ] ] ; then
# Epic Games Launcher is installed at path 1
2023-11-26 05:29:30 +01:00
epicshortcutdirectory = " \" $epic_games_launcher_path1 \" -opengl "
2023-08-12 19:11:01 +02:00
epiclaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command% "
2023-07-12 10:21:19 +02:00
epicstartingdir = " \" $( dirname " $epic_games_launcher_path1 " ) \" "
2023-05-05 01:30:31 +02:00
elif [ [ -f " $epic_games_launcher_path2 " ] ] ; then
# Epic Games Launcher is installed at path 2
epicshortcutdirectory = " \" $epic_games_launcher_path2 \" "
2023-08-12 19:11:01 +02:00
epiclaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/EpicGamesLauncher/\" %command% "
2023-07-12 10:21:19 +02:00
epicstartingdir = " \" $( dirname " $epic_games_launcher_path2 " ) \" "
2023-05-05 01:30:31 +02:00
fi
2023-08-12 18:47:52 +02:00
2023-05-05 01:30:31 +02:00
if [ [ -f " $gog_galaxy_path1 " ] ] ; then
# Gog Galaxy Launcher is installed at path 1
gogshortcutdirectory = " \" $gog_galaxy_path1 \" "
2023-08-12 19:11:01 +02:00
goglaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command% "
2023-07-12 10:21:19 +02:00
gogstartingdir = " \" $( dirname " $gog_galaxy_path1 " ) \" "
2023-05-09 12:50:48 +02:00
elif [ [ -f " $gog_galaxy_path2 " ] ] ; then
2023-05-05 01:30:31 +02:00
# Gog Galaxy Launcher is installed at path 2
gogshortcutdirectory = " \" $gog_galaxy_path2 \" "
2023-08-12 19:11:01 +02:00
goglaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/GogGalaxyLauncher/\" %command% "
2023-07-12 10:21:19 +02:00
gogstartingdir = " \" $( dirname " $gog_galaxy_path2 " ) \" "
2023-05-05 01:30:31 +02:00
fi
2023-08-12 18:47:52 +02:00
2023-05-05 01:30:31 +02:00
if [ [ -f " $origin_path1 " ] ] ; then
# Origin Launcher is installed at path 1
originshortcutdirectory = " \" $origin_path1 \" "
2023-08-12 19:11:01 +02:00
originlaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command% "
2023-07-12 10:21:19 +02:00
originstartingdir = " \" $( dirname " $origin_path1 " ) \" "
2023-05-05 01:30:31 +02:00
elif [ [ -f " $origin_path2 " ] ] ; then
# Origin Launcher is installed at path 2
originshortcutdirectory = " \" $origin_path2 \" "
2023-08-12 19:11:01 +02:00
originlaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/OriginLauncher/\" %command% "
2023-07-12 10:21:19 +02:00
originstartingdir = " \" $( dirname " $origin_path2 " ) \" "
2023-05-05 01:30:31 +02:00
fi
2023-08-12 18:47:52 +02:00
2023-05-05 01:30:31 +02:00
if [ [ -f " $uplay_path1 " ] ] ; then
# Uplay Launcher is installed at path 1
uplayshortcutdirectory = " \" $uplay_path1 \" "
2023-08-12 19:11:01 +02:00
uplaylaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command% "
2023-07-12 10:21:19 +02:00
uplaystartingdir = " \" $( dirname " $uplay_path1 " ) \" "
2023-06-10 23:05:24 +02:00
elif [ [ -f " $uplay_path2 " ] ] ; then
2023-05-05 01:30:31 +02:00
# Uplay Launcher is installed at path 2
uplayshortcutdirectory = " \" $uplay_path2 \" "
2023-08-12 19:11:01 +02:00
uplaylaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/UplayLauncher/\" %command% "
2023-07-12 10:21:19 +02:00
uplaystartingdir = " \" $( dirname " $uplay_path2 " ) \" "
2023-05-05 01:30:31 +02:00
fi
2023-08-12 18:47:52 +02:00
2023-05-05 01:30:31 +02:00
if [ [ -f " $battlenet_path1 " ] ] ; then
# Battlenet Launcher is installed at path 1
battlenetshortcutdirectory = " \" $battlenet_path1 \" "
2023-12-27 07:20:01 +01:00
battlenetlaunchoptions = " WINE_SIMULATE_WRITECOPY=1 %command% STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command% "
2023-07-12 10:21:19 +02:00
battlenetstartingdir = " \" $( dirname " $battlenet_path1 " ) \" "
2023-05-05 01:30:31 +02:00
elif [ [ -f " $battlenet_path2 " ] ] ; then
# Battlenet Launcher is installed at path 2
battlenetshortcutdirectory = " \" $battlenet_path2 \" "
2023-12-27 07:20:01 +01:00
battlenetlaunchoptions = " WINE_SIMULATE_WRITECOPY=1 %command% STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/Battle.netLauncher/\" %command% "
2023-07-12 10:21:19 +02:00
battlenetstartingdir = " \" $( dirname " $battlenet_path2 " ) \" "
2023-05-05 01:30:31 +02:00
fi
2023-08-12 18:47:52 +02:00
2023-05-05 01:30:31 +02:00
if [ [ -f " $eaapp_path1 " ] ] ; then
# EA App Launcher is installed at path 1
eaappshortcutdirectory = " \" $eaapp_path1 \" "
2023-08-12 19:11:01 +02:00
eaapplaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command% "
2023-07-12 10:21:19 +02:00
eaappstartingdir = " \" $( dirname " $eaapp_path1 " ) \" "
2023-05-05 01:30:31 +02:00
elif [ [ -f " $eaapp_path2 " ] ] ; then
# EA App Launcher is installed at path 2
eaappshortcutdirectory = " \" $eaapp_path2 \" "
2023-08-12 19:11:01 +02:00
eaapplaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/TheEAappLauncher/\" %command% "
2023-07-12 10:21:19 +02:00
eaappstartingdir = " \" $( dirname " $eaapp_path2 " ) \" "
2023-05-05 01:30:31 +02:00
fi
2023-08-12 18:47:52 +02:00
2023-05-05 01:30:31 +02:00
if [ [ -f " $amazongames_path1 " ] ] ; then
# Amazon Games Launcher is installed at path 1
amazonshortcutdirectory = " \" $amazongames_path1 \" "
2023-08-12 19:11:01 +02:00
amazonlaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command% "
2023-07-12 10:21:19 +02:00
amazonstartingdir = " \" $( dirname " $amazongames_path1 " ) \" "
2023-05-05 01:30:31 +02:00
elif [ [ -f " $amazongames_path2 " ] ] ; then
# Amazon Games Launcher is installed at path 2
amazonshortcutdirectory = " \" $amazongames_path2 \" "
2023-08-12 19:11:01 +02:00
amazonlaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/AmazonGamesLauncher/\" %command% "
2023-07-12 10:21:19 +02:00
amazonstartingdir = " \" $( dirname " $amazongames_path2 " ) \" "
2023-05-05 01:30:31 +02:00
fi
2023-08-12 18:47:52 +02:00
2023-05-05 01:30:31 +02:00
if [ [ -f " $itchio_path1 " ] ] ; then
# itchio Launcher is installed at path 1
itchioshortcutdirectory = " \" $itchio_path1 \" "
2023-08-12 19:11:01 +02:00
itchiolaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command% "
2023-07-12 10:21:19 +02:00
itchiostartingdir = " \" $( dirname " $itchio_path1 " ) \" "
2023-05-05 01:30:31 +02:00
elif [ [ -f " $itchio_path2 " ] ] ; then
# itchio Launcher is installed at path 2
itchioshortcutdirectory = " \" $itchio_path2 \" "
2023-08-12 19:11:01 +02:00
itchiolaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/itchioLauncher/\" %command% "
2023-07-12 10:21:19 +02:00
itchiostartingdir = " \" $( dirname " $itchio_path2 " ) \" "
2023-05-05 01:30:31 +02:00
fi
2023-08-12 18:47:52 +02:00
2023-05-05 01:30:31 +02:00
if [ [ -f " $legacygames_path1 " ] ] ; then
# Legacy Games Launcher is installed at path 1
legacyshortcutdirectory = " \" $legacygames_path1 \" "
2023-08-12 19:11:01 +02:00
legacylaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command% "
2023-07-12 10:21:19 +02:00
legacystartingdir = " \" $( dirname " $legacygames_path1 " ) \" "
2023-05-05 01:30:31 +02:00
elif [ [ -f " $legacygames_path2 " ] ] ; then
# Legacy Games Launcher is installed at path 2
legacyshortcutdirectory = " \" $legacygames_path2 \" "
2023-08-12 19:11:01 +02:00
legacylaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/LegacyGamesLauncher/\" %command% "
2023-07-12 10:21:19 +02:00
legacystartingdir = " \" $( dirname " $legacygames_path2 " ) \" "
2023-05-06 00:24:07 +02:00
fi
2023-08-12 18:47:52 +02:00
2023-05-06 00:24:07 +02:00
if [ [ -f " $humblegames_path1 " ] ] ; then
# Humble Games Launcher is installed at path 1
2023-06-04 08:17:16 +02:00
humbleshortcutdirectory = " \" $humblegames_path1 \" "
2023-08-12 19:11:01 +02:00
humblelaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command% "
2023-07-12 10:21:19 +02:00
humblestartingdir = " \" $( dirname " $humblegames_path1 " ) \" "
2023-05-06 00:24:07 +02:00
elif [ [ -f " $humblegames_path2 " ] ] ; then
# Humble Games Launcher is installed at path 2
2023-06-04 08:17:16 +02:00
humbleshortcutdirectory = " \" $humblegames_path2 \" "
2023-08-12 19:11:01 +02:00
humblelaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/HumbleGamesLauncher/\" %command% "
2023-07-12 10:21:19 +02:00
humblestartingdir = " \" $( dirname " $humblegames_path2 " ) \" "
2023-05-05 01:30:31 +02:00
fi
2023-08-12 18:47:52 +02:00
2023-05-09 12:50:48 +02:00
if [ [ -f " $indiegala_path1 " ] ] ; then
# indiegala Launcher is installed at path 1
indieshortcutdirectory = " \" $indiegala_path1 \" "
2023-08-12 19:11:01 +02:00
indielaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command% "
2023-07-12 10:21:19 +02:00
indiestartingdir = " \" $( dirname " $indiegala_path1 " ) \" "
2023-05-09 12:50:48 +02:00
elif [ [ -f " $indiegala_path2 " ] ] ; then
# indiegala Launcher is installed at path 2
indieshortcutdirectory = " \" $indiegala_path2 \" "
2023-08-12 19:11:01 +02:00
indielaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/IndieGalaLauncher/\" %command% "
2023-07-12 10:21:19 +02:00
indiestartingdir = " \" $( dirname " $indiegala_path2 " ) \" "
2023-05-09 12:50:48 +02:00
fi
2023-08-12 18:47:52 +02:00
2023-05-10 04:32:41 +02:00
if [ [ -f " $rockstar_path1 " ] ] ; then
# rockstar Launcher is installed at path 1
rockstarshortcutdirectory = " \" $rockstar_path1 \" "
2023-08-12 19:11:01 +02:00
rockstarlaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command% "
2023-07-12 10:21:19 +02:00
rockstarstartingdir = " \" $( dirname " $rockstar_path1 " ) \" "
2023-05-10 04:32:41 +02:00
elif [ [ -f " $rockstar_path2 " ] ] ; then
# rockstar Launcher is installed at path 2
rockstarshortcutdirectory = " \" $rockstar_path2 \" "
2023-08-12 19:11:01 +02:00
rockstarlaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/RockstarGamesLauncher/\" %command% "
2023-07-12 10:21:19 +02:00
rockstarstartingdir = " \" $( dirname " $rockstar_path2 " ) \" "
2023-05-10 04:32:41 +02:00
fi
2023-08-12 18:47:52 +02:00
2023-06-03 00:20:17 +02:00
if [ [ -f " $glyph_path1 " ] ] ; then
# Glyph is installed at path 1
glyphshortcutdirectory = " \" $glyph_path1 \" "
2023-08-12 19:11:01 +02:00
glyphlaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command% "
2023-07-12 10:21:19 +02:00
glyphstartingdir = " \" $( dirname " $glyph_path1 " ) \" "
2023-06-03 00:20:17 +02:00
elif [ [ -f " $glyph_path2 " ] ] ; then
# Glyph is installed at path 2
glyphshortcutdirectory = " \" $glyph_path2 \" "
2023-08-12 19:11:01 +02:00
glyphlaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/GlyphLauncher/\" %command% "
2023-07-12 10:21:19 +02:00
glyphstartingdir = " \" $( dirname " $glyph_path2 " ) \" "
2023-06-03 00:20:17 +02:00
fi
2023-08-12 18:47:52 +02:00
2023-06-04 08:17:16 +02:00
if [ [ -f " $minecraft_path1 " ] ] ; then
# Minecraft is installed at path 1
minecraftshortcutdirectory = " \" $minecraft_path1 \" "
2023-08-12 19:11:01 +02:00
minecraftlaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command% "
2023-07-12 10:21:19 +02:00
minecraftstartingdir = " \" $( dirname " $minecraft_path1 " ) \" "
2023-06-04 08:17:16 +02:00
elif [ [ -f " $minecraft_path2 " ] ] ; then
# Minecraft is installed at path 2
minecraftshortcutdirectory = " \" $minecraft_path2 \" "
2023-08-12 19:11:01 +02:00
minecraftlaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/MinecraftLauncher/\" %command% "
2023-07-12 10:21:19 +02:00
minecraftstartingdir = " \" $( dirname " $minecraft_path1 " ) \" "
fi
2023-08-12 18:47:52 +02:00
2023-07-12 10:21:19 +02:00
if [ [ -f " $psplus_path1 " ] ] ; then
# Playstation is installed at path 1
psplusshortcutdirectory = " \" $psplus_path1 \" "
2023-08-12 19:11:01 +02:00
pspluslaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command% "
2023-07-12 10:21:19 +02:00
psplusstartingdir = " \" $( dirname " $psplus_path1 " ) \" "
elif [ [ -f " $psplus_path2 " ] ] ; then
# Playstation is installed at path 2
psplusshortcutdirectory = " \" $psplus_path2 \" "
2023-08-12 19:11:01 +02:00
pspluslaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/PlaystationPlusLauncher/\" %command% "
2023-07-12 10:21:19 +02:00
psplusstartingdir = " \" $( dirname " $psplus_path2 " ) \" "
fi
2023-08-12 18:47:52 +02:00
2023-07-12 10:21:19 +02:00
if [ [ -f " $dmm_path1 " ] ] ; then
# DMM Games is installed at path 1
dmmshortcutdirectory = " \" $dmm_path1 \" "
2023-08-12 19:11:01 +02:00
dmmlaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command% "
2023-07-12 10:21:19 +02:00
dmmstartingdir = " \" $( dirname " $dmm_path1 " ) \" "
elif [ [ -f " $dmm_path2 " ] ] ; then
# DMM Player is installed at path 2
dmmshortcutdirectory = " \" $dmm_path2 \" "
2023-08-12 19:11:01 +02:00
dmmlaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/DMMGameLauncher/\" %command% "
2023-07-12 10:21:19 +02:00
dmmstartingdir = " \" $( dirname " $dmm_path2 " ) \" "
2023-06-04 08:17:16 +02:00
fi
2023-06-10 23:05:24 +02:00
2023-11-24 15:52:03 +01:00
if [ [ -f " $vkplay_path1 " ] ] ; then
# VK Play is installed at path 1
vkplayhortcutdirectory = " \" $vkplay_path1 \" "
vkplaylaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command% "
vkplaystartingdir = " \" $( dirname " $vkplay_path1 " ) \" "
elif [ [ -f " $vkplay_path2 " ] ] ; then
# VK Play is installed at path 2
vkplayhortcutdirectory = " \" $vkplay_path2 \" "
vkplaylaunchoptions = " STEAM_COMPAT_DATA_PATH=\" ${ logged_in_home } /.local/share/Steam/steamapps/compatdata/VKPlayLauncher/\" %command% "
vkplaystartingdir = " \" $( dirname " $vkplay_path2 " ) \" "
fi
2023-07-12 10:21:19 +02:00
# Set Chrome options based on user's selection
2023-06-12 13:05:58 +02:00
if [ [ $options = = *"Xbox Game Pass" * ] ] ; then
# User selected Xbox Game Pass
2023-07-12 10:21:19 +02:00
chromedirectory = " \" $chrome_path \" "
xboxchromelaunchoptions = "run --branch=stable --arch=x86_64 --command=/app/bin/chrome --file-forwarding com.google.Chrome @@u @@ --window-size=1280,800 --force-device-scale-factor=1.00 --device-scale-factor=1.00 --kiosk https://www.xbox.com/play --chrome-kiosk-type=fullscreen --no-first-run --enable-features=OverlayScrollbar"
2023-06-12 13:05:58 +02:00
fi
if [ [ $options = = *"Netflix" * ] ] ; then
# User selected Netflix
2023-07-12 10:21:19 +02:00
chromedirectory = " \" $chrome_path \" "
netlfixchromelaunchoptions = "run --branch=stable --arch=x86_64 --command=/app/bin/chrome --file-forwarding com.google.Chrome @@u @@ --window-size=1280,800 --force-device-scale-factor=1.00 --device-scale-factor=1.00 --kiosk https://www.netflix.com --chrome-kiosk-type=fullscreen --no-first-run --enable-features=OverlayScrollbar"
2023-06-12 13:05:58 +02:00
fi
if [ [ $options = = *"GeForce Now" * ] ] ; then
# User selected GeForce Now
2023-07-12 10:21:19 +02:00
chromedirectory = " \" $chrome_path \" "
geforcechromelaunchoptions = "run --branch=stable --arch=x86_64 --command=/app/bin/chrome --file-forwarding com.google.Chrome @@u @@ --window-size=1280,800 --force-device-scale-factor=1.00 --device-scale-factor=1.00 --kiosk https://play.geforcenow.com --chrome-kiosk-type=fullscreen --no-first-run --enable-features=OverlayScrollbar"
2023-06-12 13:05:58 +02:00
fi
if [ [ $options = = *"Hulu" * ] ] ; then
# User selected Hulu
2023-07-12 10:21:19 +02:00
chromedirectory = " \" $chrome_path \" "
huluchromelaunchoptions = "run --branch=stable --arch=x86_64 --command=/app/bin/chrome --file-forwarding com.google.Chrome @@u @@ --window-size=1280,800 --force-device-scale-factor=1.00 --device-scale-factor=1.00 --kiosk https://www.hulu.com/welcome --chrome-kiosk-type=fullscreen --no-first-run --enable-features=OverlayScrollbar"
2023-06-12 13:05:58 +02:00
fi
if [ [ $options = = *"Disney+" * ] ] ; then
# User selected Disney+
2023-07-12 10:21:19 +02:00
chromedirectory = " \" $chrome_path \" "
disneychromelaunchoptions = "run --branch=stable --arch=x86_64 --command=/app/bin/chrome --file-forwarding com.google.Chrome @@u @@ --window-size=1280,800 --force-device-scale-factor=1.00 --device-scale-factor=1.00 --kiosk https://www.disneyplus.com --chrome-kiosk-type=fullscreen --no-first-run --enable-features=OverlayScrollbar"
2023-06-12 13:05:58 +02:00
fi
if [ [ $options = = *"Amazon Prime Video" * ] ] ; then
# User selected Amazon Prime Video
2023-07-12 10:21:19 +02:00
chromedirectory = " \" $chrome_path \" "
amazonchromelaunchoptions = "run --branch=stable --arch=x86_64 --command=/app/bin/chrome --file-forwarding com.google.Chrome @@u @@ --window-size=1280,800 --force-device-scale-factor=1.00 --device-scale-factor=1.00 --kiosk https://www.amazon.com/primevideo --chrome-kiosk-type=fullscreen --no-first-run --enable-features=OverlayScrollbar"
2023-06-12 13:05:58 +02:00
fi
if [ [ $options = = *"Youtube" * ] ] ; then
# User selected Youtube
2023-07-12 10:21:19 +02:00
chromedirectory = " \" $chrome_path \" "
youtubechromelaunchoptions = "run --branch=stable --arch=x86_64 --command=/app/bin/chrome --file-forwarding com.google.Chrome @@u @@ --window-size=1280,800 --force-device-scale-factor=1.00 --device-scale-factor=1.00 --kiosk https://www.youtube.com --chrome-kiosk-type=fullscreen --no-first-run --enable-features=OverlayScrollbar"
2023-06-12 13:05:58 +02:00
fi
2023-06-19 17:55:25 +02:00
if [ [ $options = = *"Amazon Luna" * ] ] ; then
# User selected Amazon Luna
2023-07-12 10:21:19 +02:00
chromedirectory = " \" $chrome_path \" "
lunachromelaunchoptions = "run --branch=stable --arch=x86_64 --command=/app/bin/chrome --file-forwarding com.google.Chrome @@u @@ --window-size=1280,800 --force-device-scale-factor=1.00 --device-scale-factor=1.00 --kiosk https://luna.amazon.com/ --chrome-kiosk-type=fullscreen --no-first-run --enable-features=OverlayScrollbar"
2023-06-19 17:55:25 +02:00
fi
2023-06-12 13:05:58 +02:00
2023-10-31 10:44:05 +01:00
if [ [ $options = = *"Twitch" * ] ] ; then
# User selected Twitch
chromedirectory = " \" $chrome_path \" "
twitchchromelaunchoptions = "run --branch=stable --arch=x86_64 --command=/app/bin/chrome --file-forwarding com.google.Chrome @@u @@ --window-size=1280,800 --force-device-scale-factor=1.00 --device-scale-factor=1.00 --kiosk https://www.twitch.tv/ --chrome-kiosk-type=fullscreen --no-first-run --enable-features=OverlayScrollbar"
fi
2023-07-12 10:21:19 +02:00
# Check if any custom websites were provided
if [ ${# custom_websites [@] } -gt 0 ] ; then
# User entered one or more custom websites
# Set the chromedirectory variable
chromedirectory = " \" $chrome_path \" "
# Convert the custom_websites array to a string
custom_websites_str = $( IFS = ", " ; echo " ${ custom_websites [*] } " )
# Iterate over each custom website
for custom_website in " ${ custom_websites [@] } " ; do
# Remove any leading or trailing spaces from the custom website URL
custom_website = " $( echo -e " ${ custom_website } " | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' ) "
# Remove the 'http://' or 'https://' prefix and the 'www.' prefix, if present
clean_website = " ${ custom_website #http : // } "
clean_website = " ${ clean_website #https : // } "
clean_website = " ${ clean_website #www. } "
# Extract the name of the website by removing everything after the first '/'
website_name = " ${ clean_website %%/* } "
# Remove the top-level domain (e.g. '.com') from the website name
website_name = " ${ website_name %.* } "
# Capitalize the first letter of the website name
website_name = " $( tr '[:lower:]' '[:upper:]' <<< " ${ website_name : 0 : 1 } " ) ${ website_name : 1 } "
2023-08-12 18:47:52 +02:00
# TODO: `chromelaunchoptions` is unused (SC2034)
2023-07-12 10:21:19 +02:00
# Set the chromelaunchoptions variable for this website
chromelaunchoptions = " run --branch=stable --arch=x86_64 --command=/app/bin/chrome --file-forwarding com.google.Chrome @@u @@ --window-size=1280,800 --force-device-scale-factor=1.00 --device-scale-factor=1.00 --kiosk https:// $clean_website / --chrome-kiosk-type=fullscreen --no-first-run --enable-features=OverlayScrollbar "
done
fi
2023-05-09 12:50:48 +02:00
2023-05-30 03:41:29 +02:00
# Create the download directory if it doesn't exist
mkdir -p " $download_dir "
2023-06-28 08:03:55 +02:00
# Get the version of Python being used
python_version = $( python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")' )
2023-05-30 03:41:29 +02:00
2023-06-26 06:02:52 +02:00
# Create a directory for the vdf module
2023-08-12 21:02:52 +02:00
mkdir -p " ${ download_dir } /lib/python ${ python_version } /site-packages/vdf "
2023-05-30 03:41:29 +02:00
2023-06-28 08:03:55 +02:00
# Download the vdf module from the GitHub repository
download_url = "https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck/raw/main/Modules/vdf/__init__.py"
2023-08-12 21:02:52 +02:00
wget -P " ${ download_dir } /lib/python ${ python_version } /site-packages/vdf " " $download_url "
2023-05-30 03:41:29 +02:00
# Set the PYTHONPATH environment variable
2023-08-12 21:02:52 +02:00
export PYTHONPATH = " ${ download_dir } /lib/python ${ python_version } /site-packages/: $PYTHONPATH "
2023-06-28 08:03:55 +02:00
2023-05-26 10:15:12 +02:00
# Set the default Steam directory
2023-08-12 19:11:01 +02:00
steam_dir = " ${ logged_in_home } /.local/share/Steam "
2023-05-08 12:22:21 +02:00
2023-05-26 10:15:12 +02:00
# Check if the config.vdf file exists
2023-08-12 22:02:51 +02:00
if [ [ -f " ${ steam_dir } /config/config.vdf " ] ] ; then
2023-05-26 10:15:12 +02:00
# Get the steamid of the currently logged in user
2023-08-12 22:02:51 +02:00
steamid = $( grep -oP 'SteamID"\s+"\K[0-9]+' " ${ steam_dir } /config/config.vdf " | head -n 1)
2023-05-08 12:22:21 +02:00
2023-05-27 09:58:59 +02:00
# Print out the value of steamid for debugging purposes
echo " steamid: $steamid "
2023-05-26 10:15:12 +02:00
# Convert steamid to steamid3
steamid3 = $(( steamid - 76561197960265728 ))
2023-05-08 12:22:21 +02:00
2023-05-28 07:19:05 +02:00
# Initialize the userdata_folder variable
userdata_folder = ""
# Initialize the most_recent variable
most_recent = 0
2023-09-01 07:04:17 +02:00
# TODO: `find` would likely be safer than globbing
2023-05-28 07:19:05 +02:00
# Loop through all the userdata folders
2023-09-01 07:04:17 +02:00
for USERDATA_FOLDER in " ${ logged_in_home } " /.steam/root/userdata/*; do
2023-05-28 07:19:05 +02:00
# Check if the current userdata folder is not the "0" or "anonymous" folder
2023-08-12 18:47:52 +02:00
if [ [ " $USERDATA_FOLDER " != *"/0" ] ] && [ [ " $USERDATA_FOLDER " != *"/anonymous" ] ] ; then
2023-05-28 07:19:05 +02:00
# Get the access time of the current userdata folder
access_time = $( stat -c %X " $USERDATA_FOLDER " )
# Extract steamid3 from userdata folder name
userdata_steamid3 = $( basename " $USERDATA_FOLDER " )
# Check if userdata_steamid3 matches steamid3 and if access time is more recent than most recent access time
2023-08-12 18:47:52 +02:00
if [ [ $userdata_steamid3 -eq $steamid3 ] ] && [ [ $access_time -gt $most_recent ] ] ; then
2023-05-28 07:19:05 +02:00
# The access time of current userdata folder is more recent and steamid3 matches
# Set userdata_folder variable
userdata_folder = " $USERDATA_FOLDER "
# Update most_recent variable
most_recent = $access_time
fi
fi
done
2023-05-26 10:15:12 +02:00
else
echo "Could not find config.vdf file"
fi
2023-05-08 12:22:21 +02:00
2023-05-28 07:19:05 +02:00
# Check if userdata folder was found
2023-05-12 10:56:42 +02:00
if [ [ -n " $userdata_folder " ] ] ; then
2023-05-28 07:19:05 +02:00
# Userdata folder was found
2023-05-12 10:56:42 +02:00
echo " Current user's userdata folder found at: $userdata_folder "
2023-05-08 12:22:21 +02:00
2023-05-28 07:19:05 +02:00
# Find shortcuts.vdf file for current user
2023-05-12 10:56:42 +02:00
shortcuts_vdf_path = $( find " $userdata_folder " -type f -name shortcuts.vdf)
2023-05-08 10:11:53 +02:00
2023-05-12 10:56:42 +02:00
# Check if shortcuts_vdf_path is not empty
if [ [ -n " $shortcuts_vdf_path " ] ] ; then
2023-05-28 07:19:05 +02:00
# Create backup of shortcuts.vdf file
2023-05-12 10:56:42 +02:00
cp " $shortcuts_vdf_path " " $shortcuts_vdf_path .bak "
2023-05-08 10:03:07 +02:00
else
2023-05-28 07:19:05 +02:00
# Find config directory for current user
2023-05-12 10:56:42 +02:00
config_dir = $( find " $userdata_folder " -type d -name config)
# Check if config_dir is not empty
if [ [ -n " $config_dir " ] ] ; then
2023-05-28 07:19:05 +02:00
# Create new shortcuts.vdf file at expected location for current user
2023-05-12 10:56:42 +02:00
touch " $config_dir /shortcuts.vdf "
shortcuts_vdf_path = " $config_dir /shortcuts.vdf "
else
2023-05-28 07:19:05 +02:00
# Create new config directory and new shortcuts.vdf file at expected location for current user
2023-05-12 10:56:42 +02:00
mkdir " $userdata_folder /config/ "
touch " $userdata_folder /config/shortcuts.vdf "
config_dir = " $userdata_folder /config/ "
shortcuts_vdf_path = " $config_dir /shortcuts.vdf "
fi
2023-05-08 10:03:07 +02:00
fi
2023-05-12 10:56:42 +02:00
else
2023-05-28 07:19:05 +02:00
# Userdata folder was not found
2023-05-12 10:56:42 +02:00
echo "Current user's userdata folder not found"
2023-05-06 23:18:49 +02:00
fi
2023-05-05 09:44:56 +02:00
2023-05-19 23:16:19 +02:00
# Detach script from Steam process
nohup sh -c 'sleep 10; /usr/bin/steam' &
# Close all instances of Steam
2023-08-12 20:25:08 +02:00
steam_pid( ) { pgrep -x steam ; }
steam_running = $( steam_pid)
[ [ -n " $steam_running " ] ] && killall steam
2023-05-26 10:15:12 +02:00
2023-05-27 07:42:40 +02:00
# Wait for the steam process to exit
2023-08-12 20:25:08 +02:00
while steam_pid > /dev/null; do sleep 5; done
2023-05-08 10:03:07 +02:00
2023-08-12 18:47:52 +02:00
# Pre check for updating the config file
2023-06-02 22:14:30 +02:00
# Set the default Steam directory
2023-08-12 22:05:47 +02:00
steam_dir_root = " ${ logged_in_home } /.steam/root "
2023-06-02 22:14:30 +02:00
# Set the path to the config.vdf file
2023-08-12 22:05:47 +02:00
config_vdf_path = " ${ steam_dir_root } /config/config.vdf "
2023-06-02 22:14:30 +02:00
# Check if the config.vdf file exists
if [ -f " $config_vdf_path " ] ; then
# Create a backup of the config.vdf file
2023-08-12 22:05:47 +02:00
backup_path = " ${ steam_dir_root } /config/config.vdf.bak "
2023-06-02 22:14:30 +02:00
cp " $config_vdf_path " " $backup_path "
# Set the name of the compatibility tool to use
2023-11-20 08:41:43 +01:00
compat_tool_name = $( ls " ${ logged_in_home } /.steam/root/compatibilitytools.d " | grep "GE-Proton" | sort -V | tail -n1)
2023-06-02 22:14:30 +02:00
else
echo "Could not find config.vdf file"
fi
2023-11-20 08:41:43 +01:00
2023-06-05 08:26:52 +02:00
# Set the path to the configset_controller_neptune.vdf file
2023-08-12 19:11:01 +02:00
controller_config_path = " ${ logged_in_home } /.local/share/Steam/steamapps/common/Steam Controller Configs/ $steamid3 /config/configset_controller_neptune.vdf "
2023-06-05 08:26:52 +02:00
# Check if the configset_controller_neptune.vdf file exists
if [ [ -f " $controller_config_path " ] ] ; then
# Create a backup copy of the configset_controller_neptune.vdf file
cp " $controller_config_path " " $controller_config_path .bak "
else
echo " Could not find $controller_config_path "
fi
2023-08-12 18:47:52 +02:00
# TODO: relocate to standalone python script
# ! editorconfig will likely break this since bash uses tabs and python needs 4 spaces
2023-05-05 01:30:31 +02:00
# Run the Python script to create a new entry for a Steam shortcut
2023-06-02 01:49:22 +02:00
python3 -c "
2023-05-27 07:42:40 +02:00
import sys
2023-05-05 01:30:31 +02:00
import os
2023-05-29 10:18:04 +02:00
import subprocess
2023-08-12 19:11:01 +02:00
sys.path.insert( 0, os.path.expanduser( '${logged_in_home}/Downloads/NonSteamLaunchersInstallation/lib/python$python_version/site-packages' ) )
2023-05-29 09:10:12 +02:00
print( sys.path) # Add this line to print the value of sys.path
2023-05-27 07:42:40 +02:00
import vdf # Updated import
2023-06-02 22:14:30 +02:00
import binascii
2023-07-27 02:35:19 +02:00
import re
2023-08-14 06:21:37 +02:00
import shutil
2023-05-27 07:42:40 +02:00
2023-05-28 02:03:45 +02:00
# Print the path to the file where the vdf module was loaded from
print( vdf.__file__)
2023-05-05 01:30:31 +02:00
# Load the shortcuts.vdf file
with open( '$shortcuts_vdf_path' , 'rb' ) as f:
shortcuts = vdf.binary_load( f)
2023-05-08 10:03:07 +02:00
# Check if the 'shortcuts' key exists in the dictionary
if 'shortcuts' not in shortcuts:
# Create an empty 'shortcuts' entry
shortcuts[ 'shortcuts' ] = { }
# Check the format of the 'shortcuts' entry
if isinstance( shortcuts[ 'shortcuts' ] , dict) :
# The 'shortcuts' entry is a dictionary
for key, value in shortcuts[ 'shortcuts' ] .items( ) :
# Check the type of the value
if not isinstance( value, ( str, int, dict) ) :
pass
2023-05-05 01:30:31 +02:00
# Define the path of the Launchers
epicshortcutdirectory = '$epicshortcutdirectory'
gogshortcutdirectory = '$gogshortcutdirectory'
originshortcutdirectory = '$originshortcutdirectory'
uplayshortcutdirectory = '$uplayshortcutdirectory'
battlenetshortcutdirectory = '$battlenetshortcutdirectory'
eaappshortcutdirectory = '$eaappshortcutdirectory'
amazonshortcutdirectory = '$amazonshortcutdirectory'
itchioshortcutdirectory = '$itchioshortcutdirectory'
legacyshortcutdirectory = '$legacyshortcutdirectory'
2023-05-06 00:24:07 +02:00
humbleshortcutdirectory = '$humbleshortcutdirectory'
2023-05-09 12:50:48 +02:00
indieshortcutdirectory = '$indieshortcutdirectory'
2023-05-10 04:32:41 +02:00
rockstarshortcutdirectory = '$rockstarshortcutdirectory'
2023-06-03 00:20:17 +02:00
glyphshortcutdirectory = '$glyphshortcutdirectory'
2023-06-04 08:17:16 +02:00
minecraftshortcutdirectory = '$minecraftshortcutdirectory'
2023-07-12 10:21:19 +02:00
psplusshortcutdirectory = '$psplusshortcutdirectory'
dmmshortcutdirectory = '$dmmshortcutdirectory'
2023-11-24 15:52:03 +01:00
vkplayhortcutdirectory = '$vkplayhortcutdirectory'
2023-06-12 13:05:58 +02:00
#Streaming
2023-07-12 10:21:19 +02:00
chromedirectory = '$chromedirectory'
websites_str = '$custom_websites_str'
custom_websites = websites_str.split( ', ' )
2023-11-20 08:41:43 +01:00
START_FRESH = '$START_FRESH'
2023-06-10 23:05:24 +02:00
2023-06-02 22:14:30 +02:00
app_ids = [ ]
def get_steam_shortcut_id( exe, appname) :
unique_id = '' .join( [ exe, appname] )
id_int = binascii.crc32( str.encode( unique_id) ) | 0x80000000
return id_int
2023-08-01 04:43:15 +02:00
app_id_to_name = { }
2023-06-02 22:14:30 +02:00
2023-08-12 18:47:52 +02:00
2023-07-12 10:21:19 +02:00
def create_new_entry( shortcutdirectory, appname, launchoptions, startingdir) :
2023-07-27 01:10:58 +02:00
if shortcutdirectory != '' and launchoptions != '' :
exe = f'"{shortcutdirectory}"'
if shortcutdirectory != chromedirectory:
appid = get_steam_shortcut_id( exe, appname)
app_ids.append( appid)
2023-08-01 04:43:15 +02:00
app_id_to_name[ appid] = appname
2023-07-27 01:10:58 +02:00
else :
appid = None
# Create a new entry for the Steam shortcut
new_entry = {
'appid' : f'{str(appid)}' if appid is not None else '' ,
'appname' : appname,
'exe' : shortcutdirectory,
'StartDir' : startingdir,
'icon' : '' ,
'ShortcutPath' : '' ,
'LaunchOptions' : launchoptions,
'IsHidden' : 0,
'AllowDesktopConfig' : 1,
'AllowOverlay' : 1,
'OpenVR' : 0,
'Devkit' : 0,
'DevkitGameID' : '' ,
'LastPlayTime' : 0,
'tags' : {
'0' : 'favorite'
2023-05-05 01:30:31 +02:00
}
2023-07-27 01:10:58 +02:00
}
# Add the new entry to the shortcuts dictionary
entry_exists = False
if type( shortcuts[ 'shortcuts' ] ) = = list:
for entry in shortcuts[ 'shortcuts' ] :
entry.setdefault( 'appname' , '' )
entry.setdefault( 'exe' , '' )
if entry[ 'appname' ] = = new_entry[ 'appname' ] and entry[ 'exe' ] = = new_entry[ 'exe' ] :
entry_exists = True
break
if not entry_exists:
shortcuts[ 'shortcuts' ] .append( new_entry)
elif type( shortcuts[ 'shortcuts' ] ) = = dict:
for key in shortcuts[ 'shortcuts' ] .keys( ) :
shortcuts[ 'shortcuts' ] [ key] .setdefault( 'appname' , '' )
shortcuts[ 'shortcuts' ] [ key] .setdefault( 'exe' , '' )
if shortcuts[ 'shortcuts' ] [ key] [ 'appname' ] = = new_entry[ 'appname' ] and shortcuts[ 'shortcuts' ] [ key] [ 'exe' ] = = new_entry[ 'exe' ] :
entry_exists = True
break
if not entry_exists:
# Check if the shortcuts['shortcuts'] dictionary is empty
if not shortcuts[ 'shortcuts' ] :
max_key = -1
else :
# Find the highest key value
max_key = max( int( key) for key in shortcuts[ 'shortcuts' ] .keys( ) )
# Add the new entry with a key value one higher than the current maximum
shortcuts[ 'shortcuts' ] [ str( max_key + 1) ] = new_entry
2023-05-05 01:30:31 +02:00
2023-08-14 06:21:37 +02:00
2023-07-12 10:21:19 +02:00
create_new_entry( '$epicshortcutdirectory' , 'Epic Games' , '$epiclaunchoptions' , '$epicstartingdir' )
create_new_entry( '$gogshortcutdirectory' , 'Gog Galaxy' , '$goglaunchoptions' , '$gogstartingdir' )
create_new_entry( '$uplayshortcutdirectory' , 'Ubisoft Connect' , '$uplaylaunchoptions' , '$uplaystartingdir' )
create_new_entry( '$originshortcutdirectory' , 'Origin' , '$originlaunchoptions' , '$originstartingdir' )
create_new_entry( '$battlenetshortcutdirectory' , 'Battle.net' , '$battlenetlaunchoptions' , '$battlenetstartingdir' )
create_new_entry( '$eaappshortcutdirectory' , 'EA App' , '$eaapplaunchoptions' , '$eaappstartingdir' )
create_new_entry( '$amazonshortcutdirectory' , 'Amazon Games' , '$amazonlaunchoptions' , '$amazonstartingdir' )
create_new_entry( '$itchioshortcutdirectory' , 'itch.io' , '$itchiolaunchoptions' , '$itchiostartingdir' )
create_new_entry( '$legacyshortcutdirectory' , 'Legacy Games' , '$legacylaunchoptions' , '$legacystartingdir' )
create_new_entry( '$humbleshortcutdirectory' , 'Humble Bundle' , '$humblelaunchoptions' , '$humblestartingdir' )
create_new_entry( '$indieshortcutdirectory' , 'IndieGala Client' , '$indielaunchoptions' , '$indiestartingdir' )
create_new_entry( '$rockstarshortcutdirectory' , 'Rockstar Games Launcher' , '$rockstarlaunchoptions' , '$rockstarstartingdir' )
create_new_entry( '$glyphshortcutdirectory' , 'Glyph' , '$glyphlaunchoptions' , '$glyphstartingdir' )
create_new_entry( '$minecraftshortcutdirectory' , 'Minecraft: Java Edition' , '$minecraftlaunchoptions' , '$minecraftstartingdir' )
create_new_entry( '$psplusshortcutdirectory' , 'Playstation Plus' , '$pspluslaunchoptions' , '$psplusstartingdir' )
create_new_entry( '$dmmshortcutdirectory' , 'DMM Games' , '$dmmlaunchoptions' , '$dmmstartingdir' )
2023-11-24 15:52:03 +01:00
create_new_entry( '$vkplayhortcutdirectory' , 'VK Play' , '$vkplaylaunchoptions' , '$vkplaystartingdir' )
2023-07-12 10:21:19 +02:00
create_new_entry( '$chromedirectory' , 'Xbox Games Pass' , '$xboxchromelaunchoptions' , '$chrome_startdir' )
create_new_entry( '$chromedirectory' , 'GeForce Now' , '$geforcechromelaunchoptions' , '$chrome_startdir' )
create_new_entry( '$chromedirectory' , 'Netflix' , '$netlfixchromelaunchoptions' , '$chrome_startdir' )
create_new_entry( '$chromedirectory' , 'Hulu' , '$huluchromelaunchoptions' , '$chrome_startdir' )
create_new_entry( '$chromedirectory' , 'Disney+' , '$disneychromelaunchoptions' , '$chrome_startdir' )
create_new_entry( '$chromedirectory' , 'Amazon Prime Video' , '$amazonchromelaunchoptions' , '$chrome_startdir' )
create_new_entry( '$chromedirectory' , 'Youtube' , '$youtubechromelaunchoptions' , '$chrome_startdir' )
create_new_entry( '$chromedirectory' , 'Amazon Luna' , '$lunachromelaunchoptions' , '$chrome_startdir' )
2023-10-31 10:44:05 +01:00
create_new_entry( '$chromedirectory' , 'Twitch' , '$twitchchromelaunchoptions' , '$chrome_startdir' )
2023-07-12 10:21:19 +02:00
# Iterate over each custom website
for custom_website in custom_websites:
2023-07-24 09:10:27 +02:00
# Check if the custom website is not an empty string
if custom_website:
# Remove any leading or trailing spaces from the custom website URL
custom_website = custom_website.strip( )
2023-07-12 10:21:19 +02:00
2023-07-24 09:10:27 +02:00
# Remove the 'http://' or 'https://' prefix and the 'www.' prefix, if present
clean_website = custom_website.replace( 'http://' , '' ) .replace( 'https://' , '' ) .replace( 'www.' , '' )
2023-07-12 10:21:19 +02:00
2023-07-27 02:35:19 +02:00
# Define a regular expression pattern to extract the game name from the URL
pattern = r'/games/([\w-]+)'
2023-07-12 10:21:19 +02:00
2023-07-27 02:35:19 +02:00
# Use the regular expression to search for the game name in the custom website URL
match = re.search( pattern, custom_website)
2023-07-12 10:21:19 +02:00
2023-07-27 02:35:19 +02:00
# Check if a match was found
if match:
# Extract the game name from the match object
game_name = match.group( 1)
# Replace hyphens with spaces
game_name = game_name.replace( '-' , ' ' )
# Capitalize the first letter of each word in the game name
game_name = game_name.title( )
else :
2023-07-27 03:37:09 +02:00
# Use the entire URL as the entry name
game_name = clean_website
2023-07-12 10:21:19 +02:00
2023-07-24 09:10:27 +02:00
# Define the launch options for this website
chromelaunch_options = f'run --branch=stable --arch=x86_64 --command=/app/bin/chrome --file-forwarding com.google.Chrome @@u @@ --window-size=1280,800 --force-device-scale-factor=1.00 --device-scale-factor=1.00 --kiosk https://{clean_website}/ --chrome-kiosk-type=fullscreen --no-first-run --enable-features=OverlayScrollbar'
2023-07-12 10:21:19 +02:00
2023-07-24 09:10:27 +02:00
# Call the create_new_entry function for this website
2023-07-27 02:35:19 +02:00
create_new_entry( '$chromedirectory' , game_name, chromelaunch_options, '$chrome_startdir' )
2023-07-12 10:21:19 +02:00
2023-08-01 04:43:15 +02:00
print( f'app_id_to_name: {app_id_to_name}' )
2023-05-05 01:30:31 +02:00
2023-06-05 08:26:52 +02:00
# Save the updated shortcuts dictionary to the shortcuts.vdf file
with open( '$shortcuts_vdf_path' , 'wb' ) as f:
vdf.binary_dump( shortcuts, f)
2023-05-05 01:30:31 +02:00
2023-06-05 08:26:52 +02:00
# Writes to the config.vdf File
2023-05-05 01:30:31 +02:00
2023-06-19 17:55:25 +02:00
excluded_appids = [ ]
2023-06-12 13:05:58 +02:00
# Update the config.vdf file
2023-06-05 08:26:52 +02:00
with open( '$config_vdf_path' , 'r' ) as f:
config = vdf.load( f)
2023-05-05 01:30:31 +02:00
2023-06-12 13:05:58 +02:00
# Check if the CompatToolMapping key exists
if 'CompatToolMapping' not in config[ 'InstallConfigStore' ] [ 'Software' ] [ 'Valve' ] [ 'Steam' ] :
# Create the CompatToolMapping key and set its value to an empty dictionary
config[ 'InstallConfigStore' ] [ 'Software' ] [ 'Valve' ] [ 'Steam' ] [ 'CompatToolMapping' ] = { }
2023-06-05 08:26:52 +02:00
for app_id in app_ids:
2023-06-12 13:05:58 +02:00
# Check if the app_id is in the list of excluded appids
if app_id not in excluded_appids:
# Update the CompatToolMapping for this app_id
if str( app_id) in config[ 'InstallConfigStore' ] [ 'Software' ] [ 'Valve' ] [ 'Steam' ] [ 'CompatToolMapping' ] :
config[ 'InstallConfigStore' ] [ 'Software' ] [ 'Valve' ] [ 'Steam' ] [ 'CompatToolMapping' ] [ str( app_id) ] [ 'name' ] = '$compat_tool_name'
config[ 'InstallConfigStore' ] [ 'Software' ] [ 'Valve' ] [ 'Steam' ] [ 'CompatToolMapping' ] [ str( app_id) ] [ 'config' ] = ''
config[ 'InstallConfigStore' ] [ 'Software' ] [ 'Valve' ] [ 'Steam' ] [ 'CompatToolMapping' ] [ str( app_id) ] [ 'priority' ] = '250'
else :
config[ 'InstallConfigStore' ] [ 'Software' ] [ 'Valve' ] [ 'Steam' ] [ 'CompatToolMapping' ] [ str( app_id) ] = { 'name' : '$compat_tool_name' , 'config' : '' , 'priority' : '250' }
2023-06-02 22:14:30 +02:00
2023-06-05 08:26:52 +02:00
# Save the updated config dictionary to the config.vdf file
with open( '$config_vdf_path' , 'w' ) as f:
vdf.dump( config, f)
2023-06-02 22:14:30 +02:00
2023-06-05 08:26:52 +02:00
# Load the configset_controller_neptune.vdf file
with open( '$controller_config_path' , 'r' ) as f:
config = vdf.load( f)
2023-05-05 01:30:31 +02:00
2023-06-05 08:26:52 +02:00
# Add new entries for the games
for app_id in app_ids:
config[ 'controller_config' ] [ str( app_id) ] = {
'workshop' : 'workshop_id'
}
2023-06-02 22:14:30 +02:00
2023-06-05 08:26:52 +02:00
# Add new entries for the installed launchers and games
config[ 'controller_config' ] [ 'epic games' ] = {
'workshop' : '2800178806'
}
config[ 'controller_config' ] [ 'gog galaxy' ] = {
'workshop' : '2877189386'
}
config[ 'controller_config' ] [ 'ubisoft connect' ] = {
'workshop' : '2804140248'
}
config[ 'controller_config' ] [ 'amazon games' ] = {
'workshop' : '2871935783'
}
config[ 'controller_config' ] [ 'battlenet' ] = {
'workshop' : '2887894308'
}
config[ 'controller_config' ] [ 'Origin' ] = {
'workshop' : '2856043168'
}
config[ 'controller_config' ] [ 'rockstar games launcher' ] = {
'workshop' : '1892570391'
}
config[ 'controller_config' ] [ 'indiegala' ] = {
'template' : 'controller_neptune_webbrowser.vdf'
}
config[ 'controller_config' ] [ 'legacy games' ] = {
'template' : 'controller_neptune_webbrowser.vdf'
}
config[ 'controller_config' ] [ 'ea app' ] = {
'workshop' : '2899822740'
}
config[ 'controller_config' ] [ 'itchio' ] = {
'workshop' : '2845891813'
}
config[ 'controller_config' ] [ 'humble games collection' ] = {
'workshop' : '2883791560'
}
config[ 'controller_config' ] [ 'minecraft java edition' ] = {
'workshop' : '2980553929'
}
2023-07-12 10:21:19 +02:00
config[ 'controller_config' ] [ 'playstation plus' ] = {
'workshop' : 'controller_neptune_webbrowser.vdf'
}
2023-06-05 08:26:52 +02:00
config[ 'controller_config' ] [ 'glyph' ] = {
'template' : 'controller_neptune_webbrowser.vdf'
}
2023-07-12 10:21:19 +02:00
config[ 'controller_config' ] [ 'dmm games' ] = {
'template' : 'controller_neptune_webbrowser.vdf'
}
2023-11-24 15:52:03 +01:00
config[ 'controller_config' ] [ 'vk play' ] = {
'workshop' : '3202642880'
}
2023-06-12 13:05:58 +02:00
config[ 'controller_config' ] [ 'amazon prime video' ] = {
'workshop' : '2970669392'
}
config[ 'controller_config' ] [ 'hulu' ] = {
'workshop' : '2970669392'
}
config[ 'controller_config' ] [ 'netflix' ] = {
'workshop' : '2970669392'
}
config[ 'controller_config' ] [ 'disney+' ] = {
'workshop' : '2970669392'
}
config[ 'controller_config' ] [ 'youtube' ] = {
'workshop' : '2970669392'
}
config[ 'controller_config' ] [ 'geforce now' ] = {
'template' : 'controller_neptune_gamepad+mouse.vdf'
}
2023-06-19 17:55:25 +02:00
config[ 'controller_config' ] [ 'amazon luna' ] = {
'template' : 'controller_neptune_gamepad+mouse.vdf'
}
2023-10-31 10:44:05 +01:00
config[ 'controller_config' ] [ 'twitch' ] = {
'workshop' : '2875543745'
}
2023-06-12 13:05:58 +02:00
2023-08-02 06:46:34 +02:00
# Save the updated config dictionary to the configset_controller_neptune.vdf file
with open( '$controller_config_path' , 'w' ) as f:
vdf.dump( config, f)
2023-08-01 04:43:15 +02:00
# Define the path to the compatdata directory
2023-08-12 19:11:01 +02:00
compatdata_dir = '${logged_in_home}/.local/share/Steam/steamapps/compatdata'
2023-08-01 04:43:15 +02:00
# Define a dictionary of original folder names
folder_names = {
'Epic Games' : 'EpicGamesLauncher' ,
'Gog Galaxy' : 'GogGalaxyLauncher' ,
'Ubisoft Connect' : 'UplayLauncher' ,
'Origin' : 'OriginLauncher' ,
'Battle.net' : 'Battle.netLauncher' ,
'EA App' : 'TheEAappLauncher' ,
'Amazon Games' : 'AmazonGamesLauncher' ,
'itch.io' : 'itchioLauncher' ,
'Legacy Games' : 'LegacyGamesLauncher' ,
'Humble Bundle' : 'HumbleGamesLauncher' ,
'IndieGala Client' : 'IndieGalaLauncher' ,
'Rockstar Games Launcher' : 'RockstarGamesLauncher' ,
'Minecraft: Java Edition' : 'MinecraftLauncher' ,
'Playstation Plus' : 'PlaystationPlusLauncher' ,
'DMM Games' : 'DMMGameLauncher' ,
2023-11-24 15:52:03 +01:00
'VK Play' : 'VKPlayLauncher' ,
2023-08-01 04:43:15 +02:00
}
# Iterate over each launcher in the folder_names dictionary
for launcher_name, folder in folder_names.items( ) :
2023-08-02 06:46:34 +02:00
# Define the current path of the folder
current_path = os.path.join( compatdata_dir, folder)
2023-08-01 04:43:15 +02:00
# Check if the folder exists
2023-08-02 06:46:34 +02:00
if os.path.exists( current_path) :
print( f'{launcher_name}: {folder} exists' )
2023-08-01 04:43:15 +02:00
# Get the app ID for this launcher from the app_id_to_name dictionary
appid = next( key for key, value in app_id_to_name.items( ) if value = = launcher_name)
# Define the new path of the folder
new_path = os.path.join( compatdata_dir, str( appid) )
# Rename the folder
os.rename( current_path, new_path)
# Define the path of the symbolic link
symlink_path = os.path.join( compatdata_dir, folder)
# Create a symbolic link to the renamed folder
os.symlink( new_path, symlink_path)
2023-08-02 06:46:34 +02:00
else :
print( f'{launcher_name}: {folder} does not exist' )
2023-08-01 04:43:15 +02:00
# Check if the NonSteamLaunchers folder exists
if os.path.exists( os.path.join( compatdata_dir, 'NonSteamLaunchers' ) ) :
# Get the first app ID from the app_ids list
first_app_id = app_ids[ 0]
# Define the current path of the NonSteamLaunchers folder
current_path = os.path.join( compatdata_dir, 'NonSteamLaunchers' )
2023-08-14 06:21:37 +02:00
# Check if NonSteamLaunchers is already a symbolic link
if os.path.islink( current_path) :
print( 'NonSteamLaunchers is already a symbolic link' )
else :
# Define the new path of the NonSteamLaunchers folder
new_path = os.path.join( compatdata_dir, str( first_app_id) )
2023-08-01 04:43:15 +02:00
2023-08-14 06:21:37 +02:00
# Move the NonSteamLaunchers folder to the new path
shutil.move( current_path, new_path)
2023-08-01 04:43:15 +02:00
2023-08-14 06:21:37 +02:00
# Define the path of the symbolic link
symlink_path = os.path.join( compatdata_dir, 'NonSteamLaunchers' )
2023-08-01 04:43:15 +02:00
2023-08-14 06:21:37 +02:00
# Create a symbolic link to the renamed NonSteamLaunchers folder
os.symlink( new_path, symlink_path) "
2023-08-01 04:43:15 +02:00
2023-11-20 08:41:43 +01:00
2023-08-12 20:47:38 +02:00
# TODO: might be better to relocate temp files to `/tmp` or even use `mktemp -d` since `rm -rf` is potentially dangerous without the `-i` flag
2023-06-05 08:26:52 +02:00
# Delete NonSteamLaunchersInstallation subfolder in Downloads folder
2023-08-12 21:02:52 +02:00
rm -rf " $download_dir "