feat(linux)!: Support streaming through XDG portals and Pipewire (#4417)
Co-authored-by: Carlos Garnacho <carlosg@gnome.org> Co-authored-by: Carson Katri <Carson.katri@gmail.com> Co-authored-by: Bond <bond-d@ukr.net> Co-authored-by: d.bondarev <d.bondarev@crm-onebox.com> Co-authored-by: Conn O'Griofa <connogriofa@gmail.com>
This commit is contained in:
parent
5dbeb74f0d
commit
874880e5ea
23 changed files with 1338 additions and 68 deletions
4
packaging/linux/00-sunshine-kms.preset.in
Normal file
4
packaging/linux/00-sunshine-kms.preset.in
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# @PROJECT_DESCRIPTION@
|
||||
# KMS service should preset to disabled
|
||||
|
||||
disable sunshine-kms.service
|
||||
|
|
@ -37,6 +37,7 @@ depends=(
|
|||
'libevdev'
|
||||
'libmfx'
|
||||
'libnotify'
|
||||
'libpipewire'
|
||||
'libpulse'
|
||||
'libva'
|
||||
'libx11'
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ BuildRequires: libXinerama-devel
|
|||
BuildRequires: libXrandr-devel
|
||||
BuildRequires: libXtst-devel
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: pipewire-devel
|
||||
BuildRequires: rpm-build
|
||||
BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: wget
|
||||
|
|
@ -194,9 +195,10 @@ cmake_args=(
|
|||
"-DCMAKE_INSTALL_PREFIX=%{_prefix}"
|
||||
"-DSUNSHINE_ASSETS_DIR=%{_datadir}/sunshine"
|
||||
"-DSUNSHINE_EXECUTABLE_PATH=%{_bindir}/sunshine"
|
||||
"-DSUNSHINE_ENABLE_DRM=ON"
|
||||
"-DSUNSHINE_ENABLE_PORTAL=ON"
|
||||
"-DSUNSHINE_ENABLE_WAYLAND=ON"
|
||||
"-DSUNSHINE_ENABLE_X11=ON"
|
||||
"-DSUNSHINE_ENABLE_DRM=ON"
|
||||
"-DSUNSHINE_PUBLISHER_NAME=LizardByte"
|
||||
"-DSUNSHINE_PUBLISHER_WEBSITE=https://app.lizardbyte.dev"
|
||||
"-DSUNSHINE_PUBLISHER_ISSUE_URL=https://app.lizardbyte.dev/support"
|
||||
|
|
@ -366,8 +368,10 @@ fi
|
|||
%caps(cap_sys_admin+p) %{_bindir}/sunshine
|
||||
%caps(cap_sys_admin+p) %{_bindir}/sunshine-*
|
||||
|
||||
# Systemd unit file for user services
|
||||
# Systemd unit/preset files for user services
|
||||
%{_userunitdir}/sunshine.service
|
||||
%{_userunitdir}/sunshine-kms.service
|
||||
%{_userpresetdir}/00-sunshine-kms.preset
|
||||
|
||||
# Udev rules
|
||||
%{_udevrulesdir}/*-sunshine.rules
|
||||
|
|
|
|||
|
|
@ -33,10 +33,6 @@
|
|||
<code>flatpak run --command=additional-install.sh @PROJECT_FQDN@</code>
|
||||
</p>
|
||||
<p>NOTE: Sunshine uses a self-signed certificate. The web browser will report it as not secure, but it is safe.</p>
|
||||
<p>NOTE: KMS Grab (Flatpak)</p>
|
||||
<p>
|
||||
<code>sudo -i PULSE_SERVER=unix:/run/user/$(id -u $whoami)/pulse/native flatpak run @PROJECT_FQDN@</code>
|
||||
</p>
|
||||
</description>
|
||||
|
||||
<releases>
|
||||
|
|
|
|||
|
|
@ -69,10 +69,11 @@ modules:
|
|||
- -DSUNSHINE_ASSETS_DIR=share/sunshine
|
||||
- -DSUNSHINE_BUILD_FLATPAK=ON
|
||||
- -DSUNSHINE_EXECUTABLE_PATH=/app/bin/sunshine
|
||||
- -DSUNSHINE_ENABLE_CUDA=ON
|
||||
- -DSUNSHINE_ENABLE_DRM=ON
|
||||
- -DSUNSHINE_ENABLE_PORTAL=ON
|
||||
- -DSUNSHINE_ENABLE_WAYLAND=ON
|
||||
- -DSUNSHINE_ENABLE_X11=ON
|
||||
- -DSUNSHINE_ENABLE_DRM=ON
|
||||
- -DSUNSHINE_ENABLE_CUDA=ON
|
||||
- -DSUNSHINE_PUBLISHER_NAME='LizardByte'
|
||||
- -DSUNSHINE_PUBLISHER_WEBSITE='https://app.lizardbyte.dev'
|
||||
- -DSUNSHINE_PUBLISHER_ISSUE_URL='https://app.lizardbyte.dev/support'
|
||||
|
|
|
|||
16
packaging/linux/sunshine-kms.service.in
Normal file
16
packaging/linux/sunshine-kms.service.in
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
[Unit]
|
||||
Description=@PROJECT_DESCRIPTION@
|
||||
StartLimitIntervalSec=500
|
||||
StartLimitBurst=5
|
||||
Conflicts=sunshine.service
|
||||
|
||||
[Service]
|
||||
# Avoid starting Sunshine before the desktop is fully initialized.
|
||||
ExecStartPre=/bin/sleep 5
|
||||
@SUNSHINE_SERVICE_START_COMMAND@
|
||||
@SUNSHINE_SERVICE_STOP_COMMAND@
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
|
||||
[Install]
|
||||
WantedBy=xdg-desktop-autostart.target
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
Description=@PROJECT_DESCRIPTION@
|
||||
StartLimitIntervalSec=500
|
||||
StartLimitBurst=5
|
||||
Conflicts=sunshine-kms.service
|
||||
|
||||
[Service]
|
||||
# Avoid starting Sunshine before the desktop is fully initialized.
|
||||
|
|
@ -10,6 +11,7 @@ ExecStartPre=/bin/sleep 5
|
|||
@SUNSHINE_SERVICE_STOP_COMMAND@
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
NoNewPrivileges=true
|
||||
|
||||
[Install]
|
||||
WantedBy=xdg-desktop-autostart.target
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ class Sunshine < Formula
|
|||
depends_on "mesa"
|
||||
depends_on "numactl"
|
||||
depends_on "pango"
|
||||
depends_on "pipewire"
|
||||
depends_on "pulseaudio"
|
||||
depends_on "systemd"
|
||||
depends_on "wayland"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue