mirror of
https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck.git
synced 2024-11-20 08:09:18 +01:00
Add files via upload
This commit is contained in:
parent
e5b1a18367
commit
3bf35a1d0a
@ -377,6 +377,12 @@ function update_proton() {
|
|||||||
CheckInstallations
|
CheckInstallations
|
||||||
CheckInstallationDirectory
|
CheckInstallationDirectory
|
||||||
|
|
||||||
|
|
||||||
|
rm -rf ${logged_in_home}/.config/systemd/user/nslgamescanner.service
|
||||||
|
unlink ${logged_in_home}/.config/systemd/user/default.target.wants/nslgamescanner.service
|
||||||
|
systemctl --user daemon-reload
|
||||||
|
|
||||||
|
|
||||||
# Get the command line arguments
|
# Get the command line arguments
|
||||||
args=("$@")
|
args=("$@")
|
||||||
|
|
||||||
@ -391,6 +397,7 @@ if [ ${#args[@]} -eq 0 ]; then
|
|||||||
# No command line arguments were provided, so display the main zenity window
|
# No command line arguments were provided, so display the main zenity window
|
||||||
selected_launchers=$(zenity --list --text="Which launchers do you want to download and install?" --checklist --column="$version" --column="Default = one App ID Installation, One Prefix, NonSteamLaunchers - updated the NSLGameScanner.py $live" FALSE "SEPARATE APP IDS - CHECK THIS TO SEPARATE YOUR PREFIX" $epic_games_value "$epic_games_text" $gog_galaxy_value "$gog_galaxy_text" $uplay_value "$uplay_text" $battlenet_value "$battlenet_text" $amazongames_value "$amazongames_text" $eaapp_value "$eaapp_text" $legacygames_value "$legacygames_text" $itchio_value "$itchio_text" $humblegames_value "$humblegames_text" $indiegala_value "$indiegala_text" $rockstar_value "$rockstar_text" $glyph_value "$glyph_text" $psplus_value "$psplus_text" $vkplay_value "$vkplay_text" $hoyoplay_value "$hoyoplay_text" $nexon_value "$nexon_text" FALSE "RemotePlayWhatever" FALSE "Fortnite" FALSE "Xbox Game Pass" FALSE "GeForce Now" FALSE "Amazon Luna" FALSE "WebRcade" FALSE "WebRcade Editor" FALSE "Netflix" FALSE "Hulu" FALSE "Disney+" FALSE "Amazon Prime Video" FALSE "Youtube" FALSE "Twitch" FALSE "Apple TV+" FALSE "Crunchyroll" FALSE "Plex" --width=800 --height=740 --extra-button="Uninstall" --extra-button="Stop NSLGameScanner" --extra-button="Start Fresh" --extra-button="Move to SD Card" --extra-button="Update Proton-GE")
|
selected_launchers=$(zenity --list --text="Which launchers do you want to download and install?" --checklist --column="$version" --column="Default = one App ID Installation, One Prefix, NonSteamLaunchers - updated the NSLGameScanner.py $live" FALSE "SEPARATE APP IDS - CHECK THIS TO SEPARATE YOUR PREFIX" $epic_games_value "$epic_games_text" $gog_galaxy_value "$gog_galaxy_text" $uplay_value "$uplay_text" $battlenet_value "$battlenet_text" $amazongames_value "$amazongames_text" $eaapp_value "$eaapp_text" $legacygames_value "$legacygames_text" $itchio_value "$itchio_text" $humblegames_value "$humblegames_text" $indiegala_value "$indiegala_text" $rockstar_value "$rockstar_text" $glyph_value "$glyph_text" $psplus_value "$psplus_text" $vkplay_value "$vkplay_text" $hoyoplay_value "$hoyoplay_text" $nexon_value "$nexon_text" FALSE "RemotePlayWhatever" FALSE "Fortnite" FALSE "Xbox Game Pass" FALSE "GeForce Now" FALSE "Amazon Luna" FALSE "WebRcade" FALSE "WebRcade Editor" FALSE "Netflix" FALSE "Hulu" FALSE "Disney+" FALSE "Amazon Prime Video" FALSE "Youtube" FALSE "Twitch" FALSE "Apple TV+" FALSE "Crunchyroll" FALSE "Plex" --width=800 --height=740 --extra-button="Uninstall" --extra-button="Stop NSLGameScanner" --extra-button="Start Fresh" --extra-button="Move to SD Card" --extra-button="Update Proton-GE")
|
||||||
|
|
||||||
|
|
||||||
# Check if the user clicked the 'Cancel' button or selected one of the extra buttons
|
# Check if the user clicked the 'Cancel' button or selected one of the extra buttons
|
||||||
if [ $? -eq 1 ] || [[ $selected_launchers == "Start Fresh" ]] || [[ $selected_launchers == "Move to SD Card" ]] || [[ $selected_launchers == "Uninstall" ]]; then
|
if [ $? -eq 1 ] || [[ $selected_launchers == "Start Fresh" ]] || [[ $selected_launchers == "Move to SD Card" ]] || [[ $selected_launchers == "Uninstall" ]]; then
|
||||||
# The user clicked the 'Cancel' button or selected one of the extra buttons, so skip prompting for custom websites
|
# The user clicked the 'Cancel' button or selected one of the extra buttons, so skip prompting for custom websites
|
||||||
@ -436,6 +443,9 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# TODO: SC2145
|
# TODO: SC2145
|
||||||
# Print the selected launchers and custom websites
|
# Print the selected launchers and custom websites
|
||||||
echo "Selected launchers: $selected_launchers"
|
echo "Selected launchers: $selected_launchers"
|
||||||
@ -739,6 +749,7 @@ nexon_file=${logged_in_home}/Downloads/NonSteamLaunchersInstallation/NexonLaunch
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Function to handle common uninstallation tasks
|
# Function to handle common uninstallation tasks
|
||||||
handle_uninstall_common() {
|
handle_uninstall_common() {
|
||||||
compatdata_dir=$1
|
compatdata_dir=$1
|
||||||
@ -1602,6 +1613,9 @@ install_launcher "HoYoPlay" "HoYoPlayLauncher" "$hoyoplay_file" "$hoyoplay_url"
|
|||||||
install_launcher "Nexon Launcher" "NexonLauncher" "$nexon_file" "$nexon_url" "$nexon_file" "99" "" "install_nexon" true
|
install_launcher "Nexon Launcher" "NexonLauncher" "$nexon_file" "$nexon_url" "$nexon_file" "99" "" "install_nexon" true
|
||||||
#End of Launcher Installations
|
#End of Launcher Installations
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wait
|
wait
|
||||||
echo "99"
|
echo "99"
|
||||||
echo "# Checking if Chrome is installed...please wait..."
|
echo "# Checking if Chrome is installed...please wait..."
|
||||||
@ -1858,6 +1872,7 @@ echo "Backup completed"
|
|||||||
# End of Ludusavi configuration
|
# End of Ludusavi configuration
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo "100"
|
echo "100"
|
||||||
echo "# Installation Complete - Steam will now restart. Your launchers will be in your library!...Food for thought...do Jedis use Force Compatability?"
|
echo "# Installation Complete - Steam will now restart. Your launchers will be in your library!...Food for thought...do Jedis use Force Compatability?"
|
||||||
) |
|
) |
|
||||||
@ -1985,7 +2000,6 @@ if [[ $options == *"RemotePlayWhatever"* ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Set Chrome options based on user's selection
|
# Set Chrome options based on user's selection
|
||||||
|
|
||||||
if [[ $options == *"Xbox Game Pass"* ]]; then
|
if [[ $options == *"Xbox Game Pass"* ]]; then
|
||||||
@ -2032,7 +2046,7 @@ fi
|
|||||||
|
|
||||||
if [[ $options == *"Amazon Luna"* ]]; then
|
if [[ $options == *"Amazon Luna"* ]]; then
|
||||||
# User selected Amazon Luna
|
# User selected Amazon Luna
|
||||||
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 --start-fullscreen https://luna.amazon.com/ --no-first-run --enable-features=OverlayScrollbar"
|
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 --start-fullscreen https://luna.amazon.com --no-first-run --enable-features=OverlayScrollbar"
|
||||||
echo "export lunachromelaunchoptions=$lunachromelaunchoptions" >> ${logged_in_home}/.config/systemd/user/env_vars
|
echo "export lunachromelaunchoptions=$lunachromelaunchoptions" >> ${logged_in_home}/.config/systemd/user/env_vars
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -2045,25 +2059,25 @@ fi
|
|||||||
|
|
||||||
if [[ $options == *"Fortnite"* ]]; then
|
if [[ $options == *"Fortnite"* ]]; then
|
||||||
# User selected Fortnite
|
# User selected Fortnite
|
||||||
fortnitechromelaunchoptions="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 --start-fullscreen https://www.xbox.com/en-US/play/games/fortnite/BT5P2X999VH2/ --no-first-run --enable-features=OverlayScrollbar"
|
fortnitechromelaunchoptions="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 --start-fullscreen https://www.xbox.com/en-US/play/games/fortnite/BT5P2X999VH2 --no-first-run --enable-features=OverlayScrollbar"
|
||||||
echo "export fortnitechromelaunchoptions=$fortnitechromelaunchoptions" >> ${logged_in_home}/.config/systemd/user/env_vars
|
echo "export fortnitechromelaunchoptions=$fortnitechromelaunchoptions" >> ${logged_in_home}/.config/systemd/user/env_vars
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $options == *"WebRcade"* ]]; then
|
if [[ $options == *"WebRcade"* ]]; then
|
||||||
# User selected Webrcade
|
# User selected Webrcade
|
||||||
webrcadechromelaunchoptions="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 --start-fullscreen https://play.webrcade.com/ --no-first-run --enable-features=OverlayScrollbar"
|
webrcadechromelaunchoptions="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 --start-fullscreen https://play.webrcade.com --no-first-run --enable-features=OverlayScrollbar"
|
||||||
echo "export webrcadechromelaunchoptions=$webrcadechromelaunchoptions" >> ${logged_in_home}/.config/systemd/user/env_vars
|
echo "export webrcadechromelaunchoptions=$webrcadechromelaunchoptions" >> ${logged_in_home}/.config/systemd/user/env_vars
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $options == *"WebRcade Editor"* ]]; then
|
if [[ $options == *"WebRcade Editor"* ]]; then
|
||||||
# User selected Webrcade Editor
|
# User selected Webrcade Editor
|
||||||
webrcadeeditchromelaunchoptions="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 --start-fullscreen https://editor.webrcade.com/ --no-first-run --enable-features=OverlayScrollbar"
|
webrcadeeditchromelaunchoptions="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 --start-fullscreen https://editor.webrcade.com --no-first-run --enable-features=OverlayScrollbar"
|
||||||
echo "export webrcadeeditchromelaunchoptions=$webrcadeeditchromelaunchoptions" >> ${logged_in_home}/.config/systemd/user/env_vars
|
echo "export webrcadeeditchromelaunchoptions=$webrcadeeditchromelaunchoptions" >> ${logged_in_home}/.config/systemd/user/env_vars
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $options == *"Plex"* ]]; then
|
if [[ $options == *"Plex"* ]]; then
|
||||||
# User selected Webrcade
|
# User selected Webrcade
|
||||||
plexchromelaunchoptions="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 --start-fullscreen https://www.plex.tv/ --no-first-run --enable-features=OverlayScrollbar"
|
plexchromelaunchoptions="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 --start-fullscreen https://www.plex.tv --no-first-run --enable-features=OverlayScrollbar"
|
||||||
echo "export plexchromelaunchoptions=$plexchromelaunchoptions" >> ${logged_in_home}/.config/systemd/user/env_vars
|
echo "export plexchromelaunchoptions=$plexchromelaunchoptions" >> ${logged_in_home}/.config/systemd/user/env_vars
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -2075,11 +2089,10 @@ fi
|
|||||||
|
|
||||||
if [[ $options == *"Apple TV+"* ]]; then
|
if [[ $options == *"Apple TV+"* ]]; then
|
||||||
# User selected Webrcade
|
# User selected Webrcade
|
||||||
applechromelaunchoptions="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 --start-fullscreen https://tv.apple.com/ --no-first-run --enable-features=OverlayScrollbar"
|
applechromelaunchoptions="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 --start-fullscreen https://tv.apple.com --no-first-run --enable-features=OverlayScrollbar"
|
||||||
echo "export applechromelaunchoptions=$applechromelaunchoptions" >> ${logged_in_home}/.config/systemd/user/env_vars
|
echo "export applechromelaunchoptions=$applechromelaunchoptions" >> ${logged_in_home}/.config/systemd/user/env_vars
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Check if any custom websites were provided
|
# Check if any custom websites were provided
|
||||||
if [ ${#custom_websites[@]} -gt 0 ]; then
|
if [ ${#custom_websites[@]} -gt 0 ]; then
|
||||||
# User entered one or more custom websites
|
# User entered one or more custom websites
|
||||||
@ -2089,6 +2102,8 @@ if [ ${#custom_websites[@]} -gt 0 ]; then
|
|||||||
echo "export custom_websites_str=$custom_websites_str" >> ${logged_in_home}/.config/systemd/user/env_vars
|
echo "export custom_websites_str=$custom_websites_str" >> ${logged_in_home}/.config/systemd/user/env_vars
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Create the download directory if it doesn't exist
|
# Create the download directory if it doesn't exist
|
||||||
mkdir -p "$download_dir"
|
mkdir -p "$download_dir"
|
||||||
|
|
||||||
@ -2254,9 +2269,35 @@ echo "export chrome_startdir=$chrome_startdir" >> ${logged_in_home}/.config/syst
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Check if either directory does not exist
|
# Check if either directory does not exist
|
||||||
if [ "${deckyplugin}" = false ]; then
|
if [ "${deckyplugin}" = false ]; then
|
||||||
|
# Function to display a Zenity message
|
||||||
|
show_message() {
|
||||||
|
zenity --notification --text="$1" --timeout=1
|
||||||
|
}
|
||||||
|
|
||||||
|
show_message "Activating Scanner..."
|
||||||
|
|
||||||
|
# Setup NSLGameScanner.service
|
||||||
|
python_script_path="${logged_in_home}/.config/systemd/user/NSLGameScanner.py"
|
||||||
|
# Define your GitHub link
|
||||||
|
github_link="https://raw.githubusercontent.com/moraroy/NonSteamLaunchers-On-Steam-Deck/main/NSLGameScanner.py"
|
||||||
|
|
||||||
|
# Check if the service is already running
|
||||||
|
service_status=$(systemctl --user is-active nslgamescanner.service)
|
||||||
|
if [ "$service_status" = "active" ] || [ "$service_status" = "activating" ]; then
|
||||||
|
echo "Service is already running or activating. Stopping the service..."
|
||||||
|
systemctl --user stop nslgamescanner.service
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Updating Python script from GitHub..."
|
||||||
|
curl -o $python_script_path $github_link
|
||||||
|
|
||||||
|
echo "Starting the service..."
|
||||||
|
python3 $python_script_path
|
||||||
|
|
||||||
|
show_message "Restarting Steam..."
|
||||||
|
|
||||||
# Detach script from Steam process
|
# Detach script from Steam process
|
||||||
nohup sh -c 'sleep 10; /usr/bin/steam %U' &
|
nohup sh -c 'sleep 10; /usr/bin/steam %U' &
|
||||||
|
|
||||||
@ -2266,33 +2307,13 @@ if [ "${deckyplugin}" = false ]; then
|
|||||||
[[ -n "$steam_running" ]] && killall steam
|
[[ -n "$steam_running" ]] && killall steam
|
||||||
|
|
||||||
# Wait for the steam process to exit
|
# Wait for the steam process to exit
|
||||||
while steam_pid > /dev/null; do sleep 5; done
|
while steam_pid > /dev/null; do
|
||||||
|
sleep 5
|
||||||
#Setup NSLGameScanner.service
|
done
|
||||||
python_script_path="${logged_in_home}/.config/systemd/user/NSLGameScanner.py"
|
|
||||||
|
|
||||||
# Define your GitHub link
|
|
||||||
github_link="https://raw.githubusercontent.com/moraroy/NonSteamLaunchers-On-Steam-Deck/main/NSLGameScanner.py"
|
|
||||||
|
|
||||||
# Check if the service is already running
|
|
||||||
service_status=$(systemctl --user is-active nslgamescanner.service)
|
|
||||||
|
|
||||||
if [ "$service_status" = "active" ] || [ "$service_status" = "activating" ]
|
|
||||||
then
|
|
||||||
echo "Service is already running or activating. Stopping the service..."
|
|
||||||
systemctl --user stop nslgamescanner.service
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Updating Python script from GitHub..."
|
|
||||||
|
|
||||||
curl -o $python_script_path $github_link
|
|
||||||
|
|
||||||
echo "Starting the service..."
|
|
||||||
|
|
||||||
python3 $python_script_path
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 15
|
show_message "Waiting to detect plugin..."
|
||||||
|
sleep 20
|
||||||
|
|
||||||
# Function to switch to Game Mode
|
# Function to switch to Game Mode
|
||||||
switch_to_game_mode() {
|
switch_to_game_mode() {
|
||||||
@ -2306,9 +2327,11 @@ switch_to_game_mode() {
|
|||||||
|
|
||||||
# Function to display a Zenity message
|
# Function to display a Zenity message
|
||||||
show_message() {
|
show_message() {
|
||||||
zenity --notification --text="$1" --timeout=1
|
zenity --notification --text="$1" --timeout=1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Set the remote repository URL
|
# Set the remote repository URL
|
||||||
REPO_URL="https://github.com/moraroy/NonSteamLaunchersDecky/archive/refs/heads/test.zip"
|
REPO_URL="https://github.com/moraroy/NonSteamLaunchersDecky/archive/refs/heads/test.zip"
|
||||||
|
|
||||||
@ -2333,13 +2356,15 @@ fi
|
|||||||
|
|
||||||
set +x
|
set +x
|
||||||
|
|
||||||
|
show_message "Detected enviroment..."
|
||||||
|
|
||||||
if $DECKY_LOADER_EXISTS; then
|
if $DECKY_LOADER_EXISTS; then
|
||||||
while true; do
|
while true; do
|
||||||
USER_INPUT=$(zenity --forms --title="Authentication Required" --text="Decky Loader detected! $(if $NSL_PLUGIN_EXISTS; then echo 'NSL Plugin also detected and will be updated to the latest version 🚀.'; else echo 'But no NSL plugin :(. Would you like to inject it and go to Game Mode?'; fi) Please enter your sudo password to proceed:" --separator="|" --add-password="Password")
|
USER_INPUT=$(zenity --forms --title="Authentication Required" --text="Decky Loader detected! $(if $NSL_PLUGIN_EXISTS; then echo 'NSL Plugin also detected and will be updated to the latest version 🚀.'; else echo 'But no NSL plugin :(. Would you like to inject it and go to Game Mode?'; fi) Please enter your sudo password to proceed:" --separator="|" --add-password="Password")
|
||||||
USER_PASSWORD=$(echo $USER_INPUT | cut -d'|' -f1)
|
USER_PASSWORD=$(echo $USER_INPUT | cut -d'|' -f1)
|
||||||
|
|
||||||
if [ -z "$USER_PASSWORD" ]; then
|
if [ -z "$USER_PASSWORD" ]; then
|
||||||
zenity --error --text="No password entered. Exiting."
|
zenity --error --text="No password entered. Exiting." --timeout 5
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user