RYUJINX: removed wrapper and symlinked the whole keys folder

This commit is contained in:
XargonWan 2024-04-08 10:59:51 +09:00
parent 80cb3d0f88
commit 49a51bd178
5 changed files with 2 additions and 51 deletions

View file

@ -1,9 +0,0 @@
#!/bin/bash
source /app/libexec/global.sh
log i "Ryujinx RetroDECK wrapper: starting"
command="$1"
manage_ryujinx_keys
log d "Ryujinx RetroDECK wrapper: launching \"Ryujinx.sh $command\""
Ryujinx.sh "$command"

View file

@ -620,43 +620,6 @@ easter_eggs() {
cp -f "$new_splash_file" "$current_splash_file" # Deploy assigned splash screen
}
manage_ryujinx_keys() {
# This function checks if Switch keys are existing and symlinks them inside the Ryujinx system folder
# If the symlinks are broken it recreates them
log i "Checking Ryujinx Switch keys."
local ryujinx_system="/var/config/Ryujinx/system" # Set the path to the Ryujinx system folder
# Check if the keys folder exists
if [ -d "$bios_folder/switch/keys" ]; then
# Check if there are files in the keys folder
if [ -n "$(find "$bios_folder/switch/keys" -maxdepth 1 -type f)" ]; then
# Iterate over each file in the keys folder
for file in "$bios_folder/switch/keys"/*; do
local filename=$(basename "$file")
local symlink="$ryujinx_system/$filename"
# Check if the symlink exists and is valid
if [ -L "$symlink" ] && [ "$(readlink -f "$symlink")" = "$file" ]; then
log i "Found \"$symlink\" and it's a valid symlink."
continue # Skip if the symlink is already valid
fi
# Remove broken symlink or non-symlink file
log w "Found \"$symlink\" but it's not a valid symlink. Repairing it"
[ -e "$symlink" ] && rm "$symlink"
# Create symlink
ln -s "$file" "$symlink"
log i "Created symlink: \"$symlink\""
done
else
log w "No files found in $bios_folder/switch/keys. Continuing..."
fi
else
log e "Directory $bios_folder/switch/keys does not exist. Something is wrong with your RetroDECK installation. Continuing but Ryujinx will not be able to run any game."
fi
}
ponzu() {
# This function is used to extract some specific appimages
# Check if any of the specified files exist

View file

@ -602,6 +602,7 @@ prepare_component() {
dir_prep "$saves_folder/switch/ryujinx/nand" "/var/config/Ryujinx/bis"
dir_prep "$saves_folder/switch/ryujinx/sdcard" "/var/config/Ryujinx/sdcard"
dir_prep "$bios_folder/switch/firmware" "/var/config/Ryujinx/bis/system/Contents/registered"
dir_prep "$bios_folder/switch/keys" "/var/config/Ryujinx/system"
fi
fi
# if [[ "$action" == "reset" ]] || [[ "$action" == "postmove" ]]; then # Run commands that apply to both resets and moves

View file

@ -1304,10 +1304,6 @@ modules:
- cp emu-configs/gzdoom/gzdoom.sh ${FLATPAK_DEST}/bin/gzdoom.sh
- chmod +x ${FLATPAK_DEST}/bin/gzdoom.sh
# Ryujinx wrapper
- cp emu-configs/ryujinx/ryujinx-rdwrapper.sh ${FLATPAK_DEST}/bin/ryujinx-rdwrapper.sh
- chmod +x ${FLATPAK_DEST}/bin/ryujinx-rdwrapper.sh
sources:
- type: git
url: https://github.com/XargonWan/RetroDECK.git

View file

@ -527,7 +527,7 @@ configurator_open_emulator_dialog() {
"Ryujinx" )
log i "Configurator: \"$emulator\""
ryujinx-rdwrapper.sh
Ryujinx.sh
;;
"Vita3K" )