From e11f667c43ead25118f7cc5a50855beb413fe160 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Fri, 26 Jan 2024 10:32:39 +0100 Subject: [PATCH] GYRODSU: fixed installation process + launching/quitting functions update --- functions/functions.sh | 7 +++++++ functions/prepare_emulator.sh | 13 ++++++++++--- net.retrodeck.retrodeck.yml | 6 +----- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/functions/functions.sh b/functions/functions.sh index 89bc19e7..a4fd235b 100644 --- a/functions/functions.sh +++ b/functions/functions.sh @@ -528,13 +528,20 @@ easter_eggs() { } quit_retrodeck() { + echo "Terminating RetroDECK" # TODO: logger pkill -f retrodeck + echo "Terminating ES-DE" # TODO: logger pkill -f emulationstation + pkill -f es-de + echo "Terminating GyroDSU" # TODO: logger + pkill -f sdgyrodsu } start_retrodeck() { easter_eggs # Check if today has a surprise splashscreen and load it if so # normal startup echo "Starting RetroDECK v$version" + echo "Initializing GyroDSU" # TODO: logger + /bin/bash "/var/data/sdgyrodsu/sdgyrodsu" emulationstation --home /var/config/emulationstation } diff --git a/functions/prepare_emulator.sh b/functions/prepare_emulator.sh index 9ec69b92..18322355 100644 --- a/functions/prepare_emulator.sh +++ b/functions/prepare_emulator.sh @@ -644,6 +644,8 @@ prepare_emulator() { dir_prep "$screenshots_folder" "/var/data/yuzu/screenshots" dir_prep "$mods_folder/Yuzu" "/var/data/yuzu/load" mkdir -pv "$rdhome/customs/yuzu" + rm -vf "/app/bin/yuzu-rdwrapper" + ln -vs "/app/tools/yuzu-rdwrapper" "/app/bin/yuzu-rdwrapper" # removing dead symlinks as they were present in a past version if [ -d $bios_folder/switch ]; then find $bios_folder/switch -xtype l -exec rm {} \; @@ -749,11 +751,16 @@ prepare_emulator() { echo "----------------------" echo "Initializing GYRODSU" echo "----------------------" - rm -rf /var/data/gyrodsu - mkdir -p /var/data/gyrodsu + rm -rf /var/data/sdgyrodsu + mkdir -p /var/data/sdgyrodsu cd /app/retrodeck/gyrodsu - /bin/bash /app/retrodeck/gyrodsu/install-gyrodsu.sh + # gyrodsu is working on $HOME, so we're temporarly rerouting it ot /var/data + ORIGINAL_HOME=$HOME + export HOME=/var/data + /bin/bash /app/retrodeck/gyrodsu/install.sh + export HOME=$ORIGINAL_HOME cd - # back to the previous dir + chmod +x "/var/data/sdgyrodsu/*" fi # Update presets for all emulators after any reset or move diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index cabaab18..111d6769 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -725,12 +725,8 @@ modules: buildsystem: simple build-commands: - mkdir -p ${FLATPAK_DEST}/retrodeck/gyrodsu - - cp install.sh ${FLATPAK_DEST}/retrodeck/gyrodsu - - cp logcurrentrun.sh ${FLATPAK_DEST}/retrodeck/gyrodsu - - cp sdgyrodsu ${FLATPAK_DEST}/retrodeck/gyrodsu - - cp sdgyrodsu.service ${FLATPAK_DEST}/retrodeck/gyrodsu + - cp * ${FLATPAK_DEST}/retrodeck/gyrodsu - chmod +x ${FLATPAK_DEST}/retrodeck/gyrodsu/* - - sed -i 's/\$HOME/\/var\/data\/g' ${FLATPAK_DEST}/retrodeck/gyrodsu/install.sh sources: - type: archive url: https://github.com/kmicki/SteamDeckGyroDSU/releases/latest/download/SteamDeckGyroDSUSetup.zip