mirror of
https://github.com/dragoonDorise/EmuDeck.git
synced 2025-05-05 16:02:48 +00:00
Couple of fixes (ShadPS4, Ryujinx, Xenia) (#1380)
* Couple of fixes (ShadPS4, Ryujinx, Xenia ShadPS4 - separate download/unzip/AppImage setup when installing; download zip first, then unzip and then do AppImage things (installEmuAI) - launcher: we can use variables from emu script - launcher: fallback to flatpak handled more gracefully - launcher: better handling of .desktop file arguments Ryujinx - currently, the "nogui" version is downloaded; it doesn't make a difference but it might later; implement fileNameDoesNotContain in getReleaseURLGH helper function and make use of it for Ryu Xenia - latest version is running fine, removed hardcoded release * Update emuDeckShadPS4.sh ShadPS4 - create bios link for LLE sys_modules (optional) * Update emuDeckShadPS4.sh oops, variable needs $ :) * Merge fix for shadps4.sh launcher * Clean .config/EmuDeck/Emulators leftovers --------- Co-authored-by: Dragoon Dorise <rodrigosedano@me.com>
This commit is contained in:
parent
3bab8f09e4
commit
1112777f3f
@ -1048,7 +1048,7 @@
|
||||
{
|
||||
"id": "166409089761171238",
|
||||
"executable": {
|
||||
"path": "\"/home/deck/.config/EmuDeck/Emulators/Vita3K/Vita3K\" -Fr \"${/.*[/\\\\]([^/\\\\]+)[/\\\\]/|${filePath}}\"",
|
||||
"path": "\"/home/deck/Applications/Vita3K/Vita3K\" -Fr \"${/.*[/\\\\]([^/\\\\]+)[/\\\\]/|${filePath}}\"",
|
||||
"arguments": ""
|
||||
},
|
||||
"romDirectory": "roms/psvita",
|
||||
|
@ -15,7 +15,7 @@
|
||||
"specifiedAccounts": ""
|
||||
},
|
||||
"executable": {
|
||||
"path": "/home/deck/.config/EmuDeck/Emulators/Vita3K/Vita3K",
|
||||
"path": "/home/deck/Applications/Vita3K/Vita3K",
|
||||
"shortcutPassthrough": false,
|
||||
"appendArgsToExecutable": true
|
||||
},
|
||||
|
@ -9491,7 +9491,7 @@
|
||||
]
|
||||
},
|
||||
"executable": {
|
||||
"path": "/home/deck/.config/EmuDeck/Emulators/Vita3K/Vita3K",
|
||||
"path": "/home/deck/Applications/Vita3K/Vita3K",
|
||||
"shortcutPassthrough": false,
|
||||
"appendArgsToExecutable": true
|
||||
},
|
||||
|
@ -49,9 +49,9 @@ Ryujinx_cleanup(){
|
||||
Ryujinx_install(){
|
||||
echo "Begin Ryujinx Install"
|
||||
local showProgress=$1
|
||||
if installEmuBI "$Ryujinx_emuName" "$(getReleaseURLGH "Ryubing/Ryujinx" "-linux_x64.tar.gz")" "" "tar.gz" "$showProgress"; then
|
||||
if installEmuBI "$Ryujinx_emuName" "$(getReleaseURLGH "Ryubing/Ryujinx" "-linux_x64.tar.gz" "" "" "nogui")" "" "tar.gz" "$showProgress"; then
|
||||
mkdir -p "$emusFolder/publish"
|
||||
tar -xvf "$emusFolder/Ryujinx.tar.gz" -C "$emusFolder" && rm -rf "$emusFolder/Ryujinx.tar.gz"
|
||||
tar -xvf "$emusFolder/Ryujinx.tar.gz" -C "$emusFolder" && rm -rf "$HOME/Applications/Ryujinx.tar.gz"
|
||||
chmod +x "$emusFolder/publish/Ryujinx"
|
||||
else
|
||||
return 1
|
||||
|
@ -5,6 +5,7 @@
|
||||
# Variables
|
||||
|
||||
ShadPS4_emuName="ShadPS4"
|
||||
ShadPS4_emuFileName="Shadps4-qt"
|
||||
ShadPS4_emuType="$emuDeckEmuTypeAppImage"
|
||||
ShadPS4_emuPath="$emusFolder"
|
||||
ShadPS4_dir="$HOME/.local/share/shadPS4"
|
||||
@ -16,25 +17,28 @@ ShadPS4_cleanup(){
|
||||
|
||||
# TODO: Install Flatpak from https://github.com/shadps4-emu/shadPS4-flatpak
|
||||
ShadPS4_install(){
|
||||
echo "Begin ShadPS4 Install"
|
||||
local showProgress=$1
|
||||
echo "Begin ShadPS4 Install"
|
||||
local showProgress=$1
|
||||
|
||||
if installEmuAI "$ShadPS4_emuName" "" "$(getReleaseURLGH "shadps4-emu/shadPS4" "zip" "linux-qt")" "" "zip" "emulator" "$showProgress"; then
|
||||
unzip -o "$emusFolder/ShadPS4.zip" -d "$ShadPS4_emuPath" && rm -rf "$emusFolder/ShadPS4.zip"
|
||||
chmod +x "$ShadPS4_emuPath/Shadps4-qt.AppImage"
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
if safeDownload "$ShadPS4_emuName" "$(getReleaseURLGH "shadps4-emu/shadPS4" "zip" "linux-qt")" "$emusFolder/${ShadPS4_emuName}.zip" "$showProgress"; then
|
||||
unzip -o "$emusFolder/${ShadPS4_emuName}.zip" -d "$ShadPS4_emuPath" && rm -f "$emusFolder/${ShadPS4_emuName}.zip"
|
||||
if ! installEmuAI "$ShadPS4_emuName" "" "" "$ShadPS4_emuFileName" "" "emulator"; then # installEmuAI will handle everything when URL is not provided but AppImage exists...
|
||||
echo "Error installing ShadPS4"
|
||||
return 1
|
||||
fi
|
||||
else
|
||||
echo "Error installing ShadPS4"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
ShadPS4_init(){
|
||||
configEmuAI "$ShadPS4_emuName" "config" "$HOME/.local/share/shadPS4" "$emudeckBackend/configs/shadps4" "true"
|
||||
ShadPS4_setupStorage
|
||||
ShadPS4_setEmulationFolder
|
||||
ShadPS4_setupSaves
|
||||
ShadPS4_flushEmulatorLauncher
|
||||
ShadPS4_setLanguage
|
||||
configEmuAI "$ShadPS4_emuName" "config" "$HOME/.local/share/shadPS4" "$emudeckBackend/configs/shadps4" "true"
|
||||
ShadPS4_setupStorage
|
||||
ShadPS4_setEmulationFolder
|
||||
ShadPS4_setupSaves
|
||||
ShadPS4_flushEmulatorLauncher
|
||||
ShadPS4_setLanguage
|
||||
}
|
||||
|
||||
ShadPS4_update(){
|
||||
@ -45,6 +49,12 @@ ShadPS4_update(){
|
||||
ShadPS4_setEmulationFolder(){
|
||||
echo "Begin ShadPS4 Path Config"
|
||||
sed -i "s|/run/media/mmcblk0p1/Emulation|${emulationPath}|g" "$ShadPS4_configFile"
|
||||
|
||||
# setup bios link for LLE sys_modules (optional)
|
||||
mkdir -p "${biosPath}/shadps4/"
|
||||
mkdir -p "$ShadPS4_dir/sys_modules"
|
||||
ln -sn "$ShadPS4_dir/sys_modules" "${biosPath}/shadps4/sys_modules"
|
||||
|
||||
echo "ShadPS4 Path Config Completed"
|
||||
}
|
||||
|
||||
@ -64,7 +74,6 @@ ShadPS4_setupSaves(){
|
||||
echo "ShadPS4 save link completed"
|
||||
}
|
||||
|
||||
|
||||
#SetupStorage
|
||||
ShadPS4_setupStorage(){
|
||||
echo "Begin ShadPS4 storage config"
|
||||
@ -122,9 +131,9 @@ ShadPS4_resetConfig(){
|
||||
}
|
||||
|
||||
ShadPS4_setResolution(){
|
||||
echo "NYI"
|
||||
echo "NYI"
|
||||
}
|
||||
|
||||
ShadPS4_flushEmulatorLauncher(){
|
||||
flushEmulatorLaunchers "ShadPS4"
|
||||
}
|
||||
flushEmulatorLaunchers "ShadPS4"
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ Xenia_install(){
|
||||
|
||||
#need to look at standardizing exe name; or download both? let the user choose at runtime?
|
||||
#curl -L "$Xenia_releaseURL" --output "$romsPath"/xbox360/xenia.zip
|
||||
if safeDownload "$Xenia_emuName" "https://github.com/xenia-canary/xenia-canary/releases/download/eb99874/xenia_canary.zip" "$romsPath/xbox360/xenia.zip" "$showProgress"; then
|
||||
if safeDownload "$Xenia_emuName" "$Xenia_releaseURL" "$romsPath/xbox360/xenia.zip" "$showProgress"; then
|
||||
#mkdir -p "$romsPath"/xbox360/tmp
|
||||
unzip -o "$romsPath"/xbox360/xenia.zip -d "$romsPath"/xbox360
|
||||
#rsync -avzh "$romsPath"/xbox360/tmp/ "$romsPath"/xbox360/
|
||||
|
@ -417,6 +417,7 @@ function getReleaseURLGH(){
|
||||
local fileType=$2
|
||||
local fileNameContains=$3
|
||||
local fileNameStartsWith=$4
|
||||
local fileNameDoesNotContain=$5
|
||||
local url
|
||||
#local token=$(tokenGenerator)
|
||||
|
||||
@ -424,8 +425,25 @@ function getReleaseURLGH(){
|
||||
url="https://api.github.com/repos/$repository/releases"
|
||||
fi
|
||||
|
||||
# fetch and filter assets
|
||||
curl -fSs "$url" | \
|
||||
jq -r '[ .[].assets[] | select(.name | contains("'"$fileNameContains"'") and startswith("'"$fileNameStartsWith"'") and endswith("'"$fileType"'")).browser_download_url ][0] // empty'
|
||||
jq -r --arg contains "$fileNameContains" \
|
||||
--arg startsWith "$fileNameStartsWith" \
|
||||
--arg endsWith "$fileType" \
|
||||
--arg doesNotContain "$fileNameDoesNotContain" '
|
||||
[
|
||||
.[].assets[] |
|
||||
select(.name |
|
||||
contains($contains) and
|
||||
startswith($startsWith) and
|
||||
endswith($endsWith) and
|
||||
(if $doesNotContain != "" then
|
||||
contains($doesNotContain) | not
|
||||
else
|
||||
true
|
||||
end)
|
||||
).browser_download_url
|
||||
][0] // empty'
|
||||
}
|
||||
|
||||
function linkToSaveFolder(){
|
||||
|
@ -62,7 +62,8 @@ installEmuAI(){
|
||||
return 1
|
||||
fi
|
||||
|
||||
chmod +x "$emusFolder/$fileName.AppImage"
|
||||
chmod +x "$emusFolder/$fileName.${format}"
|
||||
|
||||
if [[ -n $lastVerFile ]] && [[ -n $latestVer ]]; then
|
||||
echo "latest version $latestVer > $lastVerFile"
|
||||
echo "$latestVer" > "$lastVerFile"
|
||||
|
@ -2,9 +2,11 @@
|
||||
|
||||
## emu-launch.sh
|
||||
|
||||
source "$HOME/.config/EmuDeck/backend/functions/all.sh"
|
||||
|
||||
# Attempt to find the given program as an AppImage
|
||||
getAppImage () {
|
||||
local EMUDIR="${HOME}/.config/EmuDeck/Emulators"
|
||||
local EMUDIR="$emusFolder"
|
||||
|
||||
# Check for AppImage
|
||||
local APPIMAGE
|
||||
|
@ -1,3 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
"$HOME/.config/EmuDeck/Emulators/Heroic-Games-Launcher.AppImage"
|
||||
source "$HOME/.config/EmuDeck/backend/functions/all.sh"
|
||||
|
||||
"$emusFolder/Heroic-Games-Launcher.AppImage"
|
@ -8,12 +8,17 @@ emufolder="$emusFolder" # has to be applications for ES-DE to find it
|
||||
exe=()
|
||||
|
||||
#find full path to emu executable
|
||||
exe_path=$(find "$emufolder" -iname "${emuName}*.AppImage" | sort -n | cut -d' ' -f 2- | tail -n 1 2>/dev/null)
|
||||
exe_path=$(find "$ShadPS4_emuPath" -iname "${ShadPS4_emuFileName}*.AppImage" | sort -n | cut -d' ' -f 2- | tail -n 1 2>/dev/null)
|
||||
|
||||
#if appimage doesn't exist fall back to flatpak.
|
||||
if [[ -z "$exe_path" ]]; then
|
||||
#flatpak
|
||||
flatpakApp=$(flatpak list --app --columns=application | grep "$RPCS3_emuPathFlatpak")
|
||||
flatpakApp=$(flatpak list --app --columns=application | grep "$ShadPS4_emuName")
|
||||
#check if flatpakApp is empty
|
||||
if [[ -z "$flatpakApp" ]]; then
|
||||
echo "Flatpak for '$ShadPS4_emuName' not found."
|
||||
exit 1
|
||||
fi
|
||||
#fill execute array
|
||||
exe=("flatpak" "run" "$flatpakApp")
|
||||
else
|
||||
@ -26,10 +31,25 @@ fi
|
||||
fileExtension="${@##*.}"
|
||||
|
||||
if [[ $fileExtension == "desktop" ]]; then
|
||||
rpcs3desktopFile=$(grep -E "^Exec=" "${*}" | sed 's/^Exec=//' | sed 's/%%/%/g')
|
||||
launchParam="Exec=$rpcs3desktopFile"
|
||||
launchParam=$(echo "$launchParam" | sed "s|^\(Exec=\)[^\"']*\"|\1$emusFolder/Shadps4-qt.AppImage -g \"|" | sed 's/^Exec=//')
|
||||
eval $launchParam
|
||||
# trying to figure this out... :)
|
||||
# In desktop file the Exec line is like this:
|
||||
# Exec=/tmp/.mount_ShadpsT3Dso0/usr/bin/shadps4 "/run/media/mmcblk0p1/Emulation/storage/shadps4/games/CUSA01369/eboot.bin"
|
||||
|
||||
# takes desktop file and extracts Exec= line
|
||||
shadps4DesktopExec=$(grep -E "^Exec=" "${*}" | sed 's/^Exec=//' | sed 's/%%/%/g')
|
||||
|
||||
# commented, doing it bit different...
|
||||
#launchParam="Exec=$shadps4DesktopExec" # construct new Exec= line
|
||||
#launchParam=$(echo "$launchParam" | sed "s|^\(Exec=\)[^\"']*\"|\1$emusFolder/Shadps4-qt.AppImage -g \"|" | sed 's/^Exec=//')
|
||||
|
||||
# this removes everything in Exec= line before first " or ' (quotes), keeps everything after that (including the quotes)
|
||||
# given example above, result will be: "/run/media/mmcblk0p1/Emulation/storage/shadps4/games/CUSA01369/eboot.bin"
|
||||
launchParam=$(echo "Exec=$shadps4DesktopExec" | sed "s|^\(Exec=\)[^\"\']*\([\"\']\)|\2|")
|
||||
|
||||
# construct launch args and run
|
||||
launch_args=("-g" "$launchParam")
|
||||
echo "Launching: ${exe[*]} ${launch_args[*]}"
|
||||
"${exe[@]}" "${launch_args[@]}"
|
||||
else
|
||||
#run the executable with the params.
|
||||
launch_args=()
|
||||
@ -42,7 +62,7 @@ else
|
||||
echo "Launching: ${exe[*]} ${launch_args[*]}"
|
||||
|
||||
if [[ -z "${*}" ]]; then
|
||||
echo "ROM not found. Launching $emuName directly"
|
||||
echo "ROM not found. Launching $ShadPS4_emuName directly"
|
||||
"${exe[@]}"
|
||||
else
|
||||
echo "ROM found, launching game"
|
||||
|
@ -25,7 +25,7 @@ if [[ ! $emuExeFile =~ "AppImage" ]]; then
|
||||
emuExeFile=$(find "$emufolder" -iname "${emuName}*.AppImage" | sort -n | cut -d' ' -f 2- | tail -n 1 2>/dev/null)
|
||||
fi
|
||||
if [[ ! $emuExeFile =~ "AppImage" ]]; then
|
||||
zenity --info --title="Yuzu AppImage not found!" --width 200 --text "Please check that you have the appimage in ~/.config/EmuDeck/Emulators or \nrerun Emudeck and ensure it is installed." 2>/dev/null
|
||||
zenity --info --title="Yuzu AppImage not found!" --width 200 --text "Please check that you have the AppImage in ${emusFolder} or \nrerun Emudeck and ensure it is installed." 2>/dev/null
|
||||
fi
|
||||
isMainline=true
|
||||
if [ ! "$emuExeFile" = "$emufolder/$emuName.AppImage" ]; then
|
||||
|
@ -1,3 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
"$HOME/.config/EmuDeck/Emulators/Greenlight.AppImage"
|
||||
source "$HOME/.config/EmuDeck/backend/functions/all.sh"
|
||||
|
||||
"$emusFolder/Greenlight.AppImage"
|
@ -1,3 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
"$HOME/.config/EmuDeck/Emulators/ShadowPC.AppImage"
|
||||
source "$HOME/.config/EmuDeck/backend/functions/all.sh"
|
||||
|
||||
"$emusFolder/ShadowPC.AppImage"
|
@ -1,3 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
"$HOME/.config/EmuDeck/Emulators/chiaki-ng.AppImage"
|
||||
source "$HOME/.config/EmuDeck/backend/functions/all.sh"
|
||||
|
||||
"$emusFolder/chiaki-ng.AppImage"
|
@ -1,11 +1,10 @@
|
||||
#!/bin/bash
|
||||
source "$HOME/.config/EmuDeck/backend/functions/all.sh"
|
||||
SAVESYNC_toolName="EmuDeck SaveSync"
|
||||
SAVESYNC_toolType="AppImage"
|
||||
SAVESYNC_toolPath="$HOME/.config/EmuDeck/Emulators/EmuDeck_SaveSync.AppImage"
|
||||
SAVESYNC_toolPath="$emusFolder/EmuDeck_SaveSync.AppImage"
|
||||
SAVESYNC_systemd_path="$HOME/.config/systemd/user"
|
||||
|
||||
source "$HOME/.config/EmuDeck/backend/functions/all.sh"
|
||||
|
||||
SAVESYNC_install(){
|
||||
|
||||
text="`printf " <b>Have your login details ready!</b>\n\nA new browser windows will open for your cloud provider.\nMake sure you have your cretendials ready because you only have <b>20 seconds to enter them</b>. \n\n you can always reconfigure SaveSync in the future )"`"
|
||||
|
Loading…
x
Reference in New Issue
Block a user