From 7164a2187c66fce3598cc1022c0e94c5ef5286e8 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Thu, 18 Apr 2024 15:34:17 +0900 Subject: [PATCH 01/28] SRM: adding Steam ROM Manager --- net.retrodeck.retrodeck.yml | 45 ++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 3ae6508c..079b7487 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -4,7 +4,7 @@ runtime-version: "6.5" sdk: org.kde.Sdk sdk-extensions: - org.freedesktop.Sdk.Extension.llvm16 # Needed for RPCS3 (llvm17 actually) - - org.freedesktop.Sdk.Extension.rust-stable # Needed for BoilR + - org.electronjs.Electron2.BaseApp # Needed for Steam ROM Manager command: retrodeck.sh finish-args: @@ -49,6 +49,7 @@ cleanup: - /bin/zstd* - /lib/pkg-config - /share/doc + - /share/gtk-doc # Steam ROM Manager - /share/man - /src - '*.a' @@ -449,6 +450,48 @@ modules: # External manifests start + # Steam ROM Manager - START + + - name: zypak + sources: + - type: git + url: https://github.com/refi64/zypak + tag: v2022.03 + commit: 8424c6bcf909ca2031ebc6537d324bb64772266e + + - name: steam-rom-manager + buildsystem: simple + env: + IN_FLATPAK: 1 + build-commands: + - install -D run.sh ${FLATPAK_DEST}/bin/steam-rom-manager + - cp /usr/bin/ar ${FLATPAK_DEST}/bin + - ar x srm.deb + - tar xf data.tar.xz + - mv "opt/Steam ROM Manager" "${FLATPAK_DEST}/srm" + - rm -rf "usr/share/icons/hicolor/1024x1024" + - cd usr; find share/icons/hicolor -type f -exec install -Dm644 "{}" + "${FLATPAK_DEST}/{}" \; + - rm -r srm.deb control.tar.* data.tar.xz debian-binary usr opt + sources: + - type: script + dest-filename: run.sh + commands: + - ${FLATPAK_DEST}/bin/zypak-wrapper.sh ${FLATPAK_DEST}/srm/steam-rom-manager + - type: file + dest-filename: srm.deb + url: https://github.com/SteamGridDB/steam-rom-manager/releases/download/v2.4.19/steam-rom-manager_2.4.19_amd64.deb + sha256: aa4f121d50612801c30b9365e05cb92a3b4a9c402974fee2b88652de8d731b0e + x-checker-data: + type: json + url: https://api.github.com/repos/SteamGridDB/steam-rom-manager/releases/latest + url-query: >- + .assets[] | select(.name=="steam-rom-manager_" + $version + + "_amd64.deb") | .browser_download_url + version-query: .tag_name | sub("^v"; "") + + # Steam ROM Manager - END + # RetroArch - START # https://github.com/flathub/org.libretro.RetroArch From c1b9fc3813842a7b045fb59e53ba4e699dfed459 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Thu, 18 Apr 2024 15:40:22 +0900 Subject: [PATCH 02/28] SRM: adding electron base --- net.retrodeck.retrodeck.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 079b7487..e54de2b3 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -2,9 +2,10 @@ app-id: net.retrodeck.retrodeck runtime: org.kde.Platform runtime-version: "6.5" sdk: org.kde.Sdk +base: org.electronjs.Electron2.BaseApp # Needed for Steam ROM Manager +base-version: "22.08" sdk-extensions: - org.freedesktop.Sdk.Extension.llvm16 # Needed for RPCS3 (llvm17 actually) - - org.electronjs.Electron2.BaseApp # Needed for Steam ROM Manager command: retrodeck.sh finish-args: From 74158eb8a3ba581d4cd50f8fa9fbf293867b528b Mon Sep 17 00:00:00 2001 From: Lx32 Date: Thu, 18 Apr 2024 17:55:16 +0200 Subject: [PATCH 03/28] Fixed SRM Fixed launching script of SRM --- net.retrodeck.retrodeck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index e54de2b3..780b0ee2 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -478,7 +478,7 @@ modules: - type: script dest-filename: run.sh commands: - - ${FLATPAK_DEST}/bin/zypak-wrapper.sh ${FLATPAK_DEST}/srm/steam-rom-manager + - /app/bin/zypak-wrapper.sh /app/srm/steam-rom-manager - type: file dest-filename: srm.deb url: https://github.com/SteamGridDB/steam-rom-manager/releases/download/v2.4.19/steam-rom-manager_2.4.19_amd64.deb From 34d337201d8ef208d9e46050f7125ae8d6482efa Mon Sep 17 00:00:00 2001 From: Lx32 Date: Fri, 19 Apr 2024 18:41:57 +0200 Subject: [PATCH 04/28] Updated for srm --- functions/steam-sync/steam-sync.py | 82 +++++++----------------------- 1 file changed, 19 insertions(+), 63 deletions(-) diff --git a/functions/steam-sync/steam-sync.py b/functions/steam-sync/steam-sync.py index 11b078b2..1ba3410a 100644 --- a/functions/steam-sync/steam-sync.py +++ b/functions/steam-sync/steam-sync.py @@ -272,8 +272,7 @@ exit_file="/tmp/retrodeck_steam_sync_exit" rdhome="" roms_folder="" -def create_shortcut_new(games): - changes=0 +def create_shortcut_new_new(games): old_games=os.listdir(rdhome+"/.sync/") for game in games: @@ -282,34 +281,11 @@ def create_shortcut_new(games): old_games[i]=0 except ValueError: print(game[0]+" is a new game!") - changes=1 - path=rdhome+"/.sync/"+game[0] + path=rdhome+"/.sync/"+game[0]+".sh" print("Go to path: "+path) - if not os.path.exists(path): - os.makedirs(path) - fl=open(path+"/goggame-0.info","w") - fl.write('{\n') - fl.write(' "buildId": "",\n') - fl.write(' "clientId": "",\n') - fl.write(' "gameId": "",\n') - fl.write(' "name": "'+game[0]+'",\n') - fl.write(' "playTasks": [\n') - fl.write(' {\n') - fl.write(' "category": "launcher",\n') - fl.write(' "isPrimary": true,\n') - fl.write(' "languages": [\n') - fl.write(' "en-US"\n') - fl.write(' ],\n') - fl.write(' "name": "'+game[0]+'",\n') - fl.write(' "path": "launch.sh",\n') - fl.write(' "type": "FileTask"\n') - fl.write(' }\n') - fl.write(' ]\n') - fl.write('}\n') - fl.close() - fl=open(path+"/launch.sh","w") + fl=open(path,"w") fl.write("#!/bin/bash\n\n") fl.write('if test "$(whereis flatpak)" = "flatpak:"\n') fl.write("then\n") @@ -319,18 +295,16 @@ def create_shortcut_new(games): fl.write("fi\n") fl.close() - st=os.stat(path+"/launch.sh") - os.chmod(path+"/launch.sh", st.st_mode | 0o0111) + st=os.stat(path) + os.chmod(path, st.st_mode | 0o0111) print("Start removing") print(old_games) for game in old_games: if game: - shutil.rmtree(rdhome+"/.sync/"+game) - changes=1 + os.remove(rdhome+"/.sync/"+game) - if changes: - os.system("boilr --no-ui") + os.system("/app/bin/zypak-wrapper /app/srm/steam-rom-manager add") def addToSteam(systems): games=[] @@ -382,7 +356,7 @@ def addToSteam(systems): games.append([name,alt_command_list[altemulator]+" '"+roms_folder+"/"+system+path[1:]+"'"]) print(alt_command_list[altemulator]+" '"+roms_folder+"/"+system+path[1:]+"'") if not games==[]: - create_shortcut_new(games) + create_shortcut_new_new(games) def start_config(): global rdhome @@ -410,47 +384,29 @@ def start_config(): if not os.path.exists(rdhome+"/.sync/"): os.makedirs(rdhome+"/.sync/") - boilr_path=os.path.expanduser("~/.var/app/net.retrodeck.retrodeck/config/boilr/config.toml") - if os.path.isfile(boilr_path): - with open(boilr_path,"r") as f: + os.system("/app/bin/zypak-wrapper /app/srm/steam-rom-manager list") + srm_path=os.path.expanduser("~/.var/app/net.retrodeck.retrodeck/config/steam-rom-manager/userData/userConfigurations.json") + if os.path.isfile(srm_path): + with open(srm_path,"r") as f: data=f.read() - data=re.sub("\"games_folder.*","games_folder = "+rdhome+"/.sync/\"",data) - with open(boilr_path,"w") as f: + data=re.sub("\"steamDirectory.*","\"steamDirectory\" : \""+os.path.expanduser("~/.steam/steam")+"\",",data) + data=re.sub("\"romDirectory.*","\"romDirectory\" : \""+rdhome+"/.sync/\",",data) + with open(srm_path,"w") as f: f.write(data) else: - print("Error! BoilR config not initialized.") + print("Error! Steam Rom Manager config not initialized.") + exit(1) if __name__=="__main__": start_config() - - new_hash={} - for system in os.listdir(rdhome+"/gamelists/"): - new_hash[system]=hashlib.md5(open(rdhome+"/gamelists/"+system+"/gamelist.xml","rb").read()).hexdigest() + exit(1) running=True while running: - time.sleep(30) - systems=[] - - for system in os.listdir(rdhome+"/gamelists/"): - if not system in systems: - if system in new_hash.keys(): - old_hash=new_hash[system] - new_hash[system]=hashlib.md5(open(rdhome+"/gamelists/"+system+"/gamelist.xml","rb").read()).hexdigest() - if not new_hash[system] == old_hash: - print("System {} changed!".format(system)) - systems.append(system) - else: - print("System {} not changed!".format(system)) - else: - new_hash[system]=hashlib.md5(open(rdhome+"/gamelists/"+system+"/gamelist.xml","rb").read()).hexdigest() - print("System {} added!".format(system)) - systems.append(system) - if os.path.isfile(exit_file): running=False os.remove(exit_file) - addToSteam(systems) + addToSteam(os.listdir(rdhome+"/gamelists/")) print("Finish!") From cd7da1294d070542f5f607ebe6f9714324c9e6dd Mon Sep 17 00:00:00 2001 From: Lx32 Date: Fri, 19 Apr 2024 18:42:53 +0200 Subject: [PATCH 05/28] Standard config for srm --- functions/steam-sync/userConfigurations.json | 81 ++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 functions/steam-sync/userConfigurations.json diff --git a/functions/steam-sync/userConfigurations.json b/functions/steam-sync/userConfigurations.json new file mode 100644 index 00000000..2315846d --- /dev/null +++ b/functions/steam-sync/userConfigurations.json @@ -0,0 +1,81 @@ +[ + { + "parserType": "Glob", + "configTitle": "Shortcuts", + "steamDirectory": "", + "steamCategory": "${RetroDECK}", + "romDirectory": "", + "executableArgs": "", + "executableModifier": "\"${exePath}\"", + "startInDirectory": "", + "titleModifier": "${fuzzyTitle}", + "fetchControllerTemplatesButton": null, + "removeControllersButton": null, + "imageProviders": [ + "SteamGridDB" + ], + "onlineImageQueries": "${${fuzzyTitle}}", + "imagePool": "${fuzzyTitle}", + "userAccounts": { + "specifiedAccounts": "" + }, + "executable": { + "path": "", + "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": null, + "ps5": null, + "xbox360": null, + "xboxone": null, + "switch_joycon_left": null, + "switch_joycon_right": null, + "switch_pro": null, + "neptune": null + }, + "imageProviderAPIs": { + "SteamGridDB": { + "nsfw": false, + "humor": false, + "styles": [], + "stylesHero": [], + "stylesLogo": [], + "stylesIcon": [], + "imageMotionTypes": [ + "static" + ] + } + }, + "defaultImage": { + "tall": "", + "long": "", + "hero": "", + "logo": "", + "icon": "" + }, + "localImages": { + "tall": "", + "long": "", + "hero": "", + "logo": "", + "icon": "" + }, + "parserId": "171345715969886866", + "version": 15 + } +] From 2c59cc18cdde723563759a9b3c1a6598e11768c8 Mon Sep 17 00:00:00 2001 From: Lx32 Date: Fri, 19 Apr 2024 19:04:42 +0200 Subject: [PATCH 06/28] Update with srm in place of boilr --- functions/prepare_component.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/functions/prepare_component.sh b/functions/prepare_component.sh index a47e5fd2..3f9ce804 100644 --- a/functions/prepare_component.sh +++ b/functions/prepare_component.sh @@ -821,16 +821,17 @@ prepare_component() { sed -i 's#RETRODECKSAVESDIR#'$saves_folder'#g' "/var/config/gzdoom/gzdoom.ini" # This is an unfortunate one-off because set_setting_value does not currently support JSON fi - if [[ "$component" =~ ^(boilr|BOILR|all)$ ]]; then + if [[ "$component" =~ ^(steam rom manager|STEAM ROM MANAGER|all)$ ]]; then log i "----------------------" - log i "Prepearing BOILR" + log i "Prepearing STEAM ROM MANAGER" log i "----------------------" - create_dir "/var/config/boilr" - cp -fvr "/app/libexec/steam-sync/config.toml" "/var/config/boilr" + create_dir "/var/config/steam-rom-manager" + create_dir "/var/config/steam-rom-manager/userData" + cp -fvr "/app/libexec/steam-sync/userConfigurations.json" "/var/config/steam-rom-manager/userData" fi - if [[ ! "$component" =~ ^(retrodeck|es-de|ES-DE|retroarch|RetroArch|citra|citra-emu|Citra|cemu|Cemu|dolphin|dolphin-emu|Dolphin|duckstation|Duckstation|melonds|melonDS|MelonDS|pcsx2|PCSX2|pico8|pico-8|ppsspp|PPSSPP|primehack|Primehack|rpcs3|RPCS3|ryujinx|Ryujinx|yuzu|Yuzu|xemu|XEMU|vita3k|Vita3K|mame|MAME|gzdoom|GZDOOM|boilr|BOILR|)$ ]]; then + if [[ ! "$component" =~ ^(retrodeck|es-de|ES-DE|retroarch|RetroArch|citra|citra-emu|Citra|cemu|Cemu|dolphin|dolphin-emu|Dolphin|duckstation|Duckstation|melonds|melonDS|MelonDS|pcsx2|PCSX2|pico8|pico-8|ppsspp|PPSSPP|primehack|Primehack|rpcs3|RPCS3|ryujinx|Ryujinx|yuzu|Yuzu|xemu|XEMU|vita3k|Vita3K|mame|MAME|gzdoom|GZDOOM|steam rom manager|STEAM ROM MANAGER|)$ ]]; then log e "Supplied component $component not found, not resetting" fi From 884a16b06f2d24ab0ffd58c5d08f3ec0a44540bd Mon Sep 17 00:00:00 2001 From: Lx32 Date: Fri, 19 Apr 2024 19:05:54 +0200 Subject: [PATCH 07/28] Update with srm in place of boilr --- tools/configurator.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/configurator.sh b/tools/configurator.sh index e00747f5..ea63de25 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -1194,13 +1194,13 @@ configurator_reset_dialog() { --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \ --text="Which component do you want to reset to default?" \ --column="Component" --column="Action" \ - "BoilR" "Reset BoilR that manages the sync and scraping toward Steam library" \ + "Steam Rom Manager" "Reset SRM that manages the sync and scraping toward Steam library" \ "ES-DE" "Reset the ES-DE frontend" \ ) # TODO: "GyroDSU" "Reset the gyroscope manager GyroDSU" case $component_to_reset in - "BoilR" | "ES-DE" ) # TODO: GyroDSU + "Steam Rom Manager" | "ES-DE" ) # TODO: GyroDSU if [[ $(configurator_reset_confirmation_dialog "$component_to_reset" "Are you sure you want to reset $component_to_reset to default settings?\n\nThis process cannot be undone.") == "true" ]]; then prepare_component "reset" "$component_to_reset" "configurator" configurator_process_complete_dialog "resetting $component_to_reset" From 52845b9b4477b2af02aed8f1311d97e9e0a5637c Mon Sep 17 00:00:00 2001 From: Lx32 Date: Fri, 19 Apr 2024 19:06:58 +0200 Subject: [PATCH 08/28] Added steam-sync option --- emu-configs/defaults/retrodeck/retrodeck.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/emu-configs/defaults/retrodeck/retrodeck.cfg b/emu-configs/defaults/retrodeck/retrodeck.cfg index 4056cc07..b7fa8bc4 100644 --- a/emu-configs/defaults/retrodeck/retrodeck.cfg +++ b/emu-configs/defaults/retrodeck/retrodeck.cfg @@ -30,6 +30,7 @@ default_user= developer_options=false kiroi_ponzu=false akai_ponzu=false +steam_sync=false [cheevos] duckstation=false From fb1fcbc81b4e213e1bf3be1b16a1a0117b294af4 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sat, 20 Apr 2024 21:27:40 +0900 Subject: [PATCH 09/28] PREPARE_COMPONENTS: removing spaces from steam rom manager --- functions/prepare_component.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/prepare_component.sh b/functions/prepare_component.sh index abf00ecb..6214f9c3 100644 --- a/functions/prepare_component.sh +++ b/functions/prepare_component.sh @@ -822,7 +822,7 @@ prepare_component() { sed -i 's#RETRODECKSAVESDIR#'$saves_folder'#g' "/var/config/gzdoom/gzdoom.ini" # This is an unfortunate one-off because set_setting_value does not currently support JSON fi - if [[ "$component" =~ ^(steam rom manager|all)$ ]]; then + if [[ "$component" =~ ^(steam_rom_manager|all)$ ]]; then log i "----------------------" log i "Prepearing STEAM ROM MANAGER" log i "----------------------" @@ -832,7 +832,7 @@ prepare_component() { cp -fvr "/app/libexec/steam-sync/userConfigurations.json" "/var/config/steam-rom-manager/userData" fi - if [[ ! "$component" =~ ^(retrodeck|es-de|retroarch|citra|citra-emu|cemu|dolphin|dolphin-emu|duckstation|melonds|melonDS|pcsx2|pico8|pico-8|ppsspp|primehack|rpcs3|ryujinx|yuzu|xemu|vita3k|mame|gzdoom|steam rom manager|)$ ]]; then + if [[ ! "$component" =~ ^(retrodeck|es-de|retroarch|citra|citra-emu|cemu|dolphin|dolphin-emu|duckstation|melonds|melonDS|pcsx2|pico8|pico-8|ppsspp|primehack|rpcs3|ryujinx|yuzu|xemu|vita3k|mame|gzdoom|steam_rom_manager|)$ ]]; then log e "Supplied component $component not found, not resetting" fi From 2843e69038e223a980f8bb2f23a213d73edf44ed Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sat, 20 Apr 2024 21:39:53 +0900 Subject: [PATCH 10/28] SRM: adding it ot reset cli, boilr cleanup --- net.retrodeck.retrodeck.yml | 2 +- retrodeck.sh | 4 ++-- tools/configurator.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 9fd44b22..bbe250db 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -31,7 +31,7 @@ finish-args: - --env=SDL_VIDEO_WAYLAND_WMCLASS=net.retrodeck.retrodeck # XEMU - Fixes issues with openSUSE systems, QEMU_AUDIO_DRV is defined as "pa" causing xemu to not launch - --unset-env=QEMU_AUDIO_DRV - # BoilR + # Steam Rom Manager - --filesystem=xdg-data/Steam:rw #Steam (flatpak) - --filesystem=~/.steam:rw # Steam (Non-flatpak) - --filesystem=~/.var/app/com.valvesoftware.Steam:rw # Steam (Flatpak) diff --git a/retrodeck.sh b/retrodeck.sh index 03974e92..dc16dcdc 100644 --- a/retrodeck.sh +++ b/retrodeck.sh @@ -56,10 +56,10 @@ https://retrodeck.net ;; --reset-component*) echo "You are about to reset one or more RetroDECK components or emulators." - echo "Available options are: es-de, retroarch, cemu, dolphin, duckstation, gzdoom, melonds, pcsx3, pico8, ppsspp, primehack, rpcs3, ryujinx, xemu, vita3k, mame, boilr, all" + echo "Available options are: es-de, retroarch, cemu, dolphin, duckstation, gzdoom, melonds, pcsx3, pico8, ppsspp, primehack, rpcs3, ryujinx, steam_rom_manager, xemu, vita3k, mame, all" read -p "Please enter the component you would like to reset: " component component=$(echo "$component" | tr '[:upper:]' '[:lower:]') - if [[ "$component" =~ ^(es-de|retroarch|cemu|dolphin|duckstation|gzdoom|mame|melonds|pcsx2|ppsspp|primehack|ryujinx|rpcs3|xemu|all)$ ]]; then + if [[ "$component" =~ ^(es-de|retroarch|cemu|dolphin|duckstation|gzdoom|mame|melonds|pcsx2|ppsspp|primehack|ryujinx|steam_rom_manager|rpcs3|xemu|all)$ ]]; then read -p "You are about to reset $component to default settings. Enter 'y' to continue, 'n' to stop: " response if [[ $response == [yY] ]]; then prepare_component "reset" "$component" "cli" diff --git a/tools/configurator.sh b/tools/configurator.sh index ea63de25..c5f3c07e 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -1310,7 +1310,7 @@ configurator_add_steam() { zenity --question \ --no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ --title "RetroDECK Configurator - RetroDECK Steam Syncronization" \ - --text="Steam syncronization is current disabled. Do you want to enable it?\n\nAll the games marked as favorites will be syncronized with Steam thanks to BoilR.\nRemember to restart Steam each time to see the changes.\n" + --text="Steam syncronization is current disabled. Do you want to enable it?\n\nAll the games marked as favorites will be syncronized with Steam Rom Manager.\nRemember to restart Steam each time to see the changes.\n" if [ $? == 0 ] then From ecd6cb15b3b9556b51becb882dbf81b99816d7ce Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sat, 20 Apr 2024 21:44:10 +0900 Subject: [PATCH 11/28] SRM: boilr cleanup [skip ci] --- functions/steam-sync/config.toml | 61 -------------------------------- 1 file changed, 61 deletions(-) delete mode 100644 functions/steam-sync/config.toml diff --git a/functions/steam-sync/config.toml b/functions/steam-sync/config.toml deleted file mode 100644 index 0bdd0e25..00000000 --- a/functions/steam-sync/config.toml +++ /dev/null @@ -1,61 +0,0 @@ -debug = false -config_version = 1 -blacklisted_games = [] -boilr_tag = "retrodeck" - -[steamgrid_db] -enabled = true -prefer_animated = false -banned_images = [] -only_download_boilr_images = false -allow_nsfw = false - -[steam] -create_collections = false -optimize_for_big_picture = false -stop_steam = false -start_steam = false - -[bottles] -enabled = false - -[epic_games] -enabled = false -safe_launch = [] - -[flatpak] -enabled = false - -[gog] -enabled = false -create_symlinks = true - -[heroic] -enabled = false -launch_games_through_heroic = [] -default_launch_through_heroic = true - -[itch] -enabled = false -create_symlinks = true - -[legendary] -enabled = false - -[lutris] -enabled = false -executable = "lutris" -flatpak = true -flatpak_image = "net.lutris.Lutris" -installed = true - -[origin] -enabled = false - -[uplay] -enabled = false - -[minigalaxy] -enabled = true -create_symlinks = false -games_folder = "/var/config/boilr/sync/" From 8bc061f91cdcc2629772c2b0ef6389c0f8ace169 Mon Sep 17 00:00:00 2001 From: Lx32 Date: Sun, 21 Apr 2024 15:22:44 +0200 Subject: [PATCH 12/28] Update and fixed script --- functions/steam-sync/steam-sync.py | 31 +++++++++++------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/functions/steam-sync/steam-sync.py b/functions/steam-sync/steam-sync.py index 1ba3410a..b2ebf90c 100644 --- a/functions/steam-sync/steam-sync.py +++ b/functions/steam-sync/steam-sync.py @@ -273,7 +273,7 @@ rdhome="" roms_folder="" def create_shortcut_new_new(games): - old_games=os.listdir(rdhome+"/.sync/") + old_games=os.listdir(rdhome+"/.sync/").copy() for game in games: try: @@ -386,27 +386,18 @@ def start_config(): os.system("/app/bin/zypak-wrapper /app/srm/steam-rom-manager list") srm_path=os.path.expanduser("~/.var/app/net.retrodeck.retrodeck/config/steam-rom-manager/userData/userConfigurations.json") - if os.path.isfile(srm_path): - with open(srm_path,"r") as f: - data=f.read() - data=re.sub("\"steamDirectory.*","\"steamDirectory\" : \""+os.path.expanduser("~/.steam/steam")+"\",",data) - data=re.sub("\"romDirectory.*","\"romDirectory\" : \""+rdhome+"/.sync/\",",data) - with open(srm_path,"w") as f: - f.write(data) - else: - print("Error! Steam Rom Manager config not initialized.") - exit(1) + if not os.path.isfile(srm_path): + print("Steam Rom Manager configuration not initialized! Initializing now.") + shutil.copyfile("/app/libexec/steam-sync/userConfigurations.json", srm_path) + + with open(srm_path,"r") as f: + data=f.read() + data=re.sub("\"steamDirectory.*","\"steamDirectory\" : \""+os.path.expanduser("~/.steam/steam")+"\",",data) + data=re.sub("\"romDirectory.*","\"romDirectory\" : \""+rdhome+"/.sync/\",",data) + with open(srm_path,"w") as f: + f.write(data) if __name__=="__main__": start_config() - exit(1) - - running=True - - while running: - if os.path.isfile(exit_file): - running=False - os.remove(exit_file) - addToSteam(os.listdir(rdhome+"/gamelists/")) print("Finish!") From c38233aecb38bd2f736dc55c424782cf2386107a Mon Sep 17 00:00:00 2001 From: Lx32 Date: Sun, 21 Apr 2024 15:23:37 +0200 Subject: [PATCH 13/28] Modified steam sync works --- retrodeck.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/retrodeck.sh b/retrodeck.sh index dc16dcdc..15881a0d 100644 --- a/retrodeck.sh +++ b/retrodeck.sh @@ -191,12 +191,8 @@ fi # Normal Startup -if [[ $steam_sync == "true" ]]; then - python3 /app/libexec/steam-sync/steam-sync.py & -fi - start_retrodeck if [[ $steam_sync == "true" ]]; then - touch /tmp/retrodeck_steam_sync_exit + python3 /app/libexec/steam-sync/steam-sync.py fi From c910621cff334263d580bc50bf18183d05d95647 Mon Sep 17 00:00:00 2001 From: Lx32 Date: Sun, 21 Apr 2024 15:32:22 +0200 Subject: [PATCH 14/28] Update configurator.sh --- tools/configurator.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/configurator.sh b/tools/configurator.sh index c5f3c07e..67a99440 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -1326,13 +1326,12 @@ enable_steam_sync() { zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap --ok-label="OK" \ --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ --title "RetroDECK Configurator - RetroDECK Steam Syncronization" \ - --text="Steam syncronization enabled, restart RetroDECK to get effect." + --text="Steam syncronization enabled." configurator_welcome_dialog } disable_steam_sync() { set_setting_value $rd_conf "steam_sync" "false" retrodeck "options" - touch /tmp/retrodeck_steam_sync_exit configurator_welcome_dialog } From dd132dd945ef4eb4e5cc147825c6d8eb0c6d65bb Mon Sep 17 00:00:00 2001 From: XargonWan Date: Mon, 22 Apr 2024 13:40:16 +0900 Subject: [PATCH 15/28] STEAM_SYNC: fixing gameslist location --- functions/steam-sync/steam-sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/steam-sync/steam-sync.py b/functions/steam-sync/steam-sync.py index b2ebf90c..3c49619c 100644 --- a/functions/steam-sync/steam-sync.py +++ b/functions/steam-sync/steam-sync.py @@ -311,7 +311,7 @@ def addToSteam(systems): for system in systems: print("Start parsing system: {}".format(system)) - f=open(rdhome+"/gamelists/"+system+"/gamelist.xml","r") + f=open(rdhome+"/ES-DE/gamelists/"+system+"/gamelist.xml","r") f.readline() parser=ET.XMLParser() parser.feed(b'') From 0a810e4f8e24ce2bb5ad45db54f3b5933fbf39c6 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Mon, 22 Apr 2024 22:42:37 +0900 Subject: [PATCH 16/28] SRM: fixed path, whoops --- functions/steam-sync/steam-sync.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/steam-sync/steam-sync.py b/functions/steam-sync/steam-sync.py index 3c49619c..7f74243c 100644 --- a/functions/steam-sync/steam-sync.py +++ b/functions/steam-sync/steam-sync.py @@ -399,5 +399,5 @@ def start_config(): if __name__=="__main__": start_config() - addToSteam(os.listdir(rdhome+"/gamelists/")) - print("Finish!") + addToSteam(os.listdir(rdhome+"/ES-DE/gamelists/")) + print("Finished!") From 46668df052901f61017d47b5b4005e5e1a6fe3f6 Mon Sep 17 00:00:00 2001 From: Lx32 Date: Wed, 8 May 2024 23:25:00 +0200 Subject: [PATCH 17/28] Added file for resetting the configuration --- functions/steam-sync/resetsync.py | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 functions/steam-sync/resetsync.py diff --git a/functions/steam-sync/resetsync.py b/functions/steam-sync/resetsync.py new file mode 100644 index 00000000..6e9eecd6 --- /dev/null +++ b/functions/steam-sync/resetsync.py @@ -0,0 +1,34 @@ +import os +import shutil +import re + +def resetfun(rdhome): + if not os.path.exists(rdhome+"/.sync/"): + os.makedirs(rdhome+"/.sync/") + + os.system("/app/bin/zypak-wrapper /app/srm/steam-rom-manager list") + srm_path=os.path.expanduser("~/.var/app/net.retrodeck.retrodeck/config/steam-rom-manager/userData/userConfigurations.json") + if not os.path.isfile(srm_path): + print("Steam Rom Manager configuration not initialized! Initializing now.") + shutil.copyfile("/app/libexec/steam-sync/userConfigurations.json", srm_path) + + with open(srm_path,"r") as f: + data=f.read() + data=re.sub("\"steamDirectory.*","\"steamDirectory\" : \""+os.path.expanduser("~/.steam/steam")+"\",",data) + data=re.sub("\"romDirectory.*","\"romDirectory\" : \""+rdhome+"/.sync/\",",data) + with open(srm_path,"w") as f: + f.write(data) + +if __name__=="__main__": + rdhome="" + + print("Open RetroDECK config file: {}".format(os.path.expanduser("~/.var/app/net.retrodeck.retrodeck/config/retrodeck/retrodeck.cfg"))) + + fl=open(os.path.expanduser("~/.var/app/net.retrodeck.retrodeck/config/retrodeck/retrodeck.cfg"),"r") + lines=fl.readlines() + for line in lines: + if "rdhome" in line: + rdhome=line[7:-1] + fl.close() + + resetfun(rdhome) From 4b93767cae8c057f4db18f58aab0c8f03f003bc9 Mon Sep 17 00:00:00 2001 From: Lx32 Date: Wed, 8 May 2024 23:26:12 +0200 Subject: [PATCH 18/28] Modified with external reset function --- functions/steam-sync/steam-sync.py | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/functions/steam-sync/steam-sync.py b/functions/steam-sync/steam-sync.py index 7f74243c..98dd6198 100644 --- a/functions/steam-sync/steam-sync.py +++ b/functions/steam-sync/steam-sync.py @@ -11,6 +11,8 @@ import hashlib import xml.etree.ElementTree as ET +from resetsync import resetfun + command_list_default={ "3do": "flatpak run --command=retroarch net.retrodeck.retrodeck -L /var/config/retroarch/cores/opera_libretro.so", "amiga": "flatpak run --command=retroarch net.retrodeck.retrodeck -L /var/config/retroarch/cores/puae_libretro.so", @@ -364,9 +366,6 @@ def start_config(): global command_list_default global alt_command_list - if os.path.isfile(exit_file): - os.remove(exit_file) - print("Open RetroDECK config file: {}".format(os.path.expanduser("~/.var/app/net.retrodeck.retrodeck/config/retrodeck/retrodeck.cfg"))) fl=open(os.path.expanduser("~/.var/app/net.retrodeck.retrodeck/config/retrodeck/retrodeck.cfg"),"r") @@ -381,21 +380,10 @@ def start_config(): command_list_default["pico8"]=command_list_default["pico8"].replace("{GAMEDIR}",roms_folder+"/pico8") alt_command_list["PICO-8 Splore (Standalone)"]=alt_command_list["PICO-8 Splore (Standalone)"].replace("{GAMEDIR}",roms_folder+"/pico8") - if not os.path.exists(rdhome+"/.sync/"): - os.makedirs(rdhome+"/.sync/") - - os.system("/app/bin/zypak-wrapper /app/srm/steam-rom-manager list") srm_path=os.path.expanduser("~/.var/app/net.retrodeck.retrodeck/config/steam-rom-manager/userData/userConfigurations.json") if not os.path.isfile(srm_path): print("Steam Rom Manager configuration not initialized! Initializing now.") - shutil.copyfile("/app/libexec/steam-sync/userConfigurations.json", srm_path) - - with open(srm_path,"r") as f: - data=f.read() - data=re.sub("\"steamDirectory.*","\"steamDirectory\" : \""+os.path.expanduser("~/.steam/steam")+"\",",data) - data=re.sub("\"romDirectory.*","\"romDirectory\" : \""+rdhome+"/.sync/\",",data) - with open(srm_path,"w") as f: - f.write(data) + resetfun(rdhome) if __name__=="__main__": start_config() From f23d07ddea7ddfbcc62398a23f1694d9304df2fd Mon Sep 17 00:00:00 2001 From: Lx32 Date: Wed, 8 May 2024 23:27:05 +0200 Subject: [PATCH 19/28] Modified with external reset function --- functions/prepare_component.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/functions/prepare_component.sh b/functions/prepare_component.sh index 6214f9c3..78d5cee3 100644 --- a/functions/prepare_component.sh +++ b/functions/prepare_component.sh @@ -826,10 +826,8 @@ prepare_component() { log i "----------------------" log i "Prepearing STEAM ROM MANAGER" log i "----------------------" - - create_dir "/var/config/steam-rom-manager" - create_dir "/var/config/steam-rom-manager/userData" - cp -fvr "/app/libexec/steam-sync/userConfigurations.json" "/var/config/steam-rom-manager/userData" + + python3 /app/libexec/steam-sync/resetsync.py fi if [[ ! "$component" =~ ^(retrodeck|es-de|retroarch|citra|citra-emu|cemu|dolphin|dolphin-emu|duckstation|melonds|melonDS|pcsx2|pico8|pico-8|ppsspp|primehack|rpcs3|ryujinx|yuzu|xemu|vita3k|mame|gzdoom|steam_rom_manager|)$ ]]; then From 49ad2c71c31beeb8ace6b7b2c8399e45903ad812 Mon Sep 17 00:00:00 2001 From: Lx32 Date: Wed, 8 May 2024 23:27:45 +0200 Subject: [PATCH 20/28] Added msgbox during fav sync --- retrodeck.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/retrodeck.sh b/retrodeck.sh index e1b00938..8a8e8e6d 100644 --- a/retrodeck.sh +++ b/retrodeck.sh @@ -194,5 +194,16 @@ fi start_retrodeck if [[ $steam_sync == "true" ]]; then + ( python3 /app/libexec/steam-sync/steam-sync.py + ) | + zenity --progress \ + --title="Synching with Steam" \ + --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ + --text="Synching favorite game with Steam, please wait." \ + --percentage=25 \ + --pulsate \ + --auto-close \ + --auto-kill + fi From 74c681fbe7d2764609de81600b908e698ddb4e63 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 12 May 2024 08:12:25 +0200 Subject: [PATCH 21/28] STEAM_SYNC: fixed some texts --- retrodeck.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/retrodeck.sh b/retrodeck.sh index 407035c5..92ccd025 100644 --- a/retrodeck.sh +++ b/retrodeck.sh @@ -192,9 +192,9 @@ if [[ $steam_sync == "true" ]]; then python3 /app/libexec/steam-sync/steam-sync.py ) | zenity --progress \ - --title="Synching with Steam" \ + --title="Syncing with Steam" \ --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ - --text="Synching favorite game with Steam, please wait." \ + --text="Syncing favorite games with Steam, please wait." \ --percentage=25 \ --pulsate \ --auto-close \ From 864afe504074b8d09c7cfcdfcda797e52aa19e5c Mon Sep 17 00:00:00 2001 From: Lx32 Date: Mon, 29 Jul 2024 22:03:29 +0200 Subject: [PATCH 22/28] Modified if for remove everything if no favorite games --- functions/steam-sync/steam-sync.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/functions/steam-sync/steam-sync.py b/functions/steam-sync/steam-sync.py index 98dd6198..84e89a88 100644 --- a/functions/steam-sync/steam-sync.py +++ b/functions/steam-sync/steam-sync.py @@ -357,8 +357,7 @@ def addToSteam(systems): else: games.append([name,alt_command_list[altemulator]+" '"+roms_folder+"/"+system+path[1:]+"'"]) print(alt_command_list[altemulator]+" '"+roms_folder+"/"+system+path[1:]+"'") - if not games==[]: - create_shortcut_new_new(games) + create_shortcut_new_new(games) def start_config(): global rdhome From 91bf85d7d54baac88cc6df4ffea60056770868ab Mon Sep 17 00:00:00 2001 From: Lx32 Date: Tue, 27 Aug 2024 21:54:26 +0200 Subject: [PATCH 23/28] Fixed removing the games when no favs --- functions/steam-sync/steam-sync.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/functions/steam-sync/steam-sync.py b/functions/steam-sync/steam-sync.py index 84e89a88..e7fd8a88 100644 --- a/functions/steam-sync/steam-sync.py +++ b/functions/steam-sync/steam-sync.py @@ -275,11 +275,12 @@ rdhome="" roms_folder="" def create_shortcut_new_new(games): + ignore_game=rdhome+"/.sync/IGNORE.sh" old_games=os.listdir(rdhome+"/.sync/").copy() for game in games: try: - i=old_games.index(game[0]) + i=old_games.index(game[0]+".sh") old_games[i]=0 except ValueError: print(game[0]+" is a new game!") @@ -306,7 +307,16 @@ def create_shortcut_new_new(games): if game: os.remove(rdhome+"/.sync/"+game) - os.system("/app/bin/zypak-wrapper /app/srm/steam-rom-manager add") + dir=os.listdir(rdhome+"/.sync/") + if len(dir)==0: + print("No game found, removing all") + fl=open(ignore_game,"w") + fl.close() + os.system("/app/bin/zypak-wrapper /app/srm/steam-rom-manager remove") + os.remove(ignore_game) + else: + print("Adding the games") + os.system("/app/bin/zypak-wrapper /app/srm/steam-rom-manager add") def addToSteam(systems): games=[] From 648fae3968bcb2538ff158fcd49ba4b35bda26c5 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 28 Aug 2024 13:38:05 +0900 Subject: [PATCH 24/28] STEAM_ROM_MANAGER: added to features.json --- config/retrodeck/reference_lists/features.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/retrodeck/reference_lists/features.json b/config/retrodeck/reference_lists/features.json index 576fc38c..e1ba9f10 100644 --- a/config/retrodeck/reference_lists/features.json +++ b/config/retrodeck/reference_lists/features.json @@ -1105,6 +1105,11 @@ "description": "ES-DE Emulation Frontend", "name": "ES-DE", "launch": "es-de" + }, + "steam_rom_manager": { + "description": "Steam ROM Manager (used to sync RetroDECK favorites with Steam)", + "name": "Steam ROM Manager", + "launch": "steam-rom-manager" } } } From 555068ff95866043498c74dd1809c121e8483d94 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 28 Aug 2024 13:38:37 +0900 Subject: [PATCH 25/28] STEAM_ROM_MANAGER: casing names descriptions --- functions/prepare_component.sh | 2 +- functions/steam-sync/resetsync.py | 2 +- functions/steam-sync/steam-sync.py | 2 +- net.retrodeck.retrodeck.yml | 2 +- tools/configurator.sh | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/functions/prepare_component.sh b/functions/prepare_component.sh index 576e979c..31f63eb7 100644 --- a/functions/prepare_component.sh +++ b/functions/prepare_component.sh @@ -83,7 +83,7 @@ prepare_component() { if [[ "$component" =~ ^(steam_rom_manager|all)$ ]]; then component_found="true" log i "----------------------" - log i "Prepearing STEAM ROM MANAGER" + log i "Prepearing Steam ROM Manager" log i "----------------------" python3 /app/libexec/steam-sync/resetsync.py diff --git a/functions/steam-sync/resetsync.py b/functions/steam-sync/resetsync.py index 6e9eecd6..632d846d 100644 --- a/functions/steam-sync/resetsync.py +++ b/functions/steam-sync/resetsync.py @@ -9,7 +9,7 @@ def resetfun(rdhome): os.system("/app/bin/zypak-wrapper /app/srm/steam-rom-manager list") srm_path=os.path.expanduser("~/.var/app/net.retrodeck.retrodeck/config/steam-rom-manager/userData/userConfigurations.json") if not os.path.isfile(srm_path): - print("Steam Rom Manager configuration not initialized! Initializing now.") + print("Steam ROM Manager configuration not initialized! Initializing now.") shutil.copyfile("/app/libexec/steam-sync/userConfigurations.json", srm_path) with open(srm_path,"r") as f: diff --git a/functions/steam-sync/steam-sync.py b/functions/steam-sync/steam-sync.py index e7fd8a88..1e5b45e8 100644 --- a/functions/steam-sync/steam-sync.py +++ b/functions/steam-sync/steam-sync.py @@ -391,7 +391,7 @@ def start_config(): srm_path=os.path.expanduser("~/.var/app/net.retrodeck.retrodeck/config/steam-rom-manager/userData/userConfigurations.json") if not os.path.isfile(srm_path): - print("Steam Rom Manager configuration not initialized! Initializing now.") + print("Steam ROM Manager configuration not initialized! Initializing now.") resetfun(rdhome) if __name__=="__main__": diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 02f0515b..a8fb4ec6 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -31,7 +31,7 @@ finish-args: - --env=SDL_VIDEO_WAYLAND_WMCLASS=net.retrodeck.retrodeck # XEMU - Fixes issues with openSUSE systems, QEMU_AUDIO_DRV is defined as "pa" causing xemu to not launch - --unset-env=QEMU_AUDIO_DRV - # Steam Rom Manager + # Steam ROM Manager - --filesystem=xdg-data/Steam:rw #Steam (flatpak) - --filesystem=~/.steam:rw # Steam (Non-flatpak) - --filesystem=~/.var/app/com.valvesoftware.Steam:rw # Steam (Flatpak) diff --git a/tools/configurator.sh b/tools/configurator.sh index 6656aa1c..a4775360 100755 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -1152,13 +1152,13 @@ configurator_reset_dialog() { --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \ --text="Which component do you want to reset to default settings?" \ --column="Component" --column="Action" \ - "Steam Rom Manager" "Reset SRM that manages the sync and scraping toward Steam library" \ + "Steam ROM Manager" "Reset SRM that manages the sync and scraping toward Steam library" \ "ES-DE" "Reset the ES-DE frontend" \ ) # TODO: "GyroDSU" "Reset the gyroscope manager GyroDSU" case $component_to_reset in - "Steam Rom Manager" | "ES-DE" ) # TODO: GyroDSU + "Steam ROM Manager" | "ES-DE" ) # TODO: GyroDSU if [[ $(configurator_reset_confirmation_dialog "$component_to_reset" "Are you sure you want to reset $component_to_reset to default settings?\n\nThis process cannot be undone.") == "true" ]]; then prepare_component "reset" "$component_to_reset" "configurator" configurator_process_complete_dialog "resetting $component_to_reset" @@ -1268,7 +1268,7 @@ configurator_add_steam() { zenity --question \ --no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ --title "RetroDECK Configurator - RetroDECK Steam Syncronization" \ - --text="Steam syncronization is currently disabled. Do you want to enable it?\n\nAll the games marked as favorites will be syncronized with Steam Rom Manager.\nRemember to restart Steam each time to see the changes.\n" + --text="Steam syncronization is currently disabled. Do you want to enable it?\n\nAll the games marked as favorites will be syncronized with Steam ROM Manager.\nRemember to restart Steam each time to see the changes.\n" if [ $? == 0 ] then From bf2fa76c27c3c9c3ca3613ff95ca9c29b3826436 Mon Sep 17 00:00:00 2001 From: Lx32 Date: Wed, 28 Aug 2024 17:59:43 +0200 Subject: [PATCH 26/28] Fixed some error --- functions/steam-sync/steam-sync.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/functions/steam-sync/steam-sync.py b/functions/steam-sync/steam-sync.py index 1e5b45e8..4ce79e4c 100644 --- a/functions/steam-sync/steam-sync.py +++ b/functions/steam-sync/steam-sync.py @@ -49,6 +49,7 @@ command_list_default={ "dreamcast": "flatpak run --command=retroarch net.retrodeck.retrodeck -L /var/config/retroarch/cores/flycast_libretro.so", "easyrpg": "flatpak run --command=retroarch net.retrodeck.retrodeck -L /var/config/retroarch/cores/easyrpg_libretro.so", "famicom": "flatpak run --command=retroarch net.retrodeck.retrodeck -L /var/config/retroarch/cores/mesen_libretro.so", +"flash": "TODO: I have to catch how it works", #TODO "fba": "flatpak run --command=retroarch net.retrodeck.retrodeck -L /var/config/retroarch/cores/fbalpha2012_libretro.so", "fbneo": "flatpak run --command=retroarch net.retrodeck.retrodeck -L /var/config/retroarch/cores/fbneo_libretro.so", "fds": "flatpak run --command=retroarch net.retrodeck.retrodeck -L /var/config/retroarch/cores/mesen_libretro.so", @@ -394,6 +395,9 @@ def start_config(): print("Steam ROM Manager configuration not initialized! Initializing now.") resetfun(rdhome) + if not os.path.exists(rdhome+"/.sync/"): + os.makedirs(rdhome+"/.sync/") + if __name__=="__main__": start_config() addToSteam(os.listdir(rdhome+"/ES-DE/gamelists/")) From 04919fdf7f95ef33176d2da727d9286dd470709a Mon Sep 17 00:00:00 2001 From: Lx32 Date: Wed, 28 Aug 2024 18:00:08 +0200 Subject: [PATCH 27/28] Moved away the creation of .sync folder --- functions/steam-sync/resetsync.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/functions/steam-sync/resetsync.py b/functions/steam-sync/resetsync.py index 632d846d..91055517 100644 --- a/functions/steam-sync/resetsync.py +++ b/functions/steam-sync/resetsync.py @@ -3,9 +3,6 @@ import shutil import re def resetfun(rdhome): - if not os.path.exists(rdhome+"/.sync/"): - os.makedirs(rdhome+"/.sync/") - os.system("/app/bin/zypak-wrapper /app/srm/steam-rom-manager list") srm_path=os.path.expanduser("~/.var/app/net.retrodeck.retrodeck/config/steam-rom-manager/userData/userConfigurations.json") if not os.path.isfile(srm_path): From d355e56e65348a153d89944c83c56d9f5704b77d Mon Sep 17 00:00:00 2001 From: Lx32 Date: Tue, 3 Sep 2024 22:15:21 +0200 Subject: [PATCH 28/28] Uploaded standard exception --- functions/steam-sync/userExceptions.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 functions/steam-sync/userExceptions.json diff --git a/functions/steam-sync/userExceptions.json b/functions/steam-sync/userExceptions.json new file mode 100644 index 00000000..221f012b --- /dev/null +++ b/functions/steam-sync/userExceptions.json @@ -0,0 +1,12 @@ +{ + "exceptionsVersion": 1, + "titles": { + "IGNORE": { + "newTitle": "", + "searchTitle": "", + "commandLineArguments": "", + "exclude": true, + "excludeArtwork": false + } + } +}