From 185771d64de1195f11c6ab8cd6366400cf621115 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Thu, 31 Mar 2022 15:03:00 +0900 Subject: [PATCH] "- Fixed some scripts - Added xmlstarlet --- com.xargon.retrodeck.yml | 17 +++++++++++ es_find_rules.xml | 19 ------------ es_systems.xml | 66 ++-------------------------------------- retrodeck.sh | 13 +++++--- tools-gamelist.xml | 10 ++---- tools/start-retroarch.sh | 4 +-- 6 files changed, 33 insertions(+), 96 deletions(-) diff --git a/com.xargon.retrodeck.yml b/com.xargon.retrodeck.yml index 8977d2bb..460549b9 100644 --- a/com.xargon.retrodeck.yml +++ b/com.xargon.retrodeck.yml @@ -35,6 +35,23 @@ cleanup: modules: + - name: xmlstarlet + config-opts: + - --disable-static-libs + - --with-libxml-libs-prefix=/usr/lib + - --with-libxml-include-prefix=/usr/include/libxml2 + sources: + - type: archive + url: https://downloads.sourceforge.net/xmlstar/xmlstarlet-1.6.1.tar.gz + sha256: 15d838c4f3375332fd95554619179b69e4ec91418a3a5296e7c631b7ed19e7ca + - type: shell + commands: + - cp -p /usr/share/automake-*/config.{sub,guess} .; + - autoreconf -vfi; + post-install: + - ln -s "xml" "${FLATPAK_DEST}/bin/xmlstarlet" ||:; + cleanup: ["*"] + - name: kdialog buildsystem: cmake sources: diff --git a/es_find_rules.xml b/es_find_rules.xml index 783df691..7c9fa526 100644 --- a/es_find_rules.xml +++ b/es_find_rules.xml @@ -59,16 +59,6 @@ ~/bin/Dolphin_Emulator*.AppImage - - - - dosbox-staging - io.github.dosbox-staging - - - /var/lib/flatpak/exports/bin/io.github.dosbox-staging - - @@ -178,13 +168,4 @@ ~/bin/yuzu*.AppImage - - - - bash - - - /bin/bash - - diff --git a/es_systems.xml b/es_systems.xml index eceb805c..cd72e242 100644 --- a/es_systems.xml +++ b/es_systems.xml @@ -313,15 +313,6 @@ daphne daphne - - desktop - Desktop Applications - %ROMPATH%/desktop - .sh - bash %ROM% - pc - desktop - doom Doom @@ -333,13 +324,10 @@ dos - DOS (PC) + DOS %ROMPATH%/dos - .bat .BAT .com .COM .conf .CONF .cue .CUE .exe .EXE .iso .ISO .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_core_libretro.so %ROM% + .dosz .DOSZ %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_pure_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_svn_libretro.so %ROM% - %EMULATOR_DOSBOX-STAGING% %ROM% dos dos @@ -361,15 +349,6 @@ dreamcast dreamcast - - epic - Epic Games Store - %ROMPATH%/epic - .sh - bash %ROM% - pc - epic - famicom Nintendo Family Computer @@ -525,15 +504,6 @@ android j2me - - kodi - Kodi Home Theatre Software - %ROMPATH%/kodi - .sh - bash %ROM% - pc - kodi - lutris Lutris Open Gaming Platform @@ -862,18 +832,6 @@ palm palm - - pc - IBM PC - %ROMPATH%/pc - .bat .BAT .com .COM .conf .CONF .cue .CUE .exe .EXE .iso .ISO .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_core_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_pure_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_svn_libretro.so %ROM% - %EMULATOR_DOSBOX-STAGING% %ROM% - pc - pc - pc88 NEC PC-8800 Series @@ -931,15 +889,6 @@ pokemini pokemini - - ports - Ports - %ROMPATH%/ports - .sh - bash %ROM% - pc - ports - ps2 Sony PlayStation 2 @@ -1150,15 +1099,6 @@ spectravideo spectravideo - - steam - Valve Steam - %ROMPATH%/steam - .sh - %RUNINBACKGROUND% bash %ROM% - steam - steam - stratagus Stratagus Game Engine @@ -1423,7 +1363,7 @@ RetroDECK Tools /var/config/retrodeck/tools .sh .SH - ./%ROM% + bash %ROM% tools tools diff --git a/retrodeck.sh b/retrodeck.sh index bcd17d39..6fd2f17f 100644 --- a/retrodeck.sh +++ b/retrodeck.sh @@ -9,8 +9,8 @@ is_mounted() { # if we got the .lock file it means that it's not a first run if [ ! -f ~/retrodeck/.lock ] then - internal=`kdialog --title "RetroDECK" -- yes-label "Internal" --no-label "SD Card" --yesno "Where do you want your rom folder to be located?"` - if $internal #yes - Internal + kdialog --title "RetroDECK" --yes-label "Internal" --no-label "SD Card" --yesno "Where do you want your rom folder to be located?" + if [ $? == 0 ] #yes - Internal then roms_folder=~/retrodeck/roms else #no - SD Card @@ -22,11 +22,14 @@ then exit 0 fi fi + + kdialog --title "RetroDECK" --msgbox "RetroDECK will initialize the system, please wait a few minutes, a popup will tell you when the process is finished." + mkdir -p $roms_folder rm -rf /var/config/.emulationstation/ROMs rm -rf /var/config/.emulationstation/roms + mkdir -p /var/config/.emulationstation ln -s $roms_folder /var/config/.emulationstation/roms - kdialog --Title "RetroDECK" --msgbox "Done, please put your roms in: $roms_folder. In order to change location you may use the tool provided in the tools section of RetroDECK." mkdir -p /var/config/.emulationstation rm -rf /var/config/.emulationstation/es_settings.xml @@ -42,7 +45,7 @@ then cp -r /app/retrodeck/tools/* /var/config/retrodeck/tools mkdir -p /var/config/retroarch/system - ln -s ~/.var/app/com.xargon.retrodeck/config/retroarch/system/ ~/retrodeck/bios + ln -s ~/.var/app/com.xargon.retrodeck/config/retroarch/system ~/retrodeck/bios cp /app/retrodeck/retrodeck-retroarch.cfg /var/config/retroarch/retroarch.cfg @@ -53,6 +56,8 @@ then cp /app/share/libretro/cores/* /var/config/retroarch/cores/ touch ~/retrodeck/.lock + + kdialog --title "RetroDECK" --msgbox "Initialization completed, please put your roms in: $roms_folder.\nIf you wish to change the roms location you may use the tool located the tools section of RetroDECK." fi #numFields=$(xmlstarlet sel -t -m '//system' -o "." /app/share/emulationstation/resources/systems/unix/es_systems.xml | wc -c) diff --git a/tools-gamelist.xml b/tools-gamelist.xml index 4a691c46..99e1e1f5 100644 --- a/tools-gamelist.xml +++ b/tools-gamelist.xml @@ -1,16 +1,10 @@ - start-retroarch.sh + ./start-retroarch.sh Start RetroArch RetroArch - RetroArch is a frontend for emulators, game engines and media players. - -It enables you to run classic games on a wide range of computers and consoles through its slick graphical interface. Settings are also unified so configuration is done once and for all. - -In addition to this, you are able to run original game discs (CDs) from RetroArch. - -RetroArch has advanced features like shaders, netplay, rewinding, next-frame response times, runahead, machine translation, blind accessibility features, and more! + Start RetroArch to manually tweak your settings. 20100525T000000 Libretro Libretro diff --git a/tools/start-retroarch.sh b/tools/start-retroarch.sh index bfd5bbc0..11de5e1a 100644 --- a/tools/start-retroarch.sh +++ b/tools/start-retroarch.sh @@ -1,5 +1,5 @@ #!/bin/bash -yousure=kdialog --title "RetroDECK" --warningyesno "Doing some changes in the RetroArch configuration may create serious issues, please continue only if you know what you're doing. Are you sure do you want to continue?" -if $yousure then +kdialog --title "RetroDECK" --warningyesno "Doing some changes in the RetroArch configuration may create serious issues, please continue only if you know what you're doing. Are you sure do you want to continue?" +if [ $? == 0 ]; then retroarch \ No newline at end of file