Merge branch 'cooker' into feat/godot

This commit is contained in:
Rekku 2024-09-05 15:12:42 +01:00
commit 009f7449e3
2 changed files with 23 additions and 2 deletions

View file

@ -5,12 +5,31 @@
# This script is used to inject framework and config files inside a RetroDECK cooker installation # 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 # 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 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_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" 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." echo "RetroDECK is installed in user mode, proceeding."
app="$flatpak_user_installation" app="$flatpak_user_installation"
elif [ -d "$flatpak_system_installation" ]; then elif [ -d "$flatpak_system_installation" ]; then
@ -21,6 +40,7 @@ else
exit 1 exit 1
fi fi
# Copying files to the installation
sudo cp -vfr "res/binding_icons" "$app/retrodeck/binding_icons" sudo cp -vfr "res/binding_icons" "$app/retrodeck/binding_icons"
sudo cp -vfr "config/"** "$app/retrodeck/config/" sudo cp -vfr "config/"** "$app/retrodeck/config/"
sudo cp -vfr "tools" "$app" sudo cp -vfr "tools" "$app"

View file

@ -434,6 +434,7 @@ post_update() {
set_setting_value "$raconf" "libretro_info_path" "/var/config/retroarch/cores" "retroarch" set_setting_value "$raconf" "libretro_info_path" "/var/config/retroarch/cores" "retroarch"
prepare_component "reset" "ruffle" prepare_component "reset" "ruffle"
update_rd_conf
# TODO: check this # TODO: check this
# rm /var/config/emulationstation/.emulationstation # remving the old symlink to .emulationstation as it might be not needed anymore # rm /var/config/emulationstation/.emulationstation # remving the old symlink to .emulationstation as it might be not needed anymore