From c990519f447a26a1fb0d9f0a1504b6b81f305a55 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Fri, 8 Mar 2024 20:31:38 +0100 Subject: [PATCH] DEV_TOOLS: initialized + added inject [skip ci] --- .../build_retrodck_locally.sh | 4 +++ developer_toolbox/inject_framework.sh | 32 +++++++++++++++++++ 2 files changed, 36 insertions(+) rename build-locally.sh => developer_toolbox/build_retrodck_locally.sh (98%) create mode 100644 developer_toolbox/inject_framework.sh diff --git a/build-locally.sh b/developer_toolbox/build_retrodck_locally.sh similarity index 98% rename from build-locally.sh rename to developer_toolbox/build_retrodck_locally.sh index d9bb5cc3..ac216a65 100755 --- a/build-locally.sh +++ b/developer_toolbox/build_retrodck_locally.sh @@ -1,5 +1,7 @@ #!/bin/bash +cd .. + # TODO: FEDORA # sudo dnf install -y flatpak flatpak-builder p7zip p7zip-plugins xmlstarlet bzip2 curl @@ -22,3 +24,5 @@ rm -f net.retrodeck.retrodeck.appdata.xml rm -f net.retrodeck.retrodeck.yml cp net.retrodeck.retrodeck.appdata.xml.bak net.retrodeck.retrodeck.appdata.xml cp net.retrodeck.retrodeck.yml.bak net.retrodeck.retrodeck.yml + +cd - diff --git a/developer_toolbox/inject_framework.sh b/developer_toolbox/inject_framework.sh new file mode 100644 index 00000000..4ade9a77 --- /dev/null +++ b/developer_toolbox/inject_framework.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# 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 + +cd .. + +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" + +if [ -d "$flatpak_user_installation" ]; then + echo "RetroDECK is installed in user mode, proceeding." + app="$flatpak_user_installation" +elif [ -d "$flatpak_system_installation" ]; then + echo "RetroDECK is installed in user mode, proceeding." + app="$flatpak_system_installation" +else + echo "RetroDECK installation not found, quitting" + exit 1 +fi + +sudo cp -vfr "retrodeck.sh" "$app/bin/" +sudo cp -vfr "functions/"** "$app/libexec/" +sudo cp -vfr "tools" "$app/tools" +sudo cp -vfr "emu-configs/"** "$app/retrodeck/emu-configs/" +sudo cp -vfr "es-configs/es_find_rules.xml" "$app/share/es-de/resources/systems/linux/" +sudo cp -vfr "es-configs/es_systems.xml" "$app/share/es-de/resources/systems/linux/" +sudo cp -vfr "res/binding_icons" "$app/retrodeck/binding_icons" + +cd - \ No newline at end of file