diff --git a/android/functions/EmuScripts/Android_Dolphin.sh b/android/functions/EmuScripts/Android_Dolphin.sh index 51ada4ec4..aeb4061b3 100644 --- a/android/functions/EmuScripts/Android_Dolphin.sh +++ b/android/functions/EmuScripts/Android_Dolphin.sh @@ -10,7 +10,7 @@ function Android_Dolphin_install(){ function Android_Dolphin_init(){ setMSG "Setting up Dolphin" - rsync -ra "$HOME/.config/EmuDeck/backend/android/configs/mmjr2-vbi/" "$Android_temp_internal/mmjr2-vbi/" + rsync -ra "$emudeckBackend/android/configs/mmjr2-vbi/" "$Android_temp_internal/mmjr2-vbi/" originFile="$Android_temp_internal/mmjr2-vbi/Config/Dolphin.ini" origin="XXXX" diff --git a/android/functions/EmuScripts/Android_Lime3DS.sh b/android/functions/EmuScripts/Android_Lime3DS.sh index 862cbc8ed..00f73dd9b 100644 --- a/android/functions/EmuScripts/Android_Lime3DS.sh +++ b/android/functions/EmuScripts/Android_Lime3DS.sh @@ -9,7 +9,7 @@ function Android_Lime3DS_install(){ function Android_Lime3DS_init(){ setMSG "Setting up Citra" - rsync -ra "$HOME/.config/EmuDeck/backend/android/configs/citra-emu/" "$Android_temp_internal/citra-emu/" + rsync -ra "$emudeckBackend/android/configs/citra-emu/" "$Android_temp_internal/citra-emu/" } function Android_Lime3DS_setup(){ diff --git a/android/functions/EmuScripts/Android_NetherSX2.sh b/android/functions/EmuScripts/Android_NetherSX2.sh index 19e96b50a..ad81a9787 100644 --- a/android/functions/EmuScripts/Android_NetherSX2.sh +++ b/android/functions/EmuScripts/Android_NetherSX2.sh @@ -9,7 +9,7 @@ function Android_NetherSX2_install(){ rm -rf "$Android_folder/$temp_emu.zip" chmod +x $Android_folder/builder/build-nethersx2.sh $Android_folder/builder/build-nethersx2.sh - Android_ADB_installAPK "$HOME/.config/EmuDeck/android/builder/PatchedAPK/15210-v1.5-4248-noads.apk" + Android_ADB_installAPK "$emudeckFolder/android/builder/PatchedAPK/15210-v1.5-4248-noads.apk" } function Android_NetherSX2_init(){ diff --git a/android/functions/EmuScripts/Android_RetroArch.sh b/android/functions/EmuScripts/Android_RetroArch.sh index 6a1698b02..c4b83dfcb 100644 --- a/android/functions/EmuScripts/Android_RetroArch.sh +++ b/android/functions/EmuScripts/Android_RetroArch.sh @@ -2127,16 +2127,16 @@ Android_RetroArch_retroAchievementsPromptLogin(){ ans=$? if [ $ans -eq 0 ]; then echo "RetroAchievment Login" - echo "$RAInput" | awk -F "," '{print $1}' > "$HOME/.config/EmuDeck/.rau" - echo "$RAInput" | awk -F "," '{print $2}' > "$HOME/.config/EmuDeck/.rap" + echo "$RAInput" | awk -F "," '{print $1}' > "$emudeckFolder/.rau" + echo "$RAInput" | awk -F "," '{print $2}' > "$emudeckFolder/.rap" else echo "Cancel RetroAchievment Login" fi } Android_RetroArch_retroAchievementsSetLogin(){ - rm -rf "$HOME/.config/EmuDeck/.rap" - rau=$(cat "$HOME/.config/EmuDeck/.rau") - rat=$(cat "$HOME/.config/EmuDeck/.rat") + rm -rf "$emudeckFolder/.rap" + rau=$(cat "$emudeckFolder/.rau") + rat=$(cat "$emudeckFolder/.rat") echo "Evaluate RetroAchievements Login." if [ ${#rat} -lt 1 ]; then echo "--No token." diff --git a/android/functions/EmuScripts/Android_Yuzu.sh b/android/functions/EmuScripts/Android_Yuzu.sh index 14a920203..88f833e48 100644 --- a/android/functions/EmuScripts/Android_Yuzu.sh +++ b/android/functions/EmuScripts/Android_Yuzu.sh @@ -10,7 +10,7 @@ function Android_Yuzu_install(){ function Android_Yuzu_init(){ setMSG "Setting up Yuzu" - rsync -ra "$HOME/.config/EmuDeck/backend/android/configs/Android/data/org.yuzu.yuzu_emu/" "$Android_temp_android_data/org.yuzu.yuzu_emu/" + rsync -ra "$emudeckBackend/android/configs/Android/data/org.yuzu.yuzu_emu/" "$Android_temp_android_data/org.yuzu.yuzu_emu/" originFile="$Android_temp_android_data/org.yuzu.yuzu_emu/files/config/config.ini" origin="XXXX" diff --git a/android/functions/ToolScripts/Android_ADB.sh b/android/functions/ToolScripts/Android_ADB.sh index 544f9f3fe..eb85b8686 100644 --- a/android/functions/ToolScripts/Android_ADB.sh +++ b/android/functions/ToolScripts/Android_ADB.sh @@ -16,15 +16,15 @@ function Android_ADB_isInstalled(){ function Android_ADB_install(){ local outFile="adb.zip" - local outDir="$HOME/.config/EmuDeck/android" + local outDir="$emudeckFolder/android" Android_download "$outFile" "$Android_ADB_url" && unzip -o "$outDir/$outFile" -d $outDir && rm -rf "$outDir/$outFile" && echo "true" && return 0 } function Android_download(){ - local outDir="$HOME/.config/EmuDeck/android/" - local outFile="$HOME/.config/EmuDeck/android/$1" + local outDir="$emudeckFolder/android/" + local outFile="$emudeckFolder/android/$1" local url=$2 mkdir -p $outDir @@ -75,7 +75,7 @@ Android_ADB_dl_installAPK(){ local temp_emu=$1 local temp_url=$2 Android_download "$temp_emu.apk" $temp_url - Android_ADB_installAPK "$HOME/.config/EmuDeck/android/$temp_emu.apk" + Android_ADB_installAPK "$emudeckFolder/android/$temp_emu.apk" } function Android_ADB_getSDCard(){ diff --git a/android/functions/ToolScripts/Android_Pegasus.sh b/android/functions/ToolScripts/Android_Pegasus.sh index 14df6bf47..9ec01da6c 100644 --- a/android/functions/ToolScripts/Android_Pegasus.sh +++ b/android/functions/ToolScripts/Android_Pegasus.sh @@ -38,7 +38,7 @@ function Android_Pegasus_init(){ Android_Pegasus_dl_theme $temp_emu $temp_url #Change paths - rsync -ra "$HOME/.config/EmuDeck/backend/android/configs/Android/data/org.pegasus_frontend.android/files/pegasus-frontend/" "$Android_Pegasus_temp/" + rsync -ra "$emudeckBackend/android/configs/Android/data/org.pegasus_frontend.android/files/pegasus-frontend/" "$Android_Pegasus_temp/" originFile="$Android_Pegasus_temp/game_dirs.txt" origin="XXXX" target="$androidStoragePath" diff --git a/android/functions/all.sh b/android/functions/all.sh index d57718c53..bbbd498be 100644 --- a/android/functions/all.sh +++ b/android/functions/all.sh @@ -1,26 +1,27 @@ #!/bin/bash -# SETTINGSFILEANDROID="$HOME/.config/EmuDeck/android_settings.sh" +# SETTINGSFILEANDROID="$emudeckFolder/android_settings.sh" # if [ -f "$SETTINGSFILEANDROID" ]; then # # shellcheck source=./settings.sh # source "$SETTINGSFILEANDROID" # else -# cp "$EMUDECKGIT/android/android_settings.sh" "$SETTINGSFILEANDROID" -# source "$HOME/.config/EmuDeck/android_settings.sh" +# cp "$emudeckBackend/android/android_settings.sh" "$SETTINGSFILEANDROID" +# source "$emudeckFolder/android_settings.sh" # fi -source "$EMUDECKGIT/android/vars.sh" +source "$emudeckBackend/vars.sh" +source "$emudeckBackend/android/vars.sh" -source "$EMUDECKGIT"/android/functions/EmuScripts/Android_Yuzu.sh -source "$EMUDECKGIT"/android/functions/EmuScripts/Android_NetherSX2.sh -source "$EMUDECKGIT"/android/functions/EmuScripts/Android_Lime3DS.sh -source "$EMUDECKGIT"/android/functions/EmuScripts/Android_Dolphin.sh -source "$EMUDECKGIT"/android/functions/EmuScripts/Android_RetroArch.sh -source "$EMUDECKGIT"/android/functions/EmuScripts/Android_PPSSPP.sh -source "$EMUDECKGIT"/android/functions/EmuScripts/Android_ScummVM.sh -source "$EMUDECKGIT"/android/functions/EmuScripts/Android_Vita3K.sh +source "$emudeckBackend"/android/functions/EmuScripts/Android_Yuzu.sh +source "$emudeckBackend"/android/functions/EmuScripts/Android_NetherSX2.sh +source "$emudeckBackend"/android/functions/EmuScripts/Android_Lime3DS.sh +source "$emudeckBackend"/android/functions/EmuScripts/Android_Dolphin.sh +source "$emudeckBackend"/android/functions/EmuScripts/Android_RetroArch.sh +source "$emudeckBackend"/android/functions/EmuScripts/Android_PPSSPP.sh +source "$emudeckBackend"/android/functions/EmuScripts/Android_ScummVM.sh +source "$emudeckBackend"/android/functions/EmuScripts/Android_Vita3K.sh -source "$EMUDECKGIT"/android/functions/ToolScripts/Android_ADB.sh -source "$EMUDECKGIT"/android/functions/ToolScripts/Android_Daijisho.sh -source "$EMUDECKGIT"/android/functions/ToolScripts/Android_Pegasus.sh +source "$emudeckBackend"/android/functions/ToolScripts/Android_ADB.sh +source "$emudeckBackend"/android/functions/ToolScripts/Android_Daijisho.sh +source "$emudeckBackend"/android/functions/ToolScripts/Android_Pegasus.sh Android_ADB_setPath \ No newline at end of file diff --git a/android/setup.sh b/android/setup.sh index 9e623b077..2337873d5 100644 --- a/android/setup.sh +++ b/android/setup.sh @@ -1,9 +1,16 @@ #!/bin/bash -#source $HOME/.config/EmuDeck/backend/functions/all.sh - +# +## +## set backend location +## +# +if [[ "$emudeckBackend" == "" ]]; then + emudeckBackend="$HOME/.config/EmuDeck/backend/" +fi +. "$emudeckBackend/vars.sh" -MSG=$HOME/.config/EmuDeck/logs/msg.log +MSG=$emudeckLogs/msg.log echo "0" > "$MSG" # @@ -13,8 +20,8 @@ echo "0" > "$MSG" # #mkdir -p "$HOME/.config/EmuDeck" -#mkdir -p "$HOME/.config/EmuDeck/logs" -PIDFILE="$HOME/.config/EmuDeck/install.pid" +#mkdir -p "$emudeckLogs" +PIDFILE="$emudeckFolder/install.pid" if [ -f "$PIDFILE" ]; then @@ -55,9 +62,9 @@ trap finish EXIT # #Creating log file -LOGFILE="$HOME/.config/EmuDeck/logs/emudeckAndroidSetup.log" +LOGFILE="$emudeckLogs/emudeckAndroidSetup.log" -mv "${LOGFILE}" "$HOME/.config/EmuDeck/logs/emudeckAndroidSetup.last.log" #backup last log +mv "${LOGFILE}" "$emudeckLogs/emudeckAndroidSetup.last.log" #backup last log if echo "${@}" > "${LOGFILE}" ; then echo "Log created" @@ -72,23 +79,16 @@ date "+%Y.%m.%d-%H:%M:%S %Z" echo 'Github API limits:' curl -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" "https://api.github.com/rate_limit" -# -## -## set backend location -## -# -if [[ "$EMUDECKGIT" == "" ]]; then - EMUDECKGIT="$HOME/.config/EmuDeck/backend" -fi + # ## ## Start of installation ## # -source "$EMUDECKGIT"/functions/helperFunctions.sh -source "$EMUDECKGIT"/functions/jsonToBashVars.sh -jsonToBashVars "$HOME/.config/EmuDeck/settings.json" -source "$EMUDECKGIT/functions/all.sh" +source "$emudeckBackend"/functions/helperFunctions.sh +source "$emudeckBackend"/functions/jsonToBashVars.sh +jsonToBashVars "$emudeckFolder/settings.json" +source "$emudeckBackend/functions/all.sh" mkdir -p $Android_temp_internal mkdir -p $Android_temp_external @@ -103,7 +103,7 @@ fi setMSG "Creating rom folders in $androidStoragePath..." mkdir -p "$Android_cond_path/Emulation/roms/" -rsync -ra --ignore-existing "$EMUDECKGIT/roms/" "$Android_cond_path/Emulation/roms/" +rsync -ra --ignore-existing "$emudeckBackend/roms/" "$Android_cond_path/Emulation/roms/" setMSG "Copying BIOS" rsync -ra --ignore-existing "$biosPath/" "$Android_cond_path/Emulation/bios/" @@ -207,8 +207,8 @@ xdg-open "$Android_folder/temp" & # # We mark the script as finished # -echo "100" > "$HOME/.config/EmuDeck/logs/msg.log" -echo "# Installation Complete" >> "$HOME/.config/EmuDeck/logs/msg.log" +echo "100" > "$emudeckLogs/msg.log" +echo "# Installation Complete" >> "$emudeckLogs/msg.log" } | tee "${LOGFILE}" 2>&1 diff --git a/android/vars.sh b/android/vars.sh index 9a7e2f1d0..b0c406a40 100644 --- a/android/vars.sh +++ b/android/vars.sh @@ -1,8 +1,8 @@ #!/bin/bash -Android_ADB_path="$HOME/.config/EmuDeck/android/platform-tools" +Android_ADB_path="$emudeckFolder/android/platform-tools" Android_ADB_url="https://dl.google.com/android/repository/platform-tools-latest-linux.zip" -Android_folder="$HOME/.config/EmuDeck/android/" -Android_temp_android_data="$HOME/.config/EmuDeck/android/temp/CopyToInternal/Android/data" -Android_temp_internal="$HOME/.config/EmuDeck/android/temp/CopyToInternal" -Android_temp_external="$HOME/.config/EmuDeck/android/temp/CopyToSDCARD" +Android_folder="$emudeckFolder/android/" +Android_temp_android_data="$emudeckFolder/android/temp/CopyToInternal/Android/data" +Android_temp_internal="$emudeckFolder/android/temp/CopyToInternal" +Android_temp_external="$emudeckFolder/android/temp/CopyToSDCARD" Android_emusPath="/storage/emulated/0" \ No newline at end of file diff --git a/api.sh b/api.sh index cc9dce8a0..5996d6cf5 100644 --- a/api.sh +++ b/api.sh @@ -1,9 +1,9 @@ #!/bin/bash -. $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" API_pull(){ local branch=$1 - cd ~/.config/EmuDeck/backend && touch $HOME/.config/EmuDeck/logs/git.log && git reset --hard && git clean -fd && git checkout $branch && git pull && appImageInit && echo "OK" || echo "KO" >&2 + cd ~/.config/EmuDeck/backend && touch $emudeckLogs/git.log && git reset --hard && git clean -fd && git checkout $branch && git pull && appImageInit && echo "OK" || echo "KO" >&2 } API_autoSave(){ @@ -57,7 +57,7 @@ API_setCloud(){ API_setToken(){ local token=$1 local user=$2 - echo $token > "$HOME/.config/EmuDeck/.rat" && echo $user > "$HOME/.config/EmuDeck/.rau" && RetroArch_retroAchievementsSetLogin && DuckStation_retroAchievementsSetLogin && PCSX2QT_retroAchievementsSetLogin && echo "OK" || echo "KO" >&2 + echo $token > "$emudeckFolder/.rat" && echo $user > "$emudeckFolder/.rau" && RetroArch_retroAchievementsSetLogin && DuckStation_retroAchievementsSetLogin && PCSX2QT_retroAchievementsSetLogin && echo "OK" || echo "KO" >&2 } API_getToken(){ diff --git a/cloudSyncHealth.sh b/cloudSyncHealth.sh index 511c48e69..9986d86b1 100644 --- a/cloudSyncHealth.sh +++ b/cloudSyncHealth.sh @@ -1,6 +1,6 @@ #!/bin/bash clear -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" NONE='\033[00m' RED='\033[01;31m' diff --git a/export.sh b/export.sh index 441ca54e4..24edfc764 100644 --- a/export.sh +++ b/export.sh @@ -71,7 +71,7 @@ mkdir -p "$destination/EmuDeck/saves" for entry in "$emulationPath/saves/"* do - rsync -ravL --ignore-existing --progress "$entry" "$destination/EmuDeck/saves/" | awk -f $HOME/.config/EmuDeck/backend/rsync.awk | zenity --progress --text="Exporting $entry to $destination/EmuDeck/saves/" --title="Exporting $entry..." --width=400 --percentage=0 --auto-close + rsync -ravL --ignore-existing --progress "$entry" "$destination/EmuDeck/saves/" | awk -f $emudeckBackend/rsync.awk | zenity --progress --text="Exporting $entry to $destination/EmuDeck/saves/" --title="Exporting $entry..." --width=400 --percentage=0 --auto-close done @@ -96,7 +96,7 @@ if [ "$size" -gt 4096 ]; then for entry in "$emulationPath/storage/"* do - rsync -ravL --ignore-existing --progress "$entry" "$destination/EmuDeck/storage/" | awk -f $HOME/.config/EmuDeck/backend/rsync.awk | zenity --progress --text="Exporting $entry to $destination/EmuDeck/storage/" --title="Exporting $entry..." --width=400 --percentage=0 --auto-close + rsync -ravL --ignore-existing --progress "$entry" "$destination/EmuDeck/storage/" | awk -f $emudeckBackend/rsync.awk | zenity --progress --text="Exporting $entry to $destination/EmuDeck/storage/" --title="Exporting $entry..." --width=400 --percentage=0 --auto-close done else @@ -122,7 +122,7 @@ if [ "$size" -gt 4096 ]; then for entry in "$emulationPath/bios/"* do - rsync -ravL --ignore-existing --progress "$entry" "$destination/EmuDeck/bios/" | awk -f $HOME/.config/EmuDeck/backend/rsync.awk | zenity --progress --text="Exporting $entry to $destination/EmuDeck/bios/" --title="Exporting $entry..." --width=400 --percentage=0 --auto-close + rsync -ravL --ignore-existing --progress "$entry" "$destination/EmuDeck/bios/" | awk -f $emudeckBackend/rsync.awk | zenity --progress --text="Exporting $entry to $destination/EmuDeck/bios/" --title="Exporting $entry..." --width=400 --percentage=0 --auto-close done else @@ -147,7 +147,7 @@ if [ "$size" -gt 4096 ]; then for entry in "$emulationPath/bios/"* do - rsync -ravL --ignore-existing --progress "$entry" "$destination/EmuDeck/bios/" | awk -f $HOME/.config/EmuDeck/backend/rsync.awk | zenity --progress --text="Exporting $entry to $destination/EmuDeck/bios/" --title="Exporting $entry..." --width=400 --percentage=0 --auto-close + rsync -ravL --ignore-existing --progress "$entry" "$destination/EmuDeck/bios/" | awk -f $emudeckBackend/rsync.awk | zenity --progress --text="Exporting $entry to $destination/EmuDeck/bios/" --title="Exporting $entry..." --width=400 --percentage=0 --auto-close done else @@ -172,7 +172,7 @@ if [ "$size" -gt 4096 ]; then for entry in "$ESDEscrapData/"* do - rsync -ravL --ignore-existing --progress "$entry" "$destination/EmuDeck/roms/" | awk -f $HOME/.config/EmuDeck/backend/rsync.awk | zenity --progress --text="Exporting $entry to $destination/EmuDeck/tools/downloaded_media/" --title="Exporting $entry..." --width=400 --percentage=0 --auto-close + rsync -ravL --ignore-existing --progress "$entry" "$destination/EmuDeck/roms/" | awk -f $emudeckBackend/rsync.awk | zenity --progress --text="Exporting $entry to $destination/EmuDeck/tools/downloaded_media/" --title="Exporting $entry..." --width=400 --percentage=0 --auto-close done else diff --git a/functions/EmuScripts/emuDeckBigPEmu.sh b/functions/EmuScripts/emuDeckBigPEmu.sh index d11bdfc26..4efe3295e 100644 --- a/functions/EmuScripts/emuDeckBigPEmu.sh +++ b/functions/EmuScripts/emuDeckBigPEmu.sh @@ -2,9 +2,9 @@ #variables BigPEmu_emuName="BigPEmu" BigPEmu_emuType="$emuDeckEmuTypeWindows" -BigPEmu_emuPath="$HOME/.config/EmuDeck/Emulators/BigPEmu/bigpemu" -BigPEmu_appData="$HOME/.config/EmuDeck/Emulators/BigPEmu/UserData" -BigPEmu_BigPEmuSettings="$HOME/.config/EmuDeck/Emulators/BigPEmu/UserData/BigPEmuConfig.bigpcfg" +BigPEmu_emuPath="$emusFolder/BigPEmu/bigpemu" +BigPEmu_appData="$emusFolder/BigPEmu/UserData" +BigPEmu_BigPEmuSettings="$emusFolder/BigPEmu/UserData/BigPEmuConfig.bigpcfg" #cleanupOlderThings BigPEmu_cleanup(){ @@ -19,27 +19,27 @@ BigPEmu_install(){ BigPEmudownloadLink=$(curl -s "https://www.richwhitehouse.com/jaguar/index.php?content=download" | grep -o 'https://www\.richwhitehouse\.com/jaguar/builds/BigPEmu_Linux64_v[0-9]*\.tar.gz' | grep -v "BigPEmu_*-DEV.tar.gz" | head -n 1) - if safeDownload "BigPEmu" "$BigPEmudownloadLink" "$HOME/.config/EmuDeck/Emulators/BigPEmu/BigPEmu.tar.gz" "$showProgress"; then + if safeDownload "BigPEmu" "$BigPEmudownloadLink" "$emusFolder/BigPEmu/BigPEmu.tar.gz" "$showProgress"; then - tar -xvzf "$HOME/.config/EmuDeck/Emulators/BigPEmu/BigPEmu.tar.gz" -C "$HOME/.config/EmuDeck/Emulators/BigPEmu" --strip-components 1 + tar -xvzf "$emusFolder/BigPEmu/BigPEmu.tar.gz" -C "$emusFolder/BigPEmu" --strip-components 1 - rm -f "$HOME/.config/EmuDeck/Emulators/BigPEmu/BigPEmu.tar.gz" + rm -f "$emusFolder/BigPEmu/BigPEmu.tar.gz" else return 1 fi - cp "$EMUDECKGIT/tools/launchers/bigpemu.sh" "$toolsPath/launchers/bigpemu.sh" + cp "$emudeckBackend/tools/launchers/bigpemu.sh" "$toolsPath/launchers/bigpemu.sh" # So users can still open BigPEmu from the ~/Applications folder. - #cp "$EMUDECKGIT/tools/launchers/bigpemu.sh" "$HOME/.config/EmuDeck/Emulators/BigPEmu/bigpemu.sh" - cp "$EMUDECKGIT/tools/launchers/bigpemu.sh" "$romsPath/emulators/bigpemu.sh" + #cp "$emudeckBackend/tools/launchers/bigpemu.sh" "$emusFolder/BigPEmu/bigpemu.sh" + cp "$emudeckBackend/tools/launchers/bigpemu.sh" "$romsPath/emulators/bigpemu.sh" chmod +x "${toolsPath}/launchers/bigpemu.sh" - #chmod +x "$HOME/.config/EmuDeck/Emulators/BigPEmu/bigpemu.sh" + #chmod +x "$emusFolder/BigPEmu/bigpemu.sh" chmod +x "$romsPath/emulators/bigpemu.sh" rm -rf "$HOME/.local/share/applications/BigPEmu (Proton).desktop" - rm -rf "$HOME/.config/EmuDeck/Emulators/BigPEmu/bigpemu.sh" + rm -rf "$emusFolder/BigPEmu/bigpemu.sh" createDesktopShortcut "$HOME/.local/share/applications/BigPEmu.desktop" \ "BigPEmu" \ @@ -50,7 +50,7 @@ BigPEmu_install(){ #ApplyInitialSettings BigPEmu_init(){ setMSG "Initializing $BigPEmu_emuName settings." - rsync -avhp "$EMUDECKGIT/configs/bigpemu/" "$BigPEmu_appData" --backup --suffix=.bak + rsync -avhp "$emudeckBackend/configs/bigpemu/" "$BigPEmu_appData" --backup --suffix=.bak BigPEmu_setEmulationFolder BigPEmu_setupSaves BigPEmu_flushEmulatorLauncher @@ -66,7 +66,7 @@ BigPEmu_init(){ #update BigPEmu_update(){ setMSG "Updating $BigPEmu_emuName settings." - rsync -avhp "$EMUDECKGIT/configs/bigpemu/" "$BigPEmu_appData" --ignore-existing + rsync -avhp "$emudeckBackend/configs/bigpemu/" "$BigPEmu_appData" --ignore-existing BigPEmu_setEmulationFolder BigPEmu_setupSaves BigPEmu_flushEmulatorLauncher @@ -203,7 +203,7 @@ BigPEmu_addSteamInputProfile(){ echo "NYI" # addSteamInputCustomIcons # setMSG "Adding $BigPEmu_emuName Steam Input Profile." - # rsync -r "$EMUDECKGIT/configs/steam-input/BigPEmu_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" + # rsync -r "$emudeckBackend/configs/steam-input/BigPEmu_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" } BigPEmu_flushEmulatorLauncher(){ diff --git a/functions/EmuScripts/emuDeckCemu.sh b/functions/EmuScripts/emuDeckCemu.sh index 99beb08b6..47dfe4236 100644 --- a/functions/EmuScripts/emuDeckCemu.sh +++ b/functions/EmuScripts/emuDeckCemu.sh @@ -8,7 +8,7 @@ Cemu_functions () { declare -A CemuNative=( [emuName]="CemuNative" [emuType]="AppImage" - [emuPath]="${HOME}/.config/EmuDeck/Emulators/Cemu.AppImage" + [emuPath]="$emusFolder/Cemu.AppImage" [configDir]="${HOME}/.config/Cemu" [configFile]="${HOME}/.config/Cemu/settings.xml" [shareDir]="${HOME}/.local/share/Cemu" @@ -271,8 +271,10 @@ Cemu_functions () { init () { setMSG "Initialising ${CemuNative[emuName]} settings." configEmuAI "cemu" "config" "${CemuNative[configDir]}" "${EMUDECKGIT}/configs/cemu/config/cemu" "true" - cp "$EMUDECKGIT/$SRM_userData_directory/parsers/optional/nintendo_wiiu-cemu-native-rpx.json" "$SRM_userData_configDir/parsers/custom/" - cp "$EMUDECKGIT/$SRM_userData_directory/parsers/optional/nintendo_wiiu-cemu-native-wud-wux-wua.json" "$SRM_userData_configDir/parsers/custom/" + mv "${CemuNative[configDir]}" "$HOME/EmuDeck/configs/cemu" + ln -sf "$HOME/EmuDeck/configs/cemu" "${CemuNative[configDir]}" + cp "$emudeckBackend/$SRM_userData_directory/parsers/optional/nintendo_wiiu-cemu-native-rpx.json" "$SRM_userData_configDir/parsers/custom/" + cp "$emudeckBackend/$SRM_userData_directory/parsers/optional/nintendo_wiiu-cemu-native-wud-wux-wua.json" "$SRM_userData_configDir/parsers/custom/" #SRM_createParsers #configEmuAI "cemu" "data" "${storagePath}/cemu" "${EMUDECKGIT}/configs/cemu/data/cemu" "true" #seems unneeded? maybe? setEmulationFolder @@ -295,8 +297,8 @@ Cemu_functions () { update () { setMSG "Updating ${CemuNative[emuName]} settings." configEmuAI "cemu" "config" "${CemuNative[configDir]}" "${EMUDECKGIT}/configs/cemu/.config/cemu" - cp "$EMUDECKGIT/$SRM_userData_directory/parsers/optional/nintendo_wiiu-cemu-native-rpx.json" "$SRM_userData_configDir/parsers/custom/" - cp "$EMUDECKGIT/$SRM_userData_directory/parsers/optional/nintendo_wiiu-cemu-native-wud-wux-wua.json" "$SRM_userData_configDir/parsers/custom/" + cp "$emudeckBackend/$SRM_userData_directory/parsers/optional/nintendo_wiiu-cemu-native-rpx.json" "$SRM_userData_configDir/parsers/custom/" + cp "$emudeckBackend/$SRM_userData_directory/parsers/optional/nintendo_wiiu-cemu-native-wud-wux-wua.json" "$SRM_userData_configDir/parsers/custom/" SRM_createParsers #configEmuAI "cemu" "data" "${storagePath}/cemu" "${EMUDECKGIT}/configs/cemu/data/cemu" #seems unneeded? maybe? #migrate @@ -335,7 +337,7 @@ Cemu_functions () { addSteamInputCustomIcons setMSG "Adding ${CemuNative[emuName]} Steam Input Profile." #rsync -r "${EMUDECKGIT}/configs/steam-input/cemu_controller_config.vdf" "${HOME}/.steam/steam/controller_base/templates/" - rsync -r --exclude='*/' "$EMUDECKGIT/configs/steam-input/" "$HOME/.steam/steam/controller_base/templates/" + rsync -r --exclude='*/' "$emudeckBackend/configs/steam-input/" "$HOME/.steam/steam/controller_base/templates/" } diff --git a/functions/EmuScripts/emuDeckCemuProton.sh b/functions/EmuScripts/emuDeckCemuProton.sh index 15adbf848..978d0efb2 100644 --- a/functions/EmuScripts/emuDeckCemuProton.sh +++ b/functions/EmuScripts/emuDeckCemuProton.sh @@ -51,7 +51,7 @@ CemuProton_install(){ # fi - cp "$EMUDECKGIT/tools/launchers/cemu.sh" "${toolsPath}/launchers/cemu.sh" + cp "$emudeckBackend/tools/launchers/cemu.sh" "${toolsPath}/launchers/cemu.sh" sed -i "s|/run/media/mmcblk0p1/Emulation/tools|${toolsPath}|g" "${toolsPath}/launchers/cemu.sh" sed -i "s|/run/media/mmcblk0p1/Emulation/roms|${romsPath}|" "${toolsPath}/launchers/cemu.sh" @@ -70,7 +70,7 @@ CemuProton_install(){ #ApplyInitialSettings CemuProton_init(){ setMSG "Initializing $CemuProton_emuName settings." - rsync -avhp "$EMUDECKGIT/configs/info.cemu.Cemu/data/cemu/" "${romsPath}/wiiu" --backup --suffix=.bak + rsync -avhp "$emudeckBackend/configs/info.cemu.Cemu/data/cemu/" "${romsPath}/wiiu" --backup --suffix=.bak if [ -e "$CemuProton_cemuSettings.bak" ]; then mv -f "$CemuProton_cemuSettings.bak" "$CemuProton_cemuSettings" #retain cemuSettings fi @@ -102,7 +102,7 @@ CemuProton_init(){ #update CemuProton_update(){ setMSG "Updating $CemuProton_emuName settings." - rsync -avhp "$EMUDECKGIT/configs/info.cemu.Cemu/data/cemu/" "${romsPath}/wiiu" --ignore-existing + rsync -avhp "$emudeckBackend/configs/info.cemu.Cemu/data/cemu/" "${romsPath}/wiiu" --ignore-existing CemuProton_setEmulationFolder CemuProton_setupSaves #CemuProton_addSteamInputProfile @@ -253,7 +253,7 @@ CemuProton_resetConfig(){ CemuProton_addSteamInputProfile(){ addSteamInputCustomIcons #setMSG "Adding $CemuProton_emuName Steam Input Profile." - #rsync -r "$EMUDECKGIT/configs/steam-input/CemuProton_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" + #rsync -r "$emudeckBackend/configs/steam-input/CemuProton_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" } CemuProton_setResolution(){ diff --git a/functions/EmuScripts/emuDeckCitra.sh b/functions/EmuScripts/emuDeckCitra.sh index e34367ba2..5b2484635 100755 --- a/functions/EmuScripts/emuDeckCitra.sh +++ b/functions/EmuScripts/emuDeckCitra.sh @@ -2,7 +2,7 @@ #variables Citra_emuName="Citra" Citra_emuType="$emuDeckEmuTypeAppImage" -Citra_emuPath="$HOME/.config/EmuDeck/Emulators/citra-qt.AppImage" +Citra_emuPath="$emusFolder/citra-qt.AppImage" Citra_releaseURL="" Citra_configFile="$HOME/.config/citra-emu/qt-config.ini" Citra_configPath="$HOME/.config/citra-emu" @@ -14,12 +14,12 @@ Citra_install(){ local showProgress="$1" if installEmuAI "$Citra_emuName" "" "https://github.com/PabloMK7/citra/releases/download/r608383e/citra-linux-appimage-20240927-608383e.tar.gz" "citra" "tar.gz" "emulator" "$showProgress"; then #citra-qt.AppImage #if installEmuAI "$Citra_emuName" "" "https://github.com/PabloMK7/citra/releases/download/r518f723/citra-linux-appimage-20240717-518f723.tar.gz" "citra" "tar.gz" "emulator" "$showProgress"; then #citra-qt.AppImage - mkdir "$HOME/.config/EmuDeck/Emulators/citra-temp" - tar -xvzf "$HOME/.config/EmuDeck/Emulators/citra.tar.gz" -C "$HOME/.config/EmuDeck/Emulators/citra-temp" --strip-components 1 - mv "$HOME/.config/EmuDeck/Emulators/citra-temp/citra-qt.AppImage" "$HOME/.config/EmuDeck/Emulators" - rm -rf "$HOME/.config/EmuDeck/Emulators/citra-temp" - rm -rf "$HOME/.config/EmuDeck/Emulators/citra.tar.gz" - chmod +x "$HOME/.config/EmuDeck/Emulators/citra-qt.AppImage" + mkdir "$emusFolder/citra-temp" + tar -xvzf "$emusFolder/citra.tar.gz" -C "$emusFolder/citra-temp" --strip-components 1 + mv "$emusFolder/citra-temp/citra-qt.AppImage" "$emusFolder" + rm -rf "$emusFolder/citra-temp" + rm -rf "$emusFolder/citra.tar.gz" + chmod +x "$emusFolder/citra-qt.AppImage" else return 1 fi @@ -28,7 +28,7 @@ Citra_install(){ #ApplyInitialSettings Citra_init(){ setMSG "Initializing $Citra_emuName settings." - configEmuAI "$Citra_emuName" "citra-emu" "$HOME/.config/citra-emu" "$EMUDECKGIT/configs/citra-emu" "true" + configEmuAI "$Citra_emuName" "citra-emu" "$HOME/.config/citra-emu" "$emudeckBackend/configs/citra-emu" "true" Citra_setEmulationFolder Citra_setupStorage Citra_setupSaves @@ -41,7 +41,7 @@ Citra_init(){ #update Citra_update(){ setMSG "Updating $Citra_emuName settings." - configEmuAI "$Citra_emuName" "citra-emu" "$HOME/.config/citra-emu" "$EMUDECKGIT/configs/citra-emu" + configEmuAI "$Citra_emuName" "citra-emu" "$HOME/.config/citra-emu" "$emudeckBackend/configs/citra-emu" Citra_setupStorage Citra_setEmulationFolder Citra_setupSaves @@ -219,8 +219,8 @@ Citra_resetConfig(){ Citra_addSteamInputProfile(){ addSteamInputCustomIcons setMSG "Adding $Citra_emuName Steam Input Profile." - #rsync -r "$EMUDECKGIT/configs/steam-input/citra_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" - rsync -r --exclude='*/' "$EMUDECKGIT/configs/steam-input/" "$HOME/.steam/steam/controller_base/templates/" + #rsync -r "$emudeckBackend/configs/steam-input/citra_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" + rsync -r --exclude='*/' "$emudeckBackend/configs/steam-input/" "$HOME/.steam/steam/controller_base/templates/" } Citra_setResolution(){ @@ -253,7 +253,7 @@ Citra_flushSymlinks(){ echo "Steam install not found" fi - if [ ! -f "$HOME/.config/EmuDeck/.citralegacysymlinks" ] && [ -f "$HOME/.config/EmuDeck/.citrasymlinks" ]; then + if [ ! -f "$emudeckFolder/.citralegacysymlinks" ] && [ -f "$emudeckFolder/.citrasymlinks" ]; then mkdir -p "$romsPath/n3ds" # Temporary deletion to check if there are any additional contents in the n3ds folder. @@ -295,14 +295,14 @@ Citra_flushSymlinks(){ fi - rsync -avh "$EMUDECKGIT/roms/n3ds/." "$romsPath/n3ds/." --ignore-existing + rsync -avh "$emudeckBackend/roms/n3ds/." "$romsPath/n3ds/." --ignore-existing if [ -d "$toolsPath/downloaded_media/n3ds" ] && [ ! -d "$romsPath/n3ds/media" ]; then ln -s "$toolsPath/downloaded_media/n3ds" "$romsPath/n3ds/media" fi find "$STEAMPATH/userdata" -name "shortcuts.vdf" -exec sed -i "s|${romsPath}/3ds|${romsPath}/n3ds|g" {} + - touch "$HOME/.config/EmuDeck/.citralegacysymlinks" + touch "$emudeckFolder/.citralegacysymlinks" echo "Citra symlink cleanup completed." else @@ -310,7 +310,7 @@ Citra_flushSymlinks(){ fi - if [ ! -f "$HOME/.config/EmuDeck/.citrasymlinks" ]; then + if [ ! -f "$emudeckFolder/.citrasymlinks" ]; then mkdir -p "$romsPath/n3ds" @@ -352,14 +352,14 @@ Citra_flushSymlinks(){ fi fi - rsync -avh "$EMUDECKGIT/roms/n3ds/." "$romsPath/n3ds/." --ignore-existing + rsync -avh "$emudeckBackend/roms/n3ds/." "$romsPath/n3ds/." --ignore-existing if [ -d "$toolsPath/downloaded_media/n3ds" ] && [ ! -d "$romsPath/n3ds/media" ]; then ln -s "$toolsPath/downloaded_media/n3ds" "$romsPath/n3ds/media" fi find "$STEAMPATH/userdata" -name "shortcuts.vdf" -exec sed -i "s|${romsPath}/3ds|${romsPath}/n3ds|g" {} + - touch "$HOME/.config/EmuDeck/.citrasymlinks" + touch "$emudeckFolder/.citrasymlinks" echo "Citra symlink cleanup completed." else diff --git a/functions/EmuScripts/emuDeckCitraLegacy.sh b/functions/EmuScripts/emuDeckCitraLegacy.sh index cb7195cee..81da3c12a 100755 --- a/functions/EmuScripts/emuDeckCitraLegacy.sh +++ b/functions/EmuScripts/emuDeckCitraLegacy.sh @@ -182,7 +182,7 @@ Citra_resetConfig(){ Citra_addSteamInputProfile(){ addSteamInputCustomIcons - rsync -r "$EMUDECKGIT/configs/steam-input/citra_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" + rsync -r "$emudeckBackend/configs/steam-input/citra_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" } Citra_setResolution(){ diff --git a/functions/EmuScripts/emuDeckDolphin.sh b/functions/EmuScripts/emuDeckDolphin.sh index 4f2d5faaf..903596611 100644 --- a/functions/EmuScripts/emuDeckDolphin.sh +++ b/functions/EmuScripts/emuDeckDolphin.sh @@ -235,7 +235,7 @@ Dolphin_flushSymlinks(){ echo "Steam install not found" fi - if [ ! -f "$HOME/.config/EmuDeck/.dolphinlegacysymlinks" ] && [ -f "$HOME/.config/EmuDeck/.dolphinsymlinks" ]; then + if [ ! -f "$emudeckFolder/.dolphinlegacysymlinks" ] && [ -f "$emudeckFolder/.dolphinsymlinks" ]; then mkdir -p "$romsPath/gc" # Temporary deletion to check if there are any additional contents in the gc folder. @@ -276,20 +276,20 @@ Dolphin_flushSymlinks(){ fi fi - rsync -avh "$EMUDECKGIT/roms/gc/." "$romsPath/gc/." --ignore-existing + rsync -avh "$emudeckBackend/roms/gc/." "$romsPath/gc/." --ignore-existing 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 "$emudeckFolder/.dolphinlegacysymlinks" echo "Dolphin symlink cleanup completed." else echo "Dolphin symlinks already cleaned." fi - if [ ! -f "$HOME/.config/EmuDeck/.dolphinsymlinks" ]; then + if [ ! -f "$emudeckFolder/.dolphinsymlinks" ]; then mkdir -p "$romsPath/gc" # Temporary deletion to check if there are any additional contents in the gc folder. @@ -330,14 +330,14 @@ Dolphin_flushSymlinks(){ fi fi - rsync -avh "$EMUDECKGIT/roms/gc/." "$romsPath/gc/." --ignore-existing + rsync -avh "$emudeckBackend/roms/gc/." "$romsPath/gc/." --ignore-existing 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 "$emudeckFolder/.dolphinsymlinks" echo "Dolphin symlink cleanup completed." else diff --git a/functions/EmuScripts/emuDeckDuckStation.sh b/functions/EmuScripts/emuDeckDuckStation.sh index ccf5f7795..dd5378d93 100644 --- a/functions/EmuScripts/emuDeckDuckStation.sh +++ b/functions/EmuScripts/emuDeckDuckStation.sh @@ -156,7 +156,7 @@ DuckStation_addSteamInputProfile(){ addSteamInputCustomIcons #echo "NYI" #setMSG "Adding $DuckStation_emuName Steam Input Profile." - #rsync -r "$EMUDECKGIT/configs/steam-input/duckstation_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" + #rsync -r "$emudeckBackend/configs/steam-input/duckstation_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" } DuckStation_retroAchievementsOn(){ @@ -176,8 +176,8 @@ DuckStation_retroAchievementsHardCoreOff(){ DuckStation_retroAchievementsSetLogin(){ - rau=$(cat "$HOME/.config/EmuDeck/.rau") - rat=$(cat "$HOME/.config/EmuDeck/.rat") + rau=$(cat "$emudeckFolder/.rau") + rat=$(cat "$emudeckFolder/.rat") echo "Evaluate RetroAchievements Login." if [ ${#rat} -lt 1 ]; then echo "--No token." diff --git a/functions/EmuScripts/emuDeckFlycast.sh b/functions/EmuScripts/emuDeckFlycast.sh index 37ed0ab8c..a5d0b3133 100644 --- a/functions/EmuScripts/emuDeckFlycast.sh +++ b/functions/EmuScripts/emuDeckFlycast.sh @@ -142,7 +142,7 @@ Flycast_resetConfig(){ Flycast_addSteamInputProfile(){ echo "NYI" # setMSG "Adding $Flycast_emuName Steam Input Profile." - # rsync -r "$EMUDECKGIT/configs/steam-input/Flycast_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" + # rsync -r "$emudeckBackend/configs/steam-input/Flycast_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" } Flycast_setResolution(){ @@ -158,5 +158,5 @@ Flycast_flushEmulatorLauncher(){ Flycast_addSteamInputProfile(){ setMSG "Adding $Flycast_emuName Steam Input Profile." - rsync -r --exclude='*/' "$EMUDECKGIT/configs/steam-input/emudeck_steam_deck_light_gun_controls.vdf" "$HOME/.steam/steam/controller_base/templates/emudeck_steam_deck_light_gun_controls.vdf" + rsync -r --exclude='*/' "$emudeckBackend/configs/steam-input/emudeck_steam_deck_light_gun_controls.vdf" "$HOME/.steam/steam/controller_base/templates/emudeck_steam_deck_light_gun_controls.vdf" } \ No newline at end of file diff --git a/functions/EmuScripts/emuDeckLime3DS.sh b/functions/EmuScripts/emuDeckLime3DS.sh index f15966a3e..183a97975 100755 --- a/functions/EmuScripts/emuDeckLime3DS.sh +++ b/functions/EmuScripts/emuDeckLime3DS.sh @@ -2,7 +2,7 @@ #variables Lime3DS_emuName="Lime3DS" Lime3DS_emuType="$emuDeckEmuTypeAppImage" -Lime3DS_emuPath="$HOME/.config/EmuDeck/Emulators/lime3ds-gui.AppImage" +Lime3DS_emuPath="$emusFolder/lime3ds-gui.AppImage" Lime3DS_releaseURL="" Lime3DS_configFile="$HOME/.config/lime3ds-emu/qt-config.ini" Lime3DS_configPath="$HOME/.config/lime3ds-emu" @@ -13,20 +13,20 @@ Lime3DS_install(){ echo "Begin $Lime3DS_emuName Install" local showProgress="$1" if installEmuAI "$Lime3DS_emuName" "" "$(getReleaseURLGH "Lime3DS/lime3ds-archive" "tar.gz" "")" "lime3ds" "tar.gz" "emulator" "$showProgress"; then #lime3ds-gui.AppImage - mkdir "$HOME/.config/EmuDeck/Emulators/lime3ds-temp" - tar -xvzf "$HOME/.config/EmuDeck/Emulators/lime3ds.tar.gz" -C "$HOME/.config/EmuDeck/Emulators/lime3ds-temp" --strip-components 1 - if [ -f "$HOME/.config/EmuDeck/Emulators/lime3ds-temp/lime3ds-gui.AppImage" ]; then - mv "$HOME/.config/EmuDeck/Emulators/lime3ds-temp/lime3ds-gui.AppImage" "$Lime3DS_emuPath" - elif [ -f "$HOME/.config/EmuDeck/Emulators/lime3ds-temp/lime3ds.AppImage" ]; then - mv "$HOME/.config/EmuDeck/Emulators/lime3ds-temp/lime3ds.AppImage" "$Lime3DS_emuPath" + mkdir "$emusFolder/lime3ds-temp" + tar -xvzf "$emusFolder/lime3ds.tar.gz" -C "$emusFolder/lime3ds-temp" --strip-components 1 + if [ -f "$emusFolder/lime3ds-temp/lime3ds-gui.AppImage" ]; then + mv "$emusFolder/lime3ds-temp/lime3ds-gui.AppImage" "$Lime3DS_emuPath" + elif [ -f "$emusFolder/lime3ds-temp/lime3ds.AppImage" ]; then + mv "$emusFolder/lime3ds-temp/lime3ds.AppImage" "$Lime3DS_emuPath" else - rm -rf "$HOME/.config/EmuDeck/Emulators/lime3ds-temp" - rm -rf "$HOME/.config/EmuDeck/Emulators/lime3ds.tar.gz" + rm -rf "$emusFolder/lime3ds-temp" + rm -rf "$emusFolder/lime3ds.tar.gz" return 1 fi - chmod +x "$HOME/.config/EmuDeck/Emulators/lime3ds-gui.AppImage" - rm -rf "$HOME/.config/EmuDeck/Emulators/lime3ds-temp" - rm -rf "$HOME/.config/EmuDeck/Emulators/lime3ds.tar.gz" + chmod +x "$emusFolder/lime3ds-gui.AppImage" + rm -rf "$emusFolder/lime3ds-temp" + rm -rf "$emusFolder/lime3ds.tar.gz" else return 1 fi @@ -35,7 +35,7 @@ Lime3DS_install(){ #ApplyInitialSettings Lime3DS_init(){ setMSG "Initializing $Lime3DS_emuName settings." - configEmuAI "$Lime3DS_emuName" "lime3ds-emu" "$Lime3DS_configPath" "$EMUDECKGIT/configs/lime3ds" "true" + configEmuAI "$Lime3DS_emuName" "lime3ds-emu" "$Lime3DS_configPath" "$emudeckBackend/configs/lime3ds" "true" Lime3DS_setEmulationFolder Lime3DS_setupStorage Lime3DS_setupSaves @@ -47,7 +47,7 @@ Lime3DS_init(){ #update Lime3DS_update(){ setMSG "Updating $Lime3DS_emuName settings." - configEmuAI "$Lime3DS_emuName" "lime3ds-emu" "$Lime3DS_configPath" "$EMUDECKGIT/configs/lime3ds" + configEmuAI "$Lime3DS_emuName" "lime3ds-emu" "$Lime3DS_configPath" "$emudeckBackend/configs/lime3ds" Lime3DS_setupStorage Lime3DS_setEmulationFolder Lime3DS_setupSaves @@ -265,8 +265,8 @@ Lime3DS_resetConfig(){ Lime3DS_addSteamInputProfile(){ addSteamInputCustomIcons setMSG "Adding $Lime3DS_emuName Steam Input Profile." - #rsync -r "$EMUDECKGIT/configs/steam-input/Lime3DS_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" - rsync -r --exclude='*/' "$EMUDECKGIT/configs/steam-input/" "$HOME/.steam/steam/controller_base/templates/" + #rsync -r "$emudeckBackend/configs/steam-input/Lime3DS_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" + rsync -r --exclude='*/' "$emudeckBackend/configs/steam-input/" "$HOME/.steam/steam/controller_base/templates/" } Lime3DS_setResolution(){ diff --git a/functions/EmuScripts/emuDeckMAME.sh b/functions/EmuScripts/emuDeckMAME.sh index 382a49034..b4423dcc8 100644 --- a/functions/EmuScripts/emuDeckMAME.sh +++ b/functions/EmuScripts/emuDeckMAME.sh @@ -190,5 +190,5 @@ MAME_flushEmulatorLauncher(){ MAME_addSteamInputProfile(){ setMSG "Adding $MAME_emuName Steam Input Profile." - rsync -r --exclude='*/' "$EMUDECKGIT/configs/steam-input/emudeck_steam_deck_light_gun_controls.vdf" "$HOME/.steam/steam/controller_base/templates/emudeck_steam_deck_light_gun_controls.vdf" + rsync -r --exclude='*/' "$emudeckBackend/configs/steam-input/emudeck_steam_deck_light_gun_controls.vdf" "$HOME/.steam/steam/controller_base/templates/emudeck_steam_deck_light_gun_controls.vdf" } \ No newline at end of file diff --git a/functions/EmuScripts/emuDeckMGBA.sh b/functions/EmuScripts/emuDeckMGBA.sh index 227ff679f..cdd53a3db 100644 --- a/functions/EmuScripts/emuDeckMGBA.sh +++ b/functions/EmuScripts/emuDeckMGBA.sh @@ -2,7 +2,7 @@ #variables mGBA_emuName="mGBA" mGBA_emuType="$emuDeckEmuTypeAppImage" -mGBA_emuPath="$HOME/.config/EmuDeck/Emulators/mGBA.AppImage" +mGBA_emuPath="$emusFolder/mGBA.AppImage" mGBA_configFile="$HOME/.config/mgba/config.ini" #cleanupOlderThings @@ -30,7 +30,7 @@ Mgba_install(){ #ApplyInitialSettings mGBA_init(){ setMSG "Initializing $mGBA_emuName settings." - configEmuAI "$mGBA_emuName" "config" "$HOME/.config/mgba" "$EMUDECKGIT/configs/mgba" "true" + configEmuAI "$mGBA_emuName" "config" "$HOME/.config/mgba" "$emudeckBackend/configs/mgba" "true" mGBA_setupStorage mGBA_setEmulationFolder mGBA_setupSaves @@ -42,7 +42,7 @@ mGBA_init(){ #update mGBA_update(){ setMSG "Updating $mGBA_emuName settings." - configEmuAI "$mGBA_emuName" "config" "$HOME/.config/mgba" "$EMUDECKGIT/configs/mgba" + configEmuAI "$mGBA_emuName" "config" "$HOME/.config/mgba" "$emudeckBackend/configs/mgba" mGBA_setupStorage mGBA_setEmulationFolder mGBA_setupSaves @@ -150,8 +150,8 @@ mGBA_finalize(){ mGBA_addSteamInputProfile(){ addSteamInputCustomIcons setMSG "Adding $mGBA_emuName Steam Input Profile." - #rsync -r "$EMUDECKGIT/configs/steam-input/mGBA_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" - rsync -r --exclude='*/' "$EMUDECKGIT/configs/steam-input/" "$HOME/.steam/steam/controller_base/templates/" + #rsync -r "$emudeckBackend/configs/steam-input/mGBA_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" + rsync -r --exclude='*/' "$emudeckBackend/configs/steam-input/" "$HOME/.steam/steam/controller_base/templates/" } mGBA_flushEmulatorLauncher(){ diff --git a/functions/EmuScripts/emuDeckMelonDS.sh b/functions/EmuScripts/emuDeckMelonDS.sh index 2533a94cf..2bfcc40d7 100644 --- a/functions/EmuScripts/emuDeckMelonDS.sh +++ b/functions/EmuScripts/emuDeckMelonDS.sh @@ -161,8 +161,8 @@ melonDS_resetConfig(){ melonDS_addSteamInputProfile(){ addSteamInputCustomIcons setMSG "Adding $melonDS_emuName Steam Input Profile." - #rsync -r "$EMUDECKGIT/configs/steam-input/melonds_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" - rsync -r --exclude='*/' "$EMUDECKGIT/configs/steam-input/" "$HOME/.steam/steam/controller_base/templates/" + #rsync -r "$emudeckBackend/configs/steam-input/melonds_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" + rsync -r --exclude='*/' "$emudeckBackend/configs/steam-input/" "$HOME/.steam/steam/controller_base/templates/" } melonDS_setResolution(){ diff --git a/functions/EmuScripts/emuDeckModel2.sh b/functions/EmuScripts/emuDeckModel2.sh index cec7d1e2e..37a9ec277 100644 --- a/functions/EmuScripts/emuDeckModel2.sh +++ b/functions/EmuScripts/emuDeckModel2.sh @@ -32,9 +32,9 @@ Model2_install(){ return 1 fi - cp "$EMUDECKGIT/tools/launchers/model-2-emulator.sh" "$toolsPath/launchers/model-2-emulator.sh" - cp "$EMUDECKGIT/tools/launchers/model-2-emulator.sh" "$romsPath/model2/model-2-emulator.sh" - cp "$EMUDECKGIT/tools/launchers/model-2-emulator.sh" "$romsPath/emulators/model-2-emulator.sh" + cp "$emudeckBackend/tools/launchers/model-2-emulator.sh" "$toolsPath/launchers/model-2-emulator.sh" + cp "$emudeckBackend/tools/launchers/model-2-emulator.sh" "$romsPath/model2/model-2-emulator.sh" + cp "$emudeckBackend/tools/launchers/model-2-emulator.sh" "$romsPath/emulators/model-2-emulator.sh" chmod +x "$toolsPath/launchers/model-2-emulator.sh" chmod +x "$romsPath/emulators/model-2-emulator.sh" @@ -51,7 +51,7 @@ Model2_install(){ #ApplyInitialSettings Model2_init(){ setMSG "Initializing $Model2_emuName settings." - rsync -avhp "$EMUDECKGIT/configs/model2/" "${romsPath}/model2" --backup --suffix=.bak + rsync -avhp "$emudeckBackend/configs/model2/" "${romsPath}/model2" --backup --suffix=.bak Model2_downloadProtonGE Model2ULWGL_install #SRM_createParsers @@ -96,7 +96,7 @@ Model2_addESConfig(){ #update Model2_update(){ setMSG "Updating $Model2_emuName settings." - rsync -avhp "$EMUDECKGIT/configs/model2/" "${romsPath}/model2" --ignore-existing + rsync -avhp "$emudeckBackend/configs/model2/" "${romsPath}/model2" --ignore-existing Model2ULWGL_install Model2_flushEmulatorLauncher Model2_addSteamInputProfile @@ -220,5 +220,5 @@ Model2_flushEmulatorLauncher(){ Model2_addSteamInputProfile(){ setMSG "Adding $Model2_emuName Steam Input Profile." - rsync -r --exclude='*/' "$EMUDECKGIT/configs/steam-input/emudeck_steam_deck_light_gun_controls.vdf" "$HOME/.steam/steam/controller_base/templates/emudeck_steam_deck_light_gun_controls.vdf" + rsync -r --exclude='*/' "$emudeckBackend/configs/steam-input/emudeck_steam_deck_light_gun_controls.vdf" "$HOME/.steam/steam/controller_base/templates/emudeck_steam_deck_light_gun_controls.vdf" } \ No newline at end of file diff --git a/functions/EmuScripts/emuDeckPCSX2QT.sh b/functions/EmuScripts/emuDeckPCSX2QT.sh index f97c636ff..7cfb77142 100644 --- a/functions/EmuScripts/emuDeckPCSX2QT.sh +++ b/functions/EmuScripts/emuDeckPCSX2QT.sh @@ -2,7 +2,7 @@ #variables PCSX2QT_emuName="PCSX2-QT" PCSX2QT_emuType="$emuDeckEmuTypeAppImage" -PCSX2QT_emuPath="$HOME/.config/EmuDeck/Emulators/pcsx2-Qt.AppImage" +PCSX2QT_emuPath="$emusFolder/pcsx2-Qt.AppImage" PCSX2QT_configFile="$HOME/.config/PCSX2/inis/PCSX2.ini" #cleanupOlderThings @@ -37,7 +37,7 @@ PCSX2QT_init() { if ! "$PCSX2QT_emuPath" -testconfig; then # try to generate the config file. if it fails, insert one as a fallback. #fallback - configEmuAI "$PCSX2QT_emuName" "config" "$HOME/.config/PCSX2" "$EMUDECKGIT/configs/pcsx2qt/.config/PCSX2" "true" + configEmuAI "$PCSX2QT_emuName" "config" "$HOME/.config/PCSX2" "$emudeckBackend/configs/pcsx2qt/.config/PCSX2" "true" fi PCSX2QT_setEmulationFolder @@ -56,7 +56,7 @@ PCSX2QT_init() { #update PCSX2QT_update() { setMSG "Updating $PCSX2QT_emuName settings." - configEmuAI "$PCSX2QT_emuName" "config" "$HOME/.config/PCSX2" "$EMUDECKGIT/configs/pcsx2qt/.config/PCSX2" + configEmuAI "$PCSX2QT_emuName" "config" "$HOME/.config/PCSX2" "$emudeckBackend/configs/pcsx2qt/.config/PCSX2" PCSX2QT_setEmulationFolder PCSX2QT_setupStorage PCSX2QT_setupSaves @@ -295,8 +295,8 @@ PCSX2QT_retroAchievementsHardCoreOff() { } PCSX2QT_retroAchievementsSetLogin() { - rau=$(cat "$HOME/.config/EmuDeck/.rau") - rat=$(cat "$HOME/.config/EmuDeck/.rat") + rau=$(cat "$emudeckFolder/.rau") + rat=$(cat "$emudeckFolder/.rat") echo "Evaluate RetroAchievements Login." if [ ${#rat} -lt 1 ]; then echo "--No token." diff --git a/functions/EmuScripts/emuDeckPPSSPP.sh b/functions/EmuScripts/emuDeckPPSSPP.sh index eb9548a7d..65e3572e0 100644 --- a/functions/EmuScripts/emuDeckPPSSPP.sh +++ b/functions/EmuScripts/emuDeckPPSSPP.sh @@ -137,8 +137,8 @@ PPSSPP_retroAchievementsHardCoreOff() { PPSSPP_retroAchievementsSetLogin() { # EmuDeck username and token files - rau=$(cat "$HOME/.config/EmuDeck/.rau") - rat=$(cat "$HOME/.config/EmuDeck/.rat") + rau=$(cat "$emudeckFolder/.rau") + rat=$(cat "$emudeckFolder/.rat") # Create PPSSPP token file PPSSPP_token="$HOME/.var/app/${PPSSPP_emuPath}/config/ppsspp/PSP/SYSTEM/ppsspp_retroachievements.dat" @@ -180,7 +180,7 @@ PPSSPP_setRetroAchievements(){ PPSSPP_addSteamInputProfile(){ addSteamInputCustomIcons #setMSG "Adding $PPSSPP_emuName Steam Input Profile." - #rsync -r "$EMUDECKGIT/configs/steam-input/ppsspp_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" + #rsync -r "$emudeckBackend/configs/steam-input/ppsspp_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" } PPSSPP_setResolution(){ diff --git a/functions/EmuScripts/emuDeckRMG.sh b/functions/EmuScripts/emuDeckRMG.sh index b5a8e0e84..c3dfd732a 100644 --- a/functions/EmuScripts/emuDeckRMG.sh +++ b/functions/EmuScripts/emuDeckRMG.sh @@ -178,7 +178,7 @@ RMG_resetConfig(){ RMG_addSteamInputProfile(){ addSteamInputCustomIcons #setMSG "Adding $RMG_emuName Steam Input Profile." - #rsync -r "$EMUDECKGIT/configs/steam-input/rmg_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" + #rsync -r "$emudeckBackend/configs/steam-input/rmg_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" } #finalExec - Extra stuff diff --git a/functions/EmuScripts/emuDeckRPCS3.sh b/functions/EmuScripts/emuDeckRPCS3.sh index 711f90346..3b79d12fa 100644 --- a/functions/EmuScripts/emuDeckRPCS3.sh +++ b/functions/EmuScripts/emuDeckRPCS3.sh @@ -2,10 +2,10 @@ #variables RPCS3_emuName="RPCS3" RPCS3_emuType="$emuDeckEmuTypeAppImage" -RPCS3_emuPath="$HOME/.config/EmuDeck/Emulators/rpcs3.AppImage" +RPCS3_emuPath="$emusFolder/rpcs3.AppImage" RPCS3_emuPathFlatpak="net.rpcs3.RPCS3" RPCS3_VFSConf="$HOME/.config/rpcs3/vfs.yml" -RPCS3_migrationFlag="$HOME/.config/EmuDeck/.${RPCS3_emuName}MigrationCompleted" +RPCS3_migrationFlag="$emudeckFolder/.${RPCS3_emuName}MigrationCompleted" RPCS3_configFile="$HOME/.config/rpcs3/config.yml" declare -A RPCS3_languages @@ -146,7 +146,7 @@ RPCS3_install(){ #ApplyInitialSettings RPCS3_init(){ RPCS3_migrate - configEmuAI "$RPCS3_emuName" "config" "$HOME/.config/rpcs3" "$EMUDECKGIT/configs/rpcs3" "true" + configEmuAI "$RPCS3_emuName" "config" "$HOME/.config/rpcs3" "$emudeckBackend/configs/rpcs3" "true" RPCS3_setupStorage RPCS3_setEmulationFolder RPCS3_setupSaves @@ -169,7 +169,7 @@ RPCS3_setLanguage(){ #update RPCS3_update(){ RPCS3_migrate - configEmuAI "$RPCS3_emuName" "config" "$HOME/.config/rpcs3" "$EMUDECKGIT/configs/rpcs3" + configEmuAI "$RPCS3_emuName" "config" "$HOME/.config/rpcs3" "$emudeckBackend/configs/rpcs3" RPCS3_setupStorage RPCS3_setEmulationFolder RPCS3_setupSaves diff --git a/functions/EmuScripts/emuDeckRetroArch.sh b/functions/EmuScripts/emuDeckRetroArch.sh index 01142bfc9..3db71f035 100644 --- a/functions/EmuScripts/emuDeckRetroArch.sh +++ b/functions/EmuScripts/emuDeckRetroArch.sh @@ -2457,16 +2457,16 @@ RetroArch_retroAchievementsPromptLogin(){ ans=$? if [ $ans -eq 0 ]; then echo "RetroAchievment Login" - echo "$RAInput" | awk -F "," '{print $1}' > "$HOME/.config/EmuDeck/.rau" - echo "$RAInput" | awk -F "," '{print $2}' > "$HOME/.config/EmuDeck/.rap" + echo "$RAInput" | awk -F "," '{print $1}' > "$emudeckFolder/.rau" + echo "$RAInput" | awk -F "," '{print $2}' > "$emudeckFolder/.rap" else echo "Cancel RetroAchievment Login" fi } RetroArch_retroAchievementsSetLogin(){ - rm -rf "$HOME/.config/EmuDeck/.rap" - rau=$(cat "$HOME/.config/EmuDeck/.rau") - rat=$(cat "$HOME/.config/EmuDeck/.rat") + rm -rf "$emudeckFolder/.rap" + rau=$(cat "$emudeckFolder/.rau") + rat=$(cat "$emudeckFolder/.rat") echo "Evaluate RetroAchievements Login." if [ ${#rat} -lt 1 ]; then echo "--No token." diff --git a/functions/EmuScripts/emuDeckRyujinx.sh b/functions/EmuScripts/emuDeckRyujinx.sh index 4d48b7034..fc2234fa6 100644 --- a/functions/EmuScripts/emuDeckRyujinx.sh +++ b/functions/EmuScripts/emuDeckRyujinx.sh @@ -3,7 +3,7 @@ #variables Ryujinx_emuName="Ryujinx" Ryujinx_emuType="$emuDeckEmuTypeBinary" -Ryujinx_emuPath="$HOME/.config/EmuDeck/Emulators/publish" +Ryujinx_emuPath="$emusFolder/publish" Ryujinx_configFile="$HOME/.config/Ryujinx/Config.json" # https://github.com/Ryujinx/Ryujinx/blob/master/Ryujinx.Ui.Common/Configuration/System/Language.cs#L3-L23 Ryujinx_controllerFile="$HOME/.config/Ryujinx/profiles/controller/Deck.json" @@ -50,18 +50,18 @@ Ryujinx_install(){ echo "Begin Ryujinx Install" local showProgress=$1 if installEmuBI "$Ryujinx_emuName" "$(getReleaseURLGH "Ryubing/Ryujinx" "-linux_x64.tar.gz")" "" "tar.gz" "$showProgress"; then - mkdir -p "$HOME/.config/EmuDeck/Emulators/publish" - tar -xvf "$HOME/.config/EmuDeck/Emulators/Ryujinx.tar.gz" -C "$HOME/.config/EmuDeck/Emulators" && rm -rf "$HOME/.config/EmuDeck/Emulators/Ryujinx.tar.gz" - chmod +x "$HOME/.config/EmuDeck/Emulators/publish/Ryujinx" + mkdir -p "$emusFolder/publish" + tar -xvf "$emusFolder/Ryujinx.tar.gz" -C "$emusFolder" && rm -rf "$emusFolder/Ryujinx.tar.gz" + chmod +x "$emusFolder/publish/Ryujinx" else return 1 fi # flatpak install flathub org.ryujinx.Ryujinx -y --user - # mkdir -p "$HOME/.config/EmuDeck/Emulators/publish" - # rsync -av "$HOME/.local/share/flatpak/app/org.ryujinx.Ryujinx/x86_64/stable/active/files/bin/" "$HOME/.config/EmuDeck/Emulators/publish/" && flatpak uninstall flathub org.ryujinx.Ryujinx -y --user + # mkdir -p "$emusFolder/publish" + # rsync -av "$HOME/.local/share/flatpak/app/org.ryujinx.Ryujinx/x86_64/stable/active/files/bin/" "$emusFolder/publish/" && flatpak uninstall flathub org.ryujinx.Ryujinx -y --user # rm -rf "$HOME/.config/Ryujinx/games" - # chmod +x "$HOME/.config/EmuDeck/Emulators/publish/Ryujinx" + # chmod +x "$emusFolder/publish/Ryujinx" } @@ -69,7 +69,7 @@ Ryujinx_install(){ Ryujinx_init(){ echo "Begin Ryujinx Init" - configEmuAI "Ryujinx" "config" "$HOME/.config/Ryujinx" "$EMUDECKGIT/configs/Ryujinx" "true" + configEmuAI "Ryujinx" "config" "$HOME/.config/Ryujinx" "$emudeckBackend/configs/Ryujinx" "true" Ryujinx_setEmulationFolder Ryujinx_setupStorage @@ -92,7 +92,7 @@ Ryujinx_init(){ Ryujinx_update(){ echo "Begin Ryujinx update" - configEmuAI "yuzu" "config" "$HOME/.config/Ryujinx" "$EMUDECKGIT/configs/Ryujinx" + configEmuAI "yuzu" "config" "$HOME/.config/Ryujinx" "$emudeckBackend/configs/Ryujinx" Ryujinx_setEmulationFolder Ryujinx_setupStorage @@ -207,7 +207,7 @@ Ryujinx_uninstall(){ Ryujinx_migrate(){ echo "Begin Ryujinx Migration" emu="Ryujinx" -# migrationFlag="$HOME/.config/EmuDeck/.${emu}MigrationCompleted" +# migrationFlag="$emudeckFolder/.${emu}MigrationCompleted" # #check if we have a nomigrateflag for $emu # if [ ! -f "$migrationFlag" ]; then # #yuzu flatpak to appimage diff --git a/functions/EmuScripts/emuDeckShadPS4.sh b/functions/EmuScripts/emuDeckShadPS4.sh index 627637698..6502ad5fa 100644 --- a/functions/EmuScripts/emuDeckShadPS4.sh +++ b/functions/EmuScripts/emuDeckShadPS4.sh @@ -6,7 +6,7 @@ ShadPS4_emuName="ShadPS4" ShadPS4_emuType="$emuDeckEmuTypeAppImage" -ShadPS4_emuPath="$HOME/.config/EmuDeck/Emulators" +ShadPS4_emuPath="$emusFolder" ShadPS4_dir="$HOME/.local/share/shadPS4" ShadPS4_configFile="$ShadPS4_dir/config.toml" @@ -20,7 +20,7 @@ ShadPS4_install(){ local showProgress=$1 if installEmuAI "$ShadPS4_emuName" "" "$(getReleaseURLGH "shadps4-emu/shadPS4" "zip" "linux-qt")" "" "zip" "emulator" "$showProgress"; then - unzip -o "$HOME/.config/EmuDeck/Emulators/ShadPS4.zip" -d "$ShadPS4_emuPath" && rm -rf "$HOME/.config/EmuDeck/Emulators/ShadPS4.zip" + unzip -o "$emusFolder/ShadPS4.zip" -d "$ShadPS4_emuPath" && rm -rf "$emusFolder/ShadPS4.zip" chmod +x "$ShadPS4_emuPath/publish/Shadps4-qt.AppImage" else return 1 @@ -29,7 +29,7 @@ ShadPS4_install(){ ShadPS4_init(){ - configEmuAI "$ShadPS4_emuName" "config" "$HOME/.local/share/shadPS4" "$EMUDECKGIT/configs/shadps4" "true" + configEmuAI "$ShadPS4_emuName" "config" "$HOME/.local/share/shadPS4" "$emudeckBackend/configs/shadps4" "true" ShadPS4_setupStorage ShadPS4_setEmulationFolder ShadPS4_setupSaves diff --git a/functions/EmuScripts/emuDeckSupermodel.sh b/functions/EmuScripts/emuDeckSupermodel.sh index 0227e0699..61fa7ee75 100644 --- a/functions/EmuScripts/emuDeckSupermodel.sh +++ b/functions/EmuScripts/emuDeckSupermodel.sh @@ -22,8 +22,8 @@ Supermodel_install(){ Supermodel_init(){ # Flatpak does not install to flatpak directory mkdir -p $HOME/.supermodel/Analysis $HOME/.supermodel/Log - rsync -avhp --mkpath "$EMUDECKGIT/configs/supermodel/Config/Supermodel.ini" "$HOME/.supermodel/Config/Supermodel.ini" --backup --suffix=.bak - rsync -avhp --mkpath "$EMUDECKGIT/configs/supermodel/." "$HOME/.supermodel/." --backup --suffix=.bak + rsync -avhp --mkpath "$emudeckBackend/configs/supermodel/Config/Supermodel.ini" "$HOME/.supermodel/Config/Supermodel.ini" --backup --suffix=.bak + rsync -avhp --mkpath "$emudeckBackend/configs/supermodel/." "$HOME/.supermodel/." --backup --suffix=.bak # Download updated gamelist from source if [ -e "$HOME/.supermodel/Config/Games.xml" ]; then rm -rf "$HOME/.supermodel/Config/Games.xml" @@ -41,7 +41,7 @@ Supermodel_init(){ Supermodel_update(){ # Flatpak does not install to flatpak directory mkdir -p $HOME/.supermodel/Analysis $HOME/.supermodel/Log - rsync -avhp --mkpath "$EMUDECKGIT/configs/supermodel" "$HOME/.supermodel/" --ignore-existing + rsync -avhp --mkpath "$emudeckBackend/configs/supermodel" "$HOME/.supermodel/" --ignore-existing # Download updated gamelist from source if [ -e "$HOME/.supermodel/Config/Games.xml" ]; then rm -rf "$HOME/.supermodel/Config/Games.xml" @@ -136,5 +136,5 @@ Supermodel_flushEmulatorLauncher(){ Supermodel_addSteamInputProfile(){ setMSG "Adding $Supermodel_emuName Steam Input Profile." - rsync -r --exclude='*/' "$EMUDECKGIT/configs/steam-input/emudeck_steam_deck_light_gun_controls.vdf" "$HOME/.steam/steam/controller_base/templates/emudeck_steam_deck_light_gun_controls.vdf" + rsync -r --exclude='*/' "$emudeckBackend/configs/steam-input/emudeck_steam_deck_light_gun_controls.vdf" "$HOME/.steam/steam/controller_base/templates/emudeck_steam_deck_light_gun_controls.vdf" } diff --git a/functions/EmuScripts/emuDeckSuyu.sh b/functions/EmuScripts/emuDeckSuyu.sh index fa0479a6d..9ded4450a 100644 --- a/functions/EmuScripts/emuDeckSuyu.sh +++ b/functions/EmuScripts/emuDeckSuyu.sh @@ -3,7 +3,7 @@ #variables suyu_emuName="suyu" suyu_emuType="$emuDeckEmuTypeAppImage" -suyu_emuPath="$HOME/.config/EmuDeck/Emulators/suyu.AppImage" +suyu_emuPath="$emusFolder/suyu.AppImage" suyu_configFile="$HOME/.config/suyu/qt-config.ini" @@ -61,15 +61,15 @@ suyu_install() { suyu_init() { echo "Begin suyu Init" - cp "$EMUDECKGIT/tools/launchers/suyu.sh" "$toolsPath/launchers/suyu.sh" + cp "$emudeckBackend/tools/launchers/suyu.sh" "$toolsPath/launchers/suyu.sh" chmod +x "$toolsPath/launchers/suyu.sh" mkdir -p "$HOME/.config/suyu" mkdir -p "$HOME/.local/share/suyu" - rsync -avhp "$EMUDECKGIT/configs/org.suyu_emu.suyu/config/suyu/." "$HOME/.config/suyu" - rsync -avhp "$EMUDECKGIT/configs/org.suyu_emu.suyu/data/suyu/." "$HOME/.local/share/suyu" + rsync -avhp "$emudeckBackend/configs/org.suyu_emu.suyu/config/suyu/." "$HOME/.config/suyu" + rsync -avhp "$emudeckBackend/configs/org.suyu_emu.suyu/data/suyu/." "$HOME/.local/share/suyu" suyu_migrate - configEmuAI "$suyu_emuName" "config" "$HOME/.config/suyu" "$EMUDECKGIT/configs/org.suyu_emu.suyu/config/suyu" "true" - configEmuAI "$suyu_emuName" "data" "$HOME/.local/share/suyu" "$EMUDECKGIT/configs/org.suyu_emu.suyu/data/suyu" "true" + configEmuAI "$suyu_emuName" "config" "$HOME/.config/suyu" "$emudeckBackend/configs/org.suyu_emu.suyu/config/suyu" "true" + configEmuAI "$suyu_emuName" "data" "$HOME/.local/share/suyu" "$emudeckBackend/configs/org.suyu_emu.suyu/data/suyu" "true" suyu_setEmulationFolder suyu_setupStorage @@ -97,8 +97,8 @@ suyu_update() { suyu_migrate - configEmuAI "$suyu_emuName" "config" "$HOME/.config/suyu" "$EMUDECKGIT/configs/org.suyu_emu.suyu/config/suyu" - configEmuAI "$suyu_emuName" "data" "$HOME/.local/share/suyu" "$EMUDECKGIT/configs/org.suyu_emu.suyu/data/suyu" + configEmuAI "$suyu_emuName" "config" "$HOME/.config/suyu" "$emudeckBackend/configs/org.suyu_emu.suyu/config/suyu" + configEmuAI "$suyu_emuName" "data" "$HOME/.local/share/suyu" "$emudeckBackend/configs/org.suyu_emu.suyu/data/suyu" suyu_setEmulationFolder suyu_setupStorage @@ -210,7 +210,7 @@ suyu_uninstall() { #Migrate suyu_migrate() { echo "Begin suyu Migration" - migrationFlag="$HOME/.config/EmuDeck/.${suyu_emuName}MigrationCompleted" + migrationFlag="$emudeckFolder/.${suyu_emuName}MigrationCompleted" #check if we have a nomigrateflag for $emu if [ ! -f "$migrationFlag" ]; then #suyu flatpak to appimage diff --git a/functions/EmuScripts/emuDeckVita3K.sh b/functions/EmuScripts/emuDeckVita3K.sh index 2ca113269..ecc023990 100644 --- a/functions/EmuScripts/emuDeckVita3K.sh +++ b/functions/EmuScripts/emuDeckVita3K.sh @@ -3,7 +3,7 @@ #variables Vita3K_emuName="Vita3K" Vita3K_emuType="$emuDeckEmuTypeBinary" -Vita3K_emuPath="$HOME/.config/EmuDeck/Emulators/Vita3K" +Vita3K_emuPath="$emusFolder/Vita3K" Vita3K_configFile="$HOME/.config/Vita3K/config.yml" #cleanupOlderThings @@ -17,7 +17,7 @@ Vita3K_install(){ local showProgress="$1" #if installEmuBI "Vita3K" "https://github.com/Vita3K/Vita3K/releases/download/continuous/ubuntu-latest.zip" "Vita3K" "zip" "$showProgress"; then if installEmuBI "$Vita3K_emuName" "$(getReleaseURLGH "Vita3K/Vita3K" "ubuntu-latest.zip")" "" "zip" "$showProgress"; then - unzip -o "$HOME/.config/EmuDeck/Emulators/Vita3K.zip" -d "$Vita3K_emuPath" && rm -rf "$HOME/.config/EmuDeck/Emulators/Vita3K.zip" + unzip -o "$emusFolder/Vita3K.zip" -d "$Vita3K_emuPath" && rm -rf "$emusFolder/Vita3K.zip" chmod +x "$Vita3K_emuPath/Vita3K" else return 1 @@ -33,7 +33,7 @@ Vita3k_install(){ Vita3K_init(){ echo "Begin Vita3K Init" - configEmuAI "Vita3K" "config" "$HOME/.config/Vita3K" "$EMUDECKGIT/configs/Vita3K" "true" + configEmuAI "Vita3K" "config" "$HOME/.config/Vita3K" "$emudeckBackend/configs/Vita3K" "true" Vita3K_setEmulationFolder Vita3K_setupStorage Vita3K_setupSaves #? @@ -46,7 +46,7 @@ Vita3K_init(){ Vita3K_update(){ echo "Begin Vita3K update" - configEmuAI "Vita3K" "config" "$HOME/.config/Vita3K" "$EMUDECKGIT/configs/Vita3K" + configEmuAI "Vita3K" "config" "$HOME/.config/Vita3K" "$emudeckBackend/configs/Vita3K" Vita3K_setEmulationFolder Vita3K_setupStorage diff --git a/functions/EmuScripts/emuDeckXenia.sh b/functions/EmuScripts/emuDeckXenia.sh index 54a2f5627..13754a546 100644 --- a/functions/EmuScripts/emuDeckXenia.sh +++ b/functions/EmuScripts/emuDeckXenia.sh @@ -41,9 +41,9 @@ Xenia_install(){ return 1 fi - cp "$EMUDECKGIT/tools/launchers/xenia.sh" "${toolsPath}/launchers/xenia.sh" - cp "$EMUDECKGIT/tools/launchers/xenia.sh" "$romsPath/emulators/xenia.sh" - cp "$EMUDECKGIT/tools/launchers/xenia.sh" "$romsPath/xbox360/xenia.sh" + cp "$emudeckBackend/tools/launchers/xenia.sh" "${toolsPath}/launchers/xenia.sh" + cp "$emudeckBackend/tools/launchers/xenia.sh" "$romsPath/emulators/xenia.sh" + cp "$emudeckBackend/tools/launchers/xenia.sh" "$romsPath/xbox360/xenia.sh" sed -i "s|/run/media/mmcblk0p1/Emulation/tools|${toolsPath}|g" "${toolsPath}/launchers/xenia.sh" sed -i "s|/run/media/mmcblk0p1/Emulation/roms|${romsPath}|" "${toolsPath}/launchers/xenia.sh" mkdir -p "$romsPath/xbox360/roms/xbla" @@ -67,7 +67,7 @@ Xenia_install(){ #ApplyInitialSettings Xenia_init(){ setMSG "Initializing Xenia Config" - rsync -avhp "$EMUDECKGIT/configs/xenia/" "$romsPath/xbox360" + rsync -avhp "$emudeckBackend/configs/xenia/" "$romsPath/xbox360" mkdir -p "$romsPath/xbox360/roms/xbla" Xenia_setupSaves #SRM_createParsers diff --git a/functions/EmuScripts/emuDeckYuzu.sh b/functions/EmuScripts/emuDeckYuzu.sh index c597c96a7..dbc767d80 100644 --- a/functions/EmuScripts/emuDeckYuzu.sh +++ b/functions/EmuScripts/emuDeckYuzu.sh @@ -3,7 +3,7 @@ #variables Yuzu_emuName="yuzu" Yuzu_emuType="$emuDeckEmuTypeAppImage" -Yuzu_emuPath="$HOME/.config/EmuDeck/Emulators/yuzu.AppImage" +Yuzu_emuPath="$emusFolder/yuzu.AppImage" Yuzu_configFile="$HOME/.config/yuzu/qt-config.ini" @@ -60,7 +60,7 @@ Yuzu_install() { echo "Begin Yuzu Install" local showProgress=$1 - local lastVerFile="$HOME/.config/EmuDeck/yuzu.ver" + local lastVerFile="$emudeckFolder/yuzu.ver" local latestVer=$(curl -fSs "https://api.github.com/repos/yuzu-emu/yuzu-mainline/releases" | jq -r '[ .[].tag_name ][0]') local success="false" if installEmuAI "$Yuzu_emuName" "$(getReleaseURLGH "yuzu-emu/yuzu-mainline" "AppImage")" "" "$showProgress" "$lastVerFile" "$latestVer"; then # yuzu.AppImage - needs to be lowercase yuzu for EsDE to find it @@ -76,15 +76,15 @@ Yuzu_install() { Yuzu_init() { echo "Begin Yuzu Init" - cp "$EMUDECKGIT/tools/launchers/yuzu.sh" "$toolsPath/launchers/yuzu.sh" + cp "$emudeckBackend/tools/launchers/yuzu.sh" "$toolsPath/launchers/yuzu.sh" chmod +x "$toolsPath/launchers/yuzu.sh" mkdir -p "$HOME/.config/yuzu" mkdir -p "$HOME/.local/share/yuzu" - rsync -avhp "$EMUDECKGIT/configs/org.yuzu_emu.yuzu/config/yuzu/." "$HOME/.config/yuzu" - rsync -avhp "$EMUDECKGIT/configs/org.yuzu_emu.yuzu/data/yuzu/." "$HOME/.local/share/yuzu" + rsync -avhp "$emudeckBackend/configs/org.yuzu_emu.yuzu/config/yuzu/." "$HOME/.config/yuzu" + rsync -avhp "$emudeckBackend/configs/org.yuzu_emu.yuzu/data/yuzu/." "$HOME/.local/share/yuzu" Yuzu_migrate - configEmuAI "$Yuzu_emuName" "config" "$HOME/.config/yuzu" "$EMUDECKGIT/configs/org.yuzu_emu.yuzu/config/yuzu" "true" - configEmuAI "$Yuzu_emuName" "data" "$HOME/.local/share/yuzu" "$EMUDECKGIT/configs/org.yuzu_emu.yuzu/data/yuzu" "true" + configEmuAI "$Yuzu_emuName" "config" "$HOME/.config/yuzu" "$emudeckBackend/configs/org.yuzu_emu.yuzu/config/yuzu" "true" + configEmuAI "$Yuzu_emuName" "data" "$HOME/.local/share/yuzu" "$emudeckBackend/configs/org.yuzu_emu.yuzu/data/yuzu" "true" Yuzu_setEmulationFolder Yuzu_setupStorage @@ -113,8 +113,8 @@ Yuzu_update() { Yuzu_migrate - configEmuAI "$Yuzu_emuName" "config" "$HOME/.config/yuzu" "$EMUDECKGIT/configs/org.yuzu_emu.yuzu/config/yuzu" - configEmuAI "$Yuzu_emuName" "data" "$HOME/.local/share/yuzu" "$EMUDECKGIT/configs/org.yuzu_emu.yuzu/data/yuzu" + configEmuAI "$Yuzu_emuName" "config" "$HOME/.config/yuzu" "$emudeckBackend/configs/org.yuzu_emu.yuzu/config/yuzu" + configEmuAI "$Yuzu_emuName" "data" "$HOME/.local/share/yuzu" "$emudeckBackend/configs/org.yuzu_emu.yuzu/data/yuzu" Yuzu_setEmulationFolder Yuzu_setupStorage @@ -226,7 +226,7 @@ Yuzu_uninstall() { #Migrate Yuzu_migrate() { echo "Begin Yuzu Migration" - migrationFlag="$HOME/.config/EmuDeck/.${Yuzu_emuName}MigrationCompleted" + migrationFlag="$emudeckFolder/.${Yuzu_emuName}MigrationCompleted" #check if we have a nomigrateflag for $emu if [ ! -f "$migrationFlag" ]; then #yuzu flatpak to appimage @@ -406,6 +406,6 @@ Yuzu_addESConfig(){ fi #Custom Systems config end - rsync -avhp --mkpath "$EMUDECKGIT/chimeraOS/configs/emulationstation/custom_systems/es_find_rules.xml" "$(dirname "$es_rulesFile")" --backup --suffix=.bak + rsync -avhp --mkpath "$emudeckBackend/chimeraOS/configs/emulationstation/custom_systems/es_find_rules.xml" "$(dirname "$es_rulesFile")" --backup --suffix=.bak } \ No newline at end of file diff --git a/functions/EmuScripts/emuDeckares.sh b/functions/EmuScripts/emuDeckares.sh index ce606d5fc..5dd042a41 100644 --- a/functions/EmuScripts/emuDeckares.sh +++ b/functions/EmuScripts/emuDeckares.sh @@ -330,7 +330,7 @@ ares_resetConfig(){ ares_addSteamInputProfile(){ addSteamInputCustomIcons #setMSG "Adding $ares_emuName Steam Input Profile." - #rsync -r "$EMUDECKGIT/configs/steam-input/ares_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" + #rsync -r "$emudeckBackend/configs/steam-input/ares_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" } #finalExec - Extra stuff diff --git a/functions/GenericApplicationsScripts/genericApplicationCider.sh b/functions/GenericApplicationsScripts/genericApplicationCider.sh index acb57a234..111746e7a 100644 --- a/functions/GenericApplicationsScripts/genericApplicationCider.sh +++ b/functions/GenericApplicationsScripts/genericApplicationCider.sh @@ -43,5 +43,5 @@ Cider_IsInstalled() { # Import steam profile Cider_addSteamInputProfile() { echo "NYI" - #rsync -r "$EMUDECKGIT/configs/steam-input/emudeck_Cider_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" + #rsync -r "$emudeckBackend/configs/steam-input/emudeck_Cider_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" } diff --git a/functions/GenericApplicationsScripts/genericApplicationHeroic.sh b/functions/GenericApplicationsScripts/genericApplicationHeroic.sh index 287135faf..9d8efdce5 100644 --- a/functions/GenericApplicationsScripts/genericApplicationHeroic.sh +++ b/functions/GenericApplicationsScripts/genericApplicationHeroic.sh @@ -3,7 +3,7 @@ # Variables Heroic_emuName="Heroic-Games-Launcher" Heroic_emuType="$emuDeckEmuTypeAppImage" -Heroic_emuPath="$HOME/.config/EmuDeck/Emulators/Heroic-Games-Launcher.AppImage" +Heroic_emuPath="$emusFolder/Heroic-Games-Launcher.AppImage" # Install Heroic_install() { diff --git a/functions/GenericApplicationsScripts/genericApplicationSpotify.sh b/functions/GenericApplicationsScripts/genericApplicationSpotify.sh index 630b6a8e1..b80585831 100644 --- a/functions/GenericApplicationsScripts/genericApplicationSpotify.sh +++ b/functions/GenericApplicationsScripts/genericApplicationSpotify.sh @@ -45,5 +45,5 @@ Spotify_IsInstalled() { # Import steam profile Spotify_addSteamInputProfile() { echo "NYI" - #rsync -r "$EMUDECKGIT/configs/steam-input/emudeck_spotify_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" + #rsync -r "$emudeckBackend/configs/steam-input/emudeck_spotify_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" } diff --git a/functions/RemotePlayClientScripts/remotePlayChiaki.sh b/functions/RemotePlayClientScripts/remotePlayChiaki.sh index 3acd93b5f..adfc6d930 100644 --- a/functions/RemotePlayClientScripts/remotePlayChiaki.sh +++ b/functions/RemotePlayClientScripts/remotePlayChiaki.sh @@ -51,5 +51,5 @@ Chiaki_IsInstalled() { # Import steam profile Chiaki_addSteamInputProfile() { echo "NYI" - #rsync -r "$EMUDECKGIT/configs/steam-input/emudeck_chiaki_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" + #rsync -r "$emudeckBackend/configs/steam-input/emudeck_chiaki_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" } diff --git a/functions/RemotePlayClientScripts/remotePlayChiaking.sh b/functions/RemotePlayClientScripts/remotePlayChiaking.sh index e919f7ef2..27ba79c1a 100644 --- a/functions/RemotePlayClientScripts/remotePlayChiaking.sh +++ b/functions/RemotePlayClientScripts/remotePlayChiaking.sh @@ -3,7 +3,7 @@ # Variables Chiaking_emuName="chiaki-ng" Chiaking_emuType="$emuDeckEmuTypeAppImage" -Chiaking_emuPath="$HOME/.config/EmuDeck/Emulators/chiaki-ng.AppImage" +Chiaking_emuPath="$emusFolder/chiaki-ng.AppImage" # Install Chiaking_install() { @@ -11,7 +11,7 @@ Chiaking_install() { local showProgress=$1 installEmuAI "$Chiaking_emuName" "$Chiaking_emuName" "$(getReleaseURLGH "streetpea/chiaki-ng" ".AppImage.zip")" "" "zip" "remoteplay" "$showProgress" - unzip -o "$HOME/.config/EmuDeck/Emulators/chiaki-ng.zip" -d "$HOME/.config/EmuDeck/Emulators" && rm -rf "$HOME/.config/EmuDeck/Emulators/chiaki-ng.zip" + unzip -o "$emusFolder/chiaki-ng.zip" -d "$emusFolder" && rm -rf "$emusFolder/chiaki-ng.zip" chmod +x $Chiaking_emuPath Chiaking_copySettings } diff --git a/functions/RemotePlayClientScripts/remotePlayGreenlight.sh b/functions/RemotePlayClientScripts/remotePlayGreenlight.sh index 9fe435d83..e0b14ee44 100644 --- a/functions/RemotePlayClientScripts/remotePlayGreenlight.sh +++ b/functions/RemotePlayClientScripts/remotePlayGreenlight.sh @@ -3,7 +3,7 @@ # Variables Greenlight_emuName="Greenlight" Greenlight_emuType="$emuDeckEmuTypeAppImage" -Greenlight_emuPath="$HOME/.config/EmuDeck/Emulators/Greenlight.AppImage" +Greenlight_emuPath="$emusFolder/Greenlight.AppImage" # Install @@ -28,7 +28,7 @@ Greenlight_update() { setMSG "Updating $Greenlight_emuName." rm -f "$Greenlight_emuPath" Greenlight_install - # configEmuAI "$Greenlight_emuName" "config" "$HOME/.config/greenlilght" "$EMUDECKGIT/configs/Greenlight/.config/greenlight" + # configEmuAI "$Greenlight_emuName" "config" "$HOME/.config/greenlilght" "$emudeckBackend/configs/Greenlight/.config/greenlight" # Greenlight_addSteamInputProfile } @@ -52,5 +52,5 @@ Greenlight_IsInstalled() { # Import steam profile Greenlight_addSteamInputProfile() { echo "NYI" - # rsync -r "$EMUDECKGIT/configs/steam-input/emudeck_Greenlight_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" + # rsync -r "$emudeckBackend/configs/steam-input/emudeck_Greenlight_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" } diff --git a/functions/RemotePlayClientScripts/remotePlayMoonlight.sh b/functions/RemotePlayClientScripts/remotePlayMoonlight.sh index cc0ac05ad..7be129971 100644 --- a/functions/RemotePlayClientScripts/remotePlayMoonlight.sh +++ b/functions/RemotePlayClientScripts/remotePlayMoonlight.sh @@ -51,5 +51,5 @@ Moonlight_IsInstalled() { # Import steam profile Moonlight_addSteamInputProfile() { echo "NYI" - #rsync -r "$EMUDECKGIT/configs/steam-input/emudeck_moonlight_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" + #rsync -r "$emudeckBackend/configs/steam-input/emudeck_moonlight_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" } diff --git a/functions/RemotePlayClientScripts/remotePlayParsec.sh b/functions/RemotePlayClientScripts/remotePlayParsec.sh index 5e0e45b84..98bdaa946 100644 --- a/functions/RemotePlayClientScripts/remotePlayParsec.sh +++ b/functions/RemotePlayClientScripts/remotePlayParsec.sh @@ -51,5 +51,5 @@ Parsec_IsInstalled() { # Import steam profile Parsec_addSteamInputProfile() { echo "NYI" - #rsync -r "$EMUDECKGIT/configs/steam-input/emudeck_parsec_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" + #rsync -r "$emudeckBackend/configs/steam-input/emudeck_parsec_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" } diff --git a/functions/RemotePlayClientScripts/remotePlayShadow.sh b/functions/RemotePlayClientScripts/remotePlayShadow.sh index 176dc673b..92d229e1c 100644 --- a/functions/RemotePlayClientScripts/remotePlayShadow.sh +++ b/functions/RemotePlayClientScripts/remotePlayShadow.sh @@ -3,7 +3,7 @@ # Variables ShadowPC_emuName="ShadowPC" ShadowPC_emuType="$emuDeckEmuTypeAppImage" -ShadowPC_emuPath="$HOME/.config/EmuDeck/Emulators/ShadowPC.AppImage" +ShadowPC_emuPath="$emusFolder/ShadowPC.AppImage" ShadowPC_releaseURL="https://update.Shadow.tech/launcher/prod/linux/ubuntu_18.04/ShadowPC.AppImage" # Install @@ -49,5 +49,5 @@ ShadowPC_IsInstalled() { # Import steam profile ShadowPC_addSteamInputProfile() { echo "NYI" - #rsync -r "$EMUDECKGIT/configs/steam-input/emudeck_ShadowPC_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" + #rsync -r "$emudeckBackend/configs/steam-input/emudeck_ShadowPC_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" } diff --git a/functions/RemotePlayClientScripts/remotePlaySteamLink.sh b/functions/RemotePlayClientScripts/remotePlaySteamLink.sh index b92aaed37..4fccc5d7b 100644 --- a/functions/RemotePlayClientScripts/remotePlaySteamLink.sh +++ b/functions/RemotePlayClientScripts/remotePlaySteamLink.sh @@ -45,5 +45,5 @@ SteamLink_IsInstalled() { # Import steam profile SteamLink_addSteamInputProfile() { echo "NYI" - #rsync -r "$EMUDECKGIT/configs/steam-input/emudeck_steamlink_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" + #rsync -r "$emudeckBackend/configs/steam-input/emudeck_steamlink_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" } diff --git a/functions/ToolScripts/emuDeckBINUP.sh b/functions/ToolScripts/emuDeckBINUP.sh index 31edd820d..80ce53940 100644 --- a/functions/ToolScripts/emuDeckBINUP.sh +++ b/functions/ToolScripts/emuDeckBINUP.sh @@ -9,7 +9,7 @@ BINUP_Shortcutlocation="$HOME/Desktop/EmuDeckBinUpdate.desktop" BINUP_install(){ - rsync -avhp --mkpath "$EMUDECKGIT/tools/binupdate" "$toolsPath/" + rsync -avhp --mkpath "$emudeckBackend/tools/binupdate" "$toolsPath/" chmod +x "$BINUP_toolPath" #update the paths in the script diff --git a/functions/ToolScripts/emuDeckCHD.sh b/functions/ToolScripts/emuDeckCHD.sh index 3e19272e8..a5ef7870b 100644 --- a/functions/ToolScripts/emuDeckCHD.sh +++ b/functions/ToolScripts/emuDeckCHD.sh @@ -7,7 +7,7 @@ CHD_Shortcutlocation="$HOME/Desktop/EmuDeckCHD.desktop" CHD_install(){ - rsync -avhp --mkpath "$EMUDECKGIT/tools/chdconv" "$toolsPath/" + rsync -avhp --mkpath "$emudeckBackend/tools/chdconv" "$toolsPath/" chmod +x "$CHD_toolPath" chmod +x "$toolsPath"/chdconv/chdman5 diff --git a/functions/ToolScripts/emuDeckCloudBackup.sh b/functions/ToolScripts/emuDeckCloudBackup.sh index 6be14f078..ce80ad180 100644 --- a/functions/ToolScripts/emuDeckCloudBackup.sh +++ b/functions/ToolScripts/emuDeckCloudBackup.sh @@ -18,7 +18,7 @@ cloud_backup_install(){ rm -rf "$rclone_path/tmp" chmod +x "$rclone_bin" fi - cp "$EMUDECKGIT/configs/rclone/rclone.conf" "$rclone_config" + cp "$emudeckBackend/configs/rclone/rclone.conf" "$rclone_config" cloud_backup_createJob } @@ -38,7 +38,7 @@ cloud_backup_install_and_config(){ rm -rf "$rclone_path/tmp" chmod +x "$rclone_bin" fi - cp "$EMUDECKGIT/configs/rclone/rclone.conf" "$rclone_config" + cp "$emudeckBackend/configs/rclone/rclone.conf" "$rclone_config" cloud_backup_providersSetup cloud_backup_stopService @@ -210,7 +210,7 @@ cloud_backup_etup(){ cloud_backup_createJob(){ echo '#!/bin/bash'>"$rclone_jobScript" -echo "source \$HOME/.config/EmuDeck/settings.sh +echo "source \$emudeckFolder/settings.sh PIDFILE=\"\$toolsPath/rclone/rclone.pid\" function finish { @@ -250,7 +250,7 @@ fi chmod +x "$rclone_jobScript" echo '#!/bin/bash'>"$rclone_restoreScript" -echo "source \$HOME/.config/EmuDeck/settings.sh +echo "source \$emudeckFolder/settings.sh PIDFILE=\"\$toolsPath/rclone/rclone.pid\" function finish { diff --git a/functions/ToolScripts/emuDeckCloudSync.sh b/functions/ToolScripts/emuDeckCloudSync.sh index 95e577ff2..b574c10a7 100644 --- a/functions/ToolScripts/emuDeckCloudSync.sh +++ b/functions/ToolScripts/emuDeckCloudSync.sh @@ -69,7 +69,7 @@ cloud_sync_config(){ kill -15 $(pidof rclone) local cloud_sync_provider=$1 local token=$2 - cp "$EMUDECKGIT/configs/rclone/rclone.conf" "$cloud_sync_config" + cp "$emudeckBackend/configs/rclone/rclone.conf" "$cloud_sync_config" cloud_sync_stopService cloud_sync_setup_providers $token setSetting cloud_sync_status "true" && echo "true" @@ -238,7 +238,7 @@ cloud_sync_setup_providers(){ token=$(echo "$token" | sed "s/'/\"/g") section=$(echo "$section" | sed 's/[][]//g; s/"//g') - cp "$EMUDECKGIT/configs/rclone/rclone.conf" "$cloud_sync_config" + cp "$emudeckBackend/configs/rclone/rclone.conf" "$cloud_sync_config" iniFieldUpdate "$cloud_sync_config" "$section" "token" "$token" @@ -311,7 +311,7 @@ cloud_sync_upload(){ if [ "$emuName" = "all" ]; then cloud_sync_save_hash $savesPath - ("$cloud_sync_bin" copy --fast-list --update --tpslimit 12 --log-file "$HOME/.config/EmuDeck/logs/rclone.log" --checkers=50 -P -L --exclude=/.fail_upload --exclude=/.fail_download --exclude=/system/prod.keys --exclude=/system/title.keys --exclude=/.pending_upload --exclude=/.last_upload --exclude=/es-de/** "$savesPath" "$cloud_sync_provider":"$cs_user"Emudeck/saves/ && ( + ("$cloud_sync_bin" copy --fast-list --update --tpslimit 12 --log-file "$emudeckLogs/rclone.log" --checkers=50 -P -L --exclude=/.fail_upload --exclude=/.fail_download --exclude=/system/prod.keys --exclude=/system/title.keys --exclude=/.pending_upload --exclude=/.last_upload --exclude=/es-de/** "$savesPath" "$cloud_sync_provider":"$cs_user"Emudeck/saves/ && ( local baseFolder="$savesPath/" for folder in $baseFolder*/ do @@ -323,7 +323,7 @@ cloud_sync_upload(){ )) else cloud_sync_save_hash "$savesPath/$emuName" - ("$cloud_sync_bin" copy --fast-list --update --tpslimit 12 --log-file "$HOME/.config/EmuDeck/logs/rclone.log" --checkers=50 -P -L --exclude=/.fail_upload --exclude=/.fail_download --exclude=/system/prod.keys --exclude=/system/title.keys --exclude=/.pending_upload --exclude=/.last_upload --exclude=/es-de/** "$savesPath/$emuName" "$cloud_sync_provider":"$cs_user"Emudeck/saves/$emuName/ && echo $timestamp > "$savesPath"/$emuName/.last_upload && rm -rf $savesPath/$emuName/.fail_upload) + ("$cloud_sync_bin" copy --fast-list --update --tpslimit 12 --log-file "$emudeckLogs/rclone.log" --checkers=50 -P -L --exclude=/.fail_upload --exclude=/.fail_download --exclude=/system/prod.keys --exclude=/system/title.keys --exclude=/.pending_upload --exclude=/.last_upload --exclude=/es-de/** "$savesPath/$emuName" "$cloud_sync_provider":"$cs_user"Emudeck/saves/$emuName/ && echo $timestamp > "$savesPath"/$emuName/.last_upload && rm -rf $savesPath/$emuName/.fail_upload) fi cloud_sync_unlock fi @@ -332,7 +332,7 @@ cloud_sync_upload(){ } cloud_sync_download(){ - local branch=$(cd "$HOME"/.config/EmuDeck/backend && git rev-parse --abbrev-ref HEAD) + local branch=$(cd "$emudeckBackend" && git rev-parse --abbrev-ref HEAD) if [[ "$branch" == *"early"* ]] || [ "$branch" == "dev" ] ; then echo "CloudSync Downloading" else @@ -357,7 +357,7 @@ cloud_sync_download(){ if [ -f "$savesPath/.hash" ] && [ "$hash" != "$hashCloud" ]; then - "$cloud_sync_bin" copy --fast-list --update --tpslimit 12 --log-file "$HOME/.config/EmuDeck/logs/rclone.log" --checkers=50 -P -L --exclude=/.fail_upload --exclude=/.fail_download --exclude=/system/prod.keys --exclude=/system/title.keys --exclude=/.pending_upload --exclude=/.last_upload --exclude=/es-de/** "$cloud_sync_provider":"$cs_user"Emudeck/saves/ "$savesPath" && ( + "$cloud_sync_bin" copy --fast-list --update --tpslimit 12 --log-file "$emudeckLogs/rclone.log" --checkers=50 -P -L --exclude=/.fail_upload --exclude=/.fail_download --exclude=/system/prod.keys --exclude=/system/title.keys --exclude=/.pending_upload --exclude=/.last_upload --exclude=/es-de/** "$cloud_sync_provider":"$cs_user"Emudeck/saves/ "$savesPath" && ( local baseFolder="$savesPath/" for folder in $baseFolder*/ do @@ -384,7 +384,7 @@ cloud_sync_download(){ hashCloud=$(cat "$savesPath/$emuName/.hash") if [ -f "$savesPath/$emuName/.hash" ] && [ "$hash" != "$hashCloud" ];then - "$cloud_sync_bin" copy --fast-list --update --tpslimit 12 --log-file "$HOME/.config/EmuDeck/logs/rclone.log" --checkers=50 -P -L --exclude=/.fail_upload --exclude=/.fail_download --exclude=/system/prod.keys --exclude=/system/title.keys --exclude=/.pending_upload --exclude=/.last_upload --exclude=/es-de/** "$cloud_sync_provider":"$cs_user"Emudeck/saves/$emuName/ "$savesPath"/$emuName/ && echo $timestamp > "$savesPath"/$emuName/.last_download && rm -rf $savesPath/$emuName/.fail_download + "$cloud_sync_bin" copy --fast-list --update --tpslimit 12 --log-file "$emudeckLogs/rclone.log" --checkers=50 -P -L --exclude=/.fail_upload --exclude=/.fail_download --exclude=/system/prod.keys --exclude=/system/title.keys --exclude=/.pending_upload --exclude=/.last_upload --exclude=/es-de/** "$cloud_sync_provider":"$cs_user"Emudeck/saves/$emuName/ "$savesPath"/$emuName/ && echo $timestamp > "$savesPath"/$emuName/.last_download && rm -rf $savesPath/$emuName/.fail_download else echo "up to date" fi @@ -637,7 +637,7 @@ cloud_sync_createService(){ startLog ${FUNCNAME[0]} echo "Creating CloudSync service" local service_name="EmuDeckCloudSync" - local script_path="$HOME/.config/EmuDeck/backend/tools/cloudSync/cloud_sync_watcher.sh" + local script_path="$emudeckBackend/tools/cloudSync/cloud_sync_watcher.sh" local user_service_dir="$HOME/.config/systemd/user/" mkdir -p $user_service_dir touch "$user_service_dir/$service_name.service" @@ -671,12 +671,12 @@ cloud_sync_stopService(){ cloud_sync_lock(){ # startLog ${FUNCNAME[0]} - touch "$HOME/.config/EmuDeck/cloud.lock" + touch "$emudeckFolder/cloud.lock" } cloud_sync_unlock(){ # startLog ${FUNCNAME[0]} - rm -rf "$HOME/.config/EmuDeck/cloud.lock" + rm -rf "$emudeckFolder/cloud.lock" } cloud_sync_check_lock(){ @@ -706,18 +706,18 @@ cloud_decky_check_status(){ # startLog ${FUNCNAME[0]} #Non cloudsync - if [ -f "$HOME/.config/EmuDeck/.scraping" ]; then + if [ -f "$emudeckFolder/.scraping" ]; then echo "scraping" else if [ $(check_internet_connection) == "true" ]; then if [ $cloud_sync_status = "true" ]; then - if [ -f "$savesPath/.gaming" ] && [ ! -f "$HOME/.config/EmuDeck/cloud.lock" ]; then + if [ -f "$savesPath/.gaming" ] && [ ! -f "$emudeckFolder/cloud.lock" ]; then echo "started" elif [ -f "$savesPath/.gaming" ]; then echo "nothing" - elif [ -f "$HOME/.config/EmuDeck/cloud.lock" ] && [ ! -f "$savesPath/.gaming" ]; then + elif [ -f "$emudeckFolder/cloud.lock" ] && [ ! -f "$savesPath/.gaming" ]; then echo "uploading" - elif [ ! -f "$HOME/.config/EmuDeck/cloud.lock" ] && [ ! -f "$savesPath/.gaming" ]; then + elif [ ! -f "$emudeckFolder/cloud.lock" ] && [ ! -f "$savesPath/.gaming" ]; then echo "nothing" else echo "nothing" diff --git a/functions/ToolScripts/emuDeckCopyGames.sh b/functions/ToolScripts/emuDeckCopyGames.sh index 66708cc4b..11ee0ad22 100644 --- a/functions/ToolScripts/emuDeckCopyGames.sh +++ b/functions/ToolScripts/emuDeckCopyGames.sh @@ -29,13 +29,13 @@ CreateStructureUSB(){ echo "Switch / Yuzu -> bios/yuzu/firmware and bios/yuzu/keys" >> "$destination/bios/readme.txt" echo "Those are the only mandatory bios, the rest are optional" >> "$destination/bios/readme.txt" - rsync -ravL --ignore-existing --exclude='*.txt' "$EMUDECKGIT/roms/" "$destination/roms/" && echo "true" || echo "false" + rsync -ravL --ignore-existing --exclude='*.txt' "$emudeckBackend/roms/" "$destination/roms/" && echo "true" || echo "false" fi } AutoCopy_install(){ - cp "$EMUDECKGIT/tools/autocopy.sh" "$toolsPath/" + cp "$emudeckBackend/tools/autocopy.sh" "$toolsPath/" chmod +x "$toolsPath/autocopy.sh" } @@ -132,7 +132,7 @@ CopyGames(){ fi rsync -rav --ignore-existing --progress --exclude=".*" "$entry/" "$romsPath/$dir/" | - awk -f $HOME/.config/EmuDeck/backend/rsync.awk | + awk -f $emudeckBackend/rsync.awk | zenity --progress --title "Importing your $dir games to $romsPath" \ --text="Scanning..." --width=400 --percentage=0 --auto-close fi @@ -140,7 +140,7 @@ CopyGames(){ done rsync -rav --ignore-existing --progress "$origin/bios/" "$biosPath/" | - awk -f $HOME/.config/EmuDeck/backend/rsync.awk | + awk -f $emudeckBackend/rsync.awk | zenity --progress --title "Importing your bios to $biosPath/" \ --text="Scanning..." --width=400 --percentage=0 --auto-close ) && diff --git a/functions/ToolScripts/emuDeckESDE.sh b/functions/ToolScripts/emuDeckESDE.sh index 09a48e33c..897ff6619 100644 --- a/functions/ToolScripts/emuDeckESDE.sh +++ b/functions/ToolScripts/emuDeckESDE.sh @@ -6,14 +6,14 @@ ESDE_downloadedToolName="EmulationStation-DE-x64_SteamDeck.AppImage" ESDE_toolType="$emuDeckEmuTypeAppImage" ESDE_oldConfigDirectory="$ESDE_newConfigDirectory" ESDE_newConfigDirectory="$HOME/ES-DE" -ESDE_toolLocation="$HOME/.config/EmuDeck/EmulationStation-DE" +ESDE_toolLocation="$esdeFolder" ESDE_toolPath="${ESDE_toolLocation}/ES-DE.AppImage" ESDE_releaseURL="https://gitlab.com/es-de/emulationstation-de/-/package_files/76389058/download" #default URl in case of issues parsing json ESDE_releaseMD5="b749b927d61317fde0250af9492a4b9f" #default hash ESDE_prereleaseURL="" ESDE_prereleaseMD5="" ESDE_releaseJSON="https://gitlab.com/es-de/emulationstation-de/-/raw/master/latest_release.json" -ESDE_addSteamInputFile="$EMUDECKGIT/configs/steam-input/emulationstation-de_controller_config.vdf" +ESDE_addSteamInputFile="$emudeckBackend/configs/steam-input/emulationstation-de_controller_config.vdf" steam_input_templateFolder="$HOME/.steam/steam/controller_base/templates/" es_systemsFile="$ESDE_newConfigDirectory/custom_systems/es_systems.xml" es_settingsFile="$ESDE_newConfigDirectory/settings/es_settings.xml" @@ -60,7 +60,7 @@ ESDE_customDesktopShortcut(){ mkdir -p "$toolsPath/launchers/es-de" mkdir -p "$toolsPath/launchers/esde" - cp "$EMUDECKGIT/tools/launchers/es-de/es-de.sh" "$toolsPath/launchers/es-de/es-de.sh" + cp "$emudeckBackend/tools/launchers/es-de/es-de.sh" "$toolsPath/launchers/es-de/es-de.sh" rm -rf $HOME/.local/share/applications/$ESDE_oldtoolName.desktop createDesktopShortcut "$HOME/.local/share/applications/$ESDE_toolName.desktop" \ "$ESDE_toolName AppImage" \ @@ -113,10 +113,10 @@ ESDE_init(){ mkdir -p "$ESDE_newConfigDirectory/settings" mkdir -p "$ESDE_newConfigDirectory/custom_systems/" - rsync -avhp --mkpath "$EMUDECKGIT/configs/emulationstation/es_settings.xml" "$(dirname "$es_settingsFile")" --backup --suffix=.bak - rsync -avhp --mkpath "$EMUDECKGIT/chimeraOS/configs/emulationstation/custom_systems/es_find_rules.xml" "$(dirname "$es_rulesFile")" --backup --suffix=.bak + rsync -avhp --mkpath "$emudeckBackend/configs/emulationstation/es_settings.xml" "$(dirname "$es_settingsFile")" --backup --suffix=.bak + rsync -avhp --mkpath "$emudeckBackend/chimeraOS/configs/emulationstation/custom_systems/es_find_rules.xml" "$(dirname "$es_rulesFile")" --backup --suffix=.bak # This duplicates ESDE_addCustomSystemsFile but this line only applies only if you are resetting ES-DE and not the emulators themselves. - rsync -avhp --mkpath "$EMUDECKGIT/configs/emulationstation/custom_systems/es_systems.xml" "$(dirname "$es_systemsFile")" --backup --suffix=.bak + rsync -avhp --mkpath "$emudeckBackend/configs/emulationstation/custom_systems/es_systems.xml" "$(dirname "$es_systemsFile")" --backup --suffix=.bak ESDE_createLauncher ESDE_addCustomSystems @@ -137,7 +137,7 @@ ESDE_init(){ } ESDE_createLauncher(){ - cp -r "$EMUDECKGIT/tools/launchers/es-de/." "$toolsPath/launchers/es-de/" && chmod +x "$toolsPath/launchers/es-de/es-de.sh" + cp -r "$emudeckBackend/tools/launchers/es-de/." "$toolsPath/launchers/es-de/" && chmod +x "$toolsPath/launchers/es-de/es-de.sh" } ESDE_resetConfig(){ @@ -161,9 +161,9 @@ ESDE_update(){ mkdir -p "$ESDE_newConfigDirectory/settings" #update es_settings.xml - rsync -avhp --mkpath "$EMUDECKGIT/configs/emulationstation/es_settings.xml" "$(dirname "$es_settingsFile")" --ignore-existing - rsync -avhp --mkpath "$EMUDECKGIT/chimeraOS/configs/emulationstation/custom_systems/es_find_rules.xml" "$(dirname "$es_rulesFile")" --ignore-existing - rsync -avhp --mkpath "$EMUDECKGIT/configs/emulationstation/custom_systems/es_systems.xml" "$(dirname "$es_systemsFile")" --ignore-existing + rsync -avhp --mkpath "$emudeckBackend/configs/emulationstation/es_settings.xml" "$(dirname "$es_settingsFile")" --ignore-existing + rsync -avhp --mkpath "$emudeckBackend/chimeraOS/configs/emulationstation/custom_systems/es_find_rules.xml" "$(dirname "$es_rulesFile")" --ignore-existing + rsync -avhp --mkpath "$emudeckBackend/configs/emulationstation/custom_systems/es_systems.xml" "$(dirname "$es_systemsFile")" --ignore-existing ESDE_addCustomSystems fi @@ -205,7 +205,7 @@ ESDE_addCustomSystemsFile(){ # Separate function so it can be copied and used in the emulator scripts. mkdir -p "$ESDE_newConfigDirectory/custom_systems/" - rsync -avhp --mkpath "$EMUDECKGIT/configs/emulationstation/custom_systems/es_systems.xml" "$(dirname "$es_systemsFile")" --ignore-existing + rsync -avhp --mkpath "$emudeckBackend/configs/emulationstation/custom_systems/es_systems.xml" "$(dirname "$es_systemsFile")" --ignore-existing } @@ -440,7 +440,7 @@ ESDE_setEmu(){ local system=$2 local gamelistFile="$ESDE_newConfigDirectory/gamelists/$system/gamelist.xml" if [ ! -f "$gamelistFile" ]; then - mkdir -p "$ESDE_newConfigDirectory/gamelists/$system" && cp "$EMUDECKGIT/configs/emulationstation/gamelists/$system/gamelist.xml" "$gamelistFile" + mkdir -p "$ESDE_newConfigDirectory/gamelists/$system" && cp "$emudeckBackend/configs/emulationstation/gamelists/$system/gamelist.xml" "$gamelistFile" else gamelistFound=$(grep -rnw "$gamelistFile" -e 'gameList') if [[ $gamelistFound == '' ]]; then @@ -484,6 +484,6 @@ ESDE_migrateEpicNoir(){ ESDE_flushToolLauncher(){ mkdir -p "$toolsPath/launchers/es-de" - cp "$EMUDECKGIT/tools/launchers/es-de/es-de.sh" "$toolsPath/launchers/es-de/es-de.sh" + cp "$emudeckBackend/tools/launchers/es-de/es-de.sh" "$toolsPath/launchers/es-de/es-de.sh" chmod +x "$toolsPath/launchers/es-de/es-de.sh" } \ No newline at end of file diff --git a/functions/ToolScripts/emuDeckFlatpakUP.sh b/functions/ToolScripts/emuDeckFlatpakUP.sh index 52c876e88..8cbe82e21 100644 --- a/functions/ToolScripts/emuDeckFlatpakUP.sh +++ b/functions/ToolScripts/emuDeckFlatpakUP.sh @@ -8,7 +8,7 @@ FlatpakUP_toolPath="${toolsPath}/flatpakupdate/flatpakupdate.sh" FlatpakUp_install(){ - rsync -avhp --mkpath "$EMUDECKGIT/tools/flatpakupdate" "$toolsPath/" + rsync -avhp --mkpath "$emudeckBackend/tools/flatpakupdate" "$toolsPath/" chmod +x "$FlatpakUP_toolPath" #update the paths in the script diff --git a/functions/ToolScripts/emuDeckMigration.sh b/functions/ToolScripts/emuDeckMigration.sh index 8bd5e2e8a..398431284 100644 --- a/functions/ToolScripts/emuDeckMigration.sh +++ b/functions/ToolScripts/emuDeckMigration.sh @@ -38,7 +38,7 @@ Migration_move(){ destination=$2 size=$3 rsync -av --progress "$origin" "$destination" | - awk -f $HOME/.config/EmuDeck/backend/rsync.awk | + awk -f $emudeckBackend/rsync.awk | zenity --progress --title "Migrating your current ${size} Emulation folder to $destination" \ --text="Scanning..." --width=400 --percentage=0 --auto-close } diff --git a/functions/ToolScripts/emuDeckPegasus.sh b/functions/ToolScripts/emuDeckPegasus.sh index 65f89bb0d..6c65208e2 100644 --- a/functions/ToolScripts/emuDeckPegasus.sh +++ b/functions/ToolScripts/emuDeckPegasus.sh @@ -22,8 +22,8 @@ pegasus_install(){ local url="https://github.com/dragoonDorise/pegasus-temp/releases/download/1.0/pegasus-fe" local fileName="pegasus-fe" - if safeDownload "$name" "$url" "$HOME/.config/EmuDeck/Emulators/$fileName" "$showProgress"; then - chmod +x "$HOME/.config/EmuDeck/Emulators/$fileName" + if safeDownload "$name" "$url" "$pegasusFolder/$fileName" "$showProgress"; then + chmod +x "$pegasusFolder/$fileName" pegasus_init pegasus_customDesktopShortcut else @@ -34,19 +34,19 @@ pegasus_install(){ } pegasus_setPaths(){ - rsync -avR --exclude='roms' --exclude='pfx' "$EMUDECKGIT/roms/" "$romsPath" --keep-dirlinks - rsync -avR --exclude='roms' --exclude='pfx' "$EMUDECKGIT/roms/" "$toolsPath/downloaded_media" + rsync -avR --exclude='roms' --exclude='pfx' "$emudeckBackend/roms/" "$romsPath" --keep-dirlinks + rsync -avR --exclude='roms' --exclude='pfx' "$emudeckBackend/roms/" "$toolsPath/downloaded_media" find $romsPath/ -type f -name "metadata.txt" -exec sed -i "s|CORESPATH|${RetroArch_cores}|g" {} \; find $romsPath/ -type f -name "metadata.txt" -exec sed -i "s|/run/media/mmcblk0p1/Emulation|${emulationPath}|g" {} \; #Yuzu path fix - if [ -f "$HOME/.config/EmuDeck/Emulators/yuzu.AppImage" ]; then + if [ -f "$emusFolder/yuzu.AppImage" ]; then sed -i "s|ryujinx|yuzu|g" "$romsPath/switch/metadata.txt" sed -i "s|--fullscreen|-f -g|g" "$romsPath/switch/metadata.txt" fi #Citra path fix - if [ -f "$HOME/.config/EmuDeck/Emulators/citra-qt.AppImage" ]; then + if [ -f "$emusFolder/citra-qt.AppImage" ]; then sed -i "s|lime3ds|citra|g" "$romsPath/n3ds/metadata.txt" fi @@ -56,7 +56,7 @@ pegasus_setPaths(){ pegasus_init(){ setMSG "Setting up $pegasus_toolName" - rsync -avhp --mkpath "$EMUDECKGIT/configs/$pegasus_emuPath/" "$pegasus_path/" + rsync -avhp --mkpath "$emudeckBackend/configs/$pegasus_emuPath/" "$pegasus_path/" #metadata and paths pegasus_setPaths @@ -168,7 +168,7 @@ pegasus_init(){ sed -i "s|/run/media/mmcblk0p1/Emulation|${emulationPath}|g" "$pegasus_dir_file" #mkdir -p "$toolsPath/launchers/pegasus/" - #cp "$EMUDECKGIT/tools/launchers/pegasus/pegasus-frontend.sh" "$toolsPath/launchers/pegasus/pegasus-frontend.sh" + #cp "$emudeckBackend/tools/launchers/pegasus/pegasus-frontend.sh" "$toolsPath/launchers/pegasus/pegasus-frontend.sh" #pegasus_addCustomSystems #pegasus_setEmulationFolder #pegasus_setDefaultEmulators @@ -224,7 +224,7 @@ pegasus_setEmu(){ } pegasus_IsInstalled(){ - if [ -f "$HOME/.config/EmuDeck/Emulators/pegasus-fe" ]; then + if [ -f "$pegasusFolder/pegasus-fe" ]; then echo "true" else echo "false" @@ -233,11 +233,11 @@ pegasus_IsInstalled(){ pegasus_uninstall(){ flatpak uninstall "$pegasus_emuPath" --user -y &> /dev/null; - rm -rf "$HOME/.config/EmuDeck/Emulators/pegasus-fe" &> /dev/null; + rm -rf "$pegasusFolder/pegasus-fe" &> /dev/null; } pegasus_flushToolLauncher(){ mkdir -p "$toolsPath/launchers/pegasus/" - cp "$EMUDECKGIT/tools/launchers/pegasus/pegasus-frontend.sh" "$toolsPath/launchers/pegasus/pegasus-frontend.sh" + cp "$emudeckBackend/tools/launchers/pegasus/pegasus-frontend.sh" "$toolsPath/launchers/pegasus/pegasus-frontend.sh" chmod +x "$toolsPath/launchers/pegasus/pegasus-frontend.sh" } diff --git a/functions/ToolScripts/emuDeckPlugins.sh b/functions/ToolScripts/emuDeckPlugins.sh index 0a9891991..8bb51a7a3 100644 --- a/functions/ToolScripts/emuDeckPlugins.sh +++ b/functions/ToolScripts/emuDeckPlugins.sh @@ -124,7 +124,7 @@ Plugins_installEmuDecky(){ echo $password | sudo -S chown $USER:$USER -R $HOME/homebrew/plugins/EmuDecky fi #CloudSync tools - rsync -avzh "$EMUDECKGIT/tools/cloudSync/" "$toolsPath/cloudSync/" + rsync -avzh "$emudeckBackend/tools/cloudSync/" "$toolsPath/cloudSync/" chmod +x "$toolsPath/cloudSync/cloud_sync_force_download.sh" chmod +x "$toolsPath/cloudSync/cloud_sync_force_upload.sh" @@ -152,7 +152,7 @@ Plugins_installDeckyRomLibrary(){ echo $password | sudo -S chown $USER:$USER -R $HOME/homebrew/plugins/decky-rom-library fi #RAachievemets - rau=$(cat "$HOME/.config/EmuDeck/.rau") + rau=$(cat "$emudeckFolder/.rau") setSetting cheevos_username $rau } diff --git a/functions/ToolScripts/emuDeckRemotePlayWhatever.sh b/functions/ToolScripts/emuDeckRemotePlayWhatever.sh index 7e32dd796..411214584 100644 --- a/functions/ToolScripts/emuDeckRemotePlayWhatever.sh +++ b/functions/ToolScripts/emuDeckRemotePlayWhatever.sh @@ -8,9 +8,9 @@ RemotePlayWhatever_install(){ RemotePlayWhatever_init(){ setMSG "Configuring RemotePlayWhatever" - cp "$EMUDECKGIT/tools/remoteplaywhatever/remoteplaywhatever.sh" "${toolsPath}/remoteplaywhatever/" + cp "$emudeckBackend/tools/remoteplaywhatever/remoteplaywhatever.sh" "${toolsPath}/remoteplaywhatever/" chmod +x "${toolsPath}/remoteplaywhatever/remoteplaywhatever.sh" echo -e "OK!" - zenity --question --width 450 --title "Close Steam/Steam Input?" --text "Now we will exit steam and launch Steam ROM Manager so you can add RemotePlayWhatever. Desktop controls will temporarily revert to touch/trackpad/L2/R2 until you open Steam again." && (kill -15 $(pidof steam)) & cp $HOME/.config/EmuDeck/backend/configs/steam-rom-manager/userData/userConfigurationsRPW.json $HOME/.config/steam-rom-manager/userData/userConfigurations.json && ${toolsPath}/Steam ROM Manager.AppImage && cp $HOME/.config/EmuDeck/backend/configs/steam-rom-manager/userData/userConfigurations.json $HOME/.config/steam-rom-manager/userData/userConfigurations.json + zenity --question --width 450 --title "Close Steam/Steam Input?" --text "Now we will exit steam and launch Steam ROM Manager so you can add RemotePlayWhatever. Desktop controls will temporarily revert to touch/trackpad/L2/R2 until you open Steam again." && (kill -15 $(pidof steam)) & cp $emudeckBackend/configs/steam-rom-manager/userData/userConfigurationsRPW.json $HOME/.config/steam-rom-manager/userData/userConfigurations.json && ${toolsPath}/Steam ROM Manager.AppImage && cp $emudeckBackend/configs/steam-rom-manager/userData/userConfigurations.json $HOME/.config/steam-rom-manager/userData/userConfigurations.json } diff --git a/functions/ToolScripts/emuDeckSRM.sh b/functions/ToolScripts/emuDeckSRM.sh index e25ddb00a..5e6a8d3c4 100644 --- a/functions/ToolScripts/emuDeckSRM.sh +++ b/functions/ToolScripts/emuDeckSRM.sh @@ -32,7 +32,7 @@ SRM_uninstall(){ SRM_customDesktopShortcut(){ mkdir -p "$toolsPath/launchers/srm" - cp "$EMUDECKGIT/tools/launchers/srm/steamrommanager.sh" "$toolsPath/launchers/srm/steamrommanager.sh" + cp "$emudeckBackend/tools/launchers/srm/steamrommanager.sh" "$toolsPath/launchers/srm/steamrommanager.sh" rm -rf $HOME/.local/share/applications/SRM.desktop createDesktopShortcut "$HOME/.local/share/applications/Steam ROM Manager.desktop" \ @@ -59,8 +59,8 @@ SRM_init(){ setMSG "Configuring Steam Rom Manager" mkdir -p "$HOME/.config/steam-rom-manager/userData/" - rsync -avhp --mkpath "$EMUDECKGIT/configs/steam-rom-manager/userData/userConfigurations.json" "$HOME/.config/steam-rom-manager/userData/" --backup --suffix=.bak - rsync -avhp --mkpath "$EMUDECKGIT/configs/steam-rom-manager/userData/userSettings.json" "$HOME/.config/steam-rom-manager/userData/" --backup --suffix=.bak + rsync -avhp --mkpath "$emudeckBackend/configs/steam-rom-manager/userData/userConfigurations.json" "$HOME/.config/steam-rom-manager/userData/" --backup --suffix=.bak + rsync -avhp --mkpath "$emudeckBackend/configs/steam-rom-manager/userData/userSettings.json" "$HOME/.config/steam-rom-manager/userData/" --backup --suffix=.bak SRM_setEmulationFolder SRM_setEnv SRM_addControllerTemplate @@ -112,7 +112,7 @@ SRM_setEnv(){ SRM_addControllerTemplate(){ mkdir -p "$HOME/.config/steam-rom-manager/userData/" - rsync -avhp --mkpath "$EMUDECKGIT/configs/steam-rom-manager/userData/controllerTemplates.json" "$HOME/.config/steam-rom-manager/userData/" --backup --suffix=.bak + rsync -avhp --mkpath "$emudeckBackend/configs/steam-rom-manager/userData/controllerTemplates.json" "$HOME/.config/steam-rom-manager/userData/" --backup --suffix=.bak if [ -d "${HOME}/.local/share/Steam" ]; then STEAMPATH="${HOME}/.local/share/Steam" @@ -139,7 +139,7 @@ SRM_addSteamInputProfiles(){ rm -rf "$HOME/.steam/steam/controller_base/templates/ppsspp_controller_config.vdf" rm -rf "$HOME/.steam/steam/controller_base/templates/rmg_controller_config.vdf" - rsync -r --exclude='*/' "$EMUDECKGIT/configs/steam-input/" "$HOME/.steam/steam/controller_base/templates/" + rsync -r --exclude='*/' "$emudeckBackend/configs/steam-input/" "$HOME/.steam/steam/controller_base/templates/" #Cleanup old controller schemes } @@ -165,7 +165,7 @@ SRM_IsInstalled(){ SRM_flushToolLauncher(){ mkdir -p "$toolsPath/launchers/srm" - cp "$EMUDECKGIT/tools/launchers/srm/steamrommanager.sh" "$toolsPath/launchers/srm/steamrommanager.sh" + cp "$emudeckBackend/tools/launchers/srm/steamrommanager.sh" "$toolsPath/launchers/srm/steamrommanager.sh" chmod +x "$toolsPath/launchers/srm/steamrommanager.sh" } diff --git a/functions/all.sh b/functions/all.sh index 5580ad34e..23adadb82 100644 --- a/functions/all.sh +++ b/functions/all.sh @@ -9,16 +9,19 @@ if [ $(uname) != "Linux" ]; then fi fi -if [[ "$EMUDECKGIT" == "" ]]; then - EMUDECKGIT="$HOME/.config/EmuDeck/backend" +if [[ "$emudeckBackend" == "" ]]; then + emudeckBackend="$HOME/.config/EmuDeck/backend/" fi +#Vars +source "$emudeckBackend"/vars.sh + #load helpers first, just in case -source "$EMUDECKGIT"/functions/helperFunctions.sh +source "$emudeckBackend"/functions/helperFunctions.sh -SETTINGSFILE="$HOME/.config/EmuDeck/settings.sh" +SETTINGSFILE="$emudeckFolder/settings.sh" if [ -f "$SETTINGSFILE" ] && [ ! -L "$SETTINGSFILE" ]; then # shellcheck source=./settings.sh source "$SETTINGSFILE" @@ -31,107 +34,107 @@ if [ "$system" != "darwin" ]; then chmod +x "${EMUDECKGIT}/tools/binaries/xmlstarlet" fi -source "$EMUDECKGIT"/functions/checkBIOS.sh -source "$EMUDECKGIT"/functions/checkInstalledEmus.sh -#source "$EMUDECKGIT"/functions/cloudServicesManager.sh -source "$EMUDECKGIT"/functions/configEmuAI.sh -source "$EMUDECKGIT"/functions/configEmuFP.sh -source "$EMUDECKGIT"/functions/createDesktopIcons.sh -source "$EMUDECKGIT"/functions/installEmuFP.sh -source "$EMUDECKGIT"/functions/uninstallEmuFP.sh -source "$EMUDECKGIT"/functions/setMSG.sh -source "$EMUDECKGIT"/functions/emuDeckPrereqs.sh -source "$EMUDECKGIT"/functions/installEmuAI.sh -source "$EMUDECKGIT"/functions/uninstallEmuAI.sh -source "$EMUDECKGIT"/functions/installEmuBI.sh -source "$EMUDECKGIT"/functions/uninstallGeneric.sh -source "$EMUDECKGIT"/functions/installToolAI.sh -source "$EMUDECKGIT"/functions/migrateAndLinkConfig.sh -source "$EMUDECKGIT"/functions/nonDeck.sh -source "$EMUDECKGIT"/functions/dialogBox.sh -source "$EMUDECKGIT"/functions/updateEmuFP.sh -source "$EMUDECKGIT"/functions/createFolders.sh -source "$EMUDECKGIT"/functions/runSRM.sh -source "$EMUDECKGIT"/functions/appImageInit.sh -source "$EMUDECKGIT"/functions/autofix.sh -source "$EMUDECKGIT"/functions/generateGameLists.sh -source "$EMUDECKGIT"/functions/jsonToBashVars.sh +source "$emudeckBackend"/functions/checkBIOS.sh +source "$emudeckBackend"/functions/checkInstalledEmus.sh +#source "$emudeckBackend"/functions/cloudServicesManager.sh +source "$emudeckBackend"/functions/configEmuAI.sh +source "$emudeckBackend"/functions/configEmuFP.sh +source "$emudeckBackend"/functions/createDesktopIcons.sh +source "$emudeckBackend"/functions/installEmuFP.sh +source "$emudeckBackend"/functions/uninstallEmuFP.sh +source "$emudeckBackend"/functions/setMSG.sh +source "$emudeckBackend"/functions/emuDeckPrereqs.sh +source "$emudeckBackend"/functions/installEmuAI.sh +source "$emudeckBackend"/functions/uninstallEmuAI.sh +source "$emudeckBackend"/functions/installEmuBI.sh +source "$emudeckBackend"/functions/uninstallGeneric.sh +source "$emudeckBackend"/functions/installToolAI.sh +source "$emudeckBackend"/functions/migrateAndLinkConfig.sh +source "$emudeckBackend"/functions/nonDeck.sh +source "$emudeckBackend"/functions/dialogBox.sh +source "$emudeckBackend"/functions/updateEmuFP.sh +source "$emudeckBackend"/functions/createFolders.sh +source "$emudeckBackend"/functions/runSRM.sh +source "$emudeckBackend"/functions/appImageInit.sh +source "$emudeckBackend"/functions/autofix.sh +source "$emudeckBackend"/functions/generateGameLists.sh +source "$emudeckBackend"/functions/jsonToBashVars.sh #toolScripts -source "$EMUDECKGIT"/functions/ToolScripts/emuDeckESDE.sh -source "$EMUDECKGIT"/functions/ToolScripts/emuDeckPegasus.sh -source "$EMUDECKGIT"/functions/ToolScripts/emuDeckPlugins.sh -source "$EMUDECKGIT"/functions/ToolScripts/emuDeckSRM.sh -source "$EMUDECKGIT"/functions/ToolScripts/emuDeckCHD.sh -source "$EMUDECKGIT"/functions/ToolScripts/emuDeckBINUP.sh -source "$EMUDECKGIT"/functions/ToolScripts/emuDeckFlatpakUP.sh -source "$EMUDECKGIT"/functions/ToolScripts/emuDeckCloudBackup.sh -source "$EMUDECKGIT"/functions/ToolScripts/emuDeckCloudSync.sh -source "$EMUDECKGIT"/functions/ToolScripts/emuDeckRemotePlayWhatever.sh -source "$EMUDECKGIT"/functions/ToolScripts/emuDeckInstallHomebrewGames.sh -source "$EMUDECKGIT"/functions/ToolScripts/emuDeckMigration.sh -source "$EMUDECKGIT"/functions/ToolScripts/emuDeckCopyGames.sh -source "$EMUDECKGIT"/functions/ToolScripts/emuDecky.sh -source "$EMUDECKGIT"/functions/ToolScripts/emuDeckNetPlay.sh +source "$emudeckBackend"/functions/ToolScripts/emuDeckESDE.sh +source "$emudeckBackend"/functions/ToolScripts/emuDeckPegasus.sh +source "$emudeckBackend"/functions/ToolScripts/emuDeckPlugins.sh +source "$emudeckBackend"/functions/ToolScripts/emuDeckSRM.sh +source "$emudeckBackend"/functions/ToolScripts/emuDeckCHD.sh +source "$emudeckBackend"/functions/ToolScripts/emuDeckBINUP.sh +source "$emudeckBackend"/functions/ToolScripts/emuDeckFlatpakUP.sh +source "$emudeckBackend"/functions/ToolScripts/emuDeckCloudBackup.sh +source "$emudeckBackend"/functions/ToolScripts/emuDeckCloudSync.sh +source "$emudeckBackend"/functions/ToolScripts/emuDeckRemotePlayWhatever.sh +source "$emudeckBackend"/functions/ToolScripts/emuDeckInstallHomebrewGames.sh +source "$emudeckBackend"/functions/ToolScripts/emuDeckMigration.sh +source "$emudeckBackend"/functions/ToolScripts/emuDeckCopyGames.sh +source "$emudeckBackend"/functions/ToolScripts/emuDecky.sh +source "$emudeckBackend"/functions/ToolScripts/emuDeckNetPlay.sh #emuscripts -#source "$EMUDECKGIT"/functions/EmuScripts/emuDeckSuyu.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckYuzu.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckCemu.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckCemuProton.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckRPCS3.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckCitra.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckLime3DS.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckDolphin.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckPrimehack.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckRetroArch.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckRyujinx.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckShadPS4.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckPPSSPP.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckDuckStation.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckXemu.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckXenia.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckPCSX2QT.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckMAME.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckScummVM.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckVita3K.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckMGBA.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckRMG.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckMelonDS.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckBigPEmu.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckares.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckFlycast.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckSupermodel.sh -source "$EMUDECKGIT"/functions/EmuScripts/emuDeckModel2.sh +#source "$emudeckBackend"/functions/EmuScripts/emuDeckSuyu.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckYuzu.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckCemu.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckCemuProton.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckRPCS3.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckCitra.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckLime3DS.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckDolphin.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckPrimehack.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckRetroArch.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckRyujinx.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckShadPS4.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckPPSSPP.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckDuckStation.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckXemu.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckXenia.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckPCSX2QT.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckMAME.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckScummVM.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckVita3K.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckMGBA.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckRMG.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckMelonDS.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckBigPEmu.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckares.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckFlycast.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckSupermodel.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckModel2.sh # Generic Application scripts -source "$EMUDECKGIT"/functions/GenericApplicationsScripts/genericApplicationBottles.sh -source "$EMUDECKGIT"/functions/GenericApplicationsScripts/genericApplicationCider.sh -source "$EMUDECKGIT"/functions/GenericApplicationsScripts/genericApplicationFlatseal.sh -source "$EMUDECKGIT"/functions/GenericApplicationsScripts/genericApplicationHeroic.sh -source "$EMUDECKGIT"/functions/GenericApplicationsScripts/genericApplicationLutris.sh -source "$EMUDECKGIT"/functions/GenericApplicationsScripts/genericApplicationPlexamp.sh -source "$EMUDECKGIT"/functions/GenericApplicationsScripts/genericApplicationSpotify.sh -source "$EMUDECKGIT"/functions/GenericApplicationsScripts/genericApplicationTidal.sh -source "$EMUDECKGIT"/functions/GenericApplicationsScripts/genericApplicationWarehouse.sh +source "$emudeckBackend"/functions/GenericApplicationsScripts/genericApplicationBottles.sh +source "$emudeckBackend"/functions/GenericApplicationsScripts/genericApplicationCider.sh +source "$emudeckBackend"/functions/GenericApplicationsScripts/genericApplicationFlatseal.sh +source "$emudeckBackend"/functions/GenericApplicationsScripts/genericApplicationHeroic.sh +source "$emudeckBackend"/functions/GenericApplicationsScripts/genericApplicationLutris.sh +source "$emudeckBackend"/functions/GenericApplicationsScripts/genericApplicationPlexamp.sh +source "$emudeckBackend"/functions/GenericApplicationsScripts/genericApplicationSpotify.sh +source "$emudeckBackend"/functions/GenericApplicationsScripts/genericApplicationTidal.sh +source "$emudeckBackend"/functions/GenericApplicationsScripts/genericApplicationWarehouse.sh #remoteplayclientscripts -source "$EMUDECKGIT"/functions/RemotePlayClientScripts/remotePlayChiaki.sh -source "$EMUDECKGIT"/functions/RemotePlayClientScripts/remotePlayChiaking.sh -source "$EMUDECKGIT"/functions/RemotePlayClientScripts/remotePlayGreenlight.sh -source "$EMUDECKGIT"/functions/RemotePlayClientScripts/remotePlayMoonlight.sh -source "$EMUDECKGIT"/functions/RemotePlayClientScripts/remotePlayParsec.sh -source "$EMUDECKGIT"/functions/RemotePlayClientScripts/remotePlayShadow.sh -source "$EMUDECKGIT"/functions/RemotePlayClientScripts/remotePlaySteamLink.sh +source "$emudeckBackend"/functions/RemotePlayClientScripts/remotePlayChiaki.sh +source "$emudeckBackend"/functions/RemotePlayClientScripts/remotePlayChiaking.sh +source "$emudeckBackend"/functions/RemotePlayClientScripts/remotePlayGreenlight.sh +source "$emudeckBackend"/functions/RemotePlayClientScripts/remotePlayMoonlight.sh +source "$emudeckBackend"/functions/RemotePlayClientScripts/remotePlayParsec.sh +source "$emudeckBackend"/functions/RemotePlayClientScripts/remotePlayShadow.sh +source "$emudeckBackend"/functions/RemotePlayClientScripts/remotePlaySteamLink.sh -source "$EMUDECKGIT"/functions/cloudSyncHealth.sh +source "$emudeckBackend"/functions/cloudSyncHealth.sh -source "$EMUDECKGIT"/android/functions/all.sh +source "$emudeckBackend"/android/functions/all.sh # Darwin overrides if [ "$system" = "darwin" ]; then - source "$EMUDECKGIT/darwin/functions/varsOverrides.sh" - source "$EMUDECKGIT/darwin/functions/all.sh" + source "$emudeckBackend/darwin/functions/varsOverrides.sh" + source "$emudeckBackend/darwin/functions/all.sh" fi \ No newline at end of file diff --git a/functions/appImageInit.sh b/functions/appImageInit.sh index b047eb697..7a1ea5220 100644 --- a/functions/appImageInit.sh +++ b/functions/appImageInit.sh @@ -5,26 +5,29 @@ appImageInit() { if [ -d "$HOME/emudeck/logs" ]; then # We move good old emudeck folder to .config - rsync -avh "$HOME/emudeck/" "$HOME/.config/EmuDeck/" && rm -rf "$HOME/emudeck" && mkdir "$HOME/emudeck" && ln -s "$HOME/.config/EmuDeck/settings.sh" "$HOME/emudeck/settings.sh" + rsync -avh "$HOME/emudeck/" "$emudeckFolder" && rm -rf "$HOME/emudeck" && mkdir "$HOME/emudeck" && ln -s "$emudeckFolder/settings.sh" "$HOME/emudeck/settings.sh" #Migrate AppImages to .config - mkdir -p $HOME/.config/EmuDeck/Emulators - mv -f $HOME/Applications/publish $HOME/.config/EmuDeck/Emulators/publish - mv -f $HOME/Applications/Vita3K $HOME/.config/EmuDeck/Emulators/Vita3K - mv -f $HOME/Applications/BigPEmu $HOME/.config/EmuDeck/Emulators/BigPEmu - mv -f $HOME/Applications/Cemu.AppImage $HOME/.config/EmuDeck/Emulators/Cemu.AppImage - mv -f $HOME/Applications/citra-qt.AppImage $HOME/.config/EmuDeck/Emulators/citra-qt.AppImage - mv -f $HOME/Applications/EmuDeck.AppImage $HOME/.config/EmuDeck/Emulators/EmuDeck.AppImage - mv -f $HOME/Applications/lime3ds-gui.AppImage $HOME/.config/EmuDeck/Emulators/lime3ds-gui.AppImage + mkdir -p $emusFolder + mv -f $HOME/Applications/publish $emusFolder/publish + mv -f $HOME/Applications/Vita3K $emusFolder/Vita3K + mv -f $HOME/Applications/BigPEmu $emusFolder/BigPEmu + mv -f $HOME/Applications/Cemu.AppImage $emusFolder/Cemu.AppImage + mv -f $HOME/Applications/citra-qt.AppImage $emusFolder/citra-qt.AppImage + mv -f $HOME/Applications/EmuDeck.AppImage $emusFolder/EmuDeck.AppImage + mv -f $HOME/Applications/lime3ds-gui.AppImage $emusFolder/lime3ds-gui.AppImage - mv -f $HOME/Applications/pcsx2-Qt.AppImage $HOME/.config/EmuDeck/Emulators/pcsx2-Qt.AppImage - mv -f $HOME/Applications/pegasus-fe $HOME/.config/EmuDeck/Emulators/pegasus-fe - mv -f $HOME/Applications/rpcs3.AppImage $HOME/.config/EmuDeck/Emulators/rpcs3.AppImage - mv -f $HOME/Applications/Shadps4-qt.AppImage $HOME/.config/EmuDeck/Emulators/Shadps4-qt.AppImage + mv -f $HOME/Applications/pcsx2-Qt.AppImage $emusFolder/pcsx2-Qt.AppImage + mv -f $HOME/Applications/pegasus-fe $emusFolder/pegasus-fe + mv -f $HOME/Applications/rpcs3.AppImage $emusFolder/rpcs3.AppImage + mv -f $HOME/Applications/Shadps4-qt.AppImage $emusFolder/Shadps4-qt.AppImage - mkdir -p $ESDE_toolLocation - mv -f $HOME/Applications/ES-DE.AppImage $HOME/.config/EmuDeck/EmulationStation-DE/ES-DE.AppImage + mkdir -p $esdeFolder + mv -f $HOME/Applications/ES-DE.AppImage $esdeFolder/ES-DE.AppImage + + mkdir -p $pegasusPath + mv -f $HOME/Applications/pegasus-fe $pegasusFolder/pegasus-fe #Fix paths shortcuts if [ $doInstallESDE == "true" ]; then @@ -129,7 +132,7 @@ appImageInit() { fi #Add Emus launchers to ESDE - rsync -avhp --mkpath "$EMUDECKGIT/chimeraOS/configs/emulationstation/custom_systems/es_find_rules.xml" "$(dirname "$es_rulesFile")" --backup --suffix=.bak + rsync -avhp --mkpath "$emudeckBackend/chimeraOS/configs/emulationstation/custom_systems/es_find_rules.xml" "$(dirname "$es_rulesFile")" --backup --suffix=.bak sed -i "s|/run/media/mmcblk0p1/Emulation|${emulationPath}|g" "$es_rulesFile" @@ -137,7 +140,7 @@ appImageInit() { # Init functions - mkdir -p "$HOME/.config/EmuDeck/logs" - mkdir -p "$HOME/.config/EmuDeck/feeds" + mkdir -p "$emudeckLogs" + mkdir -p "$emudeckFolder/feeds" } diff --git a/functions/cloudServicesManager.sh b/functions/cloudServicesManager.sh index 178288dd9..d91cde80d 100755 --- a/functions/cloudServicesManager.sh +++ b/functions/cloudServicesManager.sh @@ -1,7 +1,7 @@ #!/bin/bash # Dev variables (normally commented out) -#EMUDECKGIT="$HOME/github/EmuDeck" #dev +#emudeckBackend="$HOME/github/EmuDeck" #dev CloudScripts_update() { fixCloudScripts @@ -90,7 +90,7 @@ manageServicesMenu() { done # Import steam profile - rsync -r "$EMUDECKGIT/configs/steam-input/emudeck_cloud_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" + rsync -r "$emudeckBackend/configs/steam-input/emudeck_cloud_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" # Notify to update & run SRM csmSRMNotification @@ -393,7 +393,7 @@ runGASettings() manageRPSMenu() { # Create array of all Remote Play clients - cd "$EMUDECKGIT/functions/RemotePlayClientScripts" || return + cd "$emudeckBackend/functions/RemotePlayClientScripts" || return declare -a arrAllRP=() arrAllRP+=( $(Chiaki_IsInstalled) "Chiaki") @@ -443,7 +443,7 @@ manageRPSMenu() { manageGAMenu() { # Create array of all Generic Applications - cd "$EMUDECKGIT/functions/GenericApplicationsScripts" || return + cd "$emudeckBackend/functions/GenericApplicationsScripts" || return declare -a arrAllGA=() arrAllGA+=( $(Bottles_IsInstalled) "Bottles") @@ -603,7 +603,7 @@ csmMainMenu() { elif [ "$CHOICE" == "Manage Remote Play Clients" ]; then manageRPSMenu elif [ "$CHOICE" == "Manage Generic Applications" ]; then - manageGAMenu + manageGAMenu elif [ "$CHOICE" == "Change Settings" ]; then changeSettingsMenu elif [ "$CHOICE" == "Add to ES-DE and Pegasus" ]; then @@ -688,9 +688,9 @@ addESDEPegasus(){ # Pegasus local pegasusDirectoriesFile="$HOME/.config/pegasus-frontend/game_dirs.txt" - cp "$HOME/.config/EmuDeck/backend/roms/desktop/cloud/metadata.txt" "$romsPath/desktop/cloud" - cp "$HOME/.config/EmuDeck/backend/roms/desktop/remoteplay/metadata.txt" "$romsPath/desktop/remoteplay" - cp "$HOME/.config/EmuDeck/backend/roms/desktop/generic-applications/metadata.txt" "$romsPath/desktop/generic-applications" + cp "$emudeckBackend/roms/desktop/cloud/metadata.txt" "$romsPath/desktop/cloud" + cp "$emudeckBackend/roms/desktop/remoteplay/metadata.txt" "$romsPath/desktop/remoteplay" + cp "$emudeckBackend/roms/desktop/generic-applications/metadata.txt" "$romsPath/desktop/generic-applications" if ! grep -Fxq "$romsPath/desktop/cloud" "$pegasusDirectoriesFile"; then echo "$romsPath/desktop/cloud" >> "$pegasusDirectoriesFile" @@ -732,13 +732,13 @@ addESDEPegasus(){ # Initialization # ################## -if [[ "$EMUDECKGIT" == "" ]]; then - EMUDECKGIT="$HOME/.config/EmuDeck/backend" +if [[ "$emudeckBackend" == "" ]]; then + emudeckBackend="$HOME/.config/EmuDeck/backend" fi -LOCALCLOUDFILES="$EMUDECKGIT/tools/cloud" -LOCALRPFILES="$EMUDECKGIT/tools/remoteplayclients" +LOCALCLOUDFILES="$emudeckBackend/tools/cloud" +LOCALRPFILES="$emudeckBackend/tools/remoteplayclients" -source "$EMUDECKGIT/functions/all.sh" +source "$emudeckBackend/functions/all.sh" # Check for existing cloud.conf or install & setup mkdir -p "$romsPath/cloud" diff --git a/functions/cloudSyncHealth.sh b/functions/cloudSyncHealth.sh index c0ca98342..02e5ea6a7 100644 --- a/functions/cloudSyncHealth.sh +++ b/functions/cloudSyncHealth.sh @@ -30,7 +30,7 @@ cloudSyncHealth(){ local upload=1 local download=1 - touch "$HOME/.config/EmuDeck/logs/cloudHealth.log" + touch "$emudeckLogs/cloudHealth.log" { cloud_sync_stopService @@ -150,7 +150,7 @@ cloudSyncHealth(){ -} > "$HOME/.config/EmuDeck/logs/cloudHealth.log" +} > "$emudeckLogs/cloudHealth.log" echo "" echo "" diff --git a/functions/configEmuFP.sh b/functions/configEmuFP.sh index 4a4116f82..095bd68d9 100644 --- a/functions/configEmuFP.sh +++ b/functions/configEmuFP.sh @@ -12,7 +12,7 @@ configEmuFP(){ fi setMSG "Updating $name Config using $overwrite" - rsync -avhp --mkpath "$EMUDECKGIT/configs/${ID}" "$HOME/.var/app/" $overwrite + rsync -avhp --mkpath "$emudeckBackend/configs/${ID}" "$HOME/.var/app/" $overwrite } \ No newline at end of file diff --git a/functions/createDesktopIcons.sh b/functions/createDesktopIcons.sh index 05f14255f..995ab9658 100644 --- a/functions/createDesktopIcons.sh +++ b/functions/createDesktopIcons.sh @@ -19,13 +19,13 @@ createDesktopIcons(){ #New EmuDeck icon, same place so people won't get confused createDesktopShortcut "$desktop/EmuDeck.desktop" \ "EmuDeck" \ - "$HOME/.config/EmuDeck/Emulators/EmuDeck.AppImage$sandbox" \ + "$emusFolder/EmuDeck.AppImage$sandbox" \ "false" #App list #desktop-file-install --dir --delete-original "$HOME/Desktop/EmuDeck.desktop" createDesktopShortcut "$HOME/.local/share/applications/EmuDeck.desktop" \ "EmuDeck" \ - "$HOME/.config/EmuDeck/Emulators/EmuDeck.AppImage$sandbox" \ + "$emusFolder/EmuDeck.AppImage$sandbox" \ "false" } diff --git a/functions/createFolders.sh b/functions/createFolders.sh index 34385528a..80413108b 100644 --- a/functions/createFolders.sh +++ b/functions/createFolders.sh @@ -18,6 +18,6 @@ createFolders(){ find "$romsPath" -name readme.txt -type f -delete -maxdepth 2 sleep 3 - rsync -r --ignore-existing "$EMUDECKGIT/roms/" "$romsPath" + rsync -r --ignore-existing "$emudeckBackend/roms/" "$romsPath" #End repeated code } \ No newline at end of file diff --git a/functions/generateGameLists.sh b/functions/generateGameLists.sh index 0bb7533f2..515b4d80e 100644 --- a/functions/generateGameLists.sh +++ b/functions/generateGameLists.sh @@ -1,6 +1,6 @@ #!/bin/bash -MSG="$HOME/.config/EmuDeck/msg.log" +MSG="$emudeckFolder/msg.log" generateGameLists() { @@ -20,17 +20,17 @@ generateGameLists() { generateGameLists_downloadData pegasus_setPaths - rsync -r --exclude='roms' --exclude='txt' "$EMUDECKGIT/roms/" "$storagePath/retrolibrary/artwork" --keep-dirlinks + rsync -r --exclude='roms' --exclude='txt' "$emudeckBackend/roms/" "$storagePath/retrolibrary/artwork" --keep-dirlinks mkdir -p "$storagePath/retrolibrary/cache/" echo "Database built" > "$MSG" - python $HOME/.config/EmuDeck/backend/tools/retro-library/generate_game_lists.py "$romsPath" + python $emudeckBackend/tools/retro-library/generate_game_lists.py "$romsPath" generateGameLists_artwork &> /dev/null & } generateGameListsJson() { generate_pythonEnv &> /dev/null echo "Adding Games" > "$MSG" - #python $HOME/.config/EmuDeck/backend/tools/retro-library/generate_game_lists.py "$romsPath" + #python $emudeckBackend/tools/retro-library/generate_game_lists.py "$romsPath" echo "Games Added" > "$MSG" cat $storagePath/retrolibrary/cache/roms_games.json #generateGameLists_artwork $userid &> /dev/null & @@ -39,15 +39,15 @@ generateGameListsJson() { generateGameLists_importESDE() { generate_pythonEnv &> /dev/null - python $HOME/.config/EmuDeck/backend/tools/retro-library/import_media.py "$romsPath" "$dest_folder" + python $emudeckBackend/tools/retro-library/import_media.py "$romsPath" "$dest_folder" } generateGameLists_artwork() { generate_pythonEnv &> /dev/null echo "Searching for missing artwork" > "$MSG" - python $HOME/.config/EmuDeck/backend/tools/retro-library/missing_artwork_platforms.py "$romsPath" "$storagePath/retrolibrary/artwork" && python $HOME/.config/EmuDeck/backend/tools/retro-library/download_art_platforms.py "$storagePath/retrolibrary/artwork" + python $emudeckBackend/tools/retro-library/missing_artwork_platforms.py "$romsPath" "$storagePath/retrolibrary/artwork" && python $emudeckBackend/tools/retro-library/download_art_platforms.py "$storagePath/retrolibrary/artwork" - $(python $HOME/.config/EmuDeck/backend/tools/retro-library/missing_artwork.py "$romsPath" "$storagePath/retrolibrary/artwork" && python $HOME/.config/EmuDeck/backend/tools/retro-library/download_art.py "$storagePath/retrolibrary/artwork") & + $(python $emudeckBackend/tools/retro-library/missing_artwork.py "$romsPath" "$storagePath/retrolibrary/artwork" && python $emudeckBackend/tools/retro-library/download_art.py "$storagePath/retrolibrary/artwork") & echo "Artwork finished. Restart if you see this message" > "$MSG" } @@ -91,7 +91,7 @@ generateGameLists_getPercentage() { local accountfolder=$(ls -td $HOME/.steam/steam/userdata/* | head -n 1) local dest_folder="$storagePath/retrolibrary/artwork/" - python $HOME/.config/EmuDeck/backend/tools/retro-library/missing_artwork_nohash.py "$romsPath" "$dest_folder" + python $emudeckBackend/tools/retro-library/missing_artwork_nohash.py "$romsPath" "$dest_folder" local json_file="$storagePath/retrolibrary/cache/roms_games.json" local json_file_artwork="$storagePath/retrolibrary/cache/missing_artwork_no_hash.json" @@ -137,7 +137,7 @@ generateGameLists_retroAchievements(){ local hash=$1 local system=$2 local localDataPath="$storagePath/retrolibrary/achievements/$system.json" - python $HOME/.config/EmuDeck/backend/tools/retro-library/retro_achievements.py "$cheevos_username" "$hash" "$localDataPath" + python $emudeckBackend/tools/retro-library/retro_achievements.py "$cheevos_username" "$hash" "$localDataPath" } generateGameLists_downloadAchievements(){ diff --git a/functions/helperFunctions.sh b/functions/helperFunctions.sh index 1fbb29b7d..1de492a30 100644 --- a/functions/helperFunctions.sh +++ b/functions/helperFunctions.sh @@ -1,7 +1,7 @@ #!/bin/bash #Global variables -emuDecksettingsFile="$HOME/.config/EmuDeck/settings.sh" +emuDecksettingsFile="$emudeckFolder/settings.sh" emuDeckEmuTypeFlatpak="Flatpak" emuDeckEmuTypeAppImage="AppImage" @@ -11,8 +11,8 @@ emuDeckEmuTypeOther="Other" function startLog() { funcName="$1" - mkdir -p "$HOME/.config/EmuDeck/logs" - logFile="$HOME/.config/EmuDeck/logs/$funcName.log" + mkdir -p "$emudeckLogs" + logFile="$emudeckLogs/$funcName.log" touch "$logFile" @@ -170,7 +170,7 @@ function makeFunction(){ function deleteConfigs(){ - find "$HOME/.config/EmuDeck/backend/configs/org.libretro.RetroArch/config/retroarch/config" -type f -iname "*.opt" -o -type f -iname "*.cfg"| while read file + find "$emudeckBackend/configs/org.libretro.RetroArch/config/retroarch/config" -type f -iname "*.opt" -o -type f -iname "*.cfg"| while read file do rm "$file" done @@ -182,7 +182,7 @@ function customLocation(){ } function refreshSource(){ - source "$EMUDECKGIT/functions/all.sh" + source "$emudeckBackend/functions/all.sh" } function setAllEmuPaths(){ @@ -246,7 +246,7 @@ function updateOrAppendConfigLine(){ function getEnvironmentDetails(){ local sdpath=$(getSDPath) local sdValid=$(testLocationValid "sd" "$sdpath") - if [ -f "$HOME/.config/EmuDeck/.finished" ]; then + if [ -f "$emudeckFolder/.finished" ]; then firstRun="false" else firstRun="true" @@ -563,7 +563,7 @@ function createDesktopShortcut(){ mkdir -p "$HOME/.local/share/applications/" mkdir -p "$HOME/.local/share/icons/emudeck/" - cp -v "$EMUDECKGIT/icons/$(cut -d " " -f1 <<< "$name")."{svg,jpg,png} "$HOME/.local/share/icons/emudeck/" 2>/dev/null + cp -v "$emudeckBackend/icons/$(cut -d " " -f1 <<< "$name")."{svg,jpg,png} "$HOME/.local/share/icons/emudeck/" 2>/dev/null icon=$(find "$HOME/.local/share/icons/emudeck/" -type f -iname "$(cut -d " " -f1 <<< "$name").*") if [ -z "$icon" ]; then @@ -602,7 +602,7 @@ function desktopShortcutFieldUpdate(){ # update icon if name is updated if [ "$shortcutKey" == "Name" ]; then name=$shortcutValue - cp -v "$EMUDECKGIT/icons/$(cut -d " " -f1 <<< "$name").{svg,jpg,png}" "$HOME/.local/share/icons/emudeck/" 2>/dev/null + cp -v "$emudeckBackend/icons/$(cut -d " " -f1 <<< "$name").{svg,jpg,png}" "$HOME/.local/share/icons/emudeck/" 2>/dev/null icon=$(find "$HOME/.local/share/icons/emudeck/" -type f \( -iname "$(cut -d " " -f1 <<< "$name").svg" -o -iname "$(cut -d " " -f1 <<< "$name").jpg" -o -iname "$(cut -d " " -f1 <<< "$name").png" \) -print -quit) echo "Icon Found: $icon" if [ -n "$icon" ]; then @@ -802,7 +802,7 @@ flushEmulatorLaunchers(){ } addSteamInputCustomIcons() { - rsync -av "$EMUDECKGIT/configs/steam-input/Icons/" "$HOME/.steam/steam/tenfoot/resource/images/library/controller/binding_icons" + rsync -av "$emudeckBackend/configs/steam-input/Icons/" "$HOME/.steam/steam/tenfoot/resource/images/library/controller/binding_icons" } getEmuInstallStatus() { @@ -832,8 +832,8 @@ check_internet_connection(){ zipLogs() { local desktop=$(xdg-user-dir DESKTOP) - logsFolder="$HOME/.config/EmuDeck/logs" - settingsFile="$HOME/.config/EmuDeck/settings.sh" + logsFolder="$emudeckLogs" + settingsFile="$emudeckFolder/settings.sh" zipOutput="$desktop/emudeck_logs.zip" # Comprime los archivos en un archivo zip @@ -927,7 +927,7 @@ saveLatestVersionGH() { emuVersion=$(getLatestVersionGH "$repo") # JSON file path - jsonFilePath="$HOME/.config/EmuDeck/emu_versions.json" + jsonFilePath="$emudeckFolder/emu_versions.json" if [ -e "$jsonFilePath" ]; then echo "file found" @@ -954,11 +954,11 @@ saveLatestVersionGH() { isLatestVersionGH() { emuName=$1 - dontUpdate="$HOME/.config/EmuDeck/emulatorInit.noupdate" + dontUpdate="$emudeckFolder/emulatorInit.noupdate" emuDontUpdate="${emuName}.noupdate" # check global noupdate file flag, emulator noupdate flag file using case insensitive find and internet connectivity - if [ ! -f "${dontUpdate}" ] && [[ -z $(find "$HOME/.config/EmuDeck/" -maxdepth 1 -type f -iname "${emuDontUpdate}") ]] && [ "$(check_internet_connection)" == "true" ]; then + if [ ! -f "${dontUpdate}" ] && [[ -z $(find "$emudeckFolder" -maxdepth 1 -type f -iname "${emuDontUpdate}") ]] && [ "$(check_internet_connection)" == "true" ]; then repo=$(getEmuRepo "$emuName") if [ "$repo" == "none" ]; then @@ -967,7 +967,7 @@ isLatestVersionGH() { emuVersion=$(getLatestVersionGH "$repo") # JSON file path - jsonFilePath="$HOME/.config/EmuDeck/emu_versions.json" + jsonFilePath="$emudeckFolder/emu_versions.json" if [ -f "$jsonFilePath" ]; then echo "file found" @@ -1016,8 +1016,8 @@ isLatestVersionGH() { } addProtonLaunch(){ - rsync -avhp "$EMUDECKGIT/tools/proton-launch.sh" "${toolsPath}" - rsync -avhp "$EMUDECKGIT/tools/appID.py" "${toolsPath}" + rsync -avhp "$emudeckBackend/tools/proton-launch.sh" "${toolsPath}" + rsync -avhp "$emudeckBackend/tools/appID.py" "${toolsPath}" chmod +x "${toolsPath}/proton-launch.sh" } @@ -1036,7 +1036,7 @@ function emulatorInit(){ setSetting netplayCMD "' '" cloud_sync_downloadEmu "$emuName" && cloud_sync_startService fi - source $HOME/.config/EmuDeck/backend/functions/all.sh + source $emudeckBackend/functions/all.sh fi if [ "$emuName" != 'retroarch' ]; then @@ -1112,22 +1112,22 @@ function controllerLayout_BAYX(){ } function server_install(){ - cp "$EMUDECKGIT/tools/server.sh" "$toolsPath/" - #cp "$EMUDECKGIT/tools/index.html" "$toolsPath/" + cp "$emudeckBackend/tools/server.sh" "$toolsPath/" + #cp "$emudeckBackend/tools/index.html" "$toolsPath/" chmod +x "$toolsPath/server.sh" } function startCompressor(){ - konsole -e "/bin/bash $HOME/.config/EmuDeck/backend/tools/chdconv/chddeck.sh" + konsole -e "/bin/bash $emudeckBackend/tools/chdconv/chddeck.sh" } function generate_pythonEnv() { - if [ ! -d "$HOME/.config/EmuDeck/python_virtual_env" ]; then - python3 -m venv "$HOME/.config/EmuDeck/python_virtual_env" - source "$HOME/.config/EmuDeck/python_virtual_env/bin/activate" + if [ ! -d "$emudeckFolder/python_virtual_env" ]; then + python3 -m venv "$emudeckFolder/python_virtual_env" + source "$emudeckFolder/python_virtual_env/bin/activate" pip install requests else - source "$HOME/.config/EmuDeck/python_virtual_env/bin/activate" + source "$emudeckFolder/python_virtual_env/bin/activate" fi } diff --git a/functions/installEmuAI.sh b/functions/installEmuAI.sh index 9f98949ed..261b77a9f 100644 --- a/functions/installEmuAI.sh +++ b/functions/installEmuAI.sh @@ -45,24 +45,24 @@ installEmuAI(){ echo "09, Last Version: $latestVer" echo "10, Download checksum (SHA256): $downloadChecksumSha256" - #rm -f "$HOME/.config/EmuDeck/Emulators/$fileName.$format" # mv in safeDownload will overwrite... - mkdir -p "$HOME/.config/EmuDeck/Emulators" + #rm -f "$emusFolder/$fileName.$format" # mv in safeDownload will overwrite... + mkdir -p "$emusFolder" if [[ -z "$url" ]]; then - if [ -f "$HOME/.config/EmuDeck/Emulators/${fileName}.${format}" ]; then + if [ -f "$emusFolder/${fileName}.${format}" ]; then echo "No download link provided but local file already exists. Will refresh links and launcher." else echo "No download link provided and no local file exists, exitting." return 1 fi - elif safeDownload "$name" "$url" "$HOME/.config/EmuDeck/Emulators/${fileName}.${format}" "$showProgress" "" "$downloadChecksumSha256"; then + elif safeDownload "$name" "$url" "$emusFolder/${fileName}.${format}" "$showProgress" "" "$downloadChecksumSha256"; then echo "$name downloaded successfuly." else echo "Failed to download or verify $name." return 1 fi - chmod +x "$HOME/.config/EmuDeck/Emulators/$fileName.AppImage" + chmod +x "$emusFolder/$fileName.AppImage" if [[ -n $lastVerFile ]] && [[ -n $latestVer ]]; then echo "latest version $latestVer > $lastVerFile" echo "$latestVer" > "$lastVerFile" diff --git a/functions/installEmuBI.sh b/functions/installEmuBI.sh index b197d9eec..3861ad8cd 100644 --- a/functions/installEmuBI.sh +++ b/functions/installEmuBI.sh @@ -20,11 +20,11 @@ installEmuBI(){ echo "6, Last Version File: $lastVerFile" echo "7, Last Version: $latestVer" - #rm -f "$HOME/.config/EmuDeck/Emulators/$fileName.$format" # mv below will overwrite... - mkdir -p "$HOME/.config/EmuDeck/Emulators" + #rm -f "$emusFolder/$fileName.$format" # mv below will overwrite... + mkdir -p "$emusFolder" - #curl -L "$url" -o "$HOME/.config/EmuDeck/Emulators/$fileName.$format.temp" && mv "$HOME/.config/EmuDeck/Emulators/$fileName.$format.temp" "$HOME/.config/EmuDeck/Emulators/$fileName.$format" - if safeDownload "$name" "$url" "$HOME/.config/EmuDeck/Emulators/${fileName}.${format}" "$showProgress"; then + #curl -L "$url" -o "$emusFolder/$fileName.$format.temp" && mv "$emusFolder/$fileName.$format.temp" "$emusFolder/$fileName.$format" + if safeDownload "$name" "$url" "$emusFolder/${fileName}.${format}" "$showProgress"; then if [[ -n $lastVerFile ]] && [[ -n $latestVer ]]; then echo "latest version $latestVer > $lastVerFile" echo "$latestVer" > "$lastVerFile" diff --git a/functions/migrateAndLinkConfig.sh b/functions/migrateAndLinkConfig.sh index 781afd1e6..972589207 100644 --- a/functions/migrateAndLinkConfig.sh +++ b/functions/migrateAndLinkConfig.sh @@ -11,7 +11,7 @@ migrationTable=$2 # unlink $path # fi #done -migrationFlag="$HOME/.config/EmuDeck/.${emu}MigrationCompleted" +migrationFlag="$emudeckFolder/.${emu}MigrationCompleted" #check if we have a nomigrateflag for $emu if [ ! -f "$migrationFlag" ]; then diff --git a/functions/setMSG.sh b/functions/setMSG.sh index ab3d0f060..aa3553e4e 100644 --- a/functions/setMSG.sh +++ b/functions/setMSG.sh @@ -10,8 +10,8 @@ setMSG() { progressBar=90 fi - echo "$progressBar" > "$HOME/.config/EmuDeck/logs/msg.log" - echo "# $1" >> "$HOME/.config/EmuDeck/logs/msg.log" + echo "$progressBar" > "$emudeckLogs/msg.log" + echo "# $1" >> "$emudeckLogs/msg.log" echo "$1" sleep 0.5 } diff --git a/functions/uninstallEmuAI.sh b/functions/uninstallEmuAI.sh index 43e101f25..69342fffd 100644 --- a/functions/uninstallEmuAI.sh +++ b/functions/uninstallEmuAI.sh @@ -27,9 +27,9 @@ function uninstallEmuAI() { echo "3, Application File Format: $format" echo "4, Application Type: $type" - echo "Uninstalling $name. Deleting "$HOME/.config/EmuDeck/Emulators/$filename.$format". Deleting "$HOME/.local/share/applications/$name.desktop"" + echo "Uninstalling $name. Deleting "$emusFolder/$filename.$format". Deleting "$HOME/.local/share/applications/$name.desktop"" - rm -rf "$HOME/.config/EmuDeck/Emulators/$filename.$format" + rm -rf "$emusFolder/$filename.$format" rm -rf "$HOME/.local/share/applications/$name.desktop" shName=$(echo "$name" | awk '{print tolower($0)}') diff --git a/import.sh b/import.sh index 593c3b5f0..044ad1444 100644 --- a/import.sh +++ b/import.sh @@ -95,7 +95,7 @@ checkSpace "$origin/EmuDeck/saves/" "$emulationPath" for entry in "$origin/EmuDeck/saves/"* do - rsync -rav --ignore-existing --progress "$entry" "$emulationPath/saves/" | awk -f $HOME/.config/EmuDeck/backend/rsync.awk | zenity --progress --text="Importing $entry to $emulationPath/saves/" --title="Importing $entry..." --width=400 --percentage=0 --auto-close + rsync -rav --ignore-existing --progress "$entry" "$emulationPath/saves/" | awk -f $emudeckBackend/rsync.awk | zenity --progress --text="Importing $entry to $emulationPath/saves/" --title="Importing $entry..." --width=400 --percentage=0 --auto-close done @@ -117,7 +117,7 @@ if [ "$size" -gt 4096 ]; then for entry in "$origin/EmuDeck/storage/"* do - rsync -ravL --ignore-existing --progress "$entry" "$emulationPath/storage/" | awk -f $HOME/.config/EmuDeck/backend/rsync.awk | zenity --progress --text="Importing $entry to $emulationPath/storage/" --title="Importing $entry..." --width=400 --percentage=0 --auto-close + rsync -ravL --ignore-existing --progress "$entry" "$emulationPath/storage/" | awk -f $emudeckBackend/rsync.awk | zenity --progress --text="Importing $entry to $emulationPath/storage/" --title="Importing $entry..." --width=400 --percentage=0 --auto-close done else @@ -141,7 +141,7 @@ if [ "$size" -gt 4096 ]; then for entry in "$origin/EmuDeck/bios/"* do - rsync -ravL --ignore-existing --progress "$entry" "$emulationPath/bios/" | awk -f $HOME/.config/EmuDeck/backend/rsync.awk | zenity --progress --text="Importing $entry to $emulationPath/bios/" --title="Importing $entry..." --width=400 --percentage=0 --auto-close + rsync -ravL --ignore-existing --progress "$entry" "$emulationPath/bios/" | awk -f $emudeckBackend/rsync.awk | zenity --progress --text="Importing $entry to $emulationPath/bios/" --title="Importing $entry..." --width=400 --percentage=0 --auto-close done else @@ -166,7 +166,7 @@ if [ "$size" -gt 4096 ]; then for entry in "$origin/EmuDeck/tools/downloaded_media/"* do - rsync -ravL --ignore-existing --progress "$entry" "$emulationPath/bios/" | awk -f $HOME/.config/EmuDeck/backend/rsync.awk | zenity --progress --text="Importing $entry to $emulationPath/tools/downloaded_media/" --title="Importing $entry..." --width=400 --percentage=0 --auto-close + rsync -ravL --ignore-existing --progress "$entry" "$emulationPath/bios/" | awk -f $emudeckBackend/rsync.awk | zenity --progress --text="Importing $entry to $emulationPath/tools/downloaded_media/" --title="Importing $entry..." --width=400 --percentage=0 --auto-close done else @@ -192,7 +192,7 @@ if [ "$size" -gt 4096 ]; then for entry in "$origin/EmuDeck/roms/"* do - rsync -ravL --ignore-existing --progress "$entry" "$emulationPath/roms/" | awk -f $HOME/.config/EmuDeck/backend/rsync.awk | zenity --progress --text="Importing $entry to $emulationPath/roms/" --title="Importing $entry..." --width=400 --percentage=0 --auto-close + rsync -ravL --ignore-existing --progress "$entry" "$emulationPath/roms/" | awk -f $emudeckBackend/rsync.awk | zenity --progress --text="Importing $entry to $emulationPath/roms/" --title="Importing $entry..." --width=400 --percentage=0 --auto-close done else diff --git a/setup.sh b/setup.sh index c2c0b15a8..c20df656c 100644 --- a/setup.sh +++ b/setup.sh @@ -1,5 +1,12 @@ #!/bin/bash -MSG=$HOME/.config/EmuDeck/logs/msg.log +# +## +## set backend location +## +# I think this should just be in the source, so there's one spot for initialization. hrm, no i'm wrong. Here is best. +emudeckBackend="$HOME/.config/EmuDeck/backend/" +. "$emudeckBackend/vars.sh" +MSG=$emudeckLogs/msg.log echo "0" > "$MSG" #Darwin @@ -19,8 +26,8 @@ fi # mkdir -p "$HOME/.config/EmuDeck" -mkdir -p "$HOME/.config/EmuDeck/logs" -PIDFILE="$HOME/.config/EmuDeck/install.pid" +mkdir -p "$emudeckLogs" +PIDFILE="$emudeckFolder/install.pid" if [ -f "$PIDFILE" ]; then @@ -64,20 +71,20 @@ trap finish EXIT #Clean up previous installations rm ~/emudek.log 2>/dev/null # This is emudeck's old log file, it's not a typo! rm -rf ~/dragoonDoriseTools -rm -rf $HOME/.config/EmuDeck/backend +rm -rf $emudeckBackend #Creating log file -LOGFILE="$HOME/.config/EmuDeck/logs/emudeckSetup.log" +LOGFILE="$emudeckLogs/emudeckSetup.log" mkdir -p "$HOME/.config/EmuDeck" #Custom Scripts -mkdir -p "$HOME/.config/EmuDeck/custom_scripts" -echo $'#!/bin/bash\nEMUDECKGIT="$HOME/.config/EmuDeck/backend"\nsource "$EMUDECKGIT/functions/all.sh"' > "$HOME/.config/EmuDeck/custom_scripts/example.sh" +mkdir -p "$emudeckFolder/custom_scripts" +echo $'#!/bin/bash\nemudeckBackend="$HOME/.config/EmuDeck/backend/"\nsource "$emudeckBackend/functions/all.sh"' > "$emudeckFolder/custom_scripts/example.sh" echo "Press the button to start..." > "$LOGFILE" -mv "${LOGFILE}" "$HOME/.config/EmuDeck/logs/emudeckSetup.last.log" #backup last log +mv "${LOGFILE}" "$emudeckLogs/emudeckSetup.last.log" #backup last log if echo "${@}" > "${LOGFILE}" ; then echo "Log created" @@ -90,24 +97,17 @@ fi { date "+%Y.%m.%d-%H:%M:%S %Z" #Mark if this not a fresh install -FOLDER="$HOME/.config/EmuDeck/" +FOLDER="$emudeckFolder" if [ -d "$FOLDER" ]; then - echo "" > "$HOME/.config/EmuDeck/.finished" + echo "" > "$emudeckFolder/.finished" fi sleep 1 -SECONDTIME="$HOME/.config/EmuDeck/.finished" +SECONDTIME="$emudeckFolder/.finished" #Lets log github API limits just in case echo 'Github API limits:' curl -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" "https://api.github.com/rate_limit" -# -## -## set backend location -## -# I think this should just be in the source, so there's one spot for initialization. hrm, no i'm wrong. Here is best. -EMUDECKGIT="$HOME/.config/EmuDeck/backend" - # ## @@ -117,10 +117,10 @@ EMUDECKGIT="$HOME/.config/EmuDeck/backend" -source "$EMUDECKGIT"/functions/helperFunctions.sh -source "$EMUDECKGIT"/functions/jsonToBashVars.sh -jsonToBashVars "$HOME/.config/EmuDeck/settings.json" -source "$EMUDECKGIT/functions/all.sh" +source "$emudeckBackend"/functions/helperFunctions.sh +source "$emudeckBackend"/functions/jsonToBashVars.sh +jsonToBashVars "$emudeckFolder/settings.json" +source "$emudeckBackend/functions/all.sh" #after sourcing functins, check if path is empty. @@ -150,9 +150,9 @@ createFolders #setup Proton-Launch.sh #because this path gets updated by sed, we really should be installing it every and allowing it to be updated every time. In case the user changes their path. -cp "$EMUDECKGIT/tools/proton-launch.sh" "${toolsPath}/proton-launch.sh" +cp "$emudeckBackend/tools/proton-launch.sh" "${toolsPath}/proton-launch.sh" chmod +x "${toolsPath}/proton-launch.sh" -cp "$EMUDECKGIT/tools/appID.py" "${toolsPath}/appID.py" +cp "$emudeckBackend/tools/appID.py" "${toolsPath}/appID.py" # Setup emu-launch.sh cp "${EMUDECKGIT}/tools/emu-launch.sh" "${toolsPath}/emu-launch.sh" @@ -503,7 +503,7 @@ fi #EmuDeck updater on gaming Mode #mkdir -p "${toolsPath}/updater" -#cp -v "$EMUDECKGIT/tools/updater/emudeck-updater.sh" "${toolsPath}/updater/" +#cp -v "$emudeckBackend/tools/updater/emudeck-updater.sh" "${toolsPath}/updater/" #chmod +x "${toolsPath}/updater/emudeck-updater.sh" #RemotePlayWhatever @@ -514,10 +514,10 @@ fi # # We mark the script as finished # -echo "" > "$HOME/.config/EmuDeck/.finished" -echo "" > "$HOME/.config/EmuDeck/.ui-finished" -echo "100" > "$HOME/.config/EmuDeck/logs/msg.log" -echo "# Installation Complete" >> "$HOME/.config/EmuDeck/logs/msg.log" +echo "" > "$emudeckFolder/.finished" +echo "" > "$emudeckFolder/.ui-finished" +echo "100" > "$emudeckLogs/msg.log" +echo "# Installation Complete" >> "$emudeckLogs/msg.log" finished=true rm "$PIDFILE" @@ -532,7 +532,7 @@ checkInstalledEmus # Run custom scripts... shhh for now ;) # -for entry in "$HOME"/.config/emudeck/custom_scripts/*.sh +for entry in "$emudeckFolder"/custom_scripts/*.sh do bash $entry done diff --git a/tools/chdconv/chddeck.sh b/tools/chdconv/chddeck.sh index fa861e8ed..22972d1ed 100755 --- a/tools/chdconv/chddeck.sh +++ b/tools/chdconv/chddeck.sh @@ -1,10 +1,10 @@ #!/bin/bash # shellcheck source=/home/deck/emudeck/settings.sh -. $HOME/.config/EmuDeck/settings.sh - -if [[ "$EMUDECKGIT" == "" ]]; then - EMUDECKGIT="$HOME/.config/EmuDeck/backend" +if [[ "$emudeckBackend" == "" ]]; then + emudeckBackend="$HOME/.config/EmuDeck/backend/" fi +. $emudeckBackend/vars.sh +. $emudeckFolder/settings.sh #whitelist chdfolderWhiteList=("3do" "amiga" "amiga1200" "amiga600" @@ -51,16 +51,16 @@ sevenzipFileExtensions=("ngp" "ngc" "a26" combinedFileExtensions=( -"${n3dsFileExtensions[@]}" -"${chdFileExtensions[@]}" -"${rvzFileExtensions[@]}" -"${rvzFileExtensions[@]}" -"${csoFileExtensions[@]}" +"${n3dsFileExtensions[@]}" +"${chdFileExtensions[@]}" +"${rvzFileExtensions[@]}" +"${rvzFileExtensions[@]}" +"${csoFileExtensions[@]}" "${xboxFileExtensions[@]}" "${sevenzipFileExtensions[@]}") #executables -chdPath="$EMUDECKGIT/tools/chdconv" +chdPath="$emudeckBackend/tools/chdconv" chmod +x "$chdPath/chdman5" chmod +x "$chdPath/ciso" chmod +x "$chdPath/3dstool" @@ -73,8 +73,8 @@ dolphintool="flatpak run --command=dolphin-tool $flatpaktool" #initialize log TIMESTAMP=$(date "+%Y%m%d_%H%M%S") -mkdir -p "$HOME/.config/EmuDeck/logs/compression" -LOGFILE="$HOME/.config/EmuDeck/logs/compression/chdman-$TIMESTAMP.log" +mkdir -p "$emudeckLogs/compression" +LOGFILE="$emudeckLogs/compression/chdman-$TIMESTAMP.log" exec > >(tee "${LOGFILE}") 2>&1 #compression functions @@ -108,7 +108,7 @@ compressCHD() { compressCHDDVD() { local file=$1 - local successful='' + local successful='' chdman5 createdvd -i "$file" -o "${file%.*}.chd" -c zstd && successful="true" if [[ $successful == "true" ]]; then echo "Converting $file to CHD using the createdvd flag and hunksize 16348." @@ -123,7 +123,7 @@ compressCHDDVD() { compressCHDDVDLowerHunk() { local file=$1 - local successful='' + local successful='' chdman5 createdvd --hunksize 2048 -i "$file" -o "${file%.*}.chd" && successful="true" if [[ $successful == "true" ]]; then echo "Converting $file to CHD using the createdvd flag and hunksize 2048." @@ -212,7 +212,7 @@ compress7z() { decompressCHDISO() { local file=$1 - local successful='' + local successful='' chdman5 extractdvd -i "$file" -o "${file%.*}.iso" && successful="true" if [[ $successful == "true" ]]; then echo "Decompressing $file to ISO using the extractdvd flag." @@ -365,7 +365,7 @@ if [ "$selection" == "Bulk Compression" ]; then echo "found in $romfolder" searchFolderList+=("$romfolder") fi - done + done fi if ((${#searchFolderList[@]} == 0)); then @@ -450,8 +450,8 @@ if [ "$selection" == "Bulk Compression" ]; then --ok-label="CHD" \ --extra-button="CSO" \ --cancel-label="Cancel" \ - --text="${text}" 2>/dev/null && echo "CHD") - find "$romsPath/$romfolder" -type f -iname "*.iso" | while read -r f; do + --text="${text}" 2>/dev/null && echo "CHD") + find "$romsPath/$romfolder" -type f -iname "*.iso" | while read -r f; do if [ "$pspBulkSelection" == "CHD" ]; then find "$romsPath/$romfolder" -type f -iname "*.iso" | while read -r f; do echo "Converting: $f using the createdvd flag and 2048 hunksize" @@ -461,10 +461,10 @@ if [ "$selection" == "Bulk Compression" ]; then find "$romsPath/$romfolder" -type f -iname "*.iso" | while read -r f; do echo "Converting: $f" compressCSO "$f" - done - else + done + else echo "No valid ROM found" - exit + exit fi done fi @@ -485,7 +485,7 @@ if [ "$selection" == "Bulk Compression" ]; then if [[ " ${xboxfolderWhiteList[*]} " =~ " ${romfolder} " ]]; then find "$romsPath/$romfolder" -type f -iname "*.iso" ! -name '*.xiso.iso' | while read -r f; do echo "Converting: $f" - compressXISO "$f" + compressXISO "$f" done fi done @@ -517,7 +517,7 @@ elif [ "$selection" == "Select a ROM" ]; then fi if [ -n "$selectedCompressionMethod" ]; then - break + break else zenity --error \ --text="Please select a compression method." \ @@ -525,7 +525,7 @@ elif [ "$selection" == "Select a ROM" ]; then --height=100 fi done - + echo "Selected: $selectedCompressionMethod" #/bin/bash @@ -534,7 +534,7 @@ elif [ "$selection" == "Select a ROM" ]; then ext=$(echo "${f##*.}" | awk '{print tolower($0)}') romFilePath=$(dirname "$f") - + case $ext in gcm) @@ -567,14 +567,14 @@ elif [ "$selection" == "Select a ROM" ]; then ;; esac - if [ "$selectedCompressionMethod" == "Compress a ROM to RVZ" ]; then + if [ "$selectedCompressionMethod" == "Compress a ROM to RVZ" ]; then if [[ "$ext" =~ "iso" || "$ext" =~ "ISO" || "$ext" =~ "gcm" || "$ext" =~ "GCM" ]]; then echo "Valid ROM found, compressing $f to RVZ" compressRVZ "$f" else echo "No valid ROM found" fi - elif [ "$selectedCompressionMethod" == "Decompress a GC/Wii RVZ to ISO" ]; then + elif [ "$selectedCompressionMethod" == "Decompress a GC/Wii RVZ to ISO" ]; then if [[ "$ext" =~ "rvz" || "$ext" =~ "RVZ" ]]; then echo "Valid ROM found, decompressing $f to ISO" decompressRVZ "$f" @@ -587,20 +587,20 @@ elif [ "$selection" == "Select a ROM" ]; then compressCHDDVD "$f" elif [[ "$ext" =~ "gdi" || "$ext" =~ "GDI" || "$ext" =~ "cue" || "$f" =~ "CUE" ]]; then echo "Valid $ext ROM found, compressing $f to CHD" - compressCHD "$f" - else - echo "No valid ROM found" + compressCHD "$f" + else + echo "No valid ROM found" fi - elif [ "$selectedCompressionMethod" == "Compress a ROM to XISO" ]; then + elif [ "$selectedCompressionMethod" == "Compress a ROM to XISO" ]; then if [[ "$ext" =~ "xiso" || "$ext" =~ "XISO" ]]; then echo "$f already compressed." elif [[ "$ext" =~ "iso" || "$ext" =~ "ISO" ]]; then echo "Valid $ext ROM found, compressing $f to xiso" compressXISO "$f" - else + else echo "No valid ROM found" fi - elif [ "$selectedCompressionMethod" == "Compress a PSP ROM to CHD or CSO" ]; then + elif [ "$selectedCompressionMethod" == "Compress a PSP ROM to CHD or CSO" ]; then if [[ "$ext" =~ "iso" || "$ext" =~ "ISO" ]]; then echo "Valid ROM found, prompting user" @@ -611,7 +611,7 @@ elif [ "$selection" == "Select a ROM" ]; then --ok-label="CSO" \ --extra-button="CHD" \ --cancel-label="Cancel" \ - --text="${text}" 2>/dev/null && echo "CSO") + --text="${text}" 2>/dev/null && echo "CSO") if [ "$pspSelection" == "CSO" ]; then echo "Valid $ext ROM found, compressing $f to CSO" @@ -620,38 +620,38 @@ elif [ "$selection" == "Select a ROM" ]; then echo "Valid $ext ROM found, compressing $f to CHD using the createdvd flag and 2048 hunksize." compressCHDDVDLowerHunk "$f" fi - else + else echo "No valid ROM found" fi elif [ "$selectedCompressionMethod" == "Decompress a PSP CHD to ISO" ]; then if [[ "$ext" =~ "chd" || "$ext" =~ "CHD" ]]; then echo "Valid $ext ROM found, decompressing $f to ISO using the extractdvd flag." decompressCHDISO "$f" - else - echo "No valid ROM found" + else + echo "No valid ROM found" fi elif [ "$selectedCompressionMethod" == "Decompress a PSP CSO to ISO" ]; then if [[ "$ext" =~ "cso" || "$ext" =~ "CSO" ]]; then echo "Valid $ext ROM found, decompressing $f to ISO." decompressCSOISO "$f" - else - echo "No valid ROM found" + else + echo "No valid ROM found" fi - elif [ "$selectedCompressionMethod" == "Trim a 3DS ROM" ]; then + elif [ "$selectedCompressionMethod" == "Trim a 3DS ROM" ]; then if [[ "$ext" =~ "(Trimmed)" ]]; then echo "$f already trimmed." elif [[ "$ext" =~ "3ds" || "$ext" =~ "3DS" ]]; then echo "Valid $ext ROM found, trimming $f" trim3ds "$f" - else + else echo "No valid ROM found" fi - elif [ "$selectedCompressionMethod" == "Compress a ROM to 7zip" ]; then + elif [ "$selectedCompressionMethod" == "Compress a ROM to 7zip" ]; then echo "true" if [[ " ${sevenzipFileExtensions[*]} " =~ " ${ext} " ]]; then echo "Valid ROM found, compressing $f to 7zip" - compress7z "$f" - else + compress7z "$f" + else echo "No valid ROM found" fi else @@ -719,7 +719,7 @@ elif [ "$compressionSelection" == "Bulk Decompression" ]; then for romfolder in "${romfolders[@]}"; do if [[ " ${csofolderWhiteList[*]} " =~ " ${romfolder} " ]]; then - find "$romsPath/$romfolder" -type f -iname "*.chd" | while read -r f; do + find "$romsPath/$romfolder" -type f -iname "*.chd" | while read -r f; do echo "Decompressing $f using the extractdvd flag" decompressCHDISO "$f" done @@ -728,7 +728,7 @@ elif [ "$compressionSelection" == "Bulk Decompression" ]; then for romfolder in "${romfolders[@]}"; do if [[ " ${csofolderWhiteList[*]} " =~ " ${romfolder} " ]]; then - find "$romsPath/$romfolder" -type f -iname "*.cso" | while read -r f; do + find "$romsPath/$romfolder" -type f -iname "*.cso" | while read -r f; do echo "Decompressing $f" decompressCSOISO "$f" done diff --git a/tools/cloud/Amazon Luna (2020).sh b/tools/cloud/Amazon Luna (2020).sh index 886612e22..d0b05e793 100755 --- a/tools/cloud/Amazon Luna (2020).sh +++ b/tools/cloud/Amazon Luna (2020).sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://luna.amazon.com/" diff --git a/tools/cloud/Amazon Prime Video (2006).sh b/tools/cloud/Amazon Prime Video (2006).sh index 56d19a504..6887feab8 100755 --- a/tools/cloud/Amazon Prime Video (2006).sh +++ b/tools/cloud/Amazon Prime Video (2006).sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://www.amazon.com/video" diff --git a/tools/cloud/Antstream.sh b/tools/cloud/Antstream.sh index 8758e57a7..6d67e8428 100755 --- a/tools/cloud/Antstream.sh +++ b/tools/cloud/Antstream.sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://live.antstream.com/" diff --git a/tools/cloud/Apple TV.sh b/tools/cloud/Apple TV.sh index c0f68e98f..899deb2a5 100755 --- a/tools/cloud/Apple TV.sh +++ b/tools/cloud/Apple TV.sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://tv.apple.com/" diff --git a/tools/cloud/Crave.sh b/tools/cloud/Crave.sh index f174c1c57..5ee478649 100644 --- a/tools/cloud/Crave.sh +++ b/tools/cloud/Crave.sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://www.crave.ca/" diff --git a/tools/cloud/Crunchyroll.sh b/tools/cloud/Crunchyroll.sh index d9be124a1..f49e9fb9d 100755 --- a/tools/cloud/Crunchyroll.sh +++ b/tools/cloud/Crunchyroll.sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://www.crunchyroll.com/" diff --git a/tools/cloud/Discord.sh b/tools/cloud/Discord.sh index 79cc6795e..dfe190d22 100755 --- a/tools/cloud/Discord.sh +++ b/tools/cloud/Discord.sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://discord.com/app" diff --git a/tools/cloud/Disney+.sh b/tools/cloud/Disney+.sh index fe7d5d7e9..f220b01a1 100755 --- a/tools/cloud/Disney+.sh +++ b/tools/cloud/Disney+.sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://www.disneyplus.com/" diff --git a/tools/cloud/Dropout.sh b/tools/cloud/Dropout.sh index 1f8c18a30..2b99c267b 100644 --- a/tools/cloud/Dropout.sh +++ b/tools/cloud/Dropout.sh @@ -1,5 +1,5 @@ #!/usr/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK=https://www.dropout.tv/browse diff --git a/tools/cloud/Emby Theater (Program).sh b/tools/cloud/Emby Theater (Program).sh index f5211c02a..3f30d6b2a 100755 --- a/tools/cloud/Emby Theater (Program).sh +++ b/tools/cloud/Emby Theater (Program).sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://emby.media/" diff --git a/tools/cloud/HBO Max.sh b/tools/cloud/HBO Max.sh index 8659e616c..969c64b46 100755 --- a/tools/cloud/HBO Max.sh +++ b/tools/cloud/HBO Max.sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://www.max.com/" diff --git a/tools/cloud/Home Assistant (Program).sh b/tools/cloud/Home Assistant (Program).sh index 085de8520..cf3a1e056 100755 --- a/tools/cloud/Home Assistant (Program).sh +++ b/tools/cloud/Home Assistant (Program).sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://demo.home-assistant.io/" diff --git a/tools/cloud/Hulu.sh b/tools/cloud/Hulu.sh index 9b7bd8d21..17023c924 100755 --- a/tools/cloud/Hulu.sh +++ b/tools/cloud/Hulu.sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://www.hulu.com/" diff --git a/tools/cloud/Jellyfin.sh b/tools/cloud/Jellyfin.sh index d2ac8a72a..571663e36 100644 --- a/tools/cloud/Jellyfin.sh +++ b/tools/cloud/Jellyfin.sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="http://localhost:8096" diff --git a/tools/cloud/Kavita.sh b/tools/cloud/Kavita.sh index bdfd289fb..f7aa1ddae 100644 --- a/tools/cloud/Kavita.sh +++ b/tools/cloud/Kavita.sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="http://localhost:5000" diff --git a/tools/cloud/Nebula.sh b/tools/cloud/Nebula.sh index 5d1d6df5e..64629b7d3 100644 --- a/tools/cloud/Nebula.sh +++ b/tools/cloud/Nebula.sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://nebula.tv/" diff --git a/tools/cloud/Netflix.sh b/tools/cloud/Netflix.sh index 678f183b9..3100b2c31 100755 --- a/tools/cloud/Netflix.sh +++ b/tools/cloud/Netflix.sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://www.netflix.com/" diff --git a/tools/cloud/Oqee by Free.sh b/tools/cloud/Oqee by Free.sh index 3d9da2074..71bf8b574 100644 --- a/tools/cloud/Oqee by Free.sh +++ b/tools/cloud/Oqee by Free.sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://smarttv.oqee.net/" diff --git a/tools/cloud/Paramount+.sh b/tools/cloud/Paramount+.sh index 3c25cc319..fe45cf97d 100755 --- a/tools/cloud/Paramount+.sh +++ b/tools/cloud/Paramount+.sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://www.paramountplus.com/" diff --git a/tools/cloud/Peacock TV (2020).sh b/tools/cloud/Peacock TV (2020).sh index 39da465e5..9f6c5d2ec 100755 --- a/tools/cloud/Peacock TV (2020).sh +++ b/tools/cloud/Peacock TV (2020).sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://www.peacocktv.com/" diff --git a/tools/cloud/Plex.sh b/tools/cloud/Plex.sh index f5c2b2afd..0b5d0af20 100755 --- a/tools/cloud/Plex.sh +++ b/tools/cloud/Plex.sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://app.plex.tv/" diff --git a/tools/cloud/Pocket Casts.sh b/tools/cloud/Pocket Casts.sh index ec372616c..f92d16b03 100644 --- a/tools/cloud/Pocket Casts.sh +++ b/tools/cloud/Pocket Casts.sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://play.pocketcasts.com" diff --git a/tools/cloud/Spotify.sh b/tools/cloud/Spotify.sh index 3f0cf9e00..470f229a4 100755 --- a/tools/cloud/Spotify.sh +++ b/tools/cloud/Spotify.sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://open.spotify.com/" diff --git a/tools/cloud/TikTok.sh b/tools/cloud/TikTok.sh index ab2e4683e..e3cf9d90b 100755 --- a/tools/cloud/TikTok.sh +++ b/tools/cloud/TikTok.sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://www.tiktok.com/" diff --git a/tools/cloud/Twitch.sh b/tools/cloud/Twitch.sh index d0018c477..9e45f6fe8 100755 --- a/tools/cloud/Twitch.sh +++ b/tools/cloud/Twitch.sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://www.twitch.tv/" diff --git a/tools/cloud/Twitter.sh b/tools/cloud/Twitter.sh index 0d04e96a7..0cbf3278d 100755 --- a/tools/cloud/Twitter.sh +++ b/tools/cloud/Twitter.sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://twitter.com/" diff --git a/tools/cloud/Vimeo (2004).sh b/tools/cloud/Vimeo (2004).sh index 79393cf03..361d48aaf 100755 --- a/tools/cloud/Vimeo (2004).sh +++ b/tools/cloud/Vimeo (2004).sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://vimeo.com/" diff --git a/tools/cloud/Xbox Cloud Gaming (xCloud) (2019).sh b/tools/cloud/Xbox Cloud Gaming (xCloud) (2019).sh index 61192345c..dc5489226 100755 --- a/tools/cloud/Xbox Cloud Gaming (xCloud) (2019).sh +++ b/tools/cloud/Xbox Cloud Gaming (xCloud) (2019).sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://www.xbox.com/play" diff --git a/tools/cloud/YouTube Music (2015).sh b/tools/cloud/YouTube Music (2015).sh index 8a267cffb..973c9cde8 100755 --- a/tools/cloud/YouTube Music (2015).sh +++ b/tools/cloud/YouTube Music (2015).sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://music.youtube.com/" diff --git a/tools/cloud/YouTube TV.sh b/tools/cloud/YouTube TV.sh index 7ff0550b0..090d82f99 100755 --- a/tools/cloud/YouTube TV.sh +++ b/tools/cloud/YouTube TV.sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://tv.youtube.com/" diff --git a/tools/cloud/YouTube.sh b/tools/cloud/YouTube.sh index cb71760c8..e7c582717 100755 --- a/tools/cloud/YouTube.sh +++ b/tools/cloud/YouTube.sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://www.youtube.com/" diff --git a/tools/cloud/audiobookshelf.sh b/tools/cloud/audiobookshelf.sh index 47bb6c36f..d22abee71 100644 --- a/tools/cloud/audiobookshelf.sh +++ b/tools/cloud/audiobookshelf.sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="http://localhost:13378" diff --git a/tools/cloud/iPlayer.sh b/tools/cloud/iPlayer.sh index 4142656bc..dca9d2d95 100755 --- a/tools/cloud/iPlayer.sh +++ b/tools/cloud/iPlayer.sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://www.bbc.co.uk/iplayer/" diff --git a/tools/cloud/webRcade.sh b/tools/cloud/webRcade.sh index 03e5710aa..314ea9b89 100755 --- a/tools/cloud/webRcade.sh +++ b/tools/cloud/webRcade.sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" source "$romsPath/cloud/cloud.conf" LINK="https://play.webrcade.com/" diff --git a/tools/cloudSync/cloud_sync_watcher.sh b/tools/cloudSync/cloud_sync_watcher.sh index ec1c939c3..0eceda298 100644 --- a/tools/cloudSync/cloud_sync_watcher.sh +++ b/tools/cloudSync/cloud_sync_watcher.sh @@ -1,9 +1,7 @@ #!/bin/bash - -echo "SERVICE - START" > $HOME/.config/EmuDeck/logs/CloudWatcher.log -source "$HOME/.config/EmuDeck/settings.sh" -source "$HOME/.config/EmuDeck/backend/functions/helperFunctions.sh" -source "$HOME/.config/EmuDeck/backend/functions/ToolScripts/emuDeckCloudSync.sh" +emudeckBackend="$HOME/.config/EmuDeck/backend/" +. $emudeckBackend/functions/all.sh +echo "SERVICE - START" > $emudeckLogs/CloudWatcher.log show_notification(){ text=$1 @@ -16,7 +14,7 @@ show_notification(){ } if [ $system = "darwin" ];then - source "$HOME/.config/EmuDeck/backend/darwin/functions/ToolsScripts/emuDeckCloudSync.sh" + source "$emudeckBackend/darwin/functions/ToolsScripts/emuDeckCloudSync.sh" fi touch "$savesPath/.gaming" @@ -25,7 +23,7 @@ touch "$savesPath/.watching" show_notification "CloudSync Ready!" # Declare an array to store current hashes -echo "SERVICE - declare" >> $HOME/.config/EmuDeck/logs/CloudWatcher.log +echo "SERVICE - declare" >> $emudeckLogs/CloudWatcher.log declare -A current_hashes # Function to calculate the hash of a directory @@ -69,7 +67,7 @@ do lastSavedDir='' for dir in "${!current_hashes[@]}"; do - #echo -ne "." >> $HOME/.config/EmuDeck/logs/CloudWatcher.log + #echo -ne "." >> $emudeckLogs/CloudWatcher.log if [ -h "$dir" ]; then realDir=$(readlink -f "$dir") @@ -80,8 +78,8 @@ do # if [[ $dir == *"citra/saves"* ]]; then - # echo "$dir - ${current_hashes[$dir]}" >> $HOME/.config/EmuDeck/logs/CloudWatcher.log - # echo "$dir - $new_hash" >> $HOME/.config/EmuDeck/logs/CloudWatcher.log + # echo "$dir - ${current_hashes[$dir]}" >> $emudeckLogs/CloudWatcher.log + # echo "$dir - $new_hash" >> $emudeckLogs/CloudWatcher.log # fi currentEmu=$(get_emulator) @@ -89,30 +87,30 @@ do currentEmu=$dir fi - # echo $currentEmu >> $HOME/.config/EmuDeck/logs/CloudWatcher.log - # echo $dir >> $HOME/.config/EmuDeck/logs/CloudWatcher.log + # echo $currentEmu >> $emudeckLogs/CloudWatcher.log + # echo $dir >> $emudeckLogs/CloudWatcher.log if [ "${current_hashes[$dir]}" != "$new_hash" ] && [[ $dir == *"$currentEmu"* ]]; then # Show the name of the folder immediately behind "saves" - echo "SERVICE - CHANGES DETECTED on $dir, LETS CHECK IF ITS A DUPLICATE" >> $HOME/.config/EmuDeck/logs/CloudWatcher.log + echo "SERVICE - CHANGES DETECTED on $dir, LETS CHECK IF ITS A DUPLICATE" >> $emudeckLogs/CloudWatcher.log timestamp=$(date +%s) if [ $((timestamp - lastSavedTime)) == 0 ]; then - echo "SERVICE - IGNORED, same timestamp" >> $HOME/.config/EmuDeck/logs/CloudWatcher.log + echo "SERVICE - IGNORED, same timestamp" >> $emudeckLogs/CloudWatcher.log fi - echo $((timestamp - lastSavedTime)) >> $HOME/.config/EmuDeck/logs/CloudWatcher.log + echo $((timestamp - lastSavedTime)) >> $emudeckLogs/CloudWatcher.log if [ $((timestamp - lastSavedTime)) -ge 1 ]; then emuName=$(get_parent_folder_name "$dir") #cloud_sync_update - echo "SERVICE - $emuName CHANGES CONFIRMED" >> $HOME/.config/EmuDeck/logs/CloudWatcher.log + echo "SERVICE - $emuName CHANGES CONFIRMED" >> $emudeckLogs/CloudWatcher.log echo $timestamp > "$savesPath/$emuName/.pending_upload" - echo "SERVICE - UPLOADING" >> $HOME/.config/EmuDeck/logs/CloudWatcher.log + echo "SERVICE - UPLOADING" >> $emudeckLogs/CloudWatcher.log show_notification "Uploading from $emuName" cloud_sync_uploadEmu $emuName rm -rf "$savesPath/$emuName/.pending_upload" - echo "SERVICE - UPLOADED!" >> $HOME/.config/EmuDeck/logs/CloudWatcher.log + echo "SERVICE - UPLOADED!" >> $emudeckLogs/CloudWatcher.log lastSavedTime=$(date +%s) else lastSavedTime='' @@ -124,14 +122,14 @@ do #Autostop service when everything has finished if [ ! -f "$savesPath/.gaming" ]; then - echo "SERVICE - NO GAMING" >> $HOME/.config/EmuDeck/logs/CloudWatcher.log + echo "SERVICE - NO GAMING" >> $emudeckLogs/CloudWatcher.log show_notification "Uploading... don't turn off your device" - if [ ! -f "$HOME/.config/EmuDeck/cloud.lock" ]; then - echo "SERVICE - STOP WATCHING" >> $HOME/.config/EmuDeck/logs/CloudWatcher.log + if [ ! -f "$emudeckFolder/cloud.lock" ]; then + echo "SERVICE - STOP WATCHING" >> $emudeckLogs/CloudWatcher.log show_notification "Sync Completed! You can safely turn off your device" rm -rf "$savesPath/.watching" rm -rf "$savesPath/.emuName" - echo "SERVICE - NO LOCK - KILLING SERVICE" >> $HOME/.config/EmuDeck/logs/CloudWatcher.log + echo "SERVICE - NO LOCK - KILLING SERVICE" >> $emudeckLogs/CloudWatcher.log cloud_sync_stopService fi @@ -139,4 +137,4 @@ do sleep 2 # Wait for 1 second before the next iteration done -echo "SERVICE - END" >> $HOME/.config/EmuDeck/logs/CloudWatcher.log +echo "SERVICE - END" >> $emudeckLogs/CloudWatcher.log diff --git a/tools/launchers/ares-emu.sh b/tools/launchers/ares-emu.sh index d76a1e721..57f1790f7 100755 --- a/tools/launchers/ares-emu.sh +++ b/tools/launchers/ares-emu.sh @@ -1,5 +1,5 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" cd $biosPath emulatorInit "ares" /usr/bin/flatpak run dev.ares.ares "${@}" diff --git a/tools/launchers/bigpemu.sh b/tools/launchers/bigpemu.sh index f216c2afb..1ee4daad8 100755 --- a/tools/launchers/bigpemu.sh +++ b/tools/launchers/bigpemu.sh @@ -1,8 +1,8 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "BigPEmu" emuName="bigpemu" #parameterize me -emufolder="$HOME/.config/EmuDeck/Emulators/BigPEmu" # has to be here for ES-DE to find it +emufolder="$emusFolder/BigPEmu" # has to be here for ES-DE to find it #initialize execute array exe=() diff --git a/tools/launchers/cemu-native.sh b/tools/launchers/cemu-native.sh index 6025d1e93..8526f3c44 100644 --- a/tools/launchers/cemu-native.sh +++ b/tools/launchers/cemu-native.sh @@ -1,8 +1,8 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "cemu" # shellcheck disable=SC1091 -. "${HOME}/.config/emudeck/settings.sh" +. "$emudeckFolder/settings.sh" # shellcheck disable=SC2154 LAUNCH="${toolsPath}/emu-launch.sh" diff --git a/tools/launchers/cemu.sh b/tools/launchers/cemu.sh index 0c8f09f32..6c8b14023 100755 --- a/tools/launchers/cemu.sh +++ b/tools/launchers/cemu.sh @@ -1,5 +1,5 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "Cemu" # cemu.sh @@ -35,7 +35,7 @@ showArguments () { # Attempt to find the given program as an AppImage getAppImage () { - local EMUDIR="${HOME}/.config/EmuDeck/Emulators" + local EMUDIR="$emusFolder" # Check for AppImage local APPIMAGE @@ -65,7 +65,7 @@ getFlatpak () { # Main main () { - source $HOME/.config/EmuDeck/settings.sh + source $emudeckFolder/settings.sh # NAME - Cemu NAME="Cemu" diff --git a/tools/launchers/citra.sh b/tools/launchers/citra.sh index 4c14becdd..b49935c36 100755 --- a/tools/launchers/citra.sh +++ b/tools/launchers/citra.sh @@ -1,8 +1,8 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "citra" emuName="citra-qt" #parameterize me -emufolder="$HOME/.config/EmuDeck/Emulators" # has to be applications for ES-DE to find it +emufolder="$emusFolder" # has to be applications for ES-DE to find it #initialize execute array exe=() diff --git a/tools/launchers/dolphin-emu.sh b/tools/launchers/dolphin-emu.sh index 4560adcaa..b01c6578d 100644 --- a/tools/launchers/dolphin-emu.sh +++ b/tools/launchers/dolphin-emu.sh @@ -1,5 +1,5 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "dolphin" /usr/bin/flatpak run org.DolphinEmu.dolphin-emu "${@}" rm -rf "$savesPath/.gaming" \ No newline at end of file diff --git a/tools/launchers/duckstation.sh b/tools/launchers/duckstation.sh index 578b0aa96..b13c1f55a 100644 --- a/tools/launchers/duckstation.sh +++ b/tools/launchers/duckstation.sh @@ -1,5 +1,5 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "duckstation" /usr/bin/flatpak run org.duckstation.DuckStation "${@}" rm -rf "$savesPath/.gaming" \ No newline at end of file diff --git a/tools/launchers/es-de/es-de.sh b/tools/launchers/es-de/es-de.sh index 728b53bec..9b3396eb1 100755 --- a/tools/launchers/es-de/es-de.sh +++ b/tools/launchers/es-de/es-de.sh @@ -1,5 +1,5 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" cloud_sync_downloadEmuAll && cloud_sync_startService "$ESDE_toolPath" "${@}" rm -rf "$savesPath/.gaming" \ No newline at end of file diff --git a/tools/launchers/flycast.sh b/tools/launchers/flycast.sh index b61a04a6f..537fe0ed9 100644 --- a/tools/launchers/flycast.sh +++ b/tools/launchers/flycast.sh @@ -1,5 +1,5 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "flycast" /usr/bin/flatpak run org.flycast.Flycast "${@}" rm -rf "$savesPath/.gaming" \ No newline at end of file diff --git a/tools/launchers/lime3ds.sh b/tools/launchers/lime3ds.sh index ecdfcbffc..2a2bdbab5 100755 --- a/tools/launchers/lime3ds.sh +++ b/tools/launchers/lime3ds.sh @@ -1,8 +1,8 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "lime3ds" emuName="lime3ds-gui" #parameterize me -emufolder="$HOME/.config/EmuDeck/Emulators" # has to be applications for ES-DE to find it +emufolder="$emusFolder" # has to be applications for ES-DE to find it #initialize execute array exe=() diff --git a/tools/launchers/mame.sh b/tools/launchers/mame.sh index cb889f73b..a7b1d79ed 100755 --- a/tools/launchers/mame.sh +++ b/tools/launchers/mame.sh @@ -1,5 +1,5 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "mame" /usr/bin/flatpak run org.mamedev.MAME "${@}" rm -rf "$savesPath/.gaming" \ No newline at end of file diff --git a/tools/launchers/melonds.sh b/tools/launchers/melonds.sh index 2aeccf064..d759b4483 100644 --- a/tools/launchers/melonds.sh +++ b/tools/launchers/melonds.sh @@ -1,5 +1,5 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "melonds" /usr/bin/flatpak run net.kuribo64.melonDS "${@}" rm -rf "$savesPath/.gaming" \ No newline at end of file diff --git a/tools/launchers/mgba.sh b/tools/launchers/mgba.sh index db995a088..3114b6ba1 100755 --- a/tools/launchers/mgba.sh +++ b/tools/launchers/mgba.sh @@ -1,8 +1,8 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "mgba" emuName="mGBA" #parameterize me -emufolder="$HOME/.config/EmuDeck/Emulators" # has to be applications for ES-DE to find it +emufolder="$emusFolder" # has to be applications for ES-DE to find it #initialize execute array exe=() diff --git a/tools/launchers/model-2-emulator.sh b/tools/launchers/model-2-emulator.sh index 8bbef9418..12f890cea 100755 --- a/tools/launchers/model-2-emulator.sh +++ b/tools/launchers/model-2-emulator.sh @@ -1,5 +1,5 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "model2" # $ULWGL_toolPath is assigned in emuDeckModel2.sh GAMELAUNCHER=$ULWGL_toolPath/ulwgl-run diff --git a/tools/launchers/pcsx2-qt.sh b/tools/launchers/pcsx2-qt.sh index fd0f9ef24..b030eb4c0 100755 --- a/tools/launchers/pcsx2-qt.sh +++ b/tools/launchers/pcsx2-qt.sh @@ -1,8 +1,8 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "pcsx2" emuName="pcsx2-Qt" #parameterize me -emufolder="$HOME/.config/EmuDeck/Emulators" # has to be applications for ES-DE to find it +emufolder="$emusFolder" # has to be applications for ES-DE to find it #initialize execute array exe=() diff --git a/tools/launchers/pegasus/pegasus-frontend.sh b/tools/launchers/pegasus/pegasus-frontend.sh index 6850397bd..f7b669c87 100755 --- a/tools/launchers/pegasus/pegasus-frontend.sh +++ b/tools/launchers/pegasus/pegasus-frontend.sh @@ -1,6 +1,6 @@ #!/bin/bash . "$HOME/.config/EmuDeck/backend/functions/all.sh" -#. "$HOME/.config/EmuDeck/backend/tools/rom-parser.sh" +#. "$emudeckBackend/tools/rom-parser.sh" cloud_sync_downloadEmuAll && cloud_sync_startService -$HOME/.config/EmuDeck/Emulators/pegasus-fe "${@}" +$pegasusFolder/pegasus-fe "${@}" rm -rf "$savesPath/.gaming" diff --git a/tools/launchers/ppsspp.sh b/tools/launchers/ppsspp.sh index 3355040c8..4b0c7fa48 100755 --- a/tools/launchers/ppsspp.sh +++ b/tools/launchers/ppsspp.sh @@ -1,5 +1,5 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "ppsspp" /usr/bin/flatpak run org.ppsspp.PPSSPP "${@}" rm -rf "$savesPath/.gaming" \ No newline at end of file diff --git a/tools/launchers/primehack.sh b/tools/launchers/primehack.sh index 2b0b7fb91..fc9078f8a 100644 --- a/tools/launchers/primehack.sh +++ b/tools/launchers/primehack.sh @@ -1,5 +1,5 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "primehack" /usr/bin/flatpak run io.github.shiiion.primehack "${@}" rm -rf "$savesPath/.gaming" \ No newline at end of file diff --git a/tools/launchers/retroarch.sh b/tools/launchers/retroarch.sh index c6208a945..cc66e12c5 100644 --- a/tools/launchers/retroarch.sh +++ b/tools/launchers/retroarch.sh @@ -1,5 +1,5 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "retroarch" /usr/bin/flatpak run org.libretro.RetroArch $netplayCMD "${@}" rm -rf "$savesPath/.gaming" \ No newline at end of file diff --git a/tools/launchers/rosaliesmupengui.sh b/tools/launchers/rosaliesmupengui.sh index 432a9dd0c..3aac6fa50 100755 --- a/tools/launchers/rosaliesmupengui.sh +++ b/tools/launchers/rosaliesmupengui.sh @@ -1,5 +1,5 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "RMG" /usr/bin/flatpak run com.github.Rosalie241.RMG "${@}" rm -rf "$savesPath/.gaming" \ No newline at end of file diff --git a/tools/launchers/rpcs3.sh b/tools/launchers/rpcs3.sh index 636a82eb4..b581c74b5 100755 --- a/tools/launchers/rpcs3.sh +++ b/tools/launchers/rpcs3.sh @@ -1,8 +1,8 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "rpcs3" emuName="rpcs3" #parameterize me -emufolder="$HOME/.config/EmuDeck/Emulators" # has to be applications for ES-DE to find it +emufolder="$emusFolder" # has to be applications for ES-DE to find it #initialize execute array exe=() diff --git a/tools/launchers/ryujinx.sh b/tools/launchers/ryujinx.sh index 64aeb3643..e33316b37 100755 --- a/tools/launchers/ryujinx.sh +++ b/tools/launchers/ryujinx.sh @@ -1,8 +1,8 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "ryujinx" emuName="Ryujinx" #parameterize me -emufolder="$HOME/.config/EmuDeck/Emulators/publish" # has to be here for ES-DE to find it +emufolder="$emusFolder/publish" # has to be here for ES-DE to find it #initialize execute array exe=() diff --git a/tools/launchers/scummvm.sh b/tools/launchers/scummvm.sh index fb270be70..11fd970ad 100644 --- a/tools/launchers/scummvm.sh +++ b/tools/launchers/scummvm.sh @@ -1,5 +1,5 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "scummvm" /usr/bin/flatpak run org.scummvm.ScummVM "${@}" rm -rf "$savesPath/.gaming" \ No newline at end of file diff --git a/tools/launchers/shadps4.sh b/tools/launchers/shadps4.sh index cf6c91e71..90ce8be8f 100644 --- a/tools/launchers/shadps4.sh +++ b/tools/launchers/shadps4.sh @@ -1,8 +1,8 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "shadps4" emuName="Shadps4-qt" #parameterize me -emufolder="$HOME/.config/EmuDeck/Emulators" # has to be applications for ES-DE to find it +emufolder="$emusFolder" # has to be applications for ES-DE to find it #initialize execute array exe=() @@ -28,7 +28,7 @@ fileExtension="${@##*.}" if [[ $fileExtension == "desktop" ]]; then rpcs3desktopFile=$(grep -E "^Exec=" "${*}" | sed 's/^Exec=//' | sed 's/%%/%/g') launchParam="Exec=$rpcs3desktopFile" - launchParam=$(echo "$launchParam" | sed "s|^\(Exec=\)[^\"']*\"|\1$HOME/.config/EmuDeck/Emulators/Shadps4-qt.AppImage -g \"|" | sed 's/^Exec=//') + launchParam=$(echo "$launchParam" | sed "s|^\(Exec=\)[^\"']*\"|\1$emusFolder/Shadps4-qt.AppImage -g \"|" | sed 's/^Exec=//') eval $launchParam else #run the executable with the params. diff --git a/tools/launchers/srm/steamrommanager.sh b/tools/launchers/srm/steamrommanager.sh index fbf24f1c6..b16499488 100755 --- a/tools/launchers/srm/steamrommanager.sh +++ b/tools/launchers/srm/steamrommanager.sh @@ -1,16 +1,16 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" -if [ -e "${toolsPath}/Steam-ROM-Manager.AppImage" ]; then +if [ -e "${toolsPath}/Steam-ROM-Manager.AppImage" ]; then SRM_toolPath="${toolsPath}/Steam-ROM-Manager.AppImage" -elif [ -e "${toolsPath}/Steam ROM Manager.AppImage" ]; then +elif [ -e "${toolsPath}/Steam ROM Manager.AppImage" ]; then SRM_toolPath="${toolsPath}/Steam ROM Manager.AppImage" -elif [ -e "${toolsPath}/srm/Steam-ROM-Manager.AppImage" ]; then +elif [ -e "${toolsPath}/srm/Steam-ROM-Manager.AppImage" ]; then SRM_toolPath="${toolsPath}/srm/Steam-ROM-Manager.AppImage" -else +else SRM_install SRM_init -fi +fi if grep -q '"autoKillSteam": true' "$HOME/.config/steam-rom-manager/userData/userSettings.json"; then echo "Steam ROM Manager path: $SRM_toolPath" diff --git a/tools/launchers/supermodel.sh b/tools/launchers/supermodel.sh index 5af7ffc2d..fc4976c54 100644 --- a/tools/launchers/supermodel.sh +++ b/tools/launchers/supermodel.sh @@ -1,5 +1,5 @@ #!/bin/sh -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "supermodel" param="${@}" param=$(echo "$param" | sed "s|'||g") diff --git a/tools/launchers/suyu.sh b/tools/launchers/suyu.sh index ccf6b12c4..e671c20e4 100755 --- a/tools/launchers/suyu.sh +++ b/tools/launchers/suyu.sh @@ -1,8 +1,8 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "suyu" emuName="suyu" #parameterize me -emufolder="$HOME/.config/EmuDeck/Emulators" # has to be applications for ES-DE to find it +emufolder="$emusFolder" # has to be applications for ES-DE to find it #find full path to emu executable exe=$(find $emufolder -iname "${emuName}*.AppImage" | sort -n | cut -d' ' -f 2- | tail -n 1 2>/dev/null) diff --git a/tools/launchers/vita3k.sh b/tools/launchers/vita3k.sh index 45d4530e2..6261c7ab4 100755 --- a/tools/launchers/vita3k.sh +++ b/tools/launchers/vita3k.sh @@ -1,10 +1,10 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "Vita3k" export LC_ALL="C" emuName="Vita3K" #parameterize me -emufolder="$HOME/.config/EmuDeck/Emulators/Vita3K" # has to be applications for ES-DE to find it +emufolder="$emusFolder/Vita3K" # has to be applications for ES-DE to find it #initialize execute array exe=() diff --git a/tools/launchers/xemu-emu.sh b/tools/launchers/xemu-emu.sh index 2042f9dc4..ee427e098 100644 --- a/tools/launchers/xemu-emu.sh +++ b/tools/launchers/xemu-emu.sh @@ -1,5 +1,5 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "xemu" /usr/bin/flatpak run app.xemu.xemu "${@}" rm -rf "$savesPath/.gaming" \ No newline at end of file diff --git a/tools/launchers/xenia.sh b/tools/launchers/xenia.sh index f19bbd994..bbb91e12b 100644 --- a/tools/launchers/xenia.sh +++ b/tools/launchers/xenia.sh @@ -1,6 +1,6 @@ #!/bin/bash # xenia.sh -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "xenia" # Get SELFPATH SELFPATH="$( realpath "${BASH_SOURCE[0]}" )" diff --git a/tools/launchers/yuzu.sh b/tools/launchers/yuzu.sh index 7267afc79..984a95133 100755 --- a/tools/launchers/yuzu.sh +++ b/tools/launchers/yuzu.sh @@ -1,20 +1,20 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" emulatorInit "yuzu" emuName="yuzu" #parameterize me useEAifFound="true" # set to false to simply use the newest file found -emufolder="$HOME/.config/EmuDeck/Emulators" # has to be applications for ES-DE to find it -emuDontUpdate="$HOME/.config/EmuDeck/${emuName}.noupdate" -Yuzu_emuPath="$HOME/.config/EmuDeck/Emulators/yuzu.AppImage" -YuzuEA_emuPath="$HOME/.config/EmuDeck/Emulators/yuzu-ea.AppImage" -YuzuEA_tokenFile="$HOME/.config/EmuDeck/yuzu-ea-token.txt" -YuzuEA_lastVerFile="$HOME/.config/EmuDeck/yuzu-ea.ver" -Yuzu_lastVerFile="$HOME/.config/EmuDeck/yuzu.ver" +emufolder="$emusFolder" # has to be applications for ES-DE to find it +emuDontUpdate="$emudeckFolder/${emuName}.noupdate" +Yuzu_emuPath="$emusFolder/yuzu.AppImage" +YuzuEA_emuPath="$emusFolder/yuzu-ea.AppImage" +YuzuEA_tokenFile="$emudeckFolder/yuzu-ea-token.txt" +YuzuEA_lastVerFile="$emudeckFolder/yuzu-ea.ver" +Yuzu_lastVerFile="$emudeckFolder/yuzu.ver" showProgress="true" #source the helpers for safeDownload -. "$HOME/.config/EmuDeck/backend/functions/helperFunctions.sh" +. "$emudeckBackend/functions/helperFunctions.sh" #force ea if available if [ "$useEAifFound" = "true" ]; then diff --git a/tools/scrapers/screenscraper.sh b/tools/scrapers/screenscraper.sh index 3edcab97b..cf1584982 100644 --- a/tools/scrapers/screenscraper.sh +++ b/tools/scrapers/screenscraper.sh @@ -1,5 +1,5 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" NONE='\033[00m' RED='\033[01;31m' @@ -12,23 +12,23 @@ BOLD='\033[1m' UNDERLINE='\033[4m' BLINK='\x1b[5m' -if [ ! -f "$HOME/.config/EmuDeck/.userSS" ]; then +if [ ! -f "$emudeckFolder/.userSS" ]; then user=$(zenity --entry --title="ScreenScrapper" --text="User:") password=$(zenity --password --title="ScreenScrapper" --text="Password:") encryption_key=$(openssl rand -base64 32) encrypted_password=$(echo "$password" | openssl enc -aes-256-cbc -pbkdf2 -base64 -pass "pass:$encryption_key") - echo "$encryption_key" > "$HOME/.config/EmuDeck/logs/.key" - echo "$encrypted_password" > "$HOME/.config/EmuDeck/.passSS" - echo "$user" > "$HOME/.config/EmuDeck/.userSS" + echo "$encryption_key" > "$emudeckLogs/.key" + echo "$encrypted_password" > "$emudeckFolder/.passSS" + echo "$user" > "$emudeckFolder/.userSS" fi romParser_SS_get_url(){ local romName=$1 local system=$2 local type=$3 - local userSS=$(cat "$HOME/.config/EmuDeck/.userSS") - local encryption_key=$(cat "$HOME/.config/EmuDeck/logs/.key") - local encrypted_password=$(cat "$HOME/.config/EmuDeck/.passSS") + local userSS=$(cat "$emudeckFolder/.userSS") + local encryption_key=$(cat "$emudeckLogs/.key") + local encrypted_password=$(cat "$emudeckFolder/.passSS") local decrypted_password=$(echo "$encrypted_password" | openssl enc -d -aes-256-cbc -pbkdf2 -base64 -pass "pass:$encryption_key") local passSS=$decrypted_password @@ -336,8 +336,8 @@ romParser_SS_download(){ romParser_SS_start(){ #generateGameLists echo -e "${BOLD}Starting ScreenScraper Thumbnails Scraper...${NONE}" - python $HOME/.config/EmuDeck/backend/tools/generate_game_lists.py "$romsPath" - json=$(cat "$HOME/.config/EmuDeck/cache/roms_games.json") + python $emudeckBackend/tools/generate_game_lists.py "$romsPath" + json=$(cat "$emudeckFolder/cache/roms_games.json") platforms=$(echo "$json" | jq -r '.[].id') declare -A processed_games diff --git a/uninstall.sh b/uninstall.sh index 7bef81bda..b4343d058 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -1,5 +1,5 @@ #!/bin/bash -source "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/functions/all.sh" doUninstall=false doUninstallares=true @@ -88,8 +88,8 @@ if [[ -f "$HOME/homebrew/services/PluginLoader" ]] ; then ans=$? if [ $ans -eq 0 ]; then curl -S -s -L -O --output-dir "$HOME/.config/EmuDeck" --connect-timeout 30 https://github.com/SteamDeckHomebrew/decky-installer/releases/latest/download/user_install_script.sh - chmod +x "$HOME/.config/EmuDeck/user_install_script.sh" - "$HOME/.config/EmuDeck/user_install_script.sh" + chmod +x "$emudeckFolder/user_install_script.sh" + "$emudeckFolder/user_install_script.sh" else echo -e "No" @@ -158,7 +158,7 @@ fi fi if [[ "$RPUninstall" != *"chiaki-ng"* ]]; then - rm -f "$HOME/.config/EmuDeck/Emulators/chiaki-ng.AppImage" &> /dev/null + rm -f "$emusFolder/chiaki-ng.AppImage" &> /dev/null rm -rf "$HOME/.config/Chiaki/" &> /dev/null rm -rf "$HOME/.cache/Chiaki/" &> /dev/null rm -f "$romsPath/remoteplay/chiaki-ng.sh" &> /dev/null @@ -166,7 +166,7 @@ fi fi if [[ "$RPUninstall" != *"Greenlight"* ]]; then - rm -f "$HOME/.config/EmuDeck/Emulators/Greenlight.AppImage" &> /dev/null + rm -f "$emusFolder/Greenlight.AppImage" &> /dev/null rm -f "$romsPath/remoteplay/Greenlight.sh" &> /dev/null rm -rf "$HOME/.config/greenlight/" &> /dev/null rm -rf "$HOME/.local/share/applications/Greenlight.desktop" &> /dev/null @@ -185,7 +185,7 @@ fi fi if [[ "$RPUninstall" != *"ShadowPC"* ]]; then - rm -f "$HOME/.config/EmuDeck/Emulators/ShadowPC.AppImage" &> /dev/null + rm -f "$emusFolder/ShadowPC.AppImage" &> /dev/null rm -f "$romsPath/remoteplay/ShadowPC.sh" &> /dev/null rm -rf "$HOME/.config/shadow/" &> /dev/null rm -rf "$HOME/.local/share/applications/ShadowPC.desktop" &> /dev/null @@ -236,7 +236,7 @@ fi fi if [[ "$GAUninstall" != *"Heroic Games Launcher"* ]]; then - rm -f "$HOME/.config/EmuDeck/Emulators/Heroic-Games-Launcher.AppImage" &> /dev/null + rm -f "$emusFolder/Heroic-Games-Launcher.AppImage" &> /dev/null rm -f "$romsPath/generic-applications/Heroic-Games-Launcher.sh" &> /dev/null rm -rf "$HOME/.config/heroic/" &> /dev/null rm -rf "$HOME/.local/share/applications/Heroic-Games-Launcher.desktop" &> /dev/null @@ -417,7 +417,7 @@ fi rm -rf $HOME/.var/app/dev.ares.ares &> /dev/null fi if [[ "$doUninstallBigPEmu" == true ]]; then - rm -rf $HOME/.config/EmuDeck/Emulators/BigPEmu &>> /dev/null + rm -rf $emusFolder/BigPEmu &>> /dev/null rm -rf $HOME/.local/share/applications/BigPEmu.desktop &>> /dev/null rm -rf "$HOME/.local/share/applications/BigPEmu (Proton).desktop" &>> /dev/null fi @@ -426,7 +426,7 @@ fi rm -f "$HOME/.local/share/applications/Cemu (Proton).desktop" &> /dev/null fi if [[ "${doUninstallCemuNative}" == "true" ]]; then - rm -rf $HOME/.config/EmuDeck/Emulators/Cemu*.AppImage &> /dev/null + rm -rf $emusFolder/Cemu*.AppImage &> /dev/null rm -rf $HOME/.config/Cemu &> /dev/null rm -rf $HOME/.local/share/Cemu &> /dev/null rm -rf $HOME/.cache/Cemu &> /dev/null @@ -436,7 +436,7 @@ fi flatpak uninstall org.citra_emu.citra -y rm -rf $HOME/.var/app/org.citra_emu.citra &> /dev/null rm -rf $HOME/.local/share/applications/Citra.desktop &> /dev/null - rm -rf $HOME/.config/EmuDeck/Emulators/citra-qt*.AppImage &> /dev/null + rm -rf $emusFolder/citra-qt*.AppImage &> /dev/null rm -rf $HOME/.local/share/citra-emu &> /dev/null rm -rf $HOME/.config/citra-emu &> /dev/null fi @@ -456,7 +456,7 @@ fi rm -rf $HOME/.config/lime3ds-emu/ &> /dev/null rm -rf $HOME/.local/share/lime3ds-emu &> /dev/null rm -rf $HOME/.local/share/applications/Lime3DS.desktop &> /dev/null - rm -rf $HOME/.config/EmuDeck/Emulators/lime3ds-gui*.AppImage &> /dev/null + rm -rf $emusFolder/lime3ds-gui*.AppImage &> /dev/null fi if [[ "$doUninstallMame" == true ]]; then flatpak uninstall org.mamedev.MAME -y @@ -469,7 +469,7 @@ fi rm -rf $HOME/.var/app/net.kuribo64.melonDS &> /dev/null fi if [[ "$doUninstallMGBA" == true ]]; then - rm -rf $HOME/.config/EmuDeck/Emulators/mGBA.AppImage &> /dev/null + rm -rf $emusFolder/mGBA.AppImage &> /dev/null rm -rf $HOME/.config/mgba &> /dev/null rm -rf $HOME/.local/share/applications/mGBA.desktop &> /dev/null fi @@ -482,7 +482,7 @@ fi rm -rf "$HOME/.steam/steam/compatibilitytools.d/ULWGL-Proton-8.0-5-3" fi if [[ "$doUninstallPCSX2" == true ]]; then - rm -rf $HOME/.config/EmuDeck/Emulators/pcsx2-Qt.AppImage &> /dev/null + rm -rf $emusFolder/pcsx2-Qt.AppImage &> /dev/null rm -rf $HOME/.config/PCSX2 &> /dev/null # Has the PCSX2 desktop file name changed over time? As of February 2024, it's PCSX2-QT.desktop rm -rf $HOME/.local/share/applications/pcsx2-Qt.desktop &> /dev/null @@ -513,7 +513,7 @@ fi rm -rf "$HOME/.config/rpcs3" &> /dev/null rm -rf "$HOME/.cache/rpcs3" &> /dev/null rm -rf $HOME/.local/share/applications/RPCS3.desktop &> /dev/null - rm -rf $HOME/.config/EmuDeck/Emulators/rpcs3.AppImage &> /dev/null + rm -rf $emusFolder/rpcs3.AppImage &> /dev/null fi if [[ "$doUninstallShadPS4" == true ]]; then # Flatpak @@ -522,11 +522,11 @@ fi rm -rf $HOME/.local/share/shadps4 &> /dev/null # AppImage rm -rf $HOME/.local/share/applications/ShadPS4.desktop &> /dev/null - rm -rf $HOME/.config/EmuDeck/Emulators/shadPS4-qt.AppImage &> /dev/null + rm -rf $emusFolder/shadPS4-qt.AppImage &> /dev/null fi if [[ "$doUninstallRyujinx" == true ]]; then rm -rf $HOME/.config/Ryujinx &> /dev/null - rm -rf $HOME/.config/EmuDeck/Emulators/publish &> /dev/null + rm -rf $emusFolder/publish &> /dev/null rm -rf $HOME/.local/share/applications/Ryujinx.desktop &> /dev/null fi if [[ "$doUninstallShadPS4" == true ]]; then @@ -537,7 +537,7 @@ fi rm -rf "$HOME/.config/shadps4" &> /dev/null rm -rf "$HOME/.cache/shadps4" &> /dev/null rm -rf $HOME/.local/share/applications/ShadPS4.desktop &> /dev/null - rm -rf $HOME/.config/EmuDeck/Emulators/shadps4.AppImage &> /dev/null + rm -rf $emusFolder/shadps4.AppImage &> /dev/null fi if [[ "$doUninstallScummVM" == true ]]; then flatpak uninstall org.scummvm.ScummVM -y @@ -551,7 +551,7 @@ fi rm -rf $HOME/.local/share/supermodel &>> /dev/null fi if [[ "$doUninstallVita3K" == true ]]; then - rm -rf $HOME/.config/EmuDeck/Emulators/Vita3K &> /dev/null + rm -rf $emusFolder/Vita3K &> /dev/null rm -rf $HOME/.cache/Vita3K &> /dev/null rm -rf $HOME/.config/Vita3K &> /dev/null rm -rf $HOME/.local/share/Vita3K &> /dev/null @@ -568,7 +568,7 @@ fi if [[ "$doUninstallYuzu" == true ]]; then #flatpak uninstall org.yuzu_emu.yuzu --system -y #rm -rf $HOME/.var/app/org.yuzu_emu.yuzu &> /dev/null - rm -rf $HOME/.config/EmuDeck/Emulators/yuzu.AppImage &> /dev/null + rm -rf $emusFolder/yuzu.AppImage &> /dev/null rm -rf $HOME/.config/yuzu &> /dev/null rm -rf $HOME/.local/share/yuzu &> /dev/null rm -rf $HOME/.cache/yuzu &> /dev/null @@ -647,9 +647,9 @@ fi rm -rf $HOME/Desktop/SteamRomManager.desktop &> /dev/null rm -rf $HOME/Desktop/uninstall-sdgyrodsu.desktop &> /dev/null rm -rf $HOME/Desktop/update-sdgyrodsu.desktop &> /dev/null - rm -rf $HOME/.config/EmuDeck/Emulators/EmuDeck.AppImage &> /dev/null - rm -rf $HOME/.config/EmuDeck/Emulators/EmuDeck_SaveSync.AppImage &> /dev/null - rm -rf $HOME/.config/EmuDeck/Emulators/RemotePlayWhatever.AppImage &> /dev/null + rm -rf $emusFolder/EmuDeck.AppImage &> /dev/null + rm -rf $emusFolder/EmuDeck_SaveSync.AppImage &> /dev/null + rm -rf $emusFolder/RemotePlayWhatever.AppImage &> /dev/null rm -rf $HOME/.config/EmuDeck echo "70" @@ -668,8 +668,8 @@ fi rm -rf $HOME/.emulationstation rm -rf "$HOME/ES-DE" &> /dev/null rm -rf "$toolsPath/EmulationStation-DE.AppImage" &> /dev/null - rm -rf $HOME/.config/EmuDeck/Emulators/EmulationStation-DE.AppImage &> /dev/null - rm -rf $HOME/.config/EmuDeck/Emulators/ES-DE.AppImage &> /dev/null + rm -rf $emusFolder/EmulationStation-DE.AppImage &> /dev/null + rm -rf $emusFolder/ES-DE.AppImage &> /dev/null rm -rf "$HOME/.local/share/applications/EmulationStation-DE.desktop" &> /dev/null rm -rf "$HOME/.local/share/applications/ES-DE.desktop" &> /dev/null # ULWGL @@ -679,7 +679,7 @@ fi # Pegasus flatpak uninstall org.pegasus_frontend.Pegasus -y rm -rf "$HOME/.var/app/org.pegasus_frontend.Pegasus/" &> /dev/null - rm -rf $HOME/.config/EmuDeck/Emulators/pegasus-fe &> /dev/null + rm -rf $emusFolder/pegasus-fe &> /dev/null rm -rf $HOME/.config/pegasus-frontend &> /dev/null rm -rf "$HOME/.local/share/applications/Pegasus.desktop" &> /dev/null diff --git a/vars.sh b/vars.sh new file mode 100644 index 000000000..f2df0ccda --- /dev/null +++ b/vars.sh @@ -0,0 +1,7 @@ +#!/bin/bash +emudeckFolder="$HOME/.config/EmuDeck" +emudeckLogs="$HOME/.config/EmuDeck/logs" +appFolder="$HOME/.local/bin/EmuDeck" +emusFolder="$HOME/.local/bin/EmuDeck/Emulators" +esdeFolder="$HOME/.local/bin/EmuDeck/EmulationStation-DE" +pegasusFolder="$HOME/.local/bin/EmuDeck/Pegasus" \ No newline at end of file