Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New paths #1381

Merged
merged 17 commits into from
Jan 2, 2025
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,5 @@ body:
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. You can find the EmuDeck log in $HOME/emudeck. For more information, see https://emudeck.github.io/troubleshooting/steamos/#how-to-get-the-emudeck-log.
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. You can find the EmuDeck log in $HOME/.config/EmuDeck. For more information, see https://emudeck.github.io/troubleshooting/steamos/#how-to-get-the-emudeck-log.
render: shell
2 changes: 1 addition & 1 deletion android/functions/EmuScripts/Android_Dolphin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion android/functions/EmuScripts/Android_Lime3DS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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(){
Expand Down
2 changes: 1 addition & 1 deletion android/functions/EmuScripts/Android_NetherSX2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/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(){
Expand Down
10 changes: 5 additions & 5 deletions android/functions/EmuScripts/Android_RetroArch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
2 changes: 1 addition & 1 deletion android/functions/EmuScripts/Android_Yuzu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions android/functions/ToolScripts/Android_ADB.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ function Android_ADB_isInstalled(){

function Android_ADB_install(){
local outFile="adb.zip"
local outDir="$HOME/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/emudeck/android/"
local outFile="$HOME/emudeck/android/$1"
local outDir="$emudeckFolder/android/"
local outFile="$emudeckFolder/android/$1"
local url=$2
mkdir -p $outDir

Expand Down Expand Up @@ -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/emudeck/android/$temp_emu.apk"
Android_ADB_installAPK "$emudeckFolder/android/$temp_emu.apk"
}

function Android_ADB_getSDCard(){
Expand Down
2 changes: 1 addition & 1 deletion android/functions/ToolScripts/Android_Pegasus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
31 changes: 16 additions & 15 deletions android/functions/all.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
#!/bin/bash

# SETTINGSFILEANDROID="$HOME/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/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
44 changes: 22 additions & 22 deletions android/setup.sh
Original file line number Diff line number Diff line change
@@ -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/emudeck/logs/msg.log
MSG=$emudeckLogs/msg.log
echo "0" > "$MSG"

#
Expand All @@ -13,8 +20,8 @@ echo "0" > "$MSG"
#

#mkdir -p "$HOME/.config/EmuDeck"
#mkdir -p "$HOME/emudeck/logs"
PIDFILE="$HOME/.config/EmuDeck/install.pid"
#mkdir -p "$emudeckLogs"
PIDFILE="$emudeckFolder/install.pid"


if [ -f "$PIDFILE" ]; then
Expand Down Expand Up @@ -55,9 +62,9 @@ trap finish EXIT
#

#Creating log file
LOGFILE="$HOME/emudeck/logs/emudeckAndroidSetup.log"
LOGFILE="$emudeckLogs/emudeckAndroidSetup.log"

mv "${LOGFILE}" "$HOME/emudeck/logs/emudeckAndroidSetup.last.log" #backup last log
mv "${LOGFILE}" "$emudeckLogs/emudeckAndroidSetup.last.log" #backup last log

if echo "${@}" > "${LOGFILE}" ; then
echo "Log created"
Expand All @@ -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
Expand All @@ -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/"
Expand Down Expand Up @@ -207,8 +207,8 @@ xdg-open "$Android_folder/temp" &
#
# We mark the script as finished
#
echo "100" > "$HOME/emudeck/logs/msg.log"
echo "# Installation Complete" >> "$HOME/emudeck/logs/msg.log"
echo "100" > "$emudeckLogs/msg.log"
echo "# Installation Complete" >> "$emudeckLogs/msg.log"

} | tee "${LOGFILE}" 2>&1

10 changes: 5 additions & 5 deletions android/vars.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash
Android_ADB_path="$HOME/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/emudeck/android/"
Android_temp_android_data="$HOME/emudeck/android/temp/CopyToInternal/Android/data"
Android_temp_internal="$HOME/emudeck/android/temp/CopyToInternal"
Android_temp_external="$HOME/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"
6 changes: 3 additions & 3 deletions api.sh
Original file line number Diff line number Diff line change
@@ -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 ~/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(){
Expand Down Expand Up @@ -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(){
Expand Down
2 changes: 1 addition & 1 deletion cloudSyncHealth.sh
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
Loading
Loading