From 127bcdb6cde4cca85f47efdfeebb2b22868ae0ab Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 4 Sep 2024 20:58:21 +0900 Subject: [PATCH 1/6] INITOOL: added --- net.retrodeck.retrodeck.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index acda1f52..8a55dfc4 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -154,6 +154,15 @@ modules: url: https://github.com/mikefarah/yq/releases/download/v4.33.3/yq_linux_amd64 sha256: 4ee662847c588c3ef2fec8bfb304e8739e3dbaba87ccb9a608d691c88f5b64dc + - name: initool + buildsystem: simple + build-commands: + - install -Dm755 initool ${FLATPAK_DEST}/bin + source: + - type: archive + url: https://github.com/dbohdan/initool/releases/download/v0.18.0/initool-v0.18.0-fc0c3b1-linux-x86_64.zip + sha256: 0b3fc8c53a97e5362d2899f6a79a92bef9953c2c43716cfa85019211f67655bb + # GODOT Configurator - name: retrodeck-configurator buildsystem: simple From b56916c2b0bf16305b2b8f22d08871390884351c Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 4 Sep 2024 20:58:52 +0900 Subject: [PATCH 2/6] SET_SETTING_VALUE: edited to use initool --- functions/framework.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/functions/framework.sh b/functions/framework.sh index 08e736f3..de5f0fe3 100644 --- a/functions/framework.sh +++ b/functions/framework.sh @@ -12,15 +12,9 @@ set_setting_value() { case $4 in - "retrodeck" | "melonds" | "yuzu" | "citra" | "libretro_scummvm" ) - if [[ -z $current_section_name ]]; then - sed -i 's^\^'"$setting_name_to_change"'=.*^'"$setting_name_to_change"'='"$setting_value_to_change"'^' "$1" - 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" && ("$current_section_name" == "" || "$current_section_name" == "paths" || "$current_section_name" == "options") ]]; then # If a RetroDECK setting is being changed, also write it to memory for immediate use - declare -g "$setting_name_to_change=$setting_value_to_change" - fi + "retrodeck" | "melonds" | "yuzu" | "citra" | "libretro_scummvm" | "ini" ) + initool set "$1" $current_section_name $setting_name_to_change $setting_value_to_change > "$1.new" && mv -f "$1.new" "$1" + conf_read ;; "retroarch" ) From a589e20725e171fc1e3f17da37afd3b1a418a585 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 4 Sep 2024 22:21:06 +0900 Subject: [PATCH 3/6] Revert "SET_SETTING_VALUE: edited to use initool" This reverts commit b56916c2b0bf16305b2b8f22d08871390884351c. --- functions/framework.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/functions/framework.sh b/functions/framework.sh index de5f0fe3..08e736f3 100644 --- a/functions/framework.sh +++ b/functions/framework.sh @@ -12,9 +12,15 @@ set_setting_value() { case $4 in - "retrodeck" | "melonds" | "yuzu" | "citra" | "libretro_scummvm" | "ini" ) - initool set "$1" $current_section_name $setting_name_to_change $setting_value_to_change > "$1.new" && mv -f "$1.new" "$1" - conf_read + "retrodeck" | "melonds" | "yuzu" | "citra" | "libretro_scummvm" ) + if [[ -z $current_section_name ]]; then + sed -i 's^\^'"$setting_name_to_change"'=.*^'"$setting_name_to_change"'='"$setting_value_to_change"'^' "$1" + 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" && ("$current_section_name" == "" || "$current_section_name" == "paths" || "$current_section_name" == "options") ]]; then # If a RetroDECK setting is being changed, also write it to memory for immediate use + declare -g "$setting_name_to_change=$setting_value_to_change" + fi ;; "retroarch" ) From 97848cd4869d64286882fe8639e4931592e9ac4f Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 4 Sep 2024 22:21:10 +0900 Subject: [PATCH 4/6] Revert "INITOOL: added" This reverts commit 127bcdb6cde4cca85f47efdfeebb2b22868ae0ab. --- net.retrodeck.retrodeck.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 8a55dfc4..acda1f52 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -154,15 +154,6 @@ modules: url: https://github.com/mikefarah/yq/releases/download/v4.33.3/yq_linux_amd64 sha256: 4ee662847c588c3ef2fec8bfb304e8739e3dbaba87ccb9a608d691c88f5b64dc - - name: initool - buildsystem: simple - build-commands: - - install -Dm755 initool ${FLATPAK_DEST}/bin - source: - - type: archive - url: https://github.com/dbohdan/initool/releases/download/v0.18.0/initool-v0.18.0-fc0c3b1-linux-x86_64.zip - sha256: 0b3fc8c53a97e5362d2899f6a79a92bef9953c2c43716cfa85019211f67655bb - # GODOT Configurator - name: retrodeck-configurator buildsystem: simple From a1887d546d175e303bc8a2df1731ae0640ab710b Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 4 Sep 2024 22:21:59 +0900 Subject: [PATCH 5/6] POST_UPDATE: update_rd_conf to include steam_sync --- functions/post_update.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/functions/post_update.sh b/functions/post_update.sh index 8fa5338e..d7176aec 100644 --- a/functions/post_update.sh +++ b/functions/post_update.sh @@ -434,6 +434,7 @@ post_update() { set_setting_value "$raconf" "libretro_info_path" "/var/config/retroarch/cores" "retroarch" prepare_component "reset" "ruffle" + update_rd_conf # TODO: check this # rm /var/config/emulationstation/.emulationstation # remving the old symlink to .emulationstation as it might be not needed anymore From 6a8f186c59985928844df823bdab6c0700b759e4 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Thu, 5 Sep 2024 12:09:01 +0900 Subject: [PATCH 6/6] INJECT_FRAMEWORK: added force args [skip ci] --- developer_toolbox/inject_framework.sh | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/developer_toolbox/inject_framework.sh b/developer_toolbox/inject_framework.sh index fd3dedd7..ca05e638 100755 --- a/developer_toolbox/inject_framework.sh +++ b/developer_toolbox/inject_framework.sh @@ -5,12 +5,31 @@ # This script is used to inject framework and config files inside a RetroDECK cooker installation # To apply the injected config you have to reset the targeted component from the Configurator # Please know what you're doing, if you need to undo this you need to completely uninstall and reinstall RetroDECK flatpak -# Please not that this may create a dirty situation where older files are still in place as the action is add and overwrite +# Please note that this may create a dirty situation where older files are still in place as the action is add and overwrite flatpak_user_installation="$HOME/.local/share/flatpak/app/net.retrodeck.retrodeck/current/active/files" flatpak_system_installation="/var/lib/flatpak/app/net.retrodeck.retrodeck/current/active/files" +force_user=false +force_system=false -if [ -d "$flatpak_user_installation" ]; then +# Parse arguments +while [[ "$#" -gt 0 ]]; do + case $1 in + --force-user) force_user=true ;; + --force-system) force_system=true ;; + *) echo "Unknown parameter: $1"; exit 1 ;; + esac + shift +done + +# Determine installation path +if [ "$force_user" = true ]; then + echo "Forcing user mode installation." + app="$flatpak_user_installation" +elif [ "$force_system" = true ]; then + echo "Forcing system mode installation." + app="$flatpak_system_installation" +elif [ -d "$flatpak_user_installation" ]; then echo "RetroDECK is installed in user mode, proceeding." app="$flatpak_user_installation" elif [ -d "$flatpak_system_installation" ]; then @@ -21,6 +40,7 @@ else exit 1 fi +# Copying files to the installation sudo cp -vfr "res/binding_icons" "$app/retrodeck/binding_icons" sudo cp -vfr "config/"** "$app/retrodeck/config/" sudo cp -vfr "tools" "$app"