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 "