Steam ROM Manager: Remove spaces in AppImage name (#1224)

* riujinx fix

* no netplay

* Steam ROM Manager: Remove spaces in AppImage name
* Spaces were causing downloads to fail, removed space in name and replaced with dashes.
    * Added migration to new name.
* Added better fallback detection to SRM launcher.
* Added one time migration to new launcher (without resetting configs).
* Added fallback detection for the AppImage (for resetting configs).
* Removed custom variables (now handled automatically upstream).

---------

Co-authored-by: Dragoon Dorise <rodrigosedano@me.com>
This commit is contained in:
rawdatafeel 2024-05-12 06:23:56 -04:00 committed by Dragoon Dorise
parent f1acb03663
commit 7015d766cb
3 changed files with 40 additions and 10 deletions

View file

@ -2,17 +2,22 @@
#variables
SRM_toolName="Steam ROM Manager"
SRM_toolType="$emuDeckEmuTypeAppImage"
SRM_toolPath="${toolsPath}/Steam ROM Manager.AppImage"
SRM_toolPath="${toolsPath}/Steam-ROM-Manager.AppImage"
SRM_userData_directory="configs/steam-rom-manager/userData"
SRM_userData_configDir="$HOME/.config/steam-rom-manager/userData"
SRM_customVariablesURL="https://raw.githubusercontent.com/SteamGridDB/steam-rom-manager/master/files/customVariables.json"
#cleanupOlderThings
SRM_install(){
setMSG "Installing Steam ROM Manager"
local showProgress="$1"
if installToolAI "$SRM_toolName" "$(getReleaseURLGH "SteamGridDB/steam-rom-manager" "AppImage")" "" "$showProgress"; then
if [ -f "$toolsPath" ]; then
rm -rf "$toolsPath"
fi
mkdir -p "$toolsPath"
if installToolAI "Steam-ROM-Manager" "$(getReleaseURLGH "SteamGridDB/steam-rom-manager" "AppImage")" "" "$showProgress"; then
SRM_customDesktopShortcut
else
return 1
@ -38,11 +43,15 @@ SRM_customDesktopShortcut(){
SRM_migration(){
if [ -f "${toolsPath}/srm/Steam-ROM-Manager.AppImage" ]; then
mv "${toolsPath}/srm/Steam-ROM-Manager.AppImage" "${toolsPath}/Steam ROM Manager.AppImage" &> /dev/null
SRM_customDesktopShortcut
SRM_flushToolLauncher
fi
if [ -f "${toolsPath}/Steam ROM Manager.AppImage" ]; then
mv "${toolsPath}/Steam ROM Manager.AppImage" "${toolsPath}/Steam-ROM-Manager.AppImage" &> /dev/null
SRM_customDesktopShortcut
SRM_flushToolLauncher
fi
}
@ -88,8 +97,6 @@ SRM_init(){
sed -i "s|/run/media/mmcblk0p1/Emulation/roms|${romsPath}|g" "$HOME/.config/steam-rom-manager/userData/userSettings.json"
sed -i "s|/run/media/mmcblk0p1/Emulation/tools|${toolsPath}|g" "$HOME/.config/steam-rom-manager/userData/userSettings.json"
curl -L "$SRM_customVariablesURL" -o "$HOME/.config/steam-rom-manager/userData/customVariables.json"
SRM_addControllerTemplate
SRM_flushToolLauncher
SRM_addSteamInputProfiles
@ -512,12 +519,19 @@ SRM_resetConfig(){
}
SRM_IsInstalled(){
if [ -f "$SRM_toolPath" ]; then
echo "true"
else
echo "false"
echo "true"
elif [ -e "${toolsPath}/Steam ROM Manager.AppImage" ]; then
echo "true"
elif [ -e "${toolsPath}/srm/Steam-ROM-Manager.AppImage" ]; then
echo "true"
else
echo "false"
fi
}
SRM_resetLaunchers(){
rsync -av --existing $HOME/.config/EmuDeck/backend/tools/launchers/ $toolsPath/launchers/
for entry in $toolsPath/launchers/*.sh

View file

@ -201,6 +201,12 @@ appImageInit() {
touch "$HOME/.config/EmuDeck/.esdefixupdateyuzu"
fi
# This is intended so users can get the latest launcher with proper fall-back detection. This does not reset any of Steam ROM Manager's configs and only updates the launcher once.
if [ ! -f "$HOME/.config/EmuDeck/.srmlauncherupdate" ]; then
SRM_flushToolLauncher
touch "$HOME/.config/EmuDeck/.srmlauncherupdate"
fi
# Init functions
mkdir -p "$HOME/emudeck/logs"

View file

@ -1,6 +1,16 @@
#!/bin/bash
source "$HOME/.config/EmuDeck/backend/functions/all.sh"
SRM_toolPath="${toolsPath}/Steam ROM Manager.AppImage"
if [ -e "${toolsPath}/Steam-ROM-Manager.AppImage" ]; then
SRM_toolPath="${toolsPath}/Steam-ROM-Manager.AppImage"
elif [ -e "${toolsPath}/Steam ROM Manager.AppImage" ]; then
SRM_toolPath="${toolsPath}/Steam ROM Manager.AppImage"
elif [ -e "${toolsPath}/srm/Steam-ROM-Manager.AppImage" ]; then
SRM_toolPath="${toolsPath}/srm/Steam-ROM-Manager.AppImage"
else
SRM_install
SRM_init
fi
zenity --question \
--width 450 \