From e460f01ad0c2d04955fa52fb50a90ab61ba57f91 Mon Sep 17 00:00:00 2001 From: Dragoon Dorise Date: Sun, 29 Dec 2024 20:43:55 +0100 Subject: [PATCH] bye dolphin & citra zenity --- functions/EmuScripts/emuDeckCitra.sh | 10 ----- functions/EmuScripts/emuDeckDolphin.sh | 53 ++++++++++---------------- 2 files changed, 21 insertions(+), 42 deletions(-) diff --git a/functions/EmuScripts/emuDeckCitra.sh b/functions/EmuScripts/emuDeckCitra.sh index 0d10d0306..e7dda34f8 100755 --- a/functions/EmuScripts/emuDeckCitra.sh +++ b/functions/EmuScripts/emuDeckCitra.sh @@ -304,11 +304,6 @@ Citra_flushSymlinks(){ find "$STEAMPATH/userdata" -name "shortcuts.vdf" -exec sed -i "s|${romsPath}/3ds|${romsPath}/n3ds|g" {} + touch "$HOME/.config/EmuDeck/.citralegacysymlinks" echo "Citra symlink cleanup completed." - zenity --info \ - --text="Citra symlinks have been cleaned. This cleanup was conducted to prevent any potential breakage with symlinks. Place all new ROMs in Emulation/roms/n3ds. Your ROMs have been moved from Emulation/roms/3ds to Emulation/roms/n3ds." \ - --title="Symlink Update" \ - --width=400 \ - --height=300 else echo "Citra symlinks already cleaned." @@ -366,11 +361,6 @@ Citra_flushSymlinks(){ find "$STEAMPATH/userdata" -name "shortcuts.vdf" -exec sed -i "s|${romsPath}/3ds|${romsPath}/n3ds|g" {} + touch "$HOME/.config/EmuDeck/.citrasymlinks" echo "Citra symlink cleanup completed." - zenity --info \ - --text="Citra symlinks have been cleaned. This cleanup was conducted to prevent any potential breakage with symlinks. Place all new ROMs in Emulation/roms/n3ds. Your ROMs have been moved from Emulation/roms/3ds to Emulation/roms/n3ds." \ - --title="Symlink Update" \ - --width=400 \ - --height=300 else echo "Citra symlinks already cleaned." diff --git a/functions/EmuScripts/emuDeckDolphin.sh b/functions/EmuScripts/emuDeckDolphin.sh index 1813ddcf1..4f2d5faaf 100644 --- a/functions/EmuScripts/emuDeckDolphin.sh +++ b/functions/EmuScripts/emuDeckDolphin.sh @@ -41,7 +41,7 @@ Dolphin_install(){ #ApplyInitialSettings Dolphin_init(){ - + setMSG "${Dolphin_emuName}: Apply initial config" echo "" configEmuFP "${Dolphin_emuName}" "${Dolphin_emuPath}" "true" @@ -243,14 +243,14 @@ Dolphin_flushSymlinks(){ rm -rf "$romsPath/gc/metadata.txt" &> /dev/null rm -rf "$romsPath/gc/systeminfo.txt" &> /dev/null - # The Pegasus install was accidentally overwriting the pre-existing n3ds symlink. - # This checks if the gc folder is empty (post-removing the contents above) and if the original gamecube folder is still a folder and not a symlink (for those who have already migrated). - # If all of this is true, the gc folder is deleted and the old symlink is temporarily recreated to proceed with the migration. + # The Pegasus install was accidentally overwriting the pre-existing n3ds symlink. + # This checks if the gc folder is empty (post-removing the contents above) and if the original gamecube folder is still a folder and not a symlink (for those who have already migrated). + # If all of this is true, the gc folder is deleted and the old symlink is temporarily recreated to proceed with the migration. if [[ ! "$( ls -A "$romsPath/gc")" ]] && [ -d "$romsPath/gamecube" ] && [ ! -L "$romsPath/gamecube" ]; then rm -rf "$romsPath/gc" - ln -sfn "$romsPath/gamecube" "$romsPath/gc" - # Temporarily restores old directory structure. - fi + ln -sfn "$romsPath/gamecube" "$romsPath/gc" + # Temporarily restores old directory structure. + fi if [[ -L "$romsPath/gc" && ! $(readlink -f "$romsPath/gc") =~ ^"$romsPath" ]] || [[ -L "$romsPath/gamecube" && ! $(readlink -f "$romsPath/gamecube") =~ ^"$romsPath" ]]; then echo "User has symlinks that don't match expected paths located under $romsPath. Aborting symlink update." @@ -278,22 +278,16 @@ Dolphin_flushSymlinks(){ rsync -avh "$EMUDECKGIT/roms/gc/." "$romsPath/gc/." --ignore-existing - if [ -d "$toolsPath/downloaded_media/gc" ] && [ ! -d "$romsPath/gc/media" ]; then + if [ -d "$toolsPath/downloaded_media/gc" ] && [ ! -d "$romsPath/gc/media" ]; then ln -s "$toolsPath/downloaded_media/gc" "$romsPath/gc/media" fi find "$STEAMPATH/userdata" -name "shortcuts.vdf" -exec sed -i "s|${romsPath}/gamecube|${romsPath}/gc|g" {} + - touch "$HOME/.config/EmuDeck/.dolphinlegacysymlinks" + touch "$HOME/.config/EmuDeck/.dolphinlegacysymlinks" echo "Dolphin symlink cleanup completed." - zenity --info \ - --text="Dolphin symlinks have been cleaned. This cleanup was conducted to prevent any potential breakage with symlinks. Place all new ROMs in Emulation/roms/gc. Your ROMs have been moved from Emulation/roms/gamecube to Emulation/roms/gc." \ - --title="Symlink Update" \ - --width=400 \ - --height=300 - - else + else echo "Dolphin symlinks already cleaned." - fi + fi if [ ! -f "$HOME/.config/EmuDeck/.dolphinsymlinks" ]; then @@ -303,14 +297,14 @@ Dolphin_flushSymlinks(){ rm -rf "$romsPath/gc/metadata.txt" &> /dev/null rm -rf "$romsPath/gc/systeminfo.txt" &> /dev/null - # The Pegasus install was accidentally overwriting the pre-existing n3ds symlink. - # This checks if the gc folder is empty (post-removing the contents above) and if the original gamecube folder is still a folder and not a symlink (for those who have already migrated). - # If all of this is true, the gc folder is deleted and the old symlink is temporarily recreated to proceed with the migration. + # The Pegasus install was accidentally overwriting the pre-existing n3ds symlink. + # This checks if the gc folder is empty (post-removing the contents above) and if the original gamecube folder is still a folder and not a symlink (for those who have already migrated). + # If all of this is true, the gc folder is deleted and the old symlink is temporarily recreated to proceed with the migration. if [[ ! "$( ls -A "$romsPath/gc")" ]] && [ -d "$romsPath/gamecube" ] && [ ! -L "$romsPath/gamecube" ]; then rm -rf "$romsPath/gc" - ln -sfn "$romsPath/gamecube" "$romsPath/gc" - # Temporarily restores old directory structure. - fi + ln -sfn "$romsPath/gamecube" "$romsPath/gc" + # Temporarily restores old directory structure. + fi if [[ -L "$romsPath/gc" && ! $(readlink -f "$romsPath/gc") =~ ^"$romsPath" ]] || [[ -L "$romsPath/gamecube" && ! $(readlink -f "$romsPath/gamecube") =~ ^"$romsPath" ]]; then echo "User has symlinks that don't match expected paths located under $romsPath. Aborting symlink update." @@ -338,21 +332,16 @@ Dolphin_flushSymlinks(){ rsync -avh "$EMUDECKGIT/roms/gc/." "$romsPath/gc/." --ignore-existing - if [ -d "$toolsPath/downloaded_media/gc" ] && [ ! -d "$romsPath/gc/media" ]; then + if [ -d "$toolsPath/downloaded_media/gc" ] && [ ! -d "$romsPath/gc/media" ]; then ln -s "$toolsPath/downloaded_media/gc" "$romsPath/gc/media" fi find "$STEAMPATH/userdata" -name "shortcuts.vdf" -exec sed -i "s|${romsPath}/gamecube|${romsPath}/gc|g" {} + - touch "$HOME/.config/EmuDeck/.dolphinsymlinks" + touch "$HOME/.config/EmuDeck/.dolphinsymlinks" echo "Dolphin symlink cleanup completed." - zenity --info \ - --text="Dolphin symlinks have been cleaned. This cleanup was conducted to prevent any potential breakage with symlinks. Place all new ROMs in Emulation/roms/gc. Your ROMs have been moved from Emulation/roms/gamecube to Emulation/roms/gc." \ - --title="Symlink Update" \ - --width=400 \ - --height=300 - else + else echo "Dolphin symlinks already cleaned." - fi + fi } \ No newline at end of file