Add RPCS3 firmware downloader

This commit is contained in:
icenine451 2023-04-17 16:34:47 -04:00
parent e9b71b34d4
commit 0c2f8de072
4 changed files with 51 additions and 18 deletions

View file

@ -1611,6 +1611,14 @@ prepare_emulator() {
fi
}
update_rpcs3_firmware() {
mkdir -p "$roms_folder/ps3/tmp"
chmod 777 "$roms_folder/ps3/tmp"
wget "$rpcs3_firmware" -P "$roms_folder/ps3/tmp/"
rpcs3 --installfw "$roms_folder/ps3/tmp/PS3UPDAT.PUP"
rm -rf "$roms_folder/ps3/tmp"
}
create_lock() {
# creating RetroDECK's lock file and writing the version in the config file
version=$hard_version
@ -1787,6 +1795,8 @@ finit() {
mkdir -pv $roms_folder
local rpcs_firmware_install=$(configurator_generic_question_dialog "RPCS3 Firmware Install" "Would you like to install the latest PS3 firmware for the RPCS3 emulator?\n\nThis process will take several minutes and requires network access.\nIf you do not plan to emulate PS3 games this can be skipped, and can always be done later through the Configurator.\n\nIf you click Yes, RPCS3 will be launched at the end of the RetroDECK setup process.\nOnce the firmware is installed, please close the emulator to finish the process.")
zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --title "RetroDECK" \
--text="RetroDECK will now install the needed files, which can take up to one minute.\nRetroDECK will start once the process is completed.\n\nPress OK to continue."
@ -1835,6 +1845,9 @@ finit() {
tools_init
prepare_emulator "reset" "all"
if [[ $rpcs_firmware_install == "true" ]]; then
update_rpcs3_firmware
fi
) |
zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \

View file

@ -28,6 +28,7 @@ hard_version="$(cat '/app/retrodeck/version')"
rd_repo="https://github.com/XargonWan/RetroDECK" # The URL of the main RetroDECK GitHub repo
es_themes_list="https://gitlab.com/es-de/themes/themes-list/-/raw/master/themes.json" # The URL of the ES-DE 2.0 themes list
remote_network_target="https://one.one.one.one" # The URL of a common internet target for testing network access
rpcs3_firmware="http://dus01.ps3.update.playstation.net/update/ps3/image/us/2023_0228_05fe32f5dc8c78acbcd84d36ee7fdc5b/PS3UPDAT.PUP"
# Config files for emulators with single config files

@ -1 +1 @@
Subproject commit 717b78093797270877ec416e58082f1c71d435d8
Subproject commit 0b1cfb79e591e10488a3262d6b38db843c39a409

View file

@ -36,6 +36,8 @@ source /app/libexec/functions.sh
# - Compress Games
# - Manual single-game selection
# - Multi-file compression (CHD)
# - Download ES themes
# - Download PS3 firmware
# - Reset
# - Reset Specific Emulator
# - Reset RetroArch
@ -89,7 +91,7 @@ configurator_reset_dialog() {
"RetroArch" | "XEMU" ) # Emulators that require network access
if [[ $(configurator_reset_confirmation_dialog "$emulator_to_reset" "Are you sure you want to reset the $emulator_to_reset emulator to default settings?\n\nThis process cannot be undone.") == "true" ]]; then
if [[ $(check_network_connectivity) == "true" ]]; then
prepare_emulator "reset" "$emulator_to_reset"
prepare_emulator "reset" "$emulator_to_reset" "configurator"
configurator_process_complete_dialog "resetting $emulator_to_reset"
else
configurator_generic_dialog "You do not appear to be connected to a network with internet access.\n\nThe $emulator_to_reset reset process requires some files from the internet to function properly.\n\nPlease retry this process once a network connection is available."
@ -101,19 +103,9 @@ configurator_reset_dialog() {
fi
;;
"Cemu" | "Citra" | "Dolphin" | "Duckstation" | "MelonDS" | "PCSX2" | "PPSSPP" | "Primehack" | "Ryujinx" | "Yuzu" )
"Cemu" | "Citra" | "Dolphin" | "Duckstation" | "MelonDS" | "PCSX2" | "PPSSPP" | "Primehack" | "RPCS3" | "Ryujinx" | "Yuzu" )
if [[ $(configurator_reset_confirmation_dialog "$emulator_to_reset" "Are you sure you want to reset the $emulator_to_reset emulator to default settings?\n\nThis process cannot be undone.") == "true" ]]; then
prepare_emulator "reset" "$emulator_to_reset"
configurator_process_complete_dialog "resetting $emulator_to_reset"
else
configurator_generic_dialog "Reset process cancelled."
configurator_reset_dialog
fi
;;
"RPCS3" )
if [[ $(configurator_reset_confirmation_dialog "RPCS3" "Are you sure you want to reset the RPCS3 emulator to default settings?\n\nThis process cannot be undone.") == "true" ]]; then
rpcs3_init
prepare_emulator "reset" "$emulator_to_reset" "configurator"
configurator_process_complete_dialog "resetting $emulator_to_reset"
else
configurator_generic_dialog "Reset process cancelled."
@ -131,8 +123,7 @@ configurator_reset_dialog() {
"Reset All Emulators" )
if [[ $(configurator_reset_confirmation_dialog "all emulators" "Are you sure you want to reset all emulators to default settings?\n\nThis process cannot be undone.") == "true" ]]; then
if [[ $(check_network_connectivity) == "true" ]]; then
ra_init
standalones_init
prepare_emulator "reset" "all"
configurator_process_complete_dialog "resetting all emulators"
else
configurator_generic_dialog "You do not appear to be connected to a network with internet access.\n\nThe all-emulator reset process requires some files from the internet to function properly.\n\nPlease retry this process once a network connection is available."
@ -739,6 +730,19 @@ configurator_online_theme_downloader() {
fi
}
configurator_rpcs3_firmware_updater() {
configurator_generic_dialog "This tool will download firmware required by RPCS3 to emulate PS3 games.\n\nThe process will take several minutes, and the emulator will launch to finish the installation.\nPlease close RPCS3 manually once the installation is complete."
(
update_rpcs3_firmware
) |
zenity --progress --pulsate \
--icon-name=net.retrodeck.retrodeck \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title="Downloading PS3 Firmware" \
--no-cancel \
--auto-close
}
configurator_tools_and_troubleshooting_dialog() {
choice=$(zenity --list --title="RetroDECK Configurator Utility - Change Options" --cancel-label="Back" \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \
@ -748,7 +752,8 @@ configurator_tools_and_troubleshooting_dialog() {
"Basic BIOS file check" "Show a list of systems that BIOS files are found for" \
"Advanced BIOS file check" "Show advanced information about common BIOS files" \
"Compress Games" "Compress games to CHD format for systems that support it" \
"Download/Update Themes" "Download new themes for RetroDECK or update existing ones" )
"Download/Update Themes" "Download new themes for RetroDECK or update existing ones" \
"Download PS3 Firmware" "Download PS3 firmware for use with the RPCS3 emulator" )
case $choice in
@ -774,7 +779,21 @@ configurator_tools_and_troubleshooting_dialog() {
;;
"Download/Update Themes" )
configurator_online_theme_downloader
if [[ $(check_network_connectivity) == "true" ]]; then
configurator_online_theme_downloader
else
configurator_generic_dialog "You do not appear to currently have Internet access, which is required by this tool. Please try again when network access has been restored."
configurator_tools_and_troubleshooting_dialog
fi
;;
"Download PS3 Firmware" )
if [[ $(check_network_connectivity) == "true" ]]; then
configurator_rpcs3_firmware_updater
else
configurator_generic_dialog "You do not appear to currently have Internet access, which is required by this tool. Please try again when network access has been restored."
configurator_tools_and_troubleshooting_dialog
fi
;;
"" ) # No selection made or Back button clicked