diff --git a/config/steam-rom-manager/manifests/RetroDECK.json b/config/steam-rom-manager/manifests/RetroDECK.json index 509cf384..0383da53 100644 --- a/config/steam-rom-manager/manifests/RetroDECK.json +++ b/config/steam-rom-manager/manifests/RetroDECK.json @@ -1,4 +1,5 @@ { "title": "RetroDECK", - "target": "flatpak run net.retrodeck.retrodeck" + "target": "flatpak run net.retrodeck.retrodeck", + "startIn": "" } \ No newline at end of file diff --git a/developer_toolbox/inject_framework.sh b/developer_toolbox/inject_framework.sh index 1b1629e3..0655dbeb 100755 --- a/developer_toolbox/inject_framework.sh +++ b/developer_toolbox/inject_framework.sh @@ -42,7 +42,7 @@ fi # Copying files to the installation sudo cp -vfr "res/binding_icons" "$app/retrodeck/binding_icons" -sudo cp -vfr "res/steam_grid" "$app/retrodeck/steam_grid" +sudo cp -vfr "res/steam_grid" "$app/retrodeck" sudo cp -vfr "config/"** "$app/retrodeck/config/" sudo cp -vfr "tools" "$app" sudo cp -vfr "retrodeck.sh" "$app/bin/" diff --git a/functions/other_functions.sh b/functions/other_functions.sh index 357520e5..b81cb696 100644 --- a/functions/other_functions.sh +++ b/functions/other_functions.sh @@ -521,14 +521,7 @@ finit() { --title "RetroDECK Finishing Initialization" \ --text="RetroDECK is finishing the initial setup process, please wait." - rd_zenity --question --no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --title "RetroDECK" --cancel-label="No" --ok-label "Yes" \ - --text="Do you want to add RetroDECK to Steam?" - if [ $? == 0 ]; then - steam-rom-manager enable --names "RetroDECK Launcher" - steam-rom-manager add - rd_zenity --info --no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --title "RetroDECK" --text="RetroDECK has been added to Steam." - fi - + add_retrodeck_to_steam create_lock # Inform the user where to put the ROMs and BIOS files @@ -1078,3 +1071,24 @@ open_component(){ echo "Please ensure the name is correctly spelled (case sensitive) and quoted if it contains spaces." fi } + +add_retrodeck_to_steam(){ + + log i "Adding RetroDECK to Steam" + + rd_zenity --question --no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --title "RetroDECK" --cancel-label="No" --ok-label "Yes" \ + --text="Do you want to add RetroDECK to Steam?" + if [ $? == 0 ]; then + ( + steam-rom-manager enable --names "RetroDECK Launcher" + steam-rom-manager add + ) | + rd_zenity --progress --no-cancel --pulsate --auto-close \ + --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ + --title "Adding RetroDECK to Steam" \ + --text="Please wait while RetroDECK is being added to Steam...\n\n" + rd_zenity --info --no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --title "RetroDECK" --text="RetroDECK has been added to Steam.\n\nPlease close and reopen Steam to see the changes." + fi + + log i "RetroDECK has been added to Steam" +} \ No newline at end of file diff --git a/functions/prepare_component.sh b/functions/prepare_component.sh index 0d5eeaee..97a13cf4 100644 --- a/functions/prepare_component.sh +++ b/functions/prepare_component.sh @@ -125,7 +125,7 @@ prepare_component() { local srm_userdata="/var/config/steam-rom-manager/userData" create_dir -d "$srm_userdata" cp -fv "$config/steam-rom-manager/"*.json "$srm_userdata" - cp -fv "$config/steam-rom-manager/manifests" "$srm_userdata" + cp -fvr "$config/steam-rom-manager/manifests" "$srm_userdata" log i "Updating steamDirectory and romDirectory lines in $srm_userdata/userSettings.json" jq '.environmentVariables.steamDirectory = "'$HOME'/.steam/steam"' "$srm_userdata/userSettings.json" > "$srm_userdata/tmp.json" && mv -f "$srm_userdata/tmp.json" "$srm_userdata/userSettings.json" diff --git a/functions/steam_sync.sh b/functions/steam_sync.sh index b706b093..c12c289f 100644 --- a/functions/steam_sync.sh +++ b/functions/steam_sync.sh @@ -100,7 +100,7 @@ add_to_steam() { remove_from_steam else log d "Updating game list" - steam-rom-manager enable --names "RetroDECK" + steam-rom-manager enable --names "RetroDECK Steam Sync" steam-rom-manager add fi } @@ -111,10 +111,11 @@ remove_from_steam() { log d "Creating dummy game" cat "" > "$steamsync_folder/CUL0.sh" log d "Cleaning the shortcut" - steam-rom-manager enable --names "RetroDECK" + steam-rom-manager enable --names "RetroDECK Steam Sync" steam-rom-manager disable --names "RetroDECK Launcher" steam-rom-manager remove log d "Removing dummy game" rm "$steamsync_folder/CUL0.sh" steam-rom-manager enable --names "RetroDECK Launcher" + steam-rom-manager disable --names "RetroDECK Steam Sync" } diff --git a/tools/configurator.sh b/tools/configurator.sh index 89c11ac5..ffcc0217 100755 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -62,6 +62,7 @@ source /app/libexec/global.sh # - Install: PS3 firmware # - Install: PS Vita firmware # - Update Notification +# - Add RetroDECK to Steam # - Verify Multi-file Structure # - Ponzu - Remove Yuzu # - Ponzu - Remove Citra @@ -415,6 +416,7 @@ configurator_retrodeck_tools_dialog() { "Install: PS3 Firmware" "Download and Install: Playstation 3 firmware for the RPCS3 emulator." "Install: PS Vita Firmware" "Download and Install: PlayStation Vita firmware for the Vita3K emulator." "Update Notification" "Enable / Disable: Notifications for new RetroDECK versions." + "Add RetroDECK to Steam" "Add RetroDECK shortcut to Steam. Steam restart required." "Verify Multi-file Structure" "Verify the proper structure of multi-file or multi-disc games." ) @@ -508,6 +510,9 @@ configurator_retrodeck_tools_dialog() { configurator_update_notify_dialog ;; + "Add RetroDECK to Steam" ) + add_retrodeck_to_steam + "Verify Multi-file Structure" ) log i "Configurator: opening \"$choice\" menu" configurator_check_multifile_game_structure