From 26bf3f5dfc976962f54c3fa7dfe485f464c1d57e Mon Sep 17 00:00:00 2001 From: icenine451 Date: Thu, 18 May 2023 12:12:13 -0400 Subject: [PATCH] Clarify cooker reset wording new start-rd-on-exit method for Configurator --- rd-submodules/retroarch | 2 +- rd-submodules/shared-modules | 2 +- retrodeck.sh | 13 ++++++++----- tools/configurator.sh | 16 ---------------- 4 files changed, 10 insertions(+), 23 deletions(-) diff --git a/rd-submodules/retroarch b/rd-submodules/retroarch index 78786102..0b1cfb79 160000 --- a/rd-submodules/retroarch +++ b/rd-submodules/retroarch @@ -1 +1 @@ -Subproject commit 78786102fc04cf104ef9bf2f0ebcacbdda357ae0 +Subproject commit 0b1cfb79e591e10488a3262d6b38db843c39a409 diff --git a/rd-submodules/shared-modules b/rd-submodules/shared-modules index 50314360..a2441b96 160000 --- a/rd-submodules/shared-modules +++ b/rd-submodules/shared-modules @@ -1 +1 @@ -Subproject commit 50314360ded6fa3b9f0b602513b1164b7a6636ed +Subproject commit a2441b964afefd8cd1cebcdf562c7878670daf42 diff --git a/retrodeck.sh b/retrodeck.sh index e6297aed..9ff19a18 100644 --- a/retrodeck.sh +++ b/retrodeck.sh @@ -47,9 +47,12 @@ https://retrodeck.net cli_compress_all_games "$2" ;; --configurator*) - launched_from_cli="true" sh /app/tools/configurator.sh - exit + if [[ $(configurator_generic_question_dialog "RetroDECK Configurator" "Would you like to launch RetroDECK after closing the Configurator?") == "false" ]]; then + exit + else + shift + fi ;; --reset-emulator*) echo "You are about to reset one or more RetroDECK emulators." @@ -104,16 +107,16 @@ if [ -f "$lockfile" ]; 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) - choice=$(zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap --ok-label="Upgrade" --extra-button="Don't Upgrade" --extra-button="Fresh Install" \ + choice=$(zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap --ok-label="Upgrade" --extra-button="Don't Upgrade" --extra-button="Full Wipe and Fresh Install" \ --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ --title "RetroDECK Cooker Upgrade" \ - --text="You appear to be upgrading to a \"cooker\" build of RetroDECK.\n\nWould you like to perform the standard post-update process, skip the post-update process or remove ALL existing RetroDECK data to start from a fresh install?\n\nPerforming the normal post-update process multiple times may lead to unexpected results.") + --text="You appear to be upgrading to a \"cooker\" build of RetroDECK.\n\nWould you like to perform the standard post-update process, skip the post-update process or remove ALL existing RetroDECK folders and data (including ROMs and saves) to start from a fresh install?\n\nPerforming the normal post-update process multiple times may lead to unexpected results.") rc=$? # Capture return code, as "Yes" button has no text value if [[ $rc == "1" ]]; then # If any button other than "Yes" was clicked if [[ $choice == "Don't Upgrade" ]]; then # If user wants to bypass the post_update.sh process this time. echo "Skipping upgrade process for cooker build, updating stored version in retrodeck.cfg" set_setting_value $rd_conf "version" "$hard_version" retrodeck # Set version of currently running RetroDECK to updated retrodeck.cfg - elif [[ $choice == "Fresh Install" ]]; then # Remove all RetroDECK data and start a fresh install + elif [[ $choice == "Full Wipe and Fresh Install" ]]; then # Remove all RetroDECK data and start a fresh install echo "Removing RetroDECK data and starting fresh" rm -rf /var rm -rf "$HOME/retrodeck" diff --git a/tools/configurator.sh b/tools/configurator.sh index 91c08fd3..f29cfa8d 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -1289,22 +1289,6 @@ configurator_usb_import_dialog() { } -# Functions to run at exit, without keeping Configurator running in background - -launch_retrodeck_after_configurator_close() { - if [[ $(check_desktop_mode) == "true" && "$launched_from_cli" == "true" ]]; then - if [[ $(configurator_generic_question_dialog "RetroDECK Configurator" "Would you like to launch RetroDECK after closing the Configurator?") == "true" ]]; then - start_retrodeck - fi - fi -} - -trap 'launch_retrodeck_after_configurator_close' EXIT - # START THE CONFIGURATOR -if [[ "$1" == "cli" ]]; then - launched_from_cli="true" -fi - configurator_welcome_dialog