From bbbde52027cd5e150606661d71eaf208ddc7e009 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Thu, 30 Nov 2023 10:22:35 +0100 Subject: [PATCH] Pegasus parser --- .../userData/parsers/emudeck/0_pegasus.json | 100 ++++++++++++++++++ test.sh | 23 +++- tools/launchers/pegasus/pegasus-frontend.sh | 4 +- 3 files changed, 122 insertions(+), 5 deletions(-) create mode 100644 configs/steam-rom-manager/userData/parsers/emudeck/0_pegasus.json diff --git a/configs/steam-rom-manager/userData/parsers/emudeck/0_pegasus.json b/configs/steam-rom-manager/userData/parsers/emudeck/0_pegasus.json new file mode 100644 index 00000000..a46547e6 --- /dev/null +++ b/configs/steam-rom-manager/userData/parsers/emudeck/0_pegasus.json @@ -0,0 +1,100 @@ +{ + "parserType": "Glob", + "configTitle": "Pegasus Frontend", + "steamDirectory": "${steamdirglobal}", + "steamCategory": "${Emulation}", + "romDirectory": "/run/media/mmcblk0p1/Emulation/tools/launchers/pegasus/", + "executableArgs": "", + "executableModifier": "\"${exePath}\"", + "startInDirectory": "", + "titleModifier": "EmulationStation DE", + "fetchControllerTemplatesButton": null, + "removeControllersButton": null, + "imageProviders": ["SteamGridDB"], + "onlineImageQueries": "${${fuzzyTitle}}", + "imagePool": "${fuzzyTitle}", + "userAccounts": { + "specifiedAccounts": "" + }, + "executable": { + "path": "/run/media/mmcblk0p1/Emulation/tools/launchers/esde/pegasus-frontend.sh", + "shortcutPassthrough": false, + "appendArgsToExecutable": true + }, + "parserInputs": { + "glob": "${title}@(.sh)" + }, + "titleFromVariable": { + "limitToGroups": "", + "caseInsensitiveVariables": false, + "skipFileIfVariableWasNotFound": false, + "tryToMatchTitle": false + }, + "fuzzyMatch": { + "replaceDiacritics": true, + "removeCharacters": true, + "removeBrackets": true + }, + "controllers": { + "ps4": { + "title": "EmuDeck - Dual Shock 4", + "mappingId": "emudeck_controller_ps4.vdf", + "profileType": "template" + }, + "ps5": { + "title": "EmuDeck - Dual Sense", + "mappingId": "emudeck_controller_ps5.vdf", + "profileType": "template" + }, + "xbox360": { + "title": "EmuDeck - Xbox 360", + "mappingId": "emudeck_controller_xbox360.vdf", + "profileType": "template" + }, + "xboxone": { + "title": "EmuDeck - Xbox One", + "mappingId": "emudeck_controller_xboxone.vdf", + "profileType": "template" + }, + "switch_joycon_left": null, + "switch_joycon_right": null, + "switch_pro": { + "title": "EmuDeck - Switch Pro", + "mappingId": "emudeck_controller_switch_pro.vdf", + "profileType": "template" + }, + "neptune": { + "title": "EmuDeck - Steam Deck", + "mappingId": "emudeck_controller_steamdeck.vdf", + "profileType": "template" + } + }, + "imageProviderAPIs": { + "SteamGridDB": { + "nsfw": false, + "humor": false, + "styles": [], + "stylesHero": [], + "stylesLogo": [], + "stylesIcon": [], + "imageMotionTypes": ["static", "animated"] + } + }, + "defaultImage": { + "tall": "", + "long": "", + "hero": "", + "logo": "", + "icon": "/home/deck/.config/EmuDeck/backend/configs/steam-rom-manager/userData/img/default/icon.png" + }, + "localImages": { + "tall": "", + "long": "", + "hero": "", + "logo": "", + "icon": "" + }, + "parserId": "164824496516097459", + "version": 15, + "disabled": false +} diff --git a/test.sh b/test.sh index ac5b44c7..1e0bc878 100644 --- a/test.sh +++ b/test.sh @@ -1,5 +1,22 @@ #!/bin/bash -. "./functions/all-darwin.sh" -SRM_install -SRM_init \ No newline at end of file +user=$(zenity --entry --title="ScreenScrapper" --text="User:") +password=$(zenity --password --title="ScreenScrapper" --text="Password:") + +encryption_key=$(openssl rand -base64 32) +encrypted_password=$(echo "$password" | openssl enc -aes-256-cbc -pbkdf2 -base64 -pass "pass:$encryption_key") + +echo "$encryption_key" > "$HOME/.config/EmuDeck/logs/.key" +echo "$encrypted_password" > "$HOME/.config/EmuDeck/.passSS" +echo "$user" > "$HOME/.config/EmuDeck/.userSS" + + +############# + +encryption_key=$(cat "$HOME/.config/EmuDeck/logs/.key") + +encrypted_password=$(cat "$HOME/.config/EmuDeck/.passSS") + +decrypted_password=$(echo "$encrypted_password" | openssl enc -d -aes-256-cbc -pbkdf2 -base64 -pass "pass:$encryption_key") + +echo $decrypted_password diff --git a/tools/launchers/pegasus/pegasus-frontend.sh b/tools/launchers/pegasus/pegasus-frontend.sh index 52dba509..33157b39 100755 --- a/tools/launchers/pegasus/pegasus-frontend.sh +++ b/tools/launchers/pegasus/pegasus-frontend.sh @@ -1,6 +1,6 @@ #!/bin/bash -source $HOME/.config/EmuDeck/backend/functions/all.sh -source $HOME/.config/EmuDeck/backend/tools/rom-parser.sh +. "$HOME/.config/EmuDeck/backend/functions/all.sh" +. "$HOME/.config/EmuDeck/backend/tools/rom-parser.sh" cloud_sync_downloadEmuAll && cloud_sync_startService /usr/bin/flatpak run org.pegasus_frontend.Pegasus "${@}" rm -rf "$savesPath/.gaming"