From c78a72a806a21ccaade064d0425143851faed6f5 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Fri, 28 Apr 2023 09:12:32 -0400 Subject: [PATCH 1/3] Change branding on RetroDECK starter pack Remove Configurator theme downloader entry Reverted ESDE scraping setting change Add Configurator optional installs --- es-configs/es_settings.xml | 2 +- functions.sh | 31 ++++++++++++++++++++++++------- post_update.sh | 11 +++-------- tools/configurator.sh | 20 ++++++++------------ 4 files changed, 36 insertions(+), 28 deletions(-) diff --git a/es-configs/es_settings.xml b/es-configs/es_settings.xml index 8f2b0465..0b8ab539 100644 --- a/es-configs/es_settings.xml +++ b/es-configs/es_settings.xml @@ -63,7 +63,7 @@ - + diff --git a/functions.sh b/functions.sh index b9a51dd5..5055756e 100644 --- a/functions.sh +++ b/functions.sh @@ -1780,6 +1780,28 @@ backup_retrodeck_userdata() { zip -rq9 "$backups_folder/$(date +"%0m%0d")_retrodeck_userdata.zip" "$saves_folder" "$states_folder" "$bios_folder" "$media_folder" "$themes_folder" "$logs_folder" "$screenshots_folder" "$mods_folder" "$texture_packs_folder" "$borders_folder" > $logs_folder/$(date +"%0m%0d")_backup_log.log } +install_retrodeck_starterpack() { + # This function will install the roms, gamelists and metadata for the RetroDECK Starter Pack, a curated selection of games the creators of RetroDECK enjoy. + # USAGE: install_retrodeck_starterpack + + ## DOOM section ## + cp /app/retrodeck/extras/doom1.wad "$roms_folder/doom/doom1.wad" # No -f in case the user already has it + mkdir -p "/var/config/emulationstation/.emulationstation/gamelists/doom" + if [[ ! -f "/var/config/emulationstation/.emulationstation/gamelists/doom/gamelist.xml" ]]; then # Don't overwrite an existing gamelist + cp "/app/retrodeck/rd_prepacks/doom/gamelist.xml" "/var/config/emulationstation/.emulationstation/gamelists/doom/gamelist.xml" + fi + mkdir -p "$media_folder/doom" + unzip -oq "/app/retrodeck/rd_prepacks/doom/doom.zip" -d "$media_folder/doom/" +} + +install_retrodeck_controller_profile() { + # This function will install the needed files for the custom RetroDECK controller profile + # NOTE: These files need to be stored in shared locations for Steam, outside of the normal RetroDECK folders and should always be an optional user choice + # USAGE: install_retrodeck_controller_profile + rsync -a "/app/retrodeck/binding-icons/" "$HOME/.steam/steam/tenfoot/resource/images/library/controller/binding_icons/" + cp -f "$emuconfigs/retrodeck/defaults/RetroDECK_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/RetroDECK_controller_config.vdf" +} + create_lock() { # creating RetroDECK's lock file and writing the version in the config file version=$hard_version @@ -1975,15 +1997,10 @@ finit() { fi fi if [[ "$finit_options_choices" =~ (rd_controller_profile|Enable All) ]]; then - rsync -a "/app/retrodeck/binding-icons/" "$HOME/.steam/steam/tenfoot/resource/images/library/controller/binding_icons/" - cp -f "$emuconfigs/retrodeck/defaults/RetroDECK_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/RetroDECK_controller_config.vdf" + install_retrodeck_controller_profile fi if [[ "$finit_options_choices" =~ (rd_prepacks|Enable All) ]]; then - cp /app/retrodeck/extras/doom1.wad "$roms_folder/doom/doom1.wad" # No -f in case the user already has it - mkdir -p "/var/config/emulationstation/.emulationstation/gamelists/doom" - cp "/app/retrodeck/rd_prepacks/doom/gamelist.xml" "/var/config/emulationstation/.emulationstation/gamelists/doom/gamelist.xml" - mkdir -p "$media_folder/doom" - unzip -oq "/app/retrodeck/rd_prepacks/doom/doom.zip" -d "$media_folder/doom/" + install_retrodeck_starterpack fi ) | diff --git a/post_update.sh b/post_update.sh index 8ece8003..dfc233be 100644 --- a/post_update.sh +++ b/post_update.sh @@ -91,12 +91,8 @@ post_update() { dir_prep "$rdhome/gamelists" "/var/config/emulationstation/.emulationstation/gamelists" - if [[ $(configurator_generic_question_dialog "RetroDECK DOOM Addition" "RetroDECK now runs DOOM!\n\nIf you would like to have this classic game added to your library, smash that Yes button!") == "true" ]]; then - cp "/app/retrodeck/extras/doom1.wad" "$roms_folder/doom/doom1.wad" # No -f in case the user already has it - mkdir -p "/var/config/emulationstation/.emulationstation/gamelists/doom" - cp -f "/app/retrodeck/rd_prepacks/doom/gamelist.xml" "/var/config/emulationstation/.emulationstation/gamelists/doom/gamelist.xml" - mkdir -p "$media_folder/doom" - unzip -oq "/app/retrodeck/rd_prepacks/doom/doom.zip" -d "$media_folder/doom/" + if [[ $(configurator_generic_question_dialog "RetroDECK Starter Pack" "The RetroDECK creators have put together a collection of classic retro games you might enjoy!\n\nWould you like to have them automatically added to your library?\n\nThis can always be done later through the Configurator.") == "true" ]]; then + install_retrodeck_starterpack fi cp -f $emuconfigs/rpcs3/vfs.yml /var/config/rpcs3/vfs.yml @@ -139,8 +135,7 @@ post_update() { configurator_generic_dialog "RetroDECK 0.7.0b Upgrade" "As part of this update, we are offering a new official RetroDECK controller profile!\nIt is an optional component that helps you get the most out of RetroDECK with a new in-game radial menu for unified hotkeys across emulators.\n\nThe files need to be installed outside of the normal ~/retrodeck folder, so we wanted your permission before proceeding.\nIf you decide to not install the profile now, it can always be done later through the Configurator.\n\nThe files will be installed at the following shared Steam locations:\n\n$HOME/.steam/steam/tenfoot/resource/images/library/controller/binding_icons/\n$HOME/.steam/steam/controller_base/templates/RetroDECK_controller_config.vdf" if [[ $(configurator_generic_question_dialog "RetroDECK Official Controller Profile" "Would you like to install the official RetroDECK controller profile?") == "true" ]]; then - rsync -a "/app/retrodeck/binding-icons/" "$HOME/.steam/steam/tenfoot/resource/images/library/controller/binding_icons/" - cp -f "$emuconfigs/retrodeck/defaults/RetroDECK_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/RetroDECK_controller_config.vdf" + install_retrodeck_controller_profile fi fi diff --git a/tools/configurator.sh b/tools/configurator.sh index 19e85891..51dfa568 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -813,9 +813,9 @@ 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 PS3 Firmware" "Download PS3 firmware for use with the RPCS3 emulator" \ "Install RetroDECK controller profile" "Install the custom RetroDECK controller profile and required icons" \ + "Install RetroDECK Starter Pack" "Install a small selection of classic games the RetroDECK creators picked themselves!" \ "Backup RetroDECK Userdata" "Compress important RetroDECK user data folders" ) case $choice in @@ -840,15 +840,6 @@ configurator_tools_and_troubleshooting_dialog() { configurator_compress_games_dialog ;; - "Download/Update Themes" ) - 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 @@ -861,13 +852,18 @@ configurator_tools_and_troubleshooting_dialog() { "Install RetroDECK controller profile" ) configurator_generic_dialog "Starting with version 0.7.0b, we are offering a new official RetroDECK controller profile!\nIt is an optional component that helps you get the most out of RetroDECK with a new in-game radial menu for unified hotkeys across emulators.\n\nThe files need to be installed outside of the normal ~/retrodeck folder, so we wanted your permission before proceeding.\n\nThe files will be installed at the following shared Steam locations:\n\n$HOME/.steam/steam/tenfoot/resource/images/library/controller/binding_icons/\n$HOME/.steam/steam/controller_base/templates/RetroDECK_controller_config.vdf" if [[ $(configurator_generic_question_dialog "RetroDECK Official Controller Profile" "Would you like to install the official RetroDECK controller profile?") == "true" ]]; then - rsync -a "/app/retrodeck/binding-icons/" "$HOME/.steam/steam/tenfoot/resource/images/library/controller/binding_icons/" - cp -f "$emuconfigs/retrodeck/defaults/RetroDECK_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/RetroDECK_controller_config.vdf" + install_retrodeck_controller_profile fi configurator_generic_dialog "The RetroDECK controller profile install is complete.\nSee the Wiki for more details on how to use it to its fullest potential!" configurator_tools_and_troubleshooting_dialog ;; + "Install RetroDECK Starter Pack" ) + install_retrodeck_starterpack + configurator_generic_dialog "RetroDECK Configurator - Install RetroDECK Starter Pack" "The RetroDECK starter pack has been installed. We hope you enjoy it!" + configurator_tools_and_troubleshooting_dialog + ;; + "Backup RetroDECK Userdata" ) configurator_generic_dialog "This tool will compress important RetroDECK userdata (basically everything except the ROMs folder) into a zip file.\n\nThis process can take several minutes, and the resulting zip file can be found in the ~/retrodeck/backups folder." ( From 6763286b7748b80ae1e213317db6a173a4984f95 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Mon, 1 May 2023 09:13:51 -0400 Subject: [PATCH 2/3] Another updater fix Fix update file cleanup --- functions.sh | 5 ++++- global.sh | 2 +- rd-submodules/retroarch | 2 +- retrodeck.sh | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/functions.sh b/functions.sh index 5055756e..ac037314 100644 --- a/functions.sh +++ b/functions.sh @@ -325,6 +325,9 @@ set_setting_value() { else sed -i '\^\['"$current_section_name"'\]^,\^\^'"$setting_name_to_change"'.*^s^\^'"$setting_name_to_change"'=.*^'"$setting_name_to_change"'='"$setting_value_to_change"'^' $1 fi + if [[ "$4" == "retrodeck" ]]; then # If a RetroDECK setting is being changed, also write it to memory for immediate use + eval "$setting_name_to_change=$setting_value_to_change" + fi ;; "retroarch" ) @@ -758,7 +761,7 @@ check_for_version_update() { mkdir -p "$rdhome/RetroDECK_Updates" wget -P "$rdhome/RetroDECK_Updates" $latest_cooker_download flatpak-spawn --host flatpak install --user --bundle --noninteractive -y "$rdhome/RetroDECK_Updates/RetroDECK.flatpak" - rm -f "$rdhome/RetroDECK_Updates" # Cleanup old bundles to save space + rm -rf "$rdhome/RetroDECK_Updates" # Cleanup old bundles to save space ) | zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \ --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ diff --git a/global.sh b/global.sh index bb76b0c4..04e19df3 100755 --- a/global.sh +++ b/global.sh @@ -126,7 +126,7 @@ if [[ ! -f "$rd_conf" ]]; then if grep -qF "cooker" <<< $hard_version; then # If newly-installed version is a "cooker" build set_setting_value $rd_conf "update_repo" "RetroDECK-cooker" retrodeck "options" set_setting_value $rd_conf "update_check" "true" retrodeck "options" - update_ignore=$(curl --silent "https://api.github.com/repos/XargonWan/RetroDECK-cooker/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') + update_ignore=$(curl --silent "https://api.github.com/repos/XargonWan/$update_repo/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') set_setting_value $rd_conf "update_ignore" "$update_ignore" retrodeck "options" # Store the latest online version to ignore for future checks, as internal version and online tag version may not match up. fi diff --git a/rd-submodules/retroarch b/rd-submodules/retroarch index 717b7809..0b1cfb79 160000 --- a/rd-submodules/retroarch +++ b/rd-submodules/retroarch @@ -1 +1 @@ -Subproject commit 717b78093797270877ec416e58082f1c71d435d8 +Subproject commit 0b1cfb79e591e10488a3262d6b38db843c39a409 diff --git a/retrodeck.sh b/retrodeck.sh index f98312d8..c7447ccb 100644 --- a/retrodeck.sh +++ b/retrodeck.sh @@ -106,7 +106,7 @@ then echo "Config file's version is $version but the actual version is $hard_version" if grep -qF "cooker" <<< $hard_version; then # If newly-installed version is a "cooker" build cooker_base_version=$(echo $hard_version | cut -d'-' -f2) - update_ignore=$(curl --silent "https://api.github.com/repos/XargonWan/RetroDECK-cooker/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') + update_ignore=$(curl --silent "https://api.github.com/repos/XargonWan/$update_repo/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') set_setting_value $rd_conf "update_ignore" "$update_ignore" retrodeck "options" # Store the latest online version to ignore for future checks, as internal version and online tag version may not match up. choice=$(zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap --ok-label="Upgrade" --extra-button="Don't Upgrade" --extra-button="Fresh Install" \ --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ From 47afb7be813b77b4d48969cca3ab873b9ede64d2 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Mon, 1 May 2023 09:22:42 -0400 Subject: [PATCH 3/3] Remove Configurator menu entry Fix controller profile source path --- es-configs/es_systems.xml | 6 +++--- functions.sh | 2 +- net.retrodeck.retrodeck.yml | 4 ++-- rd-submodules/shared-modules | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/es-configs/es_systems.xml b/es-configs/es_systems.xml index 7d69b0f5..936271f3 100644 --- a/es-configs/es_systems.xml +++ b/es-configs/es_systems.xml @@ -1863,7 +1863,7 @@ zxspectrum zxspectrum - + + diff --git a/functions.sh b/functions.sh index ac037314..99b6f82e 100644 --- a/functions.sh +++ b/functions.sh @@ -1802,7 +1802,7 @@ install_retrodeck_controller_profile() { # NOTE: These files need to be stored in shared locations for Steam, outside of the normal RetroDECK folders and should always be an optional user choice # USAGE: install_retrodeck_controller_profile rsync -a "/app/retrodeck/binding-icons/" "$HOME/.steam/steam/tenfoot/resource/images/library/controller/binding_icons/" - cp -f "$emuconfigs/retrodeck/defaults/RetroDECK_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/RetroDECK_controller_config.vdf" + cp -f "$emuconfigs/defaults/retrodeck/RetroDECK_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/RetroDECK_controller_config.vdf" } create_lock() { diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 24f89cad..705ee651 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -1104,7 +1104,7 @@ modules: - mkdir -p /app/tools - cp tools/configurator.sh /app/tools/configurator.sh - chmod +x /app/tools/configurator.sh - - cp es-configs/tools-gamelist.xml /app/retrodeck/tools-gamelist.xml + #- cp es-configs/tools-gamelist.xml /app/retrodeck/tools-gamelist.xml - cp tools/retrodeck_function_wrapper.sh /app/tools/retrodeck_function_wrapper.sh - chmod +x /app/tools/retrodeck_function_wrapper.sh @@ -1137,4 +1137,4 @@ modules: sources: - type: git url: https://github.com/XargonWan/RetroDECK.git - branch: cooker-0.7.0b \ No newline at end of file + branch: cooker-0.7.0b diff --git a/rd-submodules/shared-modules b/rd-submodules/shared-modules index a337dd0c..a2441b96 160000 --- a/rd-submodules/shared-modules +++ b/rd-submodules/shared-modules @@ -1 +1 @@ -Subproject commit a337dd0c6b7209a316dc6fa142323972e128c85d +Subproject commit a2441b964afefd8cd1cebcdf562c7878670daf42