From ee9f744a13b61e773ec5e98292b89f467b48868e Mon Sep 17 00:00:00 2001 From: icenine451 Date: Thu, 15 Jun 2023 10:32:32 -0400 Subject: [PATCH 1/3] Update Yuzu presets to handle new config syntax --- emu-configs/defaults/retrodeck/presets/yuzu_presets.cfg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/emu-configs/defaults/retrodeck/presets/yuzu_presets.cfg b/emu-configs/defaults/retrodeck/presets/yuzu_presets.cfg index e6c915fc..bfb46f5e 100644 --- a/emu-configs/defaults/retrodeck/presets/yuzu_presets.cfg +++ b/emu-configs/defaults/retrodeck/presets/yuzu_presets.cfg @@ -3,7 +3,7 @@ target_file^$yuzuconf defaults_file^$emuconfigs/yuzu/qt-config.ini change^ask_to_exit^confirmClose^true^UI change^ask_to_exit^confirmClose\default^true^UI -change^nintendo_button_layout^player_0_button_a^pad:0,button:0,port:0,guid:03000000de280000ff11000001000000,engine:sdl^Controls -change^nintendo_button_layout^player_0_button_b^pad:0,button:1,port:0,guid:03000000de280000ff11000001000000,engine:sdl^Controls -change^nintendo_button_layout^player_0_button_x^pad:0,button:2,port:0,guid:03000000de280000ff11000001000000,engine:sdl^Controls -change^nintendo_button_layout^player_0_button_y^pad:0,button:3,port:0,guid:03000000de280000ff11000001000000,engine:sdl^Controls +change^nintendo_button_layout^player_0_button_a^"engine:sdl,guid:03000000de280000ff11000001000000,port:0,button:0,pad:0"^Controls +change^nintendo_button_layout^player_0_button_b^"engine:sdl,guid:03000000de280000ff11000001000000,port:0,button:1,pad:0"^Controls +change^nintendo_button_layout^player_0_button_x^"engine:sdl,guid:03000000de280000ff11000001000000,port:0,button:2,pad:0"^Controls +change^nintendo_button_layout^player_0_button_y^"engine:sdl,guid:03000000de280000ff11000001000000,port:0,button:3,pad:0"^Controls From b5577b1bbd8bf0e1619a4d0fc79919241320f904 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Thu, 15 Jun 2023 10:50:09 -0400 Subject: [PATCH 2/3] Fix rsync trying to keep perms from RO files --- functions/functions.sh | 2 +- functions/post_update.sh | 8 ++++---- functions/prepare_emulator.sh | 8 ++++---- tools/configurator.sh | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/functions/functions.sh b/functions/functions.sh index 2a7b1928..f137ca2d 100644 --- a/functions/functions.sh +++ b/functions/functions.sh @@ -464,7 +464,7 @@ install_retrodeck_controller_profile() { # BIGGER NOTE: As part of this process, all emulators will need to have their configs hard-reset to match the controller mappings of the profile # USAGE: install_retrodeck_controller_profile if [[ -d "$HOME/.steam/steam/tenfoot/resource/images/library/controller/binding_icons/" && -d "$HOME/.steam/steam/controller_base/templates/" ]]; then - rsync -a "/app/retrodeck/binding-icons/" "$HOME/.steam/steam/tenfoot/resource/images/library/controller/binding_icons/" + rsync -rlD "/app/retrodeck/binding-icons/" "$HOME/.steam/steam/tenfoot/resource/images/library/controller/binding_icons/" cp -f "$emuconfigs/defaults/retrodeck/RetroDECK_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/RetroDECK_controller_config.vdf" else configurator_generic_dialog "RetroDECK Controller Profile Install" "The target directories for the controller profile do not exist.\n\nThis may happen if you do not have Steam installed or the location is does not have permission to be read." diff --git a/functions/post_update.sh b/functions/post_update.sh index 4eea301b..46dc9e93 100644 --- a/functions/post_update.sh +++ b/functions/post_update.sh @@ -127,9 +127,9 @@ post_update() { dir_prep "$rdhome/gamelists" "/var/config/emulationstation/.emulationstation/gamelists" dir_prep "$borders_folder" "/var/config/retroarch/overlays/borders" - rsync -a "/app/retrodeck/emu-configs/retroarch/borders/" "/var/config/retroarch/overlays/borders" + rsync -rlD "/app/retrodeck/emu-configs/retroarch/borders/" "/var/config/retroarch/overlays/borders/" - rsync -a --mkpath "$emuconfigs/defaults/retrodeck/presets/remaps/" "/var/config/retroarch/config/remaps/" + rsync -rlD --mkpath "$emuconfigs/defaults/retrodeck/presets/remaps/" "/var/config/retroarch/config/remaps/" if [[ ! -f "$bios_folder/capsimg.so" ]]; then cp -f "/app/retrodeck/extras/Amiga/capsimg.so" "$bios_folder/capsimg.so" @@ -226,10 +226,10 @@ post_update() { # The following commands are run every time. if [[ -d "/var/data/dolphin-emu/Load/DynamicInputTextures" ]]; then # Refresh installed textures if they have been enabled - rsync -a "/app/retrodeck/extras/DynamicInputTextures/" "/var/data/dolphin-emu/Load/DynamicInputTextures/" + rsync -rlD "/app/retrodeck/extras/DynamicInputTextures/" "/var/data/dolphin-emu/Load/DynamicInputTextures/" fi if [[ -d "/var/data/primehack/Load/DynamicInputTextures" ]]; then # Refresh installed textures if they have been enabled - rsync -a "/app/retrodeck/extras/DynamicInputTextures/" "/var/data/primehack/Load/DynamicInputTextures/" + rsync -rlD "/app/retrodeck/extras/DynamicInputTextures/" "/var/data/primehack/Load/DynamicInputTextures/" fi update_splashscreens diff --git a/functions/prepare_emulator.sh b/functions/prepare_emulator.sh index f7d7dad0..1b24b608 100644 --- a/functions/prepare_emulator.sh +++ b/functions/prepare_emulator.sh @@ -72,13 +72,13 @@ prepare_emulator() { mkdir -pv /var/config/retroarch/shaders/ cp -rf /app/share/libretro/shaders /var/config/retroarch/ dir_prep "$rdhome/shaders/retroarch" "/var/config/retroarch/shaders" - rsync -a --mkpath "/app/share/libretro/cores/" "/var/config/retroarch/cores/" + rsync -rlD --mkpath "/app/share/libretro/cores/" "/var/config/retroarch/cores/" cp -fv $emuconfigs/retroarch/retroarch.cfg /var/config/retroarch/ cp -fv $emuconfigs/retroarch/retroarch-core-options.cfg /var/config/retroarch/ - rsync -a --mkpath "$emuconfigs/retroarch/core-overrides/" "/var/config/retroarch/config/" - rsync -a --mkpath "$emuconfigs/defaults/retrodeck/presets/remaps/" "/var/config/retroarch/config/remaps/" + rsync -rlD --mkpath "$emuconfigs/retroarch/core-overrides/" "/var/config/retroarch/config/" + rsync -rlD --mkpath "$emuconfigs/defaults/retrodeck/presets/remaps/" "/var/config/retroarch/config/remaps/" dir_prep "$borders_folder" "/var/config/retroarch/overlays/borders" - rsync -a --mkpath "/app/retrodeck/emu-configs/retroarch/borders/" "/var/config/retroarch/overlays/borders/" + rsync -rlD --mkpath "/app/retrodeck/emu-configs/retroarch/borders/" "/var/config/retroarch/overlays/borders/" set_setting_value "$raconf" "savefile_directory" "$saves_folder" "retroarch" set_setting_value "$raconf" "savestate_directory" "$states_folder" "retroarch" set_setting_value "$raconf" "screenshot_directory" "$screenshots_folder" "retroarch" diff --git a/tools/configurator.sh b/tools/configurator.sh index ee790af0..7285a3b7 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -344,7 +344,7 @@ configurator_dolphin_input_textures_dialog() { set_setting_value $dolphingfxconf "HiresTextures" "True" dolphin ( mkdir "/var/data/dolphin-emu/Load/DynamicInputTextures" - rsync -a "/app/retrodeck/extras/DynamicInputTextures/" "/var/data/dolphin-emu/Load/DynamicInputTextures/" + rsync -rlD "/app/retrodeck/extras/DynamicInputTextures/" "/var/data/dolphin-emu/Load/DynamicInputTextures/" ) | zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \ --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ @@ -382,7 +382,7 @@ configurator_primehack_input_textures_dialog() { set_setting_value $primehackgfxconf "HiresTextures" "True" primehack ( mkdir "/var/data/primehack/Load/DynamicInputTextures" - rsync -a "/app/retrodeck/extras/DynamicInputTextures/" "/var/data/primehack/Load/DynamicInputTextures/" + rsync -rlD "/app/retrodeck/extras/DynamicInputTextures/" "/var/data/primehack/Load/DynamicInputTextures/" ) | zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \ --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ From fe50a8afb8cc2c64d9fc881dc55d2cc9bc19a8b0 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Thu, 22 Jun 2023 09:12:43 -0400 Subject: [PATCH 3/3] 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