mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2025-04-10 19:15:12 +00:00
FRAMEWORK: finalized support for adding RetroDECK to Steam with offline assets
This commit is contained in:
parent
af87ffa8e9
commit
bd1f4d6817
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
"title": "RetroDECK",
|
"title": "RetroDECK",
|
||||||
"target": "flatpak run net.retrodeck.retrodeck"
|
"target": "flatpak run net.retrodeck.retrodeck",
|
||||||
|
"startIn": ""
|
||||||
}
|
}
|
|
@ -42,7 +42,7 @@ fi
|
||||||
|
|
||||||
# Copying files to the installation
|
# Copying files to the installation
|
||||||
sudo cp -vfr "res/binding_icons" "$app/retrodeck/binding_icons"
|
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 "config/"** "$app/retrodeck/config/"
|
||||||
sudo cp -vfr "tools" "$app"
|
sudo cp -vfr "tools" "$app"
|
||||||
sudo cp -vfr "retrodeck.sh" "$app/bin/"
|
sudo cp -vfr "retrodeck.sh" "$app/bin/"
|
||||||
|
|
|
@ -521,14 +521,7 @@ finit() {
|
||||||
--title "RetroDECK Finishing Initialization" \
|
--title "RetroDECK Finishing Initialization" \
|
||||||
--text="RetroDECK is finishing the initial setup process, please wait."
|
--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" \
|
add_retrodeck_to_steam
|
||||||
--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
|
|
||||||
|
|
||||||
create_lock
|
create_lock
|
||||||
|
|
||||||
# Inform the user where to put the ROMs and BIOS files
|
# 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."
|
echo "Please ensure the name is correctly spelled (case sensitive) and quoted if it contains spaces."
|
||||||
fi
|
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"
|
||||||
|
}
|
|
@ -125,7 +125,7 @@ prepare_component() {
|
||||||
local srm_userdata="/var/config/steam-rom-manager/userData"
|
local srm_userdata="/var/config/steam-rom-manager/userData"
|
||||||
create_dir -d "$srm_userdata"
|
create_dir -d "$srm_userdata"
|
||||||
cp -fv "$config/steam-rom-manager/"*.json "$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"
|
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"
|
jq '.environmentVariables.steamDirectory = "'$HOME'/.steam/steam"' "$srm_userdata/userSettings.json" > "$srm_userdata/tmp.json" && mv -f "$srm_userdata/tmp.json" "$srm_userdata/userSettings.json"
|
||||||
|
|
|
@ -100,7 +100,7 @@ add_to_steam() {
|
||||||
remove_from_steam
|
remove_from_steam
|
||||||
else
|
else
|
||||||
log d "Updating game list"
|
log d "Updating game list"
|
||||||
steam-rom-manager enable --names "RetroDECK"
|
steam-rom-manager enable --names "RetroDECK Steam Sync"
|
||||||
steam-rom-manager add
|
steam-rom-manager add
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -111,10 +111,11 @@ remove_from_steam() {
|
||||||
log d "Creating dummy game"
|
log d "Creating dummy game"
|
||||||
cat "" > "$steamsync_folder/CUL0.sh"
|
cat "" > "$steamsync_folder/CUL0.sh"
|
||||||
log d "Cleaning the shortcut"
|
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 disable --names "RetroDECK Launcher"
|
||||||
steam-rom-manager remove
|
steam-rom-manager remove
|
||||||
log d "Removing dummy game"
|
log d "Removing dummy game"
|
||||||
rm "$steamsync_folder/CUL0.sh"
|
rm "$steamsync_folder/CUL0.sh"
|
||||||
steam-rom-manager enable --names "RetroDECK Launcher"
|
steam-rom-manager enable --names "RetroDECK Launcher"
|
||||||
|
steam-rom-manager disable --names "RetroDECK Steam Sync"
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,6 +62,7 @@ source /app/libexec/global.sh
|
||||||
# - Install: PS3 firmware
|
# - Install: PS3 firmware
|
||||||
# - Install: PS Vita firmware
|
# - Install: PS Vita firmware
|
||||||
# - Update Notification
|
# - Update Notification
|
||||||
|
# - Add RetroDECK to Steam
|
||||||
# - Verify Multi-file Structure
|
# - Verify Multi-file Structure
|
||||||
# - Ponzu - Remove Yuzu
|
# - Ponzu - Remove Yuzu
|
||||||
# - Ponzu - Remove Citra
|
# - 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: 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."
|
"Install: PS Vita Firmware" "Download and Install: PlayStation Vita firmware for the Vita3K emulator."
|
||||||
"Update Notification" "Enable / Disable: Notifications for new RetroDECK versions."
|
"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."
|
"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
|
configurator_update_notify_dialog
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
"Add RetroDECK to Steam" )
|
||||||
|
add_retrodeck_to_steam
|
||||||
|
|
||||||
"Verify Multi-file Structure" )
|
"Verify Multi-file Structure" )
|
||||||
log i "Configurator: opening \"$choice\" menu"
|
log i "Configurator: opening \"$choice\" menu"
|
||||||
configurator_check_multifile_game_structure
|
configurator_check_multifile_game_structure
|
||||||
|
|
Loading…
Reference in a new issue