From f9d29fc6fcf2f73ede714d907a6ca08eb5b6f72c Mon Sep 17 00:00:00 2001 From: icenine451 Date: Wed, 22 Mar 2023 14:42:06 -0400 Subject: [PATCH 1/4] Removed unneeded /var/config/retrodeck/tools dir --- functions.sh | 3 --- post_update.sh | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/functions.sh b/functions.sh index 33f6f270..04c93eb9 100644 --- a/functions.sh +++ b/functions.sh @@ -1278,15 +1278,12 @@ finit() { # Recreating the folder rm -rfv /var/config/emulationstation/ - rm -rfv /var/config/retrodeck/tools/ mkdir -pv /var/config/emulationstation/ # Initializing ES-DE # TODO: after the next update of ES-DE this will not be needed - let's test it emulationstation --home /var/config/emulationstation --create-system-dirs - mkdir -pv /var/config/retrodeck/tools/ - #zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --title "RetroDECK" --text="RetroDECK will now install the needed files.\nPlease wait up to one minute,\nanother message will notify when the process will be finished.\n\nPress OK to continue." # Initializing ROMs folder - Original in retrodeck home (or SD Card) diff --git a/post_update.sh b/post_update.sh index 2b3176cf..fb7e27e7 100644 --- a/post_update.sh +++ b/post_update.sh @@ -216,6 +216,9 @@ post_update() { sed -i 's#RETRODECKHOMEDIR#'$rdhome'#g' /var/config/citra-emu/qt-config.ini cp -fvr $emuconfigs/yuzu/* /var/config/yuzu/ sed -i 's#RETRODECKHOMEDIR#'$rdhome'#g' /var/config/yuzu/qt-config.ini + + # Remove unneeded tools folder, as location has changed to RO space + rm -rfv /var/config/retrodeck/tools/ fi # The following commands are run every time. From 2cac775b7c77b3276dfdda2da55e066617f3516d Mon Sep 17 00:00:00 2001 From: icenine451 Date: Wed, 22 Mar 2023 16:40:37 -0400 Subject: [PATCH 2/4] Fixed bug in dir_prep that made recursive symlinks --- functions.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/functions.sh b/functions.sh index 04c93eb9..1bd13cf1 100644 --- a/functions.sh +++ b/functions.sh @@ -705,6 +705,13 @@ dir_prep() { echo -e "\n[DIR PREP]\nMoving $symlink in $real" #DEBUG + # if the symlink dir is already a symlink, unlink it first, to prevent recursion + if [ -L "$symlink" ]; + then + echo "$symlink is already a symlink, unlinking to prevent recursives" #DEBUG + unlink "$symlink" + fi + # if the dest dir exists we want to backup it if [ -d "$symlink" ]; then @@ -715,6 +722,7 @@ dir_prep() { # if the real dir is already a symlink, unlink it first if [ -L "$real" ]; then + echo "$real is already a symlink, unlinking to prevent recursives" #DEBUG unlink "$real" fi From 1025f1f98ca07e89ed3ce3135824ad604e1737b1 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Wed, 22 Mar 2023 16:43:10 -0400 Subject: [PATCH 3/4] PICO-8 saves symlink was backwards --- functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.sh b/functions.sh index 1bd13cf1..a60da8bc 100644 --- a/functions.sh +++ b/functions.sh @@ -1312,7 +1312,7 @@ finit() { # PICO-8 dir_prep "$bios_folder/pico-8" "$HOME/.lexaloffle/pico-8" # Store binary and config files together. The .lexaloffle directory is a hard-coded location for the PICO-8 config file, cannot be changed dir_prep "$roms_folder/pico8" "$bios_folder/pico-8/carts" # Symlink default game location to RD roms for cleanliness (this location is overridden anyway by the --root_path launch argument anyway) - dir_prep "$bios_folder/pico-8/cdata" "$saves_folder/pico-8" # PICO-8 saves folder + dir_prep "$saves_folder/pico-8" "$bios_folder/pico-8/cdata" # PICO-8 saves folder ( ra_init From 5de3e6db6bc15930aa54d00e5b10483ff840b878 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Wed, 22 Mar 2023 16:45:43 -0400 Subject: [PATCH 4/4] Fixing backwards PICO-8 saves at update --- post_update.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/post_update.sh b/post_update.sh index fb7e27e7..8b79912c 100644 --- a/post_update.sh +++ b/post_update.sh @@ -211,6 +211,7 @@ post_update() { rm -rf "$HOME/~/" # Remove old incorrect location from 0.6.2b rm -f "$HOME/.lexaloffle/pico-8" # Remove old symlink to prevent recursion dir_prep "$bios_folder/pico-8" "$HOME/.lexaloffle/pico-8" # Store binary and config files together. The .lexaloffle directory is a hard-coded location for the PICO-8 config file, cannot be changed + dir_prep "$saves_folder/pico-8" "$bios_folder/pico-8/cdata" # PICO-8 saves folder structure was backwards, fixing for consistency. cp -fv $emuconfigs/citra/qt-config.ini /var/config/citra-emu/qt-config.ini sed -i 's#RETRODECKHOMEDIR#'$rdhome'#g' /var/config/citra-emu/qt-config.ini