mirror of
https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck.git
synced 2024-12-21 23:31:52 +01:00
Another fix for shortcuts
~attempted to fix app name error
This commit is contained in:
parent
b62e5d4035
commit
5aaefb868b
@ -4,7 +4,7 @@ chmod +x "$0"
|
|||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
version=v1.8
|
version=v1.9
|
||||||
|
|
||||||
check_for_updates() {
|
check_for_updates() {
|
||||||
# Set the URL to the GitHub API for the repository
|
# Set the URL to the GitHub API for the repository
|
||||||
@ -555,18 +555,10 @@ if [[ $options == *"GOG Galaxy"* ]]; then
|
|||||||
# User selected GOG Galaxy
|
# User selected GOG Galaxy
|
||||||
echo "User selected GOG Galaxy"
|
echo "User selected GOG Galaxy"
|
||||||
|
|
||||||
|
|
||||||
# Check if Gog Galaxy Launcher is already installed
|
# Check if Gog Galaxy Launcher is already installed
|
||||||
if [[ ! -f "$gog_galaxy_path1" ]] || [[ ! -f "$gog_galaxy_path2" ]]; then
|
if [[ ! -f "$gog_galaxy_path1" ]] || [[ ! -f "$gog_galaxy_path2" ]]; then
|
||||||
# Gog Galaxy Launcher is already installed
|
|
||||||
echo "Gog Galaxy Launcher is already installed"
|
|
||||||
|
|
||||||
# Gog Galaxy Launcher is not installed
|
# Gog Galaxy Launcher is not installed
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Set the appid for the Gog Galaxy 2.0
|
# Set the appid for the Gog Galaxy 2.0
|
||||||
if [ "$use_separate_appids" = true ]; then
|
if [ "$use_separate_appids" = true ]; then
|
||||||
appid=GogGalaxyLauncher
|
appid=GogGalaxyLauncher
|
||||||
@ -588,7 +580,6 @@ if [[ $options == *"GOG Galaxy"* ]]; then
|
|||||||
# Set the STEAM_COMPAT_DATA_PATH environment variable for Epic Games Launcher
|
# Set the STEAM_COMPAT_DATA_PATH environment variable for Epic Games Launcher
|
||||||
export STEAM_COMPAT_DATA_PATH=~/.local/share/Steam/steamapps/compatdata/$appid
|
export STEAM_COMPAT_DATA_PATH=~/.local/share/Steam/steamapps/compatdata/$appid
|
||||||
|
|
||||||
|
|
||||||
# Download EXE file
|
# Download EXE file
|
||||||
if [ ! -f "$exe_file" ]; then
|
if [ ! -f "$exe_file" ]; then
|
||||||
echo "Downloading EXE file"
|
echo "Downloading EXE file"
|
||||||
@ -598,8 +589,12 @@ if [[ $options == *"GOG Galaxy"* ]]; then
|
|||||||
# Run the EXE file using Proton without the /passive option
|
# Run the EXE file using Proton without the /passive option
|
||||||
echo "Running 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" &
|
"$STEAM_RUNTIME" "$proton_dir/proton" run "$exe_file" &
|
||||||
|
else
|
||||||
|
# Gog Galaxy Launcher is already installed
|
||||||
|
echo "Gog Galaxy Launcher is already installed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo "45"
|
echo "45"
|
||||||
echo "# Downloading/Installing Gog Galaxy"
|
echo "# Downloading/Installing Gog Galaxy"
|
||||||
|
|
||||||
@ -633,11 +628,10 @@ done
|
|||||||
|
|
||||||
# Wait for the EXE file to finish running
|
# Wait for the EXE file to finish running
|
||||||
wait
|
wait
|
||||||
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wait
|
wait
|
||||||
echo "50"
|
echo "50"
|
||||||
echo "# Downloading/Installing Uplay"
|
echo "# Downloading/Installing Uplay"
|
||||||
@ -1383,6 +1377,8 @@ if epicshortcutdirectory != '':
|
|||||||
entry_exists = False
|
entry_exists = False
|
||||||
if type(shortcuts['shortcuts']) == list:
|
if type(shortcuts['shortcuts']) == list:
|
||||||
for entry in shortcuts['shortcuts']:
|
for entry in shortcuts['shortcuts']:
|
||||||
|
entry.setdefault('AppName', '')
|
||||||
|
entry.setdefault('Exe', '')
|
||||||
if entry['AppName'] == new_entry['AppName'] and entry['Exe'] == new_entry['Exe']:
|
if entry['AppName'] == new_entry['AppName'] and entry['Exe'] == new_entry['Exe']:
|
||||||
entry_exists = True
|
entry_exists = True
|
||||||
break
|
break
|
||||||
@ -1390,6 +1386,8 @@ if epicshortcutdirectory != '':
|
|||||||
shortcuts['shortcuts'].append(new_entry)
|
shortcuts['shortcuts'].append(new_entry)
|
||||||
elif type(shortcuts['shortcuts']) == dict:
|
elif type(shortcuts['shortcuts']) == dict:
|
||||||
for key in shortcuts['shortcuts'].keys():
|
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']:
|
if shortcuts['shortcuts'][key]['AppName'] == new_entry['AppName'] and shortcuts['shortcuts'][key]['Exe'] == new_entry['Exe']:
|
||||||
entry_exists = True
|
entry_exists = True
|
||||||
break
|
break
|
||||||
@ -1427,6 +1425,8 @@ if gogshortcutdirectory != '':
|
|||||||
entry_exists = False
|
entry_exists = False
|
||||||
if type(shortcuts['shortcuts']) == list:
|
if type(shortcuts['shortcuts']) == list:
|
||||||
for entry in shortcuts['shortcuts']:
|
for entry in shortcuts['shortcuts']:
|
||||||
|
entry.setdefault('AppName', '')
|
||||||
|
entry.setdefault('Exe', '')
|
||||||
if entry['AppName'] == new_entry['AppName'] and entry['Exe'] == new_entry['Exe']:
|
if entry['AppName'] == new_entry['AppName'] and entry['Exe'] == new_entry['Exe']:
|
||||||
entry_exists = True
|
entry_exists = True
|
||||||
break
|
break
|
||||||
@ -1434,6 +1434,8 @@ if gogshortcutdirectory != '':
|
|||||||
shortcuts['shortcuts'].append(new_entry)
|
shortcuts['shortcuts'].append(new_entry)
|
||||||
elif type(shortcuts['shortcuts']) == dict:
|
elif type(shortcuts['shortcuts']) == dict:
|
||||||
for key in shortcuts['shortcuts'].keys():
|
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']:
|
if shortcuts['shortcuts'][key]['AppName'] == new_entry['AppName'] and shortcuts['shortcuts'][key]['Exe'] == new_entry['Exe']:
|
||||||
entry_exists = True
|
entry_exists = True
|
||||||
break
|
break
|
||||||
@ -1476,6 +1478,8 @@ if uplayshortcutdirectory != '':
|
|||||||
entry_exists = False
|
entry_exists = False
|
||||||
if type(shortcuts['shortcuts']) == list:
|
if type(shortcuts['shortcuts']) == list:
|
||||||
for entry in shortcuts['shortcuts']:
|
for entry in shortcuts['shortcuts']:
|
||||||
|
entry.setdefault('AppName', '')
|
||||||
|
entry.setdefault('Exe', '')
|
||||||
if entry['AppName'] == new_entry['AppName'] and entry['Exe'] == new_entry['Exe']:
|
if entry['AppName'] == new_entry['AppName'] and entry['Exe'] == new_entry['Exe']:
|
||||||
entry_exists = True
|
entry_exists = True
|
||||||
break
|
break
|
||||||
@ -1483,6 +1487,8 @@ if uplayshortcutdirectory != '':
|
|||||||
shortcuts['shortcuts'].append(new_entry)
|
shortcuts['shortcuts'].append(new_entry)
|
||||||
elif type(shortcuts['shortcuts']) == dict:
|
elif type(shortcuts['shortcuts']) == dict:
|
||||||
for key in shortcuts['shortcuts'].keys():
|
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']:
|
if shortcuts['shortcuts'][key]['AppName'] == new_entry['AppName'] and shortcuts['shortcuts'][key]['Exe'] == new_entry['Exe']:
|
||||||
entry_exists = True
|
entry_exists = True
|
||||||
break
|
break
|
||||||
@ -1519,6 +1525,8 @@ if originshortcutdirectory != '':
|
|||||||
entry_exists = False
|
entry_exists = False
|
||||||
if type(shortcuts['shortcuts']) == list:
|
if type(shortcuts['shortcuts']) == list:
|
||||||
for entry in shortcuts['shortcuts']:
|
for entry in shortcuts['shortcuts']:
|
||||||
|
entry.setdefault('AppName', '')
|
||||||
|
entry.setdefault('Exe', '')
|
||||||
if entry['AppName'] == new_entry['AppName'] and entry['Exe'] == new_entry['Exe']:
|
if entry['AppName'] == new_entry['AppName'] and entry['Exe'] == new_entry['Exe']:
|
||||||
entry_exists = True
|
entry_exists = True
|
||||||
break
|
break
|
||||||
@ -1526,6 +1534,8 @@ if originshortcutdirectory != '':
|
|||||||
shortcuts['shortcuts'].append(new_entry)
|
shortcuts['shortcuts'].append(new_entry)
|
||||||
elif type(shortcuts['shortcuts']) == dict:
|
elif type(shortcuts['shortcuts']) == dict:
|
||||||
for key in shortcuts['shortcuts'].keys():
|
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']:
|
if shortcuts['shortcuts'][key]['AppName'] == new_entry['AppName'] and shortcuts['shortcuts'][key]['Exe'] == new_entry['Exe']:
|
||||||
entry_exists = True
|
entry_exists = True
|
||||||
break
|
break
|
||||||
@ -1562,6 +1572,8 @@ if battlenetshortcutdirectory != '':
|
|||||||
entry_exists = False
|
entry_exists = False
|
||||||
if type(shortcuts['shortcuts']) == list:
|
if type(shortcuts['shortcuts']) == list:
|
||||||
for entry in shortcuts['shortcuts']:
|
for entry in shortcuts['shortcuts']:
|
||||||
|
entry.setdefault('AppName', '')
|
||||||
|
entry.setdefault('Exe', '')
|
||||||
if entry['AppName'] == new_entry['AppName'] and entry['Exe'] == new_entry['Exe']:
|
if entry['AppName'] == new_entry['AppName'] and entry['Exe'] == new_entry['Exe']:
|
||||||
entry_exists = True
|
entry_exists = True
|
||||||
break
|
break
|
||||||
@ -1569,6 +1581,8 @@ if battlenetshortcutdirectory != '':
|
|||||||
shortcuts['shortcuts'].append(new_entry)
|
shortcuts['shortcuts'].append(new_entry)
|
||||||
elif type(shortcuts['shortcuts']) == dict:
|
elif type(shortcuts['shortcuts']) == dict:
|
||||||
for key in shortcuts['shortcuts'].keys():
|
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']:
|
if shortcuts['shortcuts'][key]['AppName'] == new_entry['AppName'] and shortcuts['shortcuts'][key]['Exe'] == new_entry['Exe']:
|
||||||
entry_exists = True
|
entry_exists = True
|
||||||
break
|
break
|
||||||
@ -1606,6 +1620,8 @@ if eaappshortcutdirectory != '':
|
|||||||
entry_exists = False
|
entry_exists = False
|
||||||
if type(shortcuts['shortcuts']) == list:
|
if type(shortcuts['shortcuts']) == list:
|
||||||
for entry in shortcuts['shortcuts']:
|
for entry in shortcuts['shortcuts']:
|
||||||
|
entry.setdefault('AppName', '')
|
||||||
|
entry.setdefault('Exe', '')
|
||||||
if entry['AppName'] == new_entry['AppName'] and entry['Exe'] == new_entry['Exe']:
|
if entry['AppName'] == new_entry['AppName'] and entry['Exe'] == new_entry['Exe']:
|
||||||
entry_exists = True
|
entry_exists = True
|
||||||
break
|
break
|
||||||
@ -1613,6 +1629,8 @@ if eaappshortcutdirectory != '':
|
|||||||
shortcuts['shortcuts'].append(new_entry)
|
shortcuts['shortcuts'].append(new_entry)
|
||||||
elif type(shortcuts['shortcuts']) == dict:
|
elif type(shortcuts['shortcuts']) == dict:
|
||||||
for key in shortcuts['shortcuts'].keys():
|
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']:
|
if shortcuts['shortcuts'][key]['AppName'] == new_entry['AppName'] and shortcuts['shortcuts'][key]['Exe'] == new_entry['Exe']:
|
||||||
entry_exists = True
|
entry_exists = True
|
||||||
break
|
break
|
||||||
@ -1649,6 +1667,8 @@ if amazonshortcutdirectory != '':
|
|||||||
entry_exists = False
|
entry_exists = False
|
||||||
if type(shortcuts['shortcuts']) == list:
|
if type(shortcuts['shortcuts']) == list:
|
||||||
for entry in shortcuts['shortcuts']:
|
for entry in shortcuts['shortcuts']:
|
||||||
|
entry.setdefault('AppName', '')
|
||||||
|
entry.setdefault('Exe', '')
|
||||||
if entry['AppName'] == new_entry['AppName'] and entry['Exe'] == new_entry['Exe']:
|
if entry['AppName'] == new_entry['AppName'] and entry['Exe'] == new_entry['Exe']:
|
||||||
entry_exists = True
|
entry_exists = True
|
||||||
break
|
break
|
||||||
@ -1656,6 +1676,8 @@ if amazonshortcutdirectory != '':
|
|||||||
shortcuts['shortcuts'].append(new_entry)
|
shortcuts['shortcuts'].append(new_entry)
|
||||||
elif type(shortcuts['shortcuts']) == dict:
|
elif type(shortcuts['shortcuts']) == dict:
|
||||||
for key in shortcuts['shortcuts'].keys():
|
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']:
|
if shortcuts['shortcuts'][key]['AppName'] == new_entry['AppName'] and shortcuts['shortcuts'][key]['Exe'] == new_entry['Exe']:
|
||||||
entry_exists = True
|
entry_exists = True
|
||||||
break
|
break
|
||||||
@ -1691,6 +1713,8 @@ if itchioshortcutdirectory != '':
|
|||||||
entry_exists = False
|
entry_exists = False
|
||||||
if type(shortcuts['shortcuts']) == list:
|
if type(shortcuts['shortcuts']) == list:
|
||||||
for entry in shortcuts['shortcuts']:
|
for entry in shortcuts['shortcuts']:
|
||||||
|
entry.setdefault('AppName', '')
|
||||||
|
entry.setdefault('Exe', '')
|
||||||
if entry['AppName'] == new_entry['AppName'] and entry['Exe'] == new_entry['Exe']:
|
if entry['AppName'] == new_entry['AppName'] and entry['Exe'] == new_entry['Exe']:
|
||||||
entry_exists = True
|
entry_exists = True
|
||||||
break
|
break
|
||||||
@ -1698,6 +1722,8 @@ if itchioshortcutdirectory != '':
|
|||||||
shortcuts['shortcuts'].append(new_entry)
|
shortcuts['shortcuts'].append(new_entry)
|
||||||
elif type(shortcuts['shortcuts']) == dict:
|
elif type(shortcuts['shortcuts']) == dict:
|
||||||
for key in shortcuts['shortcuts'].keys():
|
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']:
|
if shortcuts['shortcuts'][key]['AppName'] == new_entry['AppName'] and shortcuts['shortcuts'][key]['Exe'] == new_entry['Exe']:
|
||||||
entry_exists = True
|
entry_exists = True
|
||||||
break
|
break
|
||||||
@ -1734,6 +1760,8 @@ if legacyshortcutdirectory != '':
|
|||||||
entry_exists = False
|
entry_exists = False
|
||||||
if type(shortcuts['shortcuts']) == list:
|
if type(shortcuts['shortcuts']) == list:
|
||||||
for entry in shortcuts['shortcuts']:
|
for entry in shortcuts['shortcuts']:
|
||||||
|
entry.setdefault('AppName', '')
|
||||||
|
entry.setdefault('Exe', '')
|
||||||
if entry['AppName'] == new_entry['AppName'] and entry['Exe'] == new_entry['Exe']:
|
if entry['AppName'] == new_entry['AppName'] and entry['Exe'] == new_entry['Exe']:
|
||||||
entry_exists = True
|
entry_exists = True
|
||||||
break
|
break
|
||||||
@ -1741,6 +1769,8 @@ if legacyshortcutdirectory != '':
|
|||||||
shortcuts['shortcuts'].append(new_entry)
|
shortcuts['shortcuts'].append(new_entry)
|
||||||
elif type(shortcuts['shortcuts']) == dict:
|
elif type(shortcuts['shortcuts']) == dict:
|
||||||
for key in shortcuts['shortcuts'].keys():
|
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']:
|
if shortcuts['shortcuts'][key]['AppName'] == new_entry['AppName'] and shortcuts['shortcuts'][key]['Exe'] == new_entry['Exe']:
|
||||||
entry_exists = True
|
entry_exists = True
|
||||||
break
|
break
|
||||||
@ -1777,6 +1807,8 @@ if humbleshortcutdirectory != '':
|
|||||||
entry_exists = False
|
entry_exists = False
|
||||||
if type(shortcuts['shortcuts']) == list:
|
if type(shortcuts['shortcuts']) == list:
|
||||||
for entry in shortcuts['shortcuts']:
|
for entry in shortcuts['shortcuts']:
|
||||||
|
entry.setdefault('AppName', '')
|
||||||
|
entry.setdefault('Exe', '')
|
||||||
if entry['AppName'] == new_entry['AppName'] and entry['Exe'] == new_entry['Exe']:
|
if entry['AppName'] == new_entry['AppName'] and entry['Exe'] == new_entry['Exe']:
|
||||||
entry_exists = True
|
entry_exists = True
|
||||||
break
|
break
|
||||||
@ -1784,6 +1816,8 @@ if humbleshortcutdirectory != '':
|
|||||||
shortcuts['shortcuts'].append(new_entry)
|
shortcuts['shortcuts'].append(new_entry)
|
||||||
elif type(shortcuts['shortcuts']) == dict:
|
elif type(shortcuts['shortcuts']) == dict:
|
||||||
for key in shortcuts['shortcuts'].keys():
|
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']:
|
if shortcuts['shortcuts'][key]['AppName'] == new_entry['AppName'] and shortcuts['shortcuts'][key]['Exe'] == new_entry['Exe']:
|
||||||
entry_exists = True
|
entry_exists = True
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user