From 86a6dd5624dd855deffd8d5af237c8e83aca86ed Mon Sep 17 00:00:00 2001 From: Dragoon Dorise Date: Thu, 20 Mar 2025 14:05:42 +0100 Subject: [PATCH] Azahar --- android/android_settings.sh | 4 +- .../functions/EmuScripts/Android_Azahar.sh | 25 ++ .../functions/EmuScripts/Android_Lime3DS.sh | 25 -- android/functions/all.sh | 2 +- android/roms/3ds/metadata.pegasus.txt | 4 +- android/setup.sh | 10 +- .../custom_systems/es_find_rules.xml | 9 + cloudSyncHealth.sh | 2 +- .../custom_systems/es_find_rules.xml | 9 +- .../gamelists/3ds/gamelist.xml | 2 +- .../gamelists/n3ds/gamelist.xml | 2 +- configs/lime3ds/qt-config.ini | 14 +- .../optional/nintendo_3ds_lime3ds.json | 6 +- functions/EmuScripts/emuDeckAzahar.sh | 296 ++++++++++++++ functions/EmuScripts/emuDeckCitra.sh | 368 ------------------ functions/EmuScripts/emuDeckCitraLegacy.sh | 198 ---------- functions/EmuScripts/emuDeckLime3DS.sh | 296 -------------- functions/ToolScripts/emuDeckMigration.sh | 2 +- functions/ToolScripts/emuDeckPegasus.sh | 2 +- functions/ToolScripts/emuDeckSRM.sh | 2 +- functions/all.sh | 3 +- functions/helperFunctions.sh | 15 +- functions/jsonToBashVars.sh | 12 +- roms/n3ds/metadata.txt | 4 +- roms/n3ds/systeminfo.txt | 2 +- roms_alt_emus/n3ds/metadata.txt | 4 +- setup.sh | 6 +- tools/binupdate/binupdate.sh | 31 +- tools/launchers/azahar.sh | 36 ++ tools/launchers/lime3ds.sh | 4 +- uninstall.sh | 18 +- versions.json | 3 +- 32 files changed, 431 insertions(+), 985 deletions(-) create mode 100644 android/functions/EmuScripts/Android_Azahar.sh delete mode 100644 android/functions/EmuScripts/Android_Lime3DS.sh create mode 100755 functions/EmuScripts/emuDeckAzahar.sh delete mode 100755 functions/EmuScripts/emuDeckCitra.sh delete mode 100755 functions/EmuScripts/emuDeckCitraLegacy.sh delete mode 100755 functions/EmuScripts/emuDeckLime3DS.sh create mode 100755 tools/launchers/azahar.sh diff --git a/android/android_settings.sh b/android/android_settings.sh index 92338aa9..75345e9c 100644 --- a/android/android_settings.sh +++ b/android/android_settings.sh @@ -4,7 +4,7 @@ android_doSetupRA=true android_doSetupDolphin=true android_doSetupYuzu=true -android_doSetupCitra=true +android_doSetupCitra=false android_doSetupPPSSPP=true android_doSetupAetherSX2=true @@ -12,7 +12,7 @@ android_doSetupAetherSX2=true android_doInstallRA=true android_doInstallDolphin=true android_doInstallYuzu=true -android_doInstallCitra=true +android_doInstallCitra=false android_doInstallPPSSPP=true android_doInstallAetherSX2=true diff --git a/android/functions/EmuScripts/Android_Azahar.sh b/android/functions/EmuScripts/Android_Azahar.sh new file mode 100644 index 00000000..bde44c3c --- /dev/null +++ b/android/functions/EmuScripts/Android_Azahar.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +function Android_Azahar_install(){ + setMSG "Installing Azahar" + temp_url="$(getLatestReleaseURLGH "azahar-emu/azahar" ".apk")" + temp_emu="azahar" + Android_ADB_dl_installAPK $temp_emu $temp_url +} + +function Android_Azahar_init(){ + setMSG "Setting up Azahar" + rsync -ra "$emudeckBackend/android/configs/azahar-emu/" "$Android_temp_internal/azahar-emu/" +} + +function Android_Azahar_setup(){ + adb shell pm grant io.github.lime3ds.android android.permission.WRITE_EXTERNAL_STORAGE + adb shell am start -n io.github.lime3ds.android/.ui.MainActivity + sleep 1 + adb shell am force-stop io.github.lime3ds.android +} + +function Android_Azahar_IsInstalled(){ + package=" io.github.lime3ds.android" + Android_ADB_appInstalled $package +} diff --git a/android/functions/EmuScripts/Android_Lime3DS.sh b/android/functions/EmuScripts/Android_Lime3DS.sh deleted file mode 100644 index 00f73dd9..00000000 --- a/android/functions/EmuScripts/Android_Lime3DS.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -function Android_Lime3DS_install(){ - setMSG "Installing Citra" - temp_url="$(getLatestReleaseURLGH "Lime3DS/lime3ds-archive" ".apk")" - temp_emu="citra" - Android_ADB_dl_installAPK $temp_emu $temp_url -} - -function Android_Lime3DS_init(){ - setMSG "Setting up Citra" - rsync -ra "$emudeckBackend/android/configs/citra-emu/" "$Android_temp_internal/citra-emu/" -} - -function Android_Lime3DS_setup(){ - adb shell pm grant org.citra.emu android.permission.WRITE_EXTERNAL_STORAGE - adb shell am start -n org.citra.emu/.ui.MainActivity - sleep 1 - adb shell am force-stop org.citra.emu -} - -function Android_Lime3DS_IsInstalled(){ - package="org.citra.emu" - Android_ADB_appInstalled $package -} diff --git a/android/functions/all.sh b/android/functions/all.sh index bbbd498b..ce0e0d49 100644 --- a/android/functions/all.sh +++ b/android/functions/all.sh @@ -13,7 +13,7 @@ source "$emudeckBackend/android/vars.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_Azahar.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 diff --git a/android/roms/3ds/metadata.pegasus.txt b/android/roms/3ds/metadata.pegasus.txt index 5d6efc6d..8828ed7f 100755 --- a/android/roms/3ds/metadata.pegasus.txt +++ b/android/roms/3ds/metadata.pegasus.txt @@ -1,4 +1,4 @@ collection: Nintendo 3DS shortname: 3ds -extensions: 3ds, 3dsx, app, axf, cci, cxi, elf -launch: am start -n org.citra.emu/.ui.EmulationActivity -a android.intent.action.VIEW -e GamePath {file.path} \ No newline at end of file +extensions: app, axf, cci, cxi, elf +launch: am start -n io.github.lime3ds.android/.ui.EmulationActivity -a android.intent.action.VIEW -e GamePath {file.path} \ No newline at end of file diff --git a/android/setup.sh b/android/setup.sh index 2337873d..4f5c461d 100644 --- a/android/setup.sh +++ b/android/setup.sh @@ -133,9 +133,9 @@ if [ $androidInstallPegasus == "true" ]; then Android_Pegasus_init fi -if [ $androidInstallLime3DS == "true" ]; then - Android_Lime3DS_install - Android_Lime3DS_init +if [ $androidInstallAzahar == "true" ]; then + Android_Azahar_install + Android_Azahar_init fi if [ $androidInstallDolphin == "true" ]; then Android_Dolphin_install @@ -183,8 +183,8 @@ done if [ "$success" = "false" ]; then echo "500 #ANDROID" else - if [ "$androidInstallCitraMMJ" = "true" ]; then - Android_Citra_setup + if [ "$androidInstallAzahar" = "true" ]; then + Android_Azahar_setup fi if [ "$androidInstallPegasus" = "true" ]; then Android_Pegasus_setup diff --git a/chimeraOS/configs/emulationstation/custom_systems/es_find_rules.xml b/chimeraOS/configs/emulationstation/custom_systems/es_find_rules.xml index a5024fd1..8f95ba92 100644 --- a/chimeraOS/configs/emulationstation/custom_systems/es_find_rules.xml +++ b/chimeraOS/configs/emulationstation/custom_systems/es_find_rules.xml @@ -62,6 +62,15 @@ ~/.local/share/flatpak/exports/bin/org.yuzu_emu.yuzu + + + + azahar + + + ~/Applications/azahar*.AppImage + + diff --git a/cloudSyncHealth.sh b/cloudSyncHealth.sh index 9986d86b..055a0375 100644 --- a/cloudSyncHealth.sh +++ b/cloudSyncHealth.sh @@ -40,7 +40,7 @@ cloud_sync_dowload_test(){ echo -e "${CYAN}CloudSync Status Report${NONE}" echo "" -miArray=("Cemu" "citra" "dolphin" "duckstation" "MAME" "melonds" "mgba" "pcsx2" "ppsspp" "primehack" "retroarch" "rpcs3" "scummvm" "Vita3K" "yuzu" "ryujinx" ) +miArray=("Cemu" "azahar" "dolphin" "duckstation" "MAME" "melonds" "mgba" "pcsx2" "ppsspp" "primehack" "retroarch" "rpcs3" "scummvm" "Vita3K" "yuzu" "ryujinx" ) upload="true" download="true" diff --git a/configs/emulationstation/custom_systems/es_find_rules.xml b/configs/emulationstation/custom_systems/es_find_rules.xml index 385377a7..0e0d3708 100644 --- a/configs/emulationstation/custom_systems/es_find_rules.xml +++ b/configs/emulationstation/custom_systems/es_find_rules.xml @@ -33,11 +33,6 @@ /run/media/mmcblk0p1/Emulation/tools/launchers/cemu.sh - - - /run/media/mmcblk0p1/Emulation/tools/launchers/citra.sh - - /run/media/mmcblk0p1/Emulation/tools/launchers/dolphin.sh @@ -53,9 +48,9 @@ /run/media/mmcblk0p1/Emulation/tools/launchers/flycast.sh - + - /run/media/mmcblk0p1/Emulation/tools/launchers/lime3ds.sh + /run/media/mmcblk0p1/Emulation/tools/launchers/azahar.sh diff --git a/configs/emulationstation/gamelists/3ds/gamelist.xml b/configs/emulationstation/gamelists/3ds/gamelist.xml index 2c971241..fba3be42 100644 --- a/configs/emulationstation/gamelists/3ds/gamelist.xml +++ b/configs/emulationstation/gamelists/3ds/gamelist.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/configs/emulationstation/gamelists/n3ds/gamelist.xml b/configs/emulationstation/gamelists/n3ds/gamelist.xml index 2c971241..fba3be42 100644 --- a/configs/emulationstation/gamelists/n3ds/gamelist.xml +++ b/configs/emulationstation/gamelists/n3ds/gamelist.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/configs/lime3ds/qt-config.ini b/configs/lime3ds/qt-config.ini index 044a879f..92a55117 100644 --- a/configs/lime3ds/qt-config.ini +++ b/configs/lime3ds/qt-config.ini @@ -174,9 +174,9 @@ use_cpu_jit=true use_cpu_jit\default=true [Data%20Storage] -nand_directory=/home/deck/.local/share/lime3ds-emu/nand/ +nand_directory=/home/deck/.local/share/azahar-emu/nand/ nand_directory\default=false -sdmc_directory=/home/deck/.local/share/lime3ds-emu/sdmc/ +sdmc_directory=/home/deck/.local/share/azahar-emu/sdmc/ sdmc_directory\default=false use_custom_storage=true use_custom_storage\default=false @@ -459,7 +459,7 @@ Paths\moviePlaybackPath= Paths\movieRecordPath= Paths\recentFiles= Paths\romsPath= -Paths\screenshotPath=/home/deck/.local/share/lime3ds-emu/screenshots/ +Paths\screenshotPath=/home/deck/.local/share/azahar-emu/screenshots/ Paths\screenshotPath\default=false Paths\symbolsPath= Paths\videoDumpingPath= @@ -495,10 +495,10 @@ Shortcuts\Main%20Window\Decrease%20Speed%20Limit\Context=2 Shortcuts\Main%20Window\Decrease%20Speed%20Limit\Context\default=true Shortcuts\Main%20Window\Decrease%20Speed%20Limit\KeySeq=- Shortcuts\Main%20Window\Decrease%20Speed%20Limit\KeySeq\default=true -Shortcuts\Main%20Window\Exit%20Lime3DS\Context=1 -Shortcuts\Main%20Window\Exit%20Lime3DS\Context\default=true -Shortcuts\Main%20Window\Exit%20Lime3DS\KeySeq=Alt+F4 -Shortcuts\Main%20Window\Exit%20Lime3DS\KeySeq\default=false +Shortcuts\Main%20Window\Exit%20Azahar\Context=1 +Shortcuts\Main%20Window\Exit%20Azahar\Context\default=true +Shortcuts\Main%20Window\Exit%20Azahar\KeySeq=Alt+F4 +Shortcuts\Main%20Window\Exit%20Azahar\KeySeq\default=false Shortcuts\Main%20Window\Exit%20Fullscreen\Context=1 Shortcuts\Main%20Window\Exit%20Fullscreen\Context\default=true Shortcuts\Main%20Window\Exit%20Fullscreen\KeySeq=PgDown diff --git a/configs/steam-rom-manager/userData/parsers/optional/nintendo_3ds_lime3ds.json b/configs/steam-rom-manager/userData/parsers/optional/nintendo_3ds_lime3ds.json index b683048c..82638405 100644 --- a/configs/steam-rom-manager/userData/parsers/optional/nintendo_3ds_lime3ds.json +++ b/configs/steam-rom-manager/userData/parsers/optional/nintendo_3ds_lime3ds.json @@ -1,10 +1,10 @@ { "parserType": "Glob", - "configTitle": "Nintendo 3DS - Lime3DS", + "configTitle": "Nintendo 3DS - Azahar", "steamDirectory": "${steamdirglobal}", "romDirectory": "${romsdirglobal}/n3ds", "steamCategories": [ - "Nintendo 3DS - Lime3DS (Standalone)" + "Nintendo 3DS - Azahar (Standalone)" ], "executableArgs": " \"${filePath}\"", "executableModifier": "\"${exePath}\"", @@ -26,7 +26,7 @@ ] }, "executable": { - "path": "/run/media/mmcblk0p1/Emulation/tools/launchers/lime3ds.sh", + "path": "/run/media/mmcblk0p1/Emulation/tools/launchers/azahar.sh", "shortcutPassthrough": false, "appendArgsToExecutable": true }, diff --git a/functions/EmuScripts/emuDeckAzahar.sh b/functions/EmuScripts/emuDeckAzahar.sh new file mode 100755 index 00000000..f7b42031 --- /dev/null +++ b/functions/EmuScripts/emuDeckAzahar.sh @@ -0,0 +1,296 @@ +#!/bin/bash +#variables +Azahar_emuName="Azahar" +Azahar_emuType="$emuDeckEmuTypeAppImage" +Azahar_emuPath="$emusFolder/azahar-gui.AppImage" +Azahar_releaseURL="" +Azahar_configFile="$HOME/.config/azahar-emu/qt-config.ini" +Azahar_configPath="$HOME/.config/azahar-emu" +Azahar_texturesPath="$HOME/.config/azahar-emu/load/textures" + +#Install +Azahar_install(){ + echo "Begin $Azahar_emuName Install" + local showProgress="$1" + if installEmuAI "$Azahar_emuName" "" "$(getReleaseURLGH "Azahar/azahar-archive" "tar.gz" "")" "azahar" "tar.gz" "emulator" "$showProgress"; then #azahar-gui.AppImage + mkdir "$emusFolder/azahar-temp" + tar -xvzf "$emusFolder/azahar.tar.gz" -C "$emusFolder/azahar-temp" --strip-components 1 + if [ -f "$emusFolder/azahar-temp/azahar-gui.AppImage" ]; then + mv "$emusFolder/azahar-temp/azahar-gui.AppImage" "$Azahar_emuPath" + elif [ -f "$emusFolder/azahar-temp/azahar.AppImage" ]; then + mv "$emusFolder/azahar-temp/azahar.AppImage" "$Azahar_emuPath" + else + rm -rf "$emusFolder/azahar-temp" + rm -rf "$emusFolder/azahar.tar.gz" + return 1 + fi + chmod +x "$emusFolder/azahar-gui.AppImage" + rm -rf "$emusFolder/azahar-temp" + rm -rf "$emusFolder/azahar.tar.gz" + else + return 1 + fi +} + +#ApplyInitialSettings +Azahar_init(){ + setMSG "Initializing $Azahar_emuName settings." + configEmuAI "$Azahar_emuName" "azahar-emu" "$Azahar_configPath" "$emudeckBackend/configs/azahar" "true" + Azahar_setEmulationFolder + Azahar_setupStorage + Azahar_setupSaves + Azahar_addSteamInputProfile + Azahar_flushEmulatorLauncher + Azahar_setupTextures + Azahar_addParser +} + +#update +Azahar_update(){ + setMSG "Updating $Azahar_emuName settings." + configEmuAI "$Azahar_emuName" "azahar-emu" "$Azahar_configPath" "$emudeckBackend/configs/azahar" + Azahar_setupStorage + Azahar_setEmulationFolder + Azahar_setupSaves + Azahar_addSteamInputProfile + Azahar_flushEmulatorLauncher + Azahar_setupTextures +} + +Azahar_setupStorage(){ + mkdir -p "$storagePath/azahar/" + + if [ ! -d "$storagePath/azahar/sdmc" ] && [ ! -d "$HOME/.var/app/io.github.azahar.Azahar/data/azahar-emu/sdmc" -o ! -d "$HOME/.local/share/azahar-emu" ] && [ -d "$HOME/.var/app/org.citra_emu.citra/data/citra-emu/sdmc" -o -d "$HOME/.local/share/citra-emu/sdmc" -o -d "$storagePath/citra/sdmc" ]; then + echo "Azahar SDMC does not exist in storage path and does not exist in the original Flatpak or AppImage paths. Citra SDMC folder found, copying Citra SDMC folder." + + echo -e "" + setMSG "Copying Citra SDMC to the Azahar SDMC folder" + echo -e "" + + mkdir -p "$storagePath/azahar" + + + if [ -d "$storagePath/citra/sdmc" ]; then + rsync -av --ignore-existing "$storagePath/citra/sdmc" "$storagePath"/azahar + elif [ -d "$HOME/.var/app/org.citra_emu.citra/data/citra-emu/sdmc" ]; then + rsync -av --ignore-existing "$HOME/.var/app/org.citra_emu.citra/data/citra-emu/sdmc" "$storagePath"/azahar + elif [ -d "$HOME/.local/share/citra-emu/sdmc" ]; then + rsync -av --ignore-existing "$HOME/.local/share/citra-emu/sdmc" "$storagePath"/azahar + else + mkdir -p "$storagePath/citra/sdmc" + fi + + fi + + if [ ! -d "$storagePath/azahar/sdmc" ] && [ -d "$HOME/.var/app/io.github.azahar.Azahar/data/azahar-emu/sdmc" -o -d "$HOME/.local/share/azahar-emu/sdmc" ]; then + echo "Azahar SDMC does not exist in storage path. Found Azahar SDMC in original path, copying to storage folder." + + echo -e "" + setMSG "Copying Azahar SDMC to the Emulation/storage folder" + echo -e "" + + mkdir -p "$storagePath/azahar" + + if [ -d "$HOME/.var/app/io.github.azahar.Azahar/data/azahar-emu/sdmc" ]; then + rsync -av --ignore-existing "$HOME/.var/app/io.github.azahar.Azahar/data/azahar-emu/sdmc" "$storagePath"/azahar/ && rm -rf "$HOME/.var/app/io.github.azahar.Azahar/data/azahar-emu/sdmc" + + elif [ -d "$HOME/.local/share/azahar-emu/sdmc" ]; then + rsync -av --ignore-existing "$HOME/.local/share/azahar-emu/sdmc" "$storagePath"/azahar/ && rm -rf "$HOME/.local/share/azahar-emu/sdmc" + else + mkdir -p "$storagePath/azahar/sdmc" + fi + else + echo "Azahar SDMC does not exist anywhere. Creating SDMC folder." + mkdir -p "$storagePath/azahar/sdmc" + fi + + + if [ ! -d "$storagePath/azahar/nand" ] && [ ! -d "$HOME/.var/app/io.github.azahar.Azahar/data/azahar-emu/nand" -o ! -d "$HOME/.local/share/azahar-emu" ] && [ -d "$HOME/.var/app/org.citra_emu.citra/data/citra-emu/nand" -o -d "$HOME/.local/share/citra-emu/nand" -o -d "$storagePath/citra/nand" ]; then + echo "Azahar NAND does not exist in storage path and does not exist in the original Flatpak or AppImage paths. Citra NAND folder found, copying Citra NAND folder." + + echo -e "" + setMSG "Copying Citra NAND to the Azahar folder" + echo -e "" + + mkdir -p "$storagePath/azahar" + + + if [ -d "$storagePath/citra/nand" ]; then + rsync -av --ignore-existing "$storagePath/citra/nand" "$storagePath"/azahar + elif [ -d "$HOME/.var/app/org.citra_emu.citra/data/citra-emu/nand" ]; then + rsync -av --ignore-existing "$HOME/.var/app/org.citra_emu.citra/data/citra-emu/nand" "$storagePath"/azahar + elif [ -d "$HOME/.local/share/citra-emu/nand" ]; then + rsync -av --ignore-existing "$HOME/.local/share/citra-emu/nand" "$storagePath"/azahar + else + mkdir -p "$storagePath/citra/nand" + fi + + fi + + + if [ ! -d "$storagePath/azahar/nand" ] && [ -d "$HOME/.var/app/io.github.azahar.Azahar/data/azahar-emu/nand" -o -d "$HOME/.local/share/azahar-emu/nand" ]; then + echo "Azahar NAND does not exist in storage path. Found Azahar NAND in original path, copying to storage folder." + + echo -e "" + setMSG "Copying Citra NAND to the Azahar NAND folder" + echo -e "" + + mkdir -p "$storagePath/azahar" + + if [ -d "$HOME/.var/app/io.github.azahar.Azahar/data/azahar-emu/nand" ]; then + rsync -av --ignore-existing "$HOME/.var/app/io.github.azahar.Azahar/data/azahar-emu/nand" "$storagePath"/azahar/ && rm -rf "$HOME/.var/app/io.github.azahar.Azahar/data/azahar-emu/nand" + + elif [ -d "$HOME/.local/share/azahar-emu/nand" ]; then + rsync -av --ignore-existing "$HOME/.local/share/azahar-emu/nand" "$storagePath"/azahar/ && rm -rf "$HOME/.local/share/azahar-emu/nand" + else + mkdir -p "$storagePath/azahar/nand" + fi + else + echo "Azahar NAND does not exist anywhere. Creating NAND folder." + mkdir -p "$storagePath/azahar/nand" + fi + + + + # Cheats and Texture Packs + # Cheats + mkdir -p "$HOME/.local/share/azahar-emu/cheats" + linkToStorageFolder azahar cheats "$HOME/.local/share/azahar-emu/cheats" + # Texture Pack + mkdir -p "$HOME/.local/share/azahar-emu/load/textures" + linkToStorageFolder azahar textures "$HOME/.local/share/azahar-emu/load/textures" +} + +#ConfigurePaths +Azahar_setEmulationFolder(){ + setMSG "Setting $Azahar_emuName Emulation Folder" + + mkdir -p "$Azahar_configPath" + gameDirOpt='Paths\\gamedirs\\3\\path=' + newGameDirOpt='Paths\\gamedirs\\3\\path='"${romsPath}/n3ds" + sed -i "/${gameDirOpt}/c\\${newGameDirOpt}" "$Azahar_configFile" + + nandDirOpt='nand_directory=' + newnandDirOpt='nand_directory='"$storagePath/azahar/nand/" + sed -i "/${nandDirOpt}/c\\${newnandDirOpt}" "$Azahar_configFile" + + sdmcDirOpt='sdmc_directory=' + newsdmcDirOpt='sdmc_directory='"$storagePath/azahar/sdmc/" + sed -i "/${sdmcDirOpt}/c\\${newsdmcDirOpt}" "$Azahar_configFile" + + mkdir -p "$storagePath/azahar/screenshots/" + screenshotsDirOpt='Paths\\screenshotPath=' + newscreenshotDirOpt='Paths\\screenshotPath='"$storagePath/azahar/screenshots/" + sed -i "/${screenshotsDirOpt}/c\\${newscreenshotDirOpt}" "$Azahar_configFile" + + # True/False configs + sed -i 's/nand_directory\\default=true/nand_directory\\default=false/' "$Azahar_configFile" + sed -i 's/sdmc_directory\\default=true/sdmc_directory\\default=false/' "$Azahar_configFile" + sed -i 's/use_custom_storage=false/use_custom_storage=true/' "$Azahar_configFile" + sed -i 's/use_custom_storage\\default=true/use_custom_storage\\default=false/' "$Azahar_configFile" + + # Vulkan Graphics + sed -E 's/layout_option=[0-9]+/layout_option=5/g' "$Azahar_configFile" + sed -i 's/layout_option\\default=true/layout_option\\default=false/' "$Azahar_configFile" + + #Setup symlink for AES keys + mkdir -p "${biosPath}/azahar/" + mkdir -p "$HOME/.local/share/azahar-emu/sysdata" + ln -sn "$HOME/.local/share/azahar-emu/sysdata" "${biosPath}/azahar/keys" + +} + + + +#SetupSaves +Azahar_setupSaves(){ + mkdir -p "$HOME/.local/share/azahar-emu/states" + linkToSaveFolder azahar saves "$storagePath/azahar/sdmc" + linkToSaveFolder azahar states "$HOME/.local/share/azahar-emu/states" +} + +#Set up textures + +Azahar_setupTextures(){ + mkdir -p "$HOME/.local/share/azahar-emu/load/textures" + linkToTexturesFolder azahar textures "$HOME/.local/share/azahar-emu/load/textures" + +} + +#WipeSettings +Azahar_wipe(){ + setMSG "Wiping $Azahar_emuName config directory. (factory reset)" + rm -rf "$HOME/.config/azahar-emu" +} + + +#Uninstall +Azahar_uninstall(){ + setMSG "Uninstalling $Azahar_emuName." + removeParser "nintendo_3ds_azahar.json" + uninstallEmuAI $Azahar_emuName "azahar-gui" "" "emulator" +} + +#setABXYstyle +Azahar_setABXYstyle(){ + sed -i '/button_a/s/button:1/button:0/' "$Azahar_configFile" + sed -i '/button_b/s/button:0/button:1/' "$Azahar_configFile" + sed -i '/button_x/s/button:3/button:2/' "$Azahar_configFile" + sed -i '/button_y/s/button:2/button:3/' "$Azahar_configFile" + +} + +Azahar_setBAYXstyle(){ + sed -i '/button_a/s/button:0/button:1/' "$Azahar_configFile" + sed -i '/button_b/s/button:1/button:0/' "$Azahar_configFile" + sed -i '/button_x/s/button:2/button:3/' "$Azahar_configFile" + sed -i '/button_y/s/button:3/button:2/' "$Azahar_configFile" +} + +#finalExec - Extra stuff +Azahar_finalize(){ + echo "NYI" +} + +Azahar_IsInstalled(){ + if [ -e "$Azahar_emuPath" ]; then + echo "true" + else + echo "false" + fi +} + +Azahar_resetConfig(){ + Azahar_init &>/dev/null && echo "true" || echo "false" +} + +Azahar_addSteamInputProfile(){ + addSteamInputCustomIcons + setMSG "Adding $Azahar_emuName Steam Input Profile." + #rsync -r "$emudeckBackend/configs/steam-input/Azahar_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" + rsync -r --exclude='*/' "$emudeckBackend/configs/steam-input/" "$HOME/.steam/steam/controller_base/templates/" +} + +Azahar_setResolution(){ + case $azaharResolution in + "720P") multiplier=3;; + "1080P") multiplier=5;; + "1440P") multiplier=6;; + "4K") multiplier=9;; + *) echo "Error"; return 1;; + esac + + setConfig "resolution_factor" $multiplier "$Azahar_configFile" +} + +Azahar_flushEmulatorLauncher(){ + + + flushEmulatorLaunchers "azahar" + +} + + +Azahar_addParser(){ + addParser "nintendo_3ds_azahar.json" +} \ No newline at end of file diff --git a/functions/EmuScripts/emuDeckCitra.sh b/functions/EmuScripts/emuDeckCitra.sh deleted file mode 100755 index 5b248463..00000000 --- a/functions/EmuScripts/emuDeckCitra.sh +++ /dev/null @@ -1,368 +0,0 @@ -#!/bin/bash -#variables -Citra_emuName="Citra" -Citra_emuType="$emuDeckEmuTypeAppImage" -Citra_emuPath="$emusFolder/citra-qt.AppImage" -Citra_releaseURL="" -Citra_configFile="$HOME/.config/citra-emu/qt-config.ini" -Citra_configPath="$HOME/.config/citra-emu" -Citra_texturesPath="$HOME/.config/citra-emu/load/textures" - -#Install -Citra_install(){ - echo "Begin $Citra_emuName Install" - local showProgress="$1" - if installEmuAI "$Citra_emuName" "" "https://github.com/PabloMK7/citra/releases/download/r608383e/citra-linux-appimage-20240927-608383e.tar.gz" "citra" "tar.gz" "emulator" "$showProgress"; then #citra-qt.AppImage - #if installEmuAI "$Citra_emuName" "" "https://github.com/PabloMK7/citra/releases/download/r518f723/citra-linux-appimage-20240717-518f723.tar.gz" "citra" "tar.gz" "emulator" "$showProgress"; then #citra-qt.AppImage - mkdir "$emusFolder/citra-temp" - tar -xvzf "$emusFolder/citra.tar.gz" -C "$emusFolder/citra-temp" --strip-components 1 - mv "$emusFolder/citra-temp/citra-qt.AppImage" "$emusFolder" - rm -rf "$emusFolder/citra-temp" - rm -rf "$emusFolder/citra.tar.gz" - chmod +x "$emusFolder/citra-qt.AppImage" - else - return 1 - fi -} - -#ApplyInitialSettings -Citra_init(){ - setMSG "Initializing $Citra_emuName settings." - configEmuAI "$Citra_emuName" "citra-emu" "$HOME/.config/citra-emu" "$emudeckBackend/configs/citra-emu" "true" - Citra_setEmulationFolder - Citra_setupStorage - Citra_setupSaves - Citra_addSteamInputProfile - Citra_flushEmulatorLauncher - Citra_flushSymlinks - Citra_setupTextures -} - -#update -Citra_update(){ - setMSG "Updating $Citra_emuName settings." - configEmuAI "$Citra_emuName" "citra-emu" "$HOME/.config/citra-emu" "$emudeckBackend/configs/citra-emu" - Citra_setupStorage - Citra_setEmulationFolder - Citra_setupSaves - Citra_addSteamInputProfile - Citra_flushEmulatorLauncher - Citra_flushSymlinks - Citra_setupTextures -} - -Citra_setupStorage(){ - mkdir -p "$storagePath/citra/" - - - # SDMC and NAND - if [ ! -d "$storagePath/citra/sdmc" ] && [ -d "$HOME/.var/app/org.citra_emu.citra" -o -d "$HOME/.local/share/citra-emu" ]; then - echo "Citra SDMC does not exist in storage path" - - echo -e "" - setMSG "Moving Citra SDMC to the Emulation/storage folder" - echo -e "" - - mkdir -p "$storagePath/citra" - - if [ -d "$savesPath/citra/sdmc" ]; then - mv -f "$savesPath"/citra/sdmc "$storagePath"/citra/ - - elif [ -d "$HOME/.var/app/org.citra_emu.citra/data/citra-emu/sdmc" ]; then - rsync -av "$HOME/.var/app/org.citra_emu.citra/data/citra-emu/sdmc" "$storagePath"/citra/ && rm -rf "$HOME/.var/app/org.citra_emu.citra/data/citra-emu/sdmc" - - elif [ -d "$HOME/.local/share/citra-emu/sdmc" ]; then - rsync -av "$HOME/.local/share/citra-emu/sdmc" "$storagePath"/citra/ && rm -rf "$HOME/.local/share/citra-emu/sdmc" - else - mkdir -p "$storagePath/citra/sdmc" - fi - else - mkdir -p "$storagePath/citra/sdmc" - fi - - - if [ ! -d "$storagePath/citra/nand" ] && [ -d "$HOME/.var/app/org.citra_emu.citra" -o -d "$HOME/.local/share/citra-emu" ]; then - echo "Citra NAND does not exist in storage path" - - echo -e "" - setMSG "Moving Citra NAND to the Emulation/storage folder" - echo -e "" - - mkdir -p "$storagePath/citra" - - if [ -d "$savesPath/citra/nand" ]; then - mv -f "$savesPath"/citra/nand "$storagePath"/citra/ - - elif [ -d "$HOME/.var/app/org.citra_emu.citra/data/citra-emu/nand" ]; then - rsync -av "$HOME/.var/app/org.citra_emu.citra/data/citra-emu/nand" "$storagePath"/citra/ && rm -rf "$HOME/.var/app/org.citra_emu.citra/data/citra-emu/nand" - - elif [ -d "$HOME/.local/share/citra-emu/nand" ]; then - rsync -av "$HOME/.local/share/citra-emu/nand" "$storagePath"/citra/ && rm -rf "$HOME/.local/share/citra-emu/nand" - else - mkdir -p "$storagePath/citra/nand" - fi - else - mkdir -p "$storagePath/citra/nand" - fi - - # Cheats and Texture Packs - # Cheats - mkdir -p "$HOME/.local/share/citra-emu/cheats" - linkToStorageFolder citra cheats "$HOME/.local/share/citra-emu/cheats" - # Texture Pack - mkdir -p "$HOME/.local/share/citra-emu/load/textures" - linkToStorageFolder citra textures "$HOME/.local/share/citra-emu/load/textures" -} - -#ConfigurePaths -Citra_setEmulationFolder(){ - setMSG "Setting $Citra_emuName Emulation Folder" - - mkdir -p "$Citra_configPath" - gameDirOpt='Paths\\gamedirs\\3\\path=' - newGameDirOpt='Paths\\gamedirs\\3\\path='"${romsPath}/n3ds" - sed -i "/${gameDirOpt}/c\\${newGameDirOpt}" "$Citra_configFile" - - nandDirOpt='nand_directory=' - newnandDirOpt='nand_directory='"$storagePath/citra/nand/" - sed -i "/${nandDirOpt}/c\\${newnandDirOpt}" "$Citra_configFile" - - sdmcDirOpt='sdmc_directory=' - newsdmcDirOpt='sdmc_directory='"$storagePath/citra/sdmc/" - sed -i "/${sdmcDirOpt}/c\\${newsdmcDirOpt}" "$Citra_configFile" - - mkdir -p "$storagePath/citra/screenshots/" - screenshotsDirOpt='Paths\\screenshotPath=' - newscreenshotDirOpt='Paths\\screenshotPath='"$storagePath/citra/screenshots/" - sed -i "/${screenshotsDirOpt}/c\\${newscreenshotDirOpt}" "$Citra_configFile" - - # True/False configs - sed -i 's/nand_directory\\default=true/nand_directory\\default=false/' "$Citra_configFile" - sed -i 's/sdmc_directory\\default=true/sdmc_directory\\default=false/' "$Citra_configFile" - sed -i 's/use_custom_storage=false/use_custom_storage=true/' "$Citra_configFile" - sed -i 's/use_custom_storage\\default=true/use_custom_storage\\default=false/' "$Citra_configFile" - - # Vulkan Graphics - sed -E 's/layout_option=[0-9]+/layout_option=5/g' "$Citra_configFile" - sed -i 's/layout_option\\default=true/layout_option\\default=false/' "$Citra_configFile" - - #Setup symlink for AES keys - mkdir -p "${biosPath}/citra/" - mkdir -p "$HOME/.local/share/citra-emu/sysdata" - ln -sn "$HOME/.local/share/citra-emu/sysdata" "${biosPath}/citra/keys" - -} - - - -#SetupSaves -Citra_setupSaves(){ - mkdir -p "$HOME/.local/share/citra-emu/states" - linkToSaveFolder citra saves "$storagePath/citra/sdmc" - linkToSaveFolder citra states "$HOME/.local/share/citra-emu/states" -} - -#Set up textures - -Citra_setupTextures(){ - mkdir -p "$HOME/.local/share/citra-emu/load/textures" - linkToTexturesFolder citra textures "$HOME/.local/share/citra-emu/load/textures" - -} - -#WipeSettings -Citra_wipe(){ - setMSG "Wiping $Citra_emuName config directory. (factory reset)" - rm -rf "$HOME/.config/citra-emu" -} - - -#Uninstall -Citra_uninstall(){ - setMSG "Uninstalling $Citra_emuName." - uninstallEmuAI $Citra_emuName "citra-qt" "" "emulator" -} - -#setABXYstyle -Citra_setABXYstyle(){ - sed -i '/button_a/s/button:1/button:0/' "$Citra_configFile" - sed -i '/button_b/s/button:0/button:1/' "$Citra_configFile" - sed -i '/button_x/s/button:3/button:2/' "$Citra_configFile" - sed -i '/button_y/s/button:2/button:3/' "$Citra_configFile" - -} - -Citra_setBAYXstyle(){ - sed -i '/button_a/s/button:0/button:1/' "$Citra_configFile" - sed -i '/button_b/s/button:1/button:0/' "$Citra_configFile" - sed -i '/button_x/s/button:2/button:3/' "$Citra_configFile" - sed -i '/button_y/s/button:3/button:2/' "$Citra_configFile" -} - -#finalExec - Extra stuff -Citra_finalize(){ - echo "NYI" -} - -Citra_IsInstalled(){ - if [ -e "$Citra_emuPath" ]; then - echo "true" - else - echo "false" - fi -} - -Citra_resetConfig(){ - Citra_init &>/dev/null && echo "true" || echo "false" -} - -Citra_addSteamInputProfile(){ - addSteamInputCustomIcons - setMSG "Adding $Citra_emuName Steam Input Profile." - #rsync -r "$emudeckBackend/configs/steam-input/citra_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" - rsync -r --exclude='*/' "$emudeckBackend/configs/steam-input/" "$HOME/.steam/steam/controller_base/templates/" -} - -Citra_setResolution(){ - case $citraResolution in - "720P") multiplier=3;; - "1080P") multiplier=5;; - "1440P") multiplier=6;; - "4K") multiplier=9;; - *) echo "Error"; return 1;; - esac - - setConfig "resolution_factor" $multiplier "$Citra_configFile" -} - -Citra_flushEmulatorLauncher(){ - - - flushEmulatorLaunchers "citra" - -} - -Citra_flushSymlinks(){ - - - if [ -d "${HOME}/.local/share/Steam" ]; then - STEAMPATH="${HOME}/.local/share/Steam" - elif [ -d "${HOME}/.steam/steam" ]; then - STEAMPATH="${HOME}/.steam/steam" - else - echo "Steam install not found" - fi - - if [ ! -f "$emudeckFolder/.citralegacysymlinks" ] && [ -f "$emudeckFolder/.citrasymlinks" ]; then - - mkdir -p "$romsPath/n3ds" - # Temporary deletion to check if there are any additional contents in the n3ds folder. - rm -rf "$romsPath/n3ds/media" &> /dev/null - rm -rf "$romsPath/n3ds/metadata.txt" &> /dev/null - rm -rf "$romsPath/n3ds/systeminfo.txt" &> /dev/null - - # The Pegasus install was accidentally overwriting the pre-existing n3ds symlink. - # This checks if the n3ds folder is empty (post-removing the contents above) and if the original 3ds folder is still a folder and not a symlink (for those who have already migrated). - # If all of this is true, the n3ds folder is deleted and the old symlink is temporarily recreated to proceed with the migration. - if [[ ! "$( ls -A "$romsPath/n3ds")" ]] && [ -d "$romsPath/3ds" ] && [ ! -L "$romsPath/3ds" ]; then - rm -rf "$romsPath/n3ds" - ln -sfn "$romsPath/3ds" "$romsPath/n3ds" - # Temporarily restores old directory structure. - fi - - if [[ -L "$romsPath/n3ds" && ! $(readlink -f "$romsPath/n3ds") =~ ^"$romsPath" ]] || [[ -L "$romsPath/3ds" && ! $(readlink -f "$romsPath/3ds") =~ ^"$romsPath" ]]; then - echo "User has symlinks that don't match expected paths located under $romsPath. Aborting symlink update." - else - if [[ ! -e "$romsPath/3ds" && ! -e "$romsPath/n3ds" ]]; then - mkdir -p "$romsPath/n3ds" - ln -sfn "$romsPath/n3ds" "$romsPath/3ds" - elif [[ -d "$romsPath/3ds" && -L "$romsPath/n3ds" ]]; then - echo "Converting n3ds symlink to a regular directory..." - unlink "$romsPath/n3ds" - mv "$romsPath/3ds" "$romsPath/n3ds" - ln -sfn "$romsPath/n3ds" "$romsPath/3ds" - echo "3ds symlink updated to point to n3ds" - elif [[ -d "$romsPath/3ds" && ! -e "$romsPath/n3ds" ]]; then - echo "Creating n3ds directory and updating 3ds symlink..." - mv "$romsPath/3ds" "$romsPath/n3ds" - ln -sfn "$romsPath/n3ds" "$romsPath/3ds" - echo "3ds symlink updated to point to n3ds" - elif [[ -d "$romsPath/n3ds" && ! -e "$romsPath/3ds" ]]; then - echo "3ds symlink not found, creating..." - ln -sfn "$romsPath/n3ds" "$romsPath/3ds" - echo "3ds symlink created" - fi - fi - - - rsync -avh "$emudeckBackend/roms/n3ds/." "$romsPath/n3ds/." --ignore-existing - - if [ -d "$toolsPath/downloaded_media/n3ds" ] && [ ! -d "$romsPath/n3ds/media" ]; then - ln -s "$toolsPath/downloaded_media/n3ds" "$romsPath/n3ds/media" - fi - - find "$STEAMPATH/userdata" -name "shortcuts.vdf" -exec sed -i "s|${romsPath}/3ds|${romsPath}/n3ds|g" {} + - touch "$emudeckFolder/.citralegacysymlinks" - echo "Citra symlink cleanup completed." - - else - echo "Citra symlinks already cleaned." - fi - - - if [ ! -f "$emudeckFolder/.citrasymlinks" ]; then - - - mkdir -p "$romsPath/n3ds" - # Temporary deletion to check if there are any additional contents in the n3ds folder. - rm -rf "$romsPath/n3ds/media" &> /dev/null - rm -rf "$romsPath/n3ds/metadata.txt" &> /dev/null - rm -rf "$romsPath/n3ds/systeminfo.txt" &> /dev/null - - # The Pegasus install was accidentally overwriting the pre-existing n3ds symlink. - # This checks if the n3ds folder is empty (post-removing the contents above) and if the original 3ds folder is still a folder and not a symlink (for those who have already migrated). - # If all of this is true, the n3ds folder is deleted and the old symlink is temporarily recreated to proceed with the migration. - if [[ ! "$( ls -A "$romsPath/n3ds")" ]] && [ -d "$romsPath/3ds" ] && [ ! -L "$romsPath/3ds" ]; then - rm -rf "$romsPath/n3ds" - ln -sfn "$romsPath/3ds" "$romsPath/n3ds" - # Temporarily restores old directory structure. - fi - - if [[ -L "$romsPath/n3ds" && ! $(readlink -f "$romsPath/n3ds") =~ ^"$romsPath" ]] || [[ -L "$romsPath/3ds" && ! $(readlink -f "$romsPath/3ds") =~ ^"$romsPath" ]]; then - echo "User has symlinks that don't match expected paths located under $romsPath. Aborting symlink update." - else - if [[ ! -e "$romsPath/3ds" && ! -e "$romsPath/n3ds" ]]; then - mkdir -p "$romsPath/n3ds" - ln -sfn "$romsPath/n3ds" "$romsPath/3ds" - elif [[ -d "$romsPath/3ds" && -L "$romsPath/n3ds" ]]; then - echo "Converting n3ds symlink to a regular directory..." - unlink "$romsPath/n3ds" - mv "$romsPath/3ds" "$romsPath/n3ds" - ln -sfn "$romsPath/n3ds" "$romsPath/3ds" - echo "3ds symlink updated to point to n3ds" - elif [[ -d "$romsPath/3ds" && ! -e "$romsPath/n3ds" ]]; then - echo "Creating n3ds directory and updating 3ds symlink..." - mv "$romsPath/3ds" "$romsPath/n3ds" - ln -sfn "$romsPath/n3ds" "$romsPath/3ds" - echo "3ds symlink updated to point to n3ds" - elif [[ -d "$romsPath/n3ds" && ! -e "$romsPath/3ds" ]]; then - echo "3ds symlink not found, creating..." - ln -sfn "$romsPath/n3ds" "$romsPath/3ds" - echo "3ds symlink created" - fi - fi - - rsync -avh "$emudeckBackend/roms/n3ds/." "$romsPath/n3ds/." --ignore-existing - - if [ -d "$toolsPath/downloaded_media/n3ds" ] && [ ! -d "$romsPath/n3ds/media" ]; then - ln -s "$toolsPath/downloaded_media/n3ds" "$romsPath/n3ds/media" - fi - - find "$STEAMPATH/userdata" -name "shortcuts.vdf" -exec sed -i "s|${romsPath}/3ds|${romsPath}/n3ds|g" {} + - touch "$emudeckFolder/.citrasymlinks" - echo "Citra symlink cleanup completed." - - else - echo "Citra symlinks already cleaned." - fi -} diff --git a/functions/EmuScripts/emuDeckCitraLegacy.sh b/functions/EmuScripts/emuDeckCitraLegacy.sh deleted file mode 100755 index 81da3c12..00000000 --- a/functions/EmuScripts/emuDeckCitraLegacy.sh +++ /dev/null @@ -1,198 +0,0 @@ -#!/bin/bash -#variables -Citra_emuName="Citra" -Citra_emuType="FlatPak" -Citra_emuPath="org.citra_emu.citra" -Citra_releaseURL="" -Citra_configFile="$HOME/.var/app/org.citra_emu.citra/config/citra-emu/qt-config.ini" -Citra_texturesPath="$HOME/.var/app/$Citra_emuPath/data/citra-emu/load/textures" - -#cleanupOlderThings -Citra_finalize(){ - echo "NYI" -} - -#Install -Citra_install(){ - setMSG "Installing $Citra_emuName" - installEmuFP "${Citra_emuName}" "${Citra_emuPath}" -} - -#ApplyInitialSettings -Citra_init(){ - setMSG "Initializing $Citra_emuName settings." - configEmuFP "${Citra_emuName}" "${Citra_emuPath}" "true" - Citra_setupStorage - Citra_setEmulationFolder - Citra_setupSaves - #SRM_createParsers - #Citra_addSteamInputProfile -} - -#update -Citra_update(){ - setMSG "Updating $Citra_emuName settings." - configEmuFP "${Citra_emuName}" "${Citra_emuPath}" - Citra_setupStorage - Citra_setEmulationFolder - Citra_setupSaves - #Citra_addSteamInputProfile -} - -#ConfigurePaths -Citra_setEmulationFolder(){ - setMSG "Setting $Citra_emuName Emulation Folder" - - gameDirOpt='Paths\\gamedirs\\3\\path=' - newGameDirOpt='Paths\\gamedirs\\3\\path='"${romsPath}/3ds" - sed -i "/${gameDirOpt}/c\\${newGameDirOpt}" "$Citra_configFile" - - #Setup symlink for AES keys - mkdir -p "${biosPath}/citra/" - mkdir -p "$HOME/.var/app/org.citra_emu.citra/data/citra-emu/sysdata" - ln -sn "$HOME/.var/app/org.citra_emu.citra/data/citra-emu/sysdata" "${biosPath}/citra/keys" -} - -#SetupSaves -Citra_setupSaves(){ - linkToSaveFolder citra saves "$HOME/.var/app/org.citra_emu.citra/data/citra-emu/sdmc" - linkToSaveFolder citra states "$HOME/.var/app/org.citra_emu.citra/data/citra-emu/states" -} - - -#SetupStorage -Citra_setupStorage(){ - - if [ -d "${HOME}/.local/share/Steam" ]; then - STEAMPATH="${HOME}/.local/share/Steam" - elif [ -d "${HOME}/.steam/steam" ]; then - STEAMPATH="${HOME}/.steam/steam" - else - echo "Steam install not found" - fi - - if [[ -L "$romsPath/n3ds" && ! $(readlink -f "$romsPath/n3ds") =~ ^"$romsPath" ]] || [[ -L "$romsPath/3ds" && ! $(readlink -f "$romsPath/3ds") =~ ^"$romsPath" ]]; then - echo "User has symlinks that don't match expected paths located under $romsPath. Aborting symlink update." - else - if [[ ! -e "$romsPath/3ds" && ! -e "$romsPath/n3ds" ]]; then - mkdir -p "$romsPath/n3ds" - ln -sfn "$romsPath/n3ds" "$romsPath/3ds" - elif [[ -d "$romsPath/3ds" && -L "$romsPath/n3ds" ]]; then - echo "Converting n3ds symlink to a regular directory..." - unlink "$romsPath/n3ds" - mv "$romsPath/3ds" "$romsPath/n3ds" - ln -sfn "$romsPath/n3ds" "$romsPath/3ds" - echo "3ds symlink updated to point to n3ds" - elif [[ -d "$romsPath/3ds" && ! -e "$romsPath/n3ds" ]]; then - echo "Creating n3ds directory and updating 3ds symlink..." - mv "$romsPath/3ds" "$romsPath/n3ds" - ln -sfn "$romsPath/n3ds" "$romsPath/3ds" - echo "3ds symlink updated to point to n3ds" - elif [[ -d "$romsPath/n3ds" && ! -e "$romsPath/3ds" ]]; then - echo "3ds symlink not found, creating..." - ln -sfn "$romsPath/n3ds" "$romsPath/3ds" - echo "3ds symlink created" - fi - fi - find "$STEAMPATH/userdata" -name "shortcuts.vdf" -exec sed -i "s|${romsPath}/n3ds|${romsPath}/3ds|g" {} + - - - local textureLink="$(readlink -f "$Citra_texturesPath")" - if [[ "$textureLink" != "$emulationPath/hdpacks/3ds" ]]; then - rm -rf "$Citra_texturesPath" - ln -s "$Citra_texturesPath" "$emulationPath/hdpacks/3ds" - fi - - - if [ ! -f "$storagePath/citra/nand" ] && [ -d "$HOME/.var/app/org.ctira_emu.citra/data/citra-emu/nand/" ]; then - - echo "citra nand does not exist in storagepath." - echo -e "" - setMSG "Moving Citra nand to the Emulation/storage folder" - echo -e "" - - mv "$HOME/.var/app/org.ctira_emu.citra/data/citra-emu/nand/" $storagePath/citra/nand/ - mv "$HOME/.var/app/org.ctira_emu.citra/data/citra-emu/sdmc/" $storagePath/citra/sdmc/ - - unlink "$HOME/.var/app/org.ctira_emu.citra/data/citra-emu/nand/" - unlink "$HOME/.var/app/org.ctira_emu.citra/data/citra-emu/sdmc/" - - ln -ns "${storagePath}/citra/nand/" "$HOME/.var/app/org.ctira_emu.citra/data/citra-emu/nand/" - ln -ns "${storagePath}/citra/sdmc/" "$HOME/.var/app/org.ctira_emu.citra/data/citra-emu/sdmc/" - fi - -} - - -#WipeSettings -Citra_wipe(){ - setMSG "Wiping $Citra_emuName config directory. (factory reset)" - rm -rf "$HOME/.var/app/$Citra_emuPath" -} - - -#Uninstall -Citra_uninstall(){ - setMSG "Uninstalling $Citra_emuName." - flatpak uninstall "$Citra_emuPath" --user -y -} - -#setABXYstyle -Citra_setABXYstyle(){ - echo "NYI" -} - -#Migrate -Citra_migrate(){ -echo "NYI" -} - -#WideScreenOn -Citra_wideScreenOn(){ -echo "NYI" -} - -#WideScreenOff -Citra_wideScreenOff(){ -echo "NYI" -} - -#BezelOn -Citra_bezelOn(){ -echo "NYI" -} - -#BezelOff -Citra_bezelOff(){ -echo "NYI" -} - -#finalExec - Extra stuff -Citra_finalize(){ - echo "NYI" -} - -Citra_IsInstalled(){ - isFpInstalled "$Citra_emuPath" -} - -Citra_resetConfig(){ - Citra_init &>/dev/null && echo "true" || echo "false" -} - -Citra_addSteamInputProfile(){ - addSteamInputCustomIcons - rsync -r "$emudeckBackend/configs/steam-input/citra_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" -} - -Citra_setResolution(){ - case $citraResolution in - "720P") multiplier=3;; - "1080P") multiplier=5;; - "1440P") multiplier=6;; - "4K") multiplier=9;; - *) echo "Error"; return 1;; - esac - - setConfig "resolution_factor" $multiplier "$Citra_configFile" -} \ No newline at end of file diff --git a/functions/EmuScripts/emuDeckLime3DS.sh b/functions/EmuScripts/emuDeckLime3DS.sh deleted file mode 100755 index b9829c96..00000000 --- a/functions/EmuScripts/emuDeckLime3DS.sh +++ /dev/null @@ -1,296 +0,0 @@ -#!/bin/bash -#variables -Lime3DS_emuName="Lime3DS" -Lime3DS_emuType="$emuDeckEmuTypeAppImage" -Lime3DS_emuPath="$emusFolder/lime3ds-gui.AppImage" -Lime3DS_releaseURL="" -Lime3DS_configFile="$HOME/.config/lime3ds-emu/qt-config.ini" -Lime3DS_configPath="$HOME/.config/lime3ds-emu" -Lime3DS_texturesPath="$HOME/.config/lime3ds-emu/load/textures" - -#Install -Lime3DS_install(){ - echo "Begin $Lime3DS_emuName Install" - local showProgress="$1" - if installEmuAI "$Lime3DS_emuName" "" "$(getReleaseURLGH "Lime3DS/lime3ds-archive" "tar.gz" "")" "lime3ds" "tar.gz" "emulator" "$showProgress"; then #lime3ds-gui.AppImage - mkdir "$emusFolder/lime3ds-temp" - tar -xvzf "$emusFolder/lime3ds.tar.gz" -C "$emusFolder/lime3ds-temp" --strip-components 1 - if [ -f "$emusFolder/lime3ds-temp/lime3ds-gui.AppImage" ]; then - mv "$emusFolder/lime3ds-temp/lime3ds-gui.AppImage" "$Lime3DS_emuPath" - elif [ -f "$emusFolder/lime3ds-temp/lime3ds.AppImage" ]; then - mv "$emusFolder/lime3ds-temp/lime3ds.AppImage" "$Lime3DS_emuPath" - else - rm -rf "$emusFolder/lime3ds-temp" - rm -rf "$emusFolder/lime3ds.tar.gz" - return 1 - fi - chmod +x "$emusFolder/lime3ds-gui.AppImage" - rm -rf "$emusFolder/lime3ds-temp" - rm -rf "$emusFolder/lime3ds.tar.gz" - else - return 1 - fi -} - -#ApplyInitialSettings -Lime3DS_init(){ - setMSG "Initializing $Lime3DS_emuName settings." - configEmuAI "$Lime3DS_emuName" "lime3ds-emu" "$Lime3DS_configPath" "$emudeckBackend/configs/lime3ds" "true" - Lime3DS_setEmulationFolder - Lime3DS_setupStorage - Lime3DS_setupSaves - Lime3DS_addSteamInputProfile - Lime3DS_flushEmulatorLauncher - Lime3DS_setupTextures - Lime3DS_addParser -} - -#update -Lime3DS_update(){ - setMSG "Updating $Lime3DS_emuName settings." - configEmuAI "$Lime3DS_emuName" "lime3ds-emu" "$Lime3DS_configPath" "$emudeckBackend/configs/lime3ds" - Lime3DS_setupStorage - Lime3DS_setEmulationFolder - Lime3DS_setupSaves - Lime3DS_addSteamInputProfile - Lime3DS_flushEmulatorLauncher - Lime3DS_setupTextures -} - -Lime3DS_setupStorage(){ - mkdir -p "$storagePath/lime3ds/" - - if [ ! -d "$storagePath/lime3ds/sdmc" ] && [ ! -d "$HOME/.var/app/io.github.lime3ds.Lime3DS/data/lime3ds-emu/sdmc" -o ! -d "$HOME/.local/share/lime3ds-emu" ] && [ -d "$HOME/.var/app/org.citra_emu.citra/data/citra-emu/sdmc" -o -d "$HOME/.local/share/citra-emu/sdmc" -o -d "$storagePath/citra/sdmc" ]; then - echo "Lime3DS SDMC does not exist in storage path and does not exist in the original Flatpak or AppImage paths. Citra SDMC folder found, copying Citra SDMC folder." - - echo -e "" - setMSG "Copying Citra SDMC to the Lime3DS SDMC folder" - echo -e "" - - mkdir -p "$storagePath/lime3ds" - - - if [ -d "$storagePath/citra/sdmc" ]; then - rsync -av --ignore-existing "$storagePath/citra/sdmc" "$storagePath"/lime3ds - elif [ -d "$HOME/.var/app/org.citra_emu.citra/data/citra-emu/sdmc" ]; then - rsync -av --ignore-existing "$HOME/.var/app/org.citra_emu.citra/data/citra-emu/sdmc" "$storagePath"/lime3ds - elif [ -d "$HOME/.local/share/citra-emu/sdmc" ]; then - rsync -av --ignore-existing "$HOME/.local/share/citra-emu/sdmc" "$storagePath"/lime3ds - else - mkdir -p "$storagePath/citra/sdmc" - fi - - fi - - if [ ! -d "$storagePath/lime3ds/sdmc" ] && [ -d "$HOME/.var/app/io.github.lime3ds.Lime3DS/data/lime3ds-emu/sdmc" -o -d "$HOME/.local/share/lime3ds-emu/sdmc" ]; then - echo "Lime3DS SDMC does not exist in storage path. Found Lime3DS SDMC in original path, copying to storage folder." - - echo -e "" - setMSG "Copying Lime3DS SDMC to the Emulation/storage folder" - echo -e "" - - mkdir -p "$storagePath/lime3ds" - - if [ -d "$HOME/.var/app/io.github.lime3ds.Lime3DS/data/lime3ds-emu/sdmc" ]; then - rsync -av --ignore-existing "$HOME/.var/app/io.github.lime3ds.Lime3DS/data/lime3ds-emu/sdmc" "$storagePath"/lime3ds/ && rm -rf "$HOME/.var/app/io.github.lime3ds.Lime3DS/data/lime3ds-emu/sdmc" - - elif [ -d "$HOME/.local/share/lime3ds-emu/sdmc" ]; then - rsync -av --ignore-existing "$HOME/.local/share/lime3ds-emu/sdmc" "$storagePath"/lime3ds/ && rm -rf "$HOME/.local/share/lime3ds-emu/sdmc" - else - mkdir -p "$storagePath/lime3ds/sdmc" - fi - else - echo "Lime3DS SDMC does not exist anywhere. Creating SDMC folder." - mkdir -p "$storagePath/lime3ds/sdmc" - fi - - - if [ ! -d "$storagePath/lime3ds/nand" ] && [ ! -d "$HOME/.var/app/io.github.lime3ds.Lime3DS/data/lime3ds-emu/nand" -o ! -d "$HOME/.local/share/lime3ds-emu" ] && [ -d "$HOME/.var/app/org.citra_emu.citra/data/citra-emu/nand" -o -d "$HOME/.local/share/citra-emu/nand" -o -d "$storagePath/citra/nand" ]; then - echo "Lime3DS NAND does not exist in storage path and does not exist in the original Flatpak or AppImage paths. Citra NAND folder found, copying Citra NAND folder." - - echo -e "" - setMSG "Copying Citra NAND to the Lime3DS folder" - echo -e "" - - mkdir -p "$storagePath/lime3ds" - - - if [ -d "$storagePath/citra/nand" ]; then - rsync -av --ignore-existing "$storagePath/citra/nand" "$storagePath"/lime3ds - elif [ -d "$HOME/.var/app/org.citra_emu.citra/data/citra-emu/nand" ]; then - rsync -av --ignore-existing "$HOME/.var/app/org.citra_emu.citra/data/citra-emu/nand" "$storagePath"/lime3ds - elif [ -d "$HOME/.local/share/citra-emu/nand" ]; then - rsync -av --ignore-existing "$HOME/.local/share/citra-emu/nand" "$storagePath"/lime3ds - else - mkdir -p "$storagePath/citra/nand" - fi - - fi - - - if [ ! -d "$storagePath/lime3ds/nand" ] && [ -d "$HOME/.var/app/io.github.lime3ds.Lime3DS/data/lime3ds-emu/nand" -o -d "$HOME/.local/share/lime3ds-emu/nand" ]; then - echo "Lime3DS NAND does not exist in storage path. Found Lime3DS NAND in original path, copying to storage folder." - - echo -e "" - setMSG "Copying Citra NAND to the Lime3DS NAND folder" - echo -e "" - - mkdir -p "$storagePath/lime3ds" - - if [ -d "$HOME/.var/app/io.github.lime3ds.Lime3DS/data/lime3ds-emu/nand" ]; then - rsync -av --ignore-existing "$HOME/.var/app/io.github.lime3ds.Lime3DS/data/lime3ds-emu/nand" "$storagePath"/lime3ds/ && rm -rf "$HOME/.var/app/io.github.lime3ds.Lime3DS/data/lime3ds-emu/nand" - - elif [ -d "$HOME/.local/share/lime3ds-emu/nand" ]; then - rsync -av --ignore-existing "$HOME/.local/share/lime3ds-emu/nand" "$storagePath"/lime3ds/ && rm -rf "$HOME/.local/share/lime3ds-emu/nand" - else - mkdir -p "$storagePath/lime3ds/nand" - fi - else - echo "Lime3DS NAND does not exist anywhere. Creating NAND folder." - mkdir -p "$storagePath/lime3ds/nand" - fi - - - - # Cheats and Texture Packs - # Cheats - mkdir -p "$HOME/.local/share/lime3ds-emu/cheats" - linkToStorageFolder lime3ds cheats "$HOME/.local/share/lime3ds-emu/cheats" - # Texture Pack - mkdir -p "$HOME/.local/share/lime3ds-emu/load/textures" - linkToStorageFolder lime3ds textures "$HOME/.local/share/lime3ds-emu/load/textures" -} - -#ConfigurePaths -Lime3DS_setEmulationFolder(){ - setMSG "Setting $Lime3DS_emuName Emulation Folder" - - mkdir -p "$Lime3DS_configPath" - gameDirOpt='Paths\\gamedirs\\3\\path=' - newGameDirOpt='Paths\\gamedirs\\3\\path='"${romsPath}/n3ds" - sed -i "/${gameDirOpt}/c\\${newGameDirOpt}" "$Lime3DS_configFile" - - nandDirOpt='nand_directory=' - newnandDirOpt='nand_directory='"$storagePath/lime3ds/nand/" - sed -i "/${nandDirOpt}/c\\${newnandDirOpt}" "$Lime3DS_configFile" - - sdmcDirOpt='sdmc_directory=' - newsdmcDirOpt='sdmc_directory='"$storagePath/lime3ds/sdmc/" - sed -i "/${sdmcDirOpt}/c\\${newsdmcDirOpt}" "$Lime3DS_configFile" - - mkdir -p "$storagePath/lime3ds/screenshots/" - screenshotsDirOpt='Paths\\screenshotPath=' - newscreenshotDirOpt='Paths\\screenshotPath='"$storagePath/lime3ds/screenshots/" - sed -i "/${screenshotsDirOpt}/c\\${newscreenshotDirOpt}" "$Lime3DS_configFile" - - # True/False configs - sed -i 's/nand_directory\\default=true/nand_directory\\default=false/' "$Lime3DS_configFile" - sed -i 's/sdmc_directory\\default=true/sdmc_directory\\default=false/' "$Lime3DS_configFile" - sed -i 's/use_custom_storage=false/use_custom_storage=true/' "$Lime3DS_configFile" - sed -i 's/use_custom_storage\\default=true/use_custom_storage\\default=false/' "$Lime3DS_configFile" - - # Vulkan Graphics - sed -E 's/layout_option=[0-9]+/layout_option=5/g' "$Lime3DS_configFile" - sed -i 's/layout_option\\default=true/layout_option\\default=false/' "$Lime3DS_configFile" - - #Setup symlink for AES keys - mkdir -p "${biosPath}/lime3ds/" - mkdir -p "$HOME/.local/share/lime3ds-emu/sysdata" - ln -sn "$HOME/.local/share/lime3ds-emu/sysdata" "${biosPath}/lime3ds/keys" - -} - - - -#SetupSaves -Lime3DS_setupSaves(){ - mkdir -p "$HOME/.local/share/lime3ds-emu/states" - linkToSaveFolder lime3ds saves "$storagePath/lime3ds/sdmc" - linkToSaveFolder lime3ds states "$HOME/.local/share/lime3ds-emu/states" -} - -#Set up textures - -Lime3DS_setupTextures(){ - mkdir -p "$HOME/.local/share/lime3ds-emu/load/textures" - linkToTexturesFolder lime3ds textures "$HOME/.local/share/lime3ds-emu/load/textures" - -} - -#WipeSettings -Lime3DS_wipe(){ - setMSG "Wiping $Lime3DS_emuName config directory. (factory reset)" - rm -rf "$HOME/.config/lime3ds-emu" -} - - -#Uninstall -Lime3DS_uninstall(){ - setMSG "Uninstalling $Lime3DS_emuName." - removeParser "nintendo_3ds_lime3ds.json" - uninstallEmuAI $Lime3DS_emuName "lime3ds-gui" "" "emulator" -} - -#setABXYstyle -Lime3DS_setABXYstyle(){ - sed -i '/button_a/s/button:1/button:0/' "$Lime3DS_configFile" - sed -i '/button_b/s/button:0/button:1/' "$Lime3DS_configFile" - sed -i '/button_x/s/button:3/button:2/' "$Lime3DS_configFile" - sed -i '/button_y/s/button:2/button:3/' "$Lime3DS_configFile" - -} - -Lime3DS_setBAYXstyle(){ - sed -i '/button_a/s/button:0/button:1/' "$Lime3DS_configFile" - sed -i '/button_b/s/button:1/button:0/' "$Lime3DS_configFile" - sed -i '/button_x/s/button:2/button:3/' "$Lime3DS_configFile" - sed -i '/button_y/s/button:3/button:2/' "$Lime3DS_configFile" -} - -#finalExec - Extra stuff -Lime3DS_finalize(){ - echo "NYI" -} - -Lime3DS_IsInstalled(){ - if [ -e "$Lime3DS_emuPath" ]; then - echo "true" - else - echo "false" - fi -} - -Lime3DS_resetConfig(){ - Lime3DS_init &>/dev/null && echo "true" || echo "false" -} - -Lime3DS_addSteamInputProfile(){ - addSteamInputCustomIcons - setMSG "Adding $Lime3DS_emuName Steam Input Profile." - #rsync -r "$emudeckBackend/configs/steam-input/Lime3DS_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/" - rsync -r --exclude='*/' "$emudeckBackend/configs/steam-input/" "$HOME/.steam/steam/controller_base/templates/" -} - -Lime3DS_setResolution(){ - case $lime3dsResolution in - "720P") multiplier=3;; - "1080P") multiplier=5;; - "1440P") multiplier=6;; - "4K") multiplier=9;; - *) echo "Error"; return 1;; - esac - - setConfig "resolution_factor" $multiplier "$Lime3DS_configFile" -} - -Lime3DS_flushEmulatorLauncher(){ - - - flushEmulatorLaunchers "lime3ds" - -} - - -Lime3DS_addParser(){ - addParser "nintendo_3ds_lime3ds.json" -} \ No newline at end of file diff --git a/functions/ToolScripts/emuDeckMigration.sh b/functions/ToolScripts/emuDeckMigration.sh index 39843128..b129a56e 100644 --- a/functions/ToolScripts/emuDeckMigration.sh +++ b/functions/ToolScripts/emuDeckMigration.sh @@ -59,7 +59,7 @@ Migration_updatePaths(){ #Emu configs #Cemu - sed -i "s|${origin}|${destination}|g" "$Lime3DS_configFile" + sed -i "s|${origin}|${destination}|g" "$Azahar_configFile" #Citra sed -i "s|${origin}|${destination}|g" "$Citra_configFile" #Citra diff --git a/functions/ToolScripts/emuDeckPegasus.sh b/functions/ToolScripts/emuDeckPegasus.sh index c6ffbb58..4405f365 100644 --- a/functions/ToolScripts/emuDeckPegasus.sh +++ b/functions/ToolScripts/emuDeckPegasus.sh @@ -52,7 +52,7 @@ pegasus_setPaths(){ cp "$emudeckBackend/roms_alt_emus/gba/metadata.txt" "$romsPath/gba/metadata.txt" fi - if [ "$(Lime3DS_IsInstalled)" == "true" ]; then + if [ "$(Azahar_IsInstalled)" == "true" ]; then cp "$emudeckBackend/roms_alt_emus/n3ds/metadata.txt" "$romsPath/n3ds/metadata.txt" fi diff --git a/functions/ToolScripts/emuDeckSRM.sh b/functions/ToolScripts/emuDeckSRM.sh index aed7b375..b3942adb 100644 --- a/functions/ToolScripts/emuDeckSRM.sh +++ b/functions/ToolScripts/emuDeckSRM.sh @@ -232,7 +232,7 @@ SRM_addExtraParsers(){ for install_command in \ "BigPEmu_IsInstalled BigPEmu_addParser" \ "Flycast_IsInstalled Flycast_addParser" \ - "Lime3DS_IsInstalled Lime3DS_addParser" \ + "Azahar_IsInstalled Azahar_addParser" \ "MAME_IsInstalled MAME_addParser" \ "mGBA_IsInstalled mGBA_addParser" \ "melonDS_IsInstalled melonDS_addParser" \ diff --git a/functions/all.sh b/functions/all.sh index 5aea8630..be6609fa 100644 --- a/functions/all.sh +++ b/functions/all.sh @@ -85,8 +85,7 @@ source "$emudeckBackend"/functions/EmuScripts/emuDeckYuzu.sh source "$emudeckBackend"/functions/EmuScripts/emuDeckCemu.sh source "$emudeckBackend"/functions/EmuScripts/emuDeckCemuProton.sh source "$emudeckBackend"/functions/EmuScripts/emuDeckRPCS3.sh -source "$emudeckBackend"/functions/EmuScripts/emuDeckCitra.sh -source "$emudeckBackend"/functions/EmuScripts/emuDeckLime3DS.sh +source "$emudeckBackend"/functions/EmuScripts/emuDeckAzahar.sh source "$emudeckBackend"/functions/EmuScripts/emuDeckDolphin.sh source "$emudeckBackend"/functions/EmuScripts/emuDeckPrimehack.sh source "$emudeckBackend"/functions/EmuScripts/emuDeckRetroArch.sh diff --git a/functions/helperFunctions.sh b/functions/helperFunctions.sh index 45a8b1d3..2cf3de7b 100644 --- a/functions/helperFunctions.sh +++ b/functions/helperFunctions.sh @@ -276,7 +276,6 @@ function createUpdateSettingsFile(){ #defaultSettingsList+=("doSetupPCSX2=true") defaultSettingsList+=("doSetupRPCS3=true") defaultSettingsList+=("doSetupYuzu=true") - defaultSettingsList+=("doSetupCitra=true") defaultSettingsList+=("doSetupDuck=true") defaultSettingsList+=("doSetupCemu=true") defaultSettingsList+=("doSetupXenia=false") @@ -307,7 +306,6 @@ function createUpdateSettingsFile(){ defaultSettingsList+=("doInstallRyujinx=true") defaultSettingsList+=("doInstallRPCS3=true") defaultSettingsList+=("doInstallYuzu=true") - defaultSettingsList+=("doInstallCitra=true") defaultSettingsList+=("doInstallDuck=true") defaultSettingsList+=("doInstallCemu=true") defaultSettingsList+=("doInstallXenia=true") @@ -866,7 +864,7 @@ zipLogs() { setResolutions(){ Cemu_setResolution - Citra_setResolution + Azahar_setResolution Dolphin_setResolution DuckStation_setResolution Flycast_setResolution @@ -906,7 +904,7 @@ scriptConfigFileGetVar() { getEmuRepo() { case "$1" in "cemu") repo="cemu-project/Cemu" ;; - "citra") repo="citra-emu/citra-nightly" ;; + "azahar") repo="azahar-emu/azahar" ;; "dolphin") repo="shiiion/dolphin" ;; "duckstation") repo="stenzek/duckstation" ;; "flycast") repo="flyinghead/flycast" ;; @@ -1109,8 +1107,7 @@ function storePatreonToken(){ function controllerLayout_ABXY(){ Cemu_setABXYstyle - Citra_setABXYstyle - Lime3DS_setABXYstyle + Azahar_setABXYstyle Dolphin_setABXYstyle melonDS_setABXYstyle RetroArch_setABXYstyle @@ -1120,9 +1117,8 @@ function controllerLayout_ABXY(){ function controllerLayout_BAYX(){ Cemu_setBAYXstyle - Citra_setBAYXstyle Dolphin_setBAYXstyle - Lime3DS_setBAYXstyle + Azahar_setBAYXstyle melonDS_setBAYXstyle RetroArch_setBAYXstyle RMG_setBAYXstyle @@ -1202,8 +1198,7 @@ function flushAllLaunchers(){ "$doSetupDolphin Dolphin_flushEmulatorLauncher" \ "$doSetupPCSX2QT PCSX2QT_flushEmulatorLauncher" \ "$doSetupRPCS3 RPCS3_flushEmulatorLauncher" \ - "$doSetupCitra Citra_flushEmulatorLauncher" \ - "$doSetupLime3DS Lime3DS_flushEmulatorLauncher" \ + "$doSetupAzahar Azahar_flushEmulatorLauncher" \ "$doSetupDuck DuckStation_flushEmulatorLauncher" \ "$doSetupYuzu Yuzu_flushEmulatorLauncher" \ "$doSetupRyujinx Ryujinx_flushEmulatorLauncher" \ diff --git a/functions/jsonToBashVars.sh b/functions/jsonToBashVars.sh index d7907eb9..ba4ee5a6 100644 --- a/functions/jsonToBashVars.sh +++ b/functions/jsonToBashVars.sh @@ -10,8 +10,7 @@ function jsonToBashVars(){ setSetting doInstallRPCS3 "$(jq .installEmus.rpcs3.status $json)" setSetting doInstallYuzu "$(jq .installEmus.yuzu.status $json)" setSetting doInstallSuyu "$(jq .installEmus.suyu.status $json)" - setSetting doInstallCitra "$(jq .installEmus.citra.status $json)" - setSetting doInstallLime3DS "$(jq .installEmus.lime3ds.status $json)" + setSetting doInstallAzahar "$(jq .installEmus.azahar.status $json)" setSetting doInstallDuck "$(jq .installEmus.duckstation.status $json)" setSetting doInstallCemu "$(jq .installEmus.cemu.status $json)" setSetting doInstallXenia "$(jq .installEmus.xenia.status $json)" @@ -42,8 +41,7 @@ function jsonToBashVars(){ setSetting doSetupRPCS3 "$(jq .overwriteConfigEmus.rpcs3.status $json)" setSetting doSetupYuzu "$(jq .overwriteConfigEmus.yuzu.status $json)" setSetting doSetupSuyu "$(jq .overwriteConfigEmus.suyu.status $json)" - setSetting doSetupCitra "$(jq .overwriteConfigEmus.citra.status $json)" - setSetting doSetupLime3DS "$(jq .overwriteConfigEmus.lime3ds.status $json)" + setSetting doSetupAzahar "$(jq .overwriteConfigEmus.azahar.status $json)" setSetting doSetupDuck "$(jq .overwriteConfigEmus.duckstation.status $json)" setSetting doSetupCemu "$(jq .overwriteConfigEmus.cemu.status $json)" setSetting doSetupXenia "$(jq .overwriteConfigEmus.xenia.status $json)" @@ -143,16 +141,14 @@ function jsonToBashVars(){ setSetting androidInstallRA "$(jq .android.installEmus.ra.status $json)" setSetting androidInstallDolphin "$(jq .android.installEmus.dolphin.status $json)" setSetting androidInstallPPSSPP "$(jq .android.installEmus.ppsspp.status $json)" - setSetting androidInstallCitraMMJ "$(jq .android.installEmus.citrammj.status $json)" - setSetting androidInstallLime3DS "$(jq .android.installEmus.lime3ds.status $json)" + setSetting androidInstallAzahar "$(jq .android.installEmus.azahar.status $json)" setSetting androidInstallNetherSX2 "$(jq .android.installEmus.nethersx2.status $json)" setSetting androidInstallScummVM "$(jq .android.installEmus.scummvm.status $json)" setSetting androidSetupRA "$(jq .android.overwriteConfigEmus.ra.status $json)" setSetting androidSetupDolphin "$(jq .android.overwriteConfigEmus.dolphin.status $json)" setSetting androidSetupPPSSPP "$(jq .android.overwriteConfigEmus.ppsspp.status $json)" - setSetting androidSetupCitraMMJ "$(jq .android.overwriteConfigEmus.citrammj.status $json)" - setSetting androidSetupLime3DS "$(jq .android.overwriteConfigEmus.lime3ds.status $json)" + setSetting androidSetupAzahar "$(jq .android.overwriteConfigEmus.azahar.status $json)" setSetting androidSetupNetherSX2 "$(jq .android.overwriteConfigEmus.nethersx2.status $json)" setSetting androidSetupScummVM "$(jq .android.overwriteConfigEmus.scummvm.status $json)" diff --git a/roms/n3ds/metadata.txt b/roms/n3ds/metadata.txt index 933e59ea..eb828c0f 100644 --- a/roms/n3ds/metadata.txt +++ b/roms/n3ds/metadata.txt @@ -1,4 +1,4 @@ collection: Nintendo 3DS shortname: n3ds -extensions: 3ds, 3DS, 3dsx, 3DSX, app, APP, axf, AXF, cii, CII, cxi, CXI, elf, ELF, cci, CCI -launch: /run/media/mmcblk0p1/Emulation/tools/launchers/citra.sh {file.path} +extensions: 3dsx, 3DSX, app, APP, axf, AXF, cii, CII, cxi, CXI, elf, ELF, cci, CCI +launch: /run/media/mmcblk0p1/Emulation/tools/launchers/azahar.sh {file.path} diff --git a/roms/n3ds/systeminfo.txt b/roms/n3ds/systeminfo.txt index b7c08c68..78985460 100644 --- a/roms/n3ds/systeminfo.txt +++ b/roms/n3ds/systeminfo.txt @@ -5,7 +5,7 @@ Full system name: Nintendo 3DS Supported file extensions: -.3ds .3DS .3dsx .3DSX .app .APP .axf .AXF .cci .CCI .cxi .CXI .elf .ELF .7z .7Z .zip .ZIP +.3dsx .3DSX .app .APP .axf .AXF .cci .CCI .cxi .CXI .elf .ELF .7z .7Z .zip .ZIP Launch command: %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/citra_libretro.so %ROM% diff --git a/roms_alt_emus/n3ds/metadata.txt b/roms_alt_emus/n3ds/metadata.txt index 7b5dfd7c..c13a87b8 100644 --- a/roms_alt_emus/n3ds/metadata.txt +++ b/roms_alt_emus/n3ds/metadata.txt @@ -1,4 +1,4 @@ -collection: Nintendo 3DS (Lime3DS) +collection: Nintendo 3DS (Azahar) shortname: n3ds extensions: 3ds, 3DS, 3dsx, 3DSX, app, APP, axf, AXF, cii, CII, cxi, CXI, elf, ELF, cci, CCI -launch: /run/media/mmcblk0p1/Emulation/tools/launchers/lime3ds.sh {file.path} +launch: /run/media/mmcblk0p1/Emulation/tools/launchers/azahar.sh {file.path} diff --git a/setup.sh b/setup.sh index e2e18904..2ca34b08 100644 --- a/setup.sh +++ b/setup.sh @@ -169,8 +169,7 @@ for install_command in \ "$doInstallPCSX2QT PCSX2QT_install" \ "$doInstallPrimeHack Primehack_install" \ "$doInstallRPCS3 RPCS3_install" \ - "$doInstallCitra Citra_install" \ - "$doInstallLime3DS Lime3DS_install" \ + "$doInstallAzahar Azahar_install" \ "$doInstallDolphin Dolphin_install" \ "$doInstallDuck DuckStation_install" \ "$doInstallRA RetroArch_install" \ @@ -226,8 +225,7 @@ for setup_command in \ "$doSetupDolphin Dolphin_init" \ "$doSetupPCSX2QT PCSX2QT_init" \ "$doSetupRPCS3 RPCS3_init" \ - "$doSetupCitra Citra_init" \ - "$doSetupLime3DS Lime3DS_init" \ + "$doSetupAzahar Azahar_init" \ "$doSetupDuck DuckStation_init" \ "$doSetupYuzu Yuzu_init" \ "$doSetupCitron Citron_init" \ diff --git a/tools/binupdate/binupdate.sh b/tools/binupdate/binupdate.sh index 903fc4b9..856cd422 100755 --- a/tools/binupdate/binupdate.sh +++ b/tools/binupdate/binupdate.sh @@ -109,16 +109,6 @@ function runBinDownloads { messages+=("There was a problem updating Cemu (Native)") fi fi - if [[ "$binsToDL" == *"Citra"* ]]; then - ((progresspct += pct)) || true - echo "$progresspct" - echo "# Updating Citra" - if Citra_install "true" 2>&1; then - messages+=("Citra Updated Successfully") - else - messages+=("There was a problem updating Citra") - fi - fi if [[ "$binsToDL" == *"ES-DE"* ]]; then echo "0" echo "# Updating ES-DE" @@ -128,14 +118,14 @@ function runBinDownloads { messages+=("There was a problem updating ES-DE") fi fi - if [[ "$binsToDL" == *"Lime3DS"* ]]; then + if [[ "$binsToDL" == *"Azahar"* ]]; then ((progresspct += pct)) || true echo "$progresspct" - echo "# Updating Lime3DS" - if Lime3DS_install "true" 2>&1; then - messages+=("Lime3DS Updated Successfully") + echo "# Updating Azahar" + if Azahar_install "true" 2>&1; then + messages+=("Azahar Updated Successfully") else - messages+=("There was a problem updating Lime3DS") + messages+=("There was a problem updating Azahar") fi fi if [[ "$binsToDL" == *"mGBA"* ]]; then @@ -250,20 +240,15 @@ if [ "$(Cemu_IsInstalled ""$emuDeckEmuTypeAppImage"")" == "true" ]; then else binTable+=(FALSE "Cemu (Native)" "Nintendo Wii U") fi -if [ "$(Citra_IsInstalled ""$emuDeckEmuTypeAppImage"")" == "true" ]; then - binTable+=(TRUE "Citra" "Nintendo 3DS") -else - binTable+=(FALSE "Citra" "Nintendo 3DS") -fi if [ "$(ESDE_IsInstalled ""$emuDeckEmuTypeAppImage"")" == "true" ]; then binTable+=(TRUE "ES-DE" "Emulator Front-End") else binTable+=(FALSE "ES-DE" "Emulator Front-End") fi -if [ "$(Lime3DS_IsInstalled ""$emuDeckEmuTypeAppImage"")" == "true" ]; then - binTable+=(TRUE "Lime3DS" "Nintendo 3DS") +if [ "$(Azahar_IsInstalled ""$emuDeckEmuTypeAppImage"")" == "true" ]; then + binTable+=(TRUE "Azahar" "Nintendo 3DS") else - binTable+=(FALSE "Lime3DS" "Nintendo 3DS") + binTable+=(FALSE "Azahar" "Nintendo 3DS") fi if [ "$(mGBA_IsInstalled ""$emuDeckEmuTypeAppImage"")" == "true" ]; then binTable+=(TRUE "mGBA" "Nintendo Game Boy Family") diff --git a/tools/launchers/azahar.sh b/tools/launchers/azahar.sh new file mode 100755 index 00000000..77cb81e0 --- /dev/null +++ b/tools/launchers/azahar.sh @@ -0,0 +1,36 @@ +#!/bin/bash +. "$HOME/.config/EmuDeck/backend/functions/all.sh" +emulatorInit "azahar" +emuName="azahar" #parameterize me +emufolder="$emusFolder" # has to be applications for ES-DE to find it + +#initialize execute array +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) + +#make sure that file is executable +chmod +x "$exe_path" +#fill execute array +exe=("$exe_path") + +#run the executable with the params. +launch_args=() +for rom in "${@}"; do + # Parsers previously had single quotes ("'/path/to/rom'" ), this allows those shortcuts to continue working. + removedLegacySingleQuotes=$(echo "$rom" | sed "s/^'//; s/'$//") + launch_args+=("$removedLegacySingleQuotes") +done + +echo "Launching: ${exe[*]} ${launch_args[*]}" + +if [[ -z "${*}" ]]; then + echo "ROM not found. Launching $emuName directly" + "${exe[@]}" +else + echo "ROM found, launching game" + "${exe[@]}" "${launch_args[@]}" +fi + +rm -rf "$savesPath/.gaming" \ No newline at end of file diff --git a/tools/launchers/lime3ds.sh b/tools/launchers/lime3ds.sh index 2a2bdbab..ebccddb6 100755 --- a/tools/launchers/lime3ds.sh +++ b/tools/launchers/lime3ds.sh @@ -1,7 +1,7 @@ #!/bin/bash . "$HOME/.config/EmuDeck/backend/functions/all.sh" -emulatorInit "lime3ds" -emuName="lime3ds-gui" #parameterize me +emulatorInit "azahar" +emuName="azahar-gui" #parameterize me emufolder="$emusFolder" # has to be applications for ES-DE to find it #initialize execute array diff --git a/uninstall.sh b/uninstall.sh index b4343d05..b10490c5 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -11,7 +11,7 @@ doUninstallDolphin=true doUninstallDuck=true doUninstallESDE=true doUninstallFlycast=true -doUninstallLime3DS=true +doUninstallAzahar=true doUninstallMame=true doUninstallmelonDS=true doUninstallMGBA=true @@ -296,7 +296,7 @@ fi 6 "Dolphin" \ 7 "Duckstation" \ 8 "Flycast" \ - 9 "Lime3DS" \ + 9 "Azahar" \ 10 "Mame" \ 11 "melonDS" \ 12 "mGBA" \ @@ -344,8 +344,8 @@ fi if [[ "$emusToUninstall" == *"Flycast"* ]]; then doUninstallFlycast=false fi - if [[ "$emusToUninstall" == *"Lime3DS"* ]]; then - doUninstallLime3DS=false + if [[ "$emusToUninstall" == *"Azahar"* ]]; then + doUninstallAzahar=false fi if [[ "$emusToUninstall" == *"Mame"* ]]; then doUninstallMame=false @@ -452,11 +452,11 @@ fi flatpak uninstall org.flycast.Flycast -y rm -rf $HOME/.var/app/org.flycast.Flycast &> /dev/null fi - if [[ "$doUninstallLime3DS" == true ]]; then - rm -rf $HOME/.config/lime3ds-emu/ &> /dev/null - rm -rf $HOME/.local/share/lime3ds-emu &> /dev/null - rm -rf $HOME/.local/share/applications/Lime3DS.desktop &> /dev/null - rm -rf $emusFolder/lime3ds-gui*.AppImage &> /dev/null + if [[ "$doUninstallAzahar" == true ]]; then + rm -rf $HOME/.config/azahar-emu/ &> /dev/null + rm -rf $HOME/.local/share/azahar-emu &> /dev/null + rm -rf $HOME/.local/share/applications/Azahar.desktop &> /dev/null + rm -rf $emusFolder/azahar-gui*.AppImage &> /dev/null fi if [[ "$doUninstallMame" == true ]]; then flatpak uninstall org.mamedev.MAME -y diff --git a/versions.json b/versions.json index e21271fd..3fb78c7f 100644 --- a/versions.json +++ b/versions.json @@ -5,8 +5,7 @@ "ppsspp": { "id": "ppsspp", "code": "PPSSPP", "version": 0 }, "duckstation": { "id": "duckstation", "code": "Duckstation", "version": 0 }, "melonds": { "id": "melonds", "code": "melonDS", "version": 0 }, - "citra": { "id": "citra", "code": "Citra", "version": 0 }, - "lime3ds": { "id": "lime3ds", "code": "Lime3DS", "version": 0 }, + "azahar": { "id": "azahar", "code": "Azahar", "version": 0 }, "pcsx2": { "id": "pcsx2", "code": "PCSX2QT", "version": 1 }, "rpcs3": { "id": "rpcs3", "code": "RPCS3", "version": 0 }, "yuzu": { "id": "yuzu", "code": "Yuzu", "version": 1 },