From fe50a8afb8cc2c64d9fc881dc55d2cc9bc19a8b0 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Thu, 22 Jun 2023 09:12:43 -0400 Subject: [PATCH] Upgrade controller config at update if installed Change auto-update to notification only until auto update permissions can be fixed --- functions/checks.sh | 48 +++++++++++++++++++++--------------- functions/post_update.sh | 4 +++ rd-submodules/retroarch | 2 +- rd-submodules/shared-modules | 2 +- 4 files changed, 34 insertions(+), 22 deletions(-) diff --git a/functions/checks.sh b/functions/checks.sh index ead3f45d..227be3fd 100644 --- a/functions/checks.sh +++ b/functions/checks.sh @@ -38,26 +38,34 @@ check_for_version_update() { if [[ ! "$update_ignore" == "$online_version" ]]; then if [[ "$update_repo" == "RetroDECK" ]] && [[ $(sed -e 's/[\.a-z]//g' <<< $version) -le $(sed -e 's/[\.a-z]//g' <<< $online_version) ]]; then - choice=$(zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap --ok-label="Yes" --extra-button="No" --extra-button="Ignore this version" \ - --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ - --title "RetroDECK Update Available" \ - --text="There is a new version of RetroDECK on the stable release channel $online_version. Would you like to update to it?\n\n(depending on your internet speed this could takes several minutes).") - 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 == "Ignore this version" ]]; then - set_setting_value $rd_conf "update_ignore" "$online_version" retrodeck "options" # Store version to ignore for future checks - fi - else # User clicked "Yes" - configurator_generic_dialog "RetroDECK Online Update" "The update process may take several minutes.\n\nAfter the update is complete, RetroDECK will close. When you run it again you will be using the latest version." - ( - flatpak-spawn --host flatpak update --noninteractive -y net.retrodeck.retrodeck - ) | - zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \ - --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ - --title "RetroDECK Updater" \ - --text="Upgrade in process please wait (this could takes several minutes)." - configurator_generic_dialog "RetroDECK Online Update" "The update process is now complete!\n\nPlease restart RetroDECK to keep the fun going." - exit 1 + # choice=$(zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap --ok-label="Yes" --extra-button="No" --extra-button="Ignore this version" \ + # --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ + # --title "RetroDECK Update Available" \ + # --text="There is a new version of RetroDECK on the stable release channel $online_version. Would you like to update to it?\n\n(depending on your internet speed this could takes several minutes).") + # 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 == "Ignore this version" ]]; then + # set_setting_value $rd_conf "update_ignore" "$online_version" retrodeck "options" # Store version to ignore for future checks + # fi + # else # User clicked "Yes" + # configurator_generic_dialog "RetroDECK Online Update" "The update process may take several minutes.\n\nAfter the update is complete, RetroDECK will close. When you run it again you will be using the latest version." + # ( + # flatpak-spawn --host flatpak update --noninteractive -y net.retrodeck.retrodeck + # ) | + # zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \ + # --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ + # --title "RetroDECK Updater" \ + # --text="Upgrade in process please wait (this could takes several minutes)." + # configurator_generic_dialog "RetroDECK Online Update" "The update process is now complete!\n\nPlease restart RetroDECK to keep the fun going." + # exit 1 + # fi + choice=$(zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap --ok-label="OK" --extra-button="Ignore this version" \ + --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ + --title "RetroDECK Update Available" \ + --text="There is a new version of RetroDECK on the stable release channel $online_version. Please update through the Discover app!\n\nIf you would like to ignore this version and recieve a notification at the NEXT version,\nclick the \"Ignore this version\" button.") + rc=$? # Capture return code, as "OK" button has no text value + if [[ $rc == "1" ]]; then # If any button other than "OK" was clicked + set_setting_value $rd_conf "update_ignore" "$online_version" retrodeck "options" # Store version to ignore for future checks fi elif [[ "$update_repo" == "RetroDECK-cooker" ]] && [[ ! $version == $online_version ]]; then choice=$(zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap --ok-label="Yes" --extra-button="No" --extra-button="Ignore this version" \ diff --git a/functions/post_update.sh b/functions/post_update.sh index 46dc9e93..0cfdf25b 100644 --- a/functions/post_update.sh +++ b/functions/post_update.sh @@ -232,6 +232,10 @@ post_update() { rsync -rlD "/app/retrodeck/extras/DynamicInputTextures/" "/var/data/primehack/Load/DynamicInputTextures/" fi + if [[ -f "$HOME/.steam/steam/controller_base/templates/RetroDECK_controller_config.vdf" ]]; then # If RetroDECK controller profile has been previously installed + cp -f "$emuconfigs/defaults/retrodeck/RetroDECK_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/RetroDECK_controller_config.vdf" + fi + update_splashscreens build_retrodeck_current_presets ) | diff --git a/rd-submodules/retroarch b/rd-submodules/retroarch index fbfdda61..0b1cfb79 160000 --- a/rd-submodules/retroarch +++ b/rd-submodules/retroarch @@ -1 +1 @@ -Subproject commit fbfdda61b3da092a71cc53999dd3e7b909f244e2 +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