diff --git a/Config.in b/Config.in index f27a70205121ab8b6ca3dd3865819572d1be00ac..52a1546c60400ca14bf3b404f9a2a85feb36fd1f 100644 --- a/Config.in +++ b/Config.in @@ -67,6 +67,7 @@ menu "Recalbox" source "$BR2_EXTERNAL_RECALBOX_PATH/package/mali-450/Config.in" source "$BR2_EXTERNAL_RECALBOX_PATH/package/moonlight-embedded/Config.in" source "$BR2_EXTERNAL_RECALBOX_PATH/package/moonlight-qt/Config.in" + source "$BR2_EXTERNAL_RECALBOX_PATH/package/steamlink/Config.in" source "$BR2_EXTERNAL_RECALBOX_PATH/package/nvidia-driver-legacy-recalbox/Config.in" source "$BR2_EXTERNAL_RECALBOX_PATH/package/nvidia-driver-production-recalbox/Config.in" source "$BR2_EXTERNAL_RECALBOX_PATH/package/pwm-audio-pi-zero/Config.in" diff --git a/configs/recalbox-rpi5_64_defconfig b/configs/recalbox-rpi5_64_defconfig index 14bd7cfe0f91aa6431ab9cc0e9cb751bd0e25e93..977d974bcbb787115a2d77291f9c6ccc36767a88 100644 --- a/configs/recalbox-rpi5_64_defconfig +++ b/configs/recalbox-rpi5_64_defconfig @@ -387,3 +387,4 @@ BR2_PACKAGE_LIBXMP=y BR2_PACKAGE_MOONLIGHT_EMBEDDED=y BR2_PACKAGE_KODI_PLUGIN_VIDEO_ORANGE=y BR2_PACKAGE_LIBRETRO_GEARGRAFX=y +BR2_PACKAGE_STEAMLINK=y diff --git a/package/recalbox-romfs2/systems/steamlink/init/roms/.keep b/package/recalbox-romfs2/systems/steamlink/init/roms/.keep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/package/recalbox-romfs2/systems/steamlink/system.ini b/package/recalbox-romfs2/systems/steamlink/system.ini new file mode 100644 index 0000000000000000000000000000000000000000..2adb20aa8ee83b7048cdc35dc4b30cc52ea8e022 --- /dev/null +++ b/package/recalbox-romfs2/systems/steamlink/system.ini @@ -0,0 +1,52 @@ +; =========================== +; steamlink +; =========================== + +; all keys can be overridden for a particular board using key. +; example: +; priority = 0 +; priority.rpi4 = 3 +; Complete sections may be overridden. In such cases, all key from the global section are ignored, +; you must redefine them all +; example +; [core.0] +; [core.0.rpi4] +; Board tags are defined by BR2_PACKAGE_RECALBOX_TARGET_ + +[system] +uuid = "58ce12f5-c55a-46b5-92f0-10e57a2f63d0" +name = "steamlink" +fullname = "Steam Link" +theme.folder = "steamlink" +roms.folder = "%ROOT%/steamlink" +screenscraper.id = 0 +doc.link.fr = "" +port = 0 +readonly = 0 +icon.unicode = $ +extension.types = "" + +[properties] +type = virtual +device.pad = mandatory +device.keyboard = optional +device.mouse = optional +device.lightgun = no +release.date = "2028-11" +manufacturer = "Valve" +retroachievements = 0 +crt.multiresolution = 0 +crt.multiregion = 0 + +[core.0] +package = BR2_PACKAGE_STEAMLINK +priority = 0 +emulator = "steamlink" +core = "steamlink" +extensions = ".sh" +netplay = 0 +softpatching = 0 +compatibility = average +speed = good +video.backend.rpi5_64 = wayland +crt.available = 1 diff --git a/package/recalbox-romfs2/systems/steamlink/upgrade/roms/.readme.placeholder b/package/recalbox-romfs2/systems/steamlink/upgrade/roms/.readme.placeholder new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/package/steamlink/Config.in b/package/steamlink/Config.in new file mode 100644 index 0000000000000000000000000000000000000000..26d671355077b9c74a617075516c5234ed169584 --- /dev/null +++ b/package/steamlink/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_STEAMLINK + bool "steamlink" + help + The Steam Link app brings desktop gaming to your computer. + https://store.steampowered.com/remoteplay diff --git a/package/steamlink/src/steamlink-1.3.18.291.tar.gz b/package/steamlink/src/steamlink-1.3.18.291.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..a9a86876bd8ce40a1288271798e7e07be35a7b8b Binary files /dev/null and b/package/steamlink/src/steamlink-1.3.18.291.tar.gz differ diff --git a/package/steamlink/steamlink.mk b/package/steamlink/steamlink.mk new file mode 100644 index 0000000000000000000000000000000000000000..7906346163ad4dcdd8015bac38bf73df1f62ce30 --- /dev/null +++ b/package/steamlink/steamlink.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# steamlink +# +################################################################################ + +STEAMLINK_VERSION = 1.3.18.291 +STEAMLINK_SITE = $(STEAMLINK_PKGDIR)/src +STEAMLINK_SITE_METHOD=file +STEAMLINK_LICENSE = Commercial + +define STEAMLINK_COPY_CMDS + $(INSTALL) -D -m 0755 $(@D)/bin/shell $(TARGET_DIR)/usr/bin/steamlink + mkdir -p $(TARGET_DIR)/usr/share/steamlink + cp -r $(@D)/libs $(TARGET_DIR)/usr/share/steamlink + cp -r $(@D)/Qt-5.14.1 $(TARGET_DIR)/usr/share/steamlink +endef + +STEAMLINK_INSTALL_TARGET_CMDS += $(STEAMLINK_COPY_CMDS) + +$(eval $(generic-package)) diff --git a/projects/configgen/configgen/emulatorlauncher.py b/projects/configgen/configgen/emulatorlauncher.py index 098b0dfe4dee75fb62f8ed30703ca4d04582c94b..1c111e9139ebf8a0475052e97080ee17b8563996 100644 --- a/projects/configgen/configgen/emulatorlauncher.py +++ b/projects/configgen/configgen/emulatorlauncher.py @@ -125,6 +125,9 @@ def getGenerator(emulator): elif emulator == "xemu": module = __import__("configgen.generators.xemu.xemuGenerator", fromlist=["XemuGenerator"]) generatorClass = getattr(module, "XemuGenerator") + elif emulator == "steamlink": + module = __import__("configgen.generators.steamlink.steamlinkGenerator", fromlist=["SteamlinkGenerator"]) + generatorClass = getattr(module, "XemuGenerator") else: print("Missing generator for {}".format(emulator)) raise ValueError diff --git a/projects/configgen/configgen/generators/steamlink/__init__.py b/projects/configgen/configgen/generators/steamlink/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aab1cea2c16c31661cdc644061ed83b2599acee6 --- /dev/null +++ b/projects/configgen/configgen/generators/steamlink/__init__.py @@ -0,0 +1 @@ +__author__ = 'beudbeud' diff --git a/projects/configgen/configgen/generators/steamlink/steamlinkGenerator.py b/projects/configgen/configgen/generators/steamlink/steamlinkGenerator.py new file mode 100755 index 0000000000000000000000000000000000000000..2b354dc8a44d1115f44e7185247662b9ccba7c78 --- /dev/null +++ b/projects/configgen/configgen/generators/steamlink/steamlinkGenerator.py @@ -0,0 +1,38 @@ +from configgen.Command import Command +import configgen.recalboxFiles as recalboxFiles +from configgen.Emulator import Emulator +from configgen.controllers.controller import ControllerPerPlayer +from configgen.generators.Generator import Generator +from configgen.settings.keyValueSettings import keyValueSettings +from configgen.utils.videoMode import createCrtDesktopRes + + +class SteamlinkGenerator(Generator): + def generate(self, system: Emulator, playersControllers: ControllerPerPlayer, recalboxOptions: keyValueSettings, args,) -> Command: + """ + Load, override keys and save back emulator's configuration file + This way, any modification is kept accross emulator launhes + """ + + commandArray = [ + recalboxFiles.recalboxBins[system.Emulator], + ] + + if system.HasArgs: + commandArray.extend(system.Args) + + steamlink_path = "/usr/share/steamlink/" + qtdir = steamlink_path + "Qt-5.14.1/" + + createCrtDesktopRes("768x576", system) + + env = { + "QTDIR": qtdir, + "QT_PLUGIN_PATH": qtdir + "plugins", + "LD_LIBRARY_PATH": steamlink_path + "libs:" + qtdir + "lib", + "QT_QPA_PLATFORM": "eglfs", + "SDL_VIDEO_FORCE_EGL": "1", + "SDL_VIDEO_DRIVER": "x11" + } + + return Command(videomode=system.VideoMode, array=commandArray, env=env) diff --git a/projects/configgen/configgen/recalboxFiles.py b/projects/configgen/configgen/recalboxFiles.py index 6eea5d7191c7fc8b4b26e828587fc0f7f1024852..f421c0151b6e5dfc9299f2825665bf78805261b1 100644 --- a/projects/configgen/configgen/recalboxFiles.py +++ b/projects/configgen/configgen/recalboxFiles.py @@ -55,6 +55,7 @@ recalboxBins =\ 'simcoupe' : '/usr/bin/simcoupe', 'solarus' : '/usr/bin/solarus-run', 'supermodel' : '/usr/bin/supermodel', + 'steamlink' : '/usr/bin/syeamlink', 'ti99sim' : '/usr/bin/ti99sim/ti99sim-sdl', 'vice' : '/usr/bin/x64', 'vpinball' : '/usr/bin/vpinball/VPinballX_GL', diff --git a/projects/configgen/configgen/utils/runner.py b/projects/configgen/configgen/utils/runner.py index e1fd8f98386f87515e733d880f3090a7e4115144..e4a5723b287f8e2a0acb596668e77798fa0b19a5 100644 --- a/projects/configgen/configgen/utils/runner.py +++ b/projects/configgen/configgen/utils/runner.py @@ -34,6 +34,8 @@ def runCommand(command, args, demoStartButtons, recalboxOptions, fixedScreenSize # Update environment import os + if "/usr/bin/steamlink" in command.array: + os.environ.pop('MESA_LOADER_DRIVER_OVERRIDE', None) if "/usr/bin/supermodel" in command.array: os.environ.pop('MESA_LOADER_DRIVER_OVERRIDE', None) elif "/usr/bin/dolphin-gui" in command.array and (Architecture().isPi5 or Architecture().isPi4): diff --git a/projects/configgen/setup.py b/projects/configgen/setup.py index 08602218455b75589b65ed5b144b38b3b74d8015..23532ca0d70840fb88209f22d47cec2da2978b99 100644 --- a/projects/configgen/setup.py +++ b/projects/configgen/setup.py @@ -50,6 +50,7 @@ setup(name='recalbox-configgen', 'configgen.generators.xemu', 'configgen.generators.xemu.xk', 'configgen.generators.vpinball', + 'configgen.generators.steamlink', 'configgen.settings', 'configgen.utils'], scripts=['emulatorlauncher.py']