This commit is contained in:
pigeatgarlic 2023-10-27 15:05:57 +07:00
parent f922c9b0c7
commit afbfbb508e
131 changed files with 54 additions and 11457 deletions

View File

@ -1,74 +0,0 @@
---
# This file is centrally managed in https://github.com/<organization>/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
# the above-mentioned repo.
# Generated from CLion C/C++ Code Style settings
BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: false
AlignOperands: Align
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
AlignTrailingComments: false
AlwaysBreakAfterReturnType: All
AlwaysBreakTemplateDeclarations: MultiLine
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterUnion: false
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: true
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: false
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterColon
ColumnLimit: 0
CompactNamespaces: false
ContinuationIndentWidth: 2
IndentCaseLabels: true
IndentPPDirectives: BeforeHash
IndentWidth: 2
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PointerAlignment: Right
ReflowComments: true
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: false
SpaceBeforeInheritanceColon: false
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: Never
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
TabWidth: 2
Cpp11BracedListStyle: false
UseTab: Never

View File

@ -1,55 +0,0 @@
# install dependencies for C++ analysis
sudo apt-get update -y
sudo apt-get install -y \
build-essential \
gcc-10 \
g++-10 \
libayatana-appindicator3-dev \
libavdevice-dev \
libboost-filesystem-dev \
libboost-locale-dev \
libboost-log-dev \
libboost-program-options-dev \
libcap-dev \
libcurl4-openssl-dev \
libdrm-dev \
libevdev-dev \
libmfx-dev \
libnotify-dev \
libnuma-dev \
libopus-dev \
libpulse-dev \
libssl-dev \
libva-dev \
libvdpau-dev \
libwayland-dev \
libx11-dev \
libxcb-shm0-dev \
libxcb-xfixes0-dev \
libxcb1-dev \
libxfixes-dev \
libxrandr-dev \
libxtst-dev \
wget
# clean apt cache
sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*
# Update gcc alias
# https://stackoverflow.com/a/70653945/11214013
sudo update-alternatives --install \
/usr/bin/gcc gcc /usr/bin/gcc-10 100 \
--slave /usr/bin/g++ g++ /usr/bin/g++-10 \
--slave /usr/bin/gcov gcov /usr/bin/gcov-10 \
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-10 \
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-10
# Install CUDA
sudo wget \
https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run \
--progress=bar:force:noscroll -q --show-progress -O /root/cuda.run
sudo chmod a+x /root/cuda.run
sudo /root/cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm
sudo rm /root/cuda.run

View File

@ -1,7 +0,0 @@
[flake8]
filename =
*.py,
*.pys
max-line-length = 120
extend-exclude =
venv/

4
.gitmodules vendored
View File

@ -2,10 +2,6 @@
path = third-party/nv-codec-headers
url = https://github.com/FFmpeg/nv-codec-headers
branch = sdk/12.0
[submodule "third-party/TPCircularBuffer"]
path = third-party/TPCircularBuffer
url = https://github.com/michaeltyson/TPCircularBuffer
branch = master
[submodule "third-party/ffmpeg-windows-x86_64"]
path = third-party/ffmpeg-windows-x86_64
url = https://github.com/LizardByte/build-deps

View File

@ -1 +0,0 @@
{}

View File

@ -1,39 +0,0 @@
---
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Set the version of Python
build:
os: ubuntu-22.04
tools:
python: "3.11"
apt_packages:
- graphviz # required to build diagrams
- libboost-locale-dev # required for rstcheck in cpp code block
jobs:
post_build:
- find ./third-party -iname "*.rst" -type f -delete # find and delete rst files in third-party
- rstcheck -r . # lint rst files
# - rstfmt --check --diff -w 120 . # check rst formatting
# submodules required for include statements
submodules:
include: all
recursive: true
# Build documentation in the docs/ directory with Sphinx
sphinx:
builder: html
configuration: docs/source/conf.py
fail_on_warning: true
# Using Sphinx, build docs in additional formats
formats: all
python:
install:
- requirements: ./docs/requirements.txt

View File

@ -1,10 +0,0 @@
# configuration file for rstcheck, an rst linting tool
# https://rstcheck.readthedocs.io/en/latest/usage/config
[rstcheck]
ignore_directives =
doxygenfile,
include,
mdinclude,
tab,
todo,

View File

@ -1,594 +0,0 @@
# Changelog
## [0.21.0] - 2023-10-15
**Added**
- (Input) Add support for automatically selecting the emulated controller type based on the physical controller connected to the client
- (Input/Windows) Add support for Applications (context menu) key
- (Input/Windows) Implement touchpad, motion sensors, battery state, and LED control for the emulated DualShock 4 controller
- (Input) Advertise support for new input features to clients
- (Linux/Debian) Added Debian Bookworm package
- (Prep-Commands) Expose connection environment variables
- (Input/Windows) Implement pen and touch support
- (Capture/Windows) Add standalone NVENC encoder
- (Capture) Implement AV1 encoding
- (Network) Implement IPv6 support
- (Capture/Windows) Add option to disable realtime hags
- (Graphics/NVIDIA) Add an option to decrease GPU scheduling priority to workaround HAGS video hang
- (Capture/Linux) Add FFmpeg powerpc64le architecture for self compiling Sunshine
- (Capture/Windows) Add support for capturing rotated displays
- (System Tray) Implement streaming event notifications
- (UI) Add port configuration table
- (Applications) Added option to automatically treat launcher type apps as detached commands
- (Input/Gamepad) Allow the Misc button to work as Guide on emulated Xbox 360 controllers
**Changed**
- (Input) Reduce latency by implementing input batching
- (Logging) Move input packet debug prints off the control stream thread
- (Input) Refactor gamepad emulation code to use DS4 extended report format
- (Graphics/NVIDIA) Modify and restore NVIDIA control panel settings before and after stream, respectively
- (Graphics/NVIDIA) New config page for NVENC
- (Graphics/Windows) Refactor DX shaders
- (Input/Windows) Use our own keycode mapping to avoid installing the US English keyboard layout
**Fixed**
- (UI) Fix update notifications
- (Dependencies/Linux) Replace libboost chrono and thread with standard chrono and thread
- (Input) Increase maximum gamepad limit to 16
- (Network) Allow use of multiple ENet channels
- (Network) Consider link-local addresses on LAN
- (Input) Fixed issue where button may sometimes stick on Windows
- (Input) Fix "ControllerNumber not allocated" warning when a gamepad is removed
- (Input) Fix handling of gamepad feedback with multiple clients connected
- (Input) Fix clamping mouse position to aspect ratio adjusted viewport
- (Graphics/AMD) Fix crash during startup on some older AMD GPUs
- (Logging) Fix crash when non-ASCII characters are logged
- (Prep-Commands) Fix resource exhaustion bug which could occur when many prep commands were used
- (Subprocesses) Fix race condition when inserting new processes
- (Logging) Log error if encoder doesn't produce IDR frame on demand
- (Audio) Improve audio capture logic and logging
- (Logging) Fix AMF logging to match configured log level
- (Logging) Log FFmpeg to log file instead of stdout
- (Capture) Reject codecs that are not supported by display device
- (Capture) Add fallbacks for unsupported codec settings
- (Capture) Avoid probing HEVC or AV1 codecs in some cases
- (Caputre) Remove DwmFlush()
- (Capture/Windows) Improvements to capture sleeps for better frame stability
- (Capture/Windows) Adjust capture rate to better match with display
- (Linux/ArchLinux) Fix package version in PKGBUILD and precompiled package
- (UI) Highlight fatal log messages in web ui
- (Commands) Allow stream if prep command fails
- (Capture/Linux) Fix KMS grab VRAM capture with libva 2.20
- (Capture/macOS) Fix video capture backend
- (Misc/Windows) Don't start the session monitor window when launched in command mode
- (Linux/AppImage) Use the linuxdeploy GTK plugin to correctly deploy GTK3 dependencies
- (Input/Windows) Fix reWASD not recognizing emulated DualShock 4 input
**Dependencies**
- Bump bootstrap from 5.2.3 to 5.3.2
- Bump third-party/moonlight-common-c from c9426a6 to 7a6d12f
- Bump gcc-10 in Ubuntu 20.04 docker image
- Bump furo from 2023.5.20 to 2023.9.10
- Bump sphinx from 7.0.1 to 7.2.6
- Bump cmake from 3.26 to 3.27 in Fedora docker images
- Move third-party/nv-codec-headers from sdk/11.1 branch to sdk/12.0 branch
- Automatic bump ffmpeg
- Bump actions/checkout from 3 to 4
- Bump boost from 1.80 to 1.81 in Macport manifest
- Bump @fortawesome/fontawesome-free from 6.4.0 to 6.4.2
**Misc**
- (Docs) Force badges to use svg
- (Docs) Add Linux SSH example
- (Docs) Add information about mesa for Linux
- (CI) Free additional space on Docker, Flatpak, and AppImage builds due to internal changes on GitHub runners
- (Docs/Logging/UI) Corrected various typos
- (Docs) Add blurb about Gamescope compatibility
- (Installer/Windows) Use system proxy to download ViGEmBus
- (CI) Ignore third-party directory for clang-format
- (Docs/Linux) Add Plasma-Compatible resolution example
- (Docs) Add Sunshine website available at https://app.lizardbyte.dev/Sunshine
- (Build/Windows) Fix audio code build with new MinGW headers
- (Build/Windows) Fix QoS code build with new MinGW headers
- (CI/Windows) Prevent winget action from creating an update when running in a fork
- (CI/Windows) Change winget job to ubuntu-latest runner
- (CI) Add CodeQL analysis
- (CI/Docker) Fix ArchLinux image caching issue
- (Windows) Manifest improvements
- (CI/macOS) Simplify macport build
- (Docs) Remove deprecated options from readthedocs config
- (CI/Docs) Lint rst files
- (Docs) Update localization information (after consolidating Crowdin projects)
- (Cmake) Split CMakelists into modules
- (Docs) Add Linux Headless/SSH Guide
## [0.20.0] - 2023-05-28
**Breaking**
- (Windows) The Windows installer version of Sunshine is now always launched by the Sunshine Service. Manually launching Sunshine.exe from Program Files is no longer supported. This was necessary to address security issues caused by non-admin users having access to Sunshine's config data. If you have set up Task Scheduler or other mechanisms to launch Sunshine automatically, remove those from your system before updating.
- (Windows) The Start Menu shortcut has been redesigned for use with the Sunshine Service. It now launches Sunshine in the background (if not already running) and opens the Web UI, avoiding the persistent Command Prompt window present in prior versions. The Start Menu shortcut is now the recommended method for opening the Web UI and launching Sunshine.
- (Network/UPnP) If the Moonlight Internet Hosting Tool is installed alongside Sunshine, you must remove it or upgrade to v5.6 or later to prevent conflicts with Sunshine's UPnP support. As a reminder, the Moonlight Internet Hosting Tool is not required to stream over the Internet with Sunshine. Instead, simply enable UPnP in the Sunshine Web UI.
- (Windows) If Steam is installed, the Steam Streaming Speakers driver will be automatically installed when starting a stream for the first time. This behavior can be disabled in the Audio/Video tab of the Web UI. This Steam driver enables support for surround sound and muting host audio without requiring any manual configuration.
- (Input) The Back Button Timeout option has been renamed to Guide Button Emulation Timeout and has been disabled by default to ensure long presses on the Back button work by default. The previous behavior can be restored by setting the Guide Button Emulation Timeout to 2000.
- (Windows) The service name of SunshineSvc has been changed to SunshineService to address a false positive in MalwareBytes. If you have any scripts or other logic on your system that is using the service name, you will need to update that for the new name.
- (Windows) To support new installer features, install-service.bat no longer sets the service to auto-start by default. Users executing install-service.bat manually on the Sunshine portable build must also execute autostart-service.bat to start Sunshine on boot. However, installing the service manually like this is not recommended. Instead, use the Sunshine installer which handles service installation and configuration automatically.
- (Linux/Fedora) Fedora 36 builds are removed due to upstream end of support
**Added**
- (Windows) Added an option to launch apps and prep/undo commands as administrator
- (Installer/Windows) Added an option to choose whether Sunshine launches on boot. If not configured to launch on boot, use the Start Menu shortcut to start Sunshine when desired.
- (Input/Windows) Added option to send VK codes instead of scancodes for compatibility with iOS/Android devices using non-English keyboard layouts
- (UI) The Apply/Restart option is now available in the Web UI for all platforms
- (Systray) Added a Restart option to the system tray context menu
- (Video/Windows) Added host latency data to video frames. This requires future updates to Moonlight to display in the on-screen overlay.
- (Audio) Added support for matching Audio Sink and Virtual Sink values on device names
- (Client) Added friendly error messages for clients when streaming fails to start
- (Video/Windows) Added warning log messages when Windows is hiding DRM-protected content from display capture
- (Interop/Windows) Added warning log messages when GeForce Experience is currently using the same ports as Sunshine
- (Linux/Fedora) Fedora 38 builds are now available
**Changed**
- (Video) Encoder selection now happens at each stream start for more reliable GPU detection
- (Video/Windows) The host display now stays on while clients are actively streaming
- (Audio) Streaming will no longer fail if audio capture is unavailable
- (Audio/Windows) Sunshine will automatically switch back to the Virtual Sink if the default audio device is changed while streaming
- (Audio) Changes to the host audio playback option will now take effect when resuming a session from Moonlight
- (Audio/Windows) Sunshine will switch to a different default audio device if Steam Streaming Speakers are the default when Sunshine starts. This handles cases where Sunshine terminates unexpectedly without restoring the default audio device.
- (Apps) The Connection Terminated dialog will no longer appear in Moonlight when the app on the host exits normally
- (Systray/Windows) Quitting Sunshine via the system tray will now stop the Sunshine Service rather than leaving it running and allowing it to restart Sunshine
- (UI) The 100.64.0.0/10 CGN IP address range is now treated as a LAN address range
- (Video) Removed a workaround for some versions of Moonlight prior to mid-2022
- (UI) The PIN field is now cleared after successfully pairing
- (UI) User names are now treated as case-insensitive
- (Linux) Changed udev rule to automatically grant access to virtual input devices
- (UI) Several item descriptions were adjusted to reflect newer configuration recommendations
- (UI) Placeholder text opacity has been reduced to improve contrast with non-placeholder text
- (Video/Windows) Minor capture performance improvements
**Fixed**
- (Video) VRAM usage while streaming is significantly reduced, particularly with higher display resolutions and HDR
- (Network/UPnP) UPnP support was rewritten to fix several major issues handling router restarts, IP address changes, and port forwarding expiration
- (Input) Fixed modifier keys from the software keyboard on Android clients
- (Audio) Fixed handling of default audio device changes while streaming
- (Windows) Fixed streaming after Microsoft Remote Desktop or Fast User Switching has been used
- (Input) Fixed some games not recognizing emulated Guide button presses
- (Video/Windows) Fixed incorrect gamma when using an Advanced Color SDR display on the host
- (Installer/Windows) The installer is no longer blurry on High DPI systems
- (Systray/Windows) Fixed multiple system tray icons appearing if Sunshine exits unexpectedly
- (Systray/Windows) Fixed the system tray icon not appearing in several situations
- (Windows) Fixed hang on shutdown/restart if mDNS registration fails
- (UI) Fixed missing response headers
- (Stability) Fixed several possible crashes in cases where the client did not successfully connect
- (Stability) Fixed several memory leaks
- (Input/Windows) Back/Select input now correctly generates the Share button when emulating DS4 controllers
- (Audio/Windows) Fixed various bugs in audio-info.exe that led to inaccurate output on some systems
- (Video/Windows) Fixed incorrect resolution values from dxgi-info.exe on High DPI systems
- (Video/Linux) Fixed poor quality encoding from H.264 on Intel encoders
- (Config) Fixed a couple of typos in predefined resolutions
**Dependencies**
- Bump sphinx-copybutton from 0.5.1 to 0.5.2
- Bump sphinx from 6.13 to 7.0.1
- Bump third-party/nv-codec-headers from 2055784 to 2cd175b
- Bump furo from 2023.3.27 to 2023.5.20
**Misc**
- (Build/Linux) Add X11 to PLATFORM_LIBARIES when found
- (Build/macOS) Fix compilation with Clang 14
- (Docs) Fix nvlax URL
- (Docs) Add diagrams using graphviz
- (Docs) Improvements to source code documentation
- (Build) Unpin docker dependencies
- (Build/Linux) Honor install prefix for tray icon
- (Build/Windows) Unstripped binaries are now provided as a debuginfo package to support crash dump debugging
- (Config) Config directories are now created recursively
## [0.19.1] - 2023-03-30
**Fixed**
- (Audio) Fixed no audio issue introduced in v0.19.0
## [0.19.0] - 2023-03-29
**Breaking**
- (Linux/Flatpak) Moved Flatpak to org.freedesktop.Platform 22.08 and Cuda 12.0.0
This will drop support for Nvidia GPUs with compute capability 3.5
**Added**
- (Input) Added option to suppress input from gamepads, keyboards, or mice
- (Input/Linux) Added unicode support for remote pasting (may not work on all DEs)
- (Input/Linux) Added XTest input fallback
- (UI) Added version notifications to web UI
- (Linux/Windows) Add system tray icon
- (Windows) Added ability to safely elevate commands that fail due to insufficient permissions when running as a service
- (Config) Added global prep commands, and ability to exclude an app from using global prep commands
- (Installer/Windows) Automatically install ViGEmBus if selected
**Changed**
- (Logging) Changed client verified messages to debug to prevent spamming the log
- (Config) Only save non default config values
- (Service/Linux) Use xdg-desktop-autostart for systemd service
- (Linux) Added config option to force capture method
- (Windows) Execute prep command in context of current user
- (Linux) Allow disconnected X11 outputs
**Fixed**
- (Input/Windows) Fix issue where internation keys were not translated correct, and modifier keys appeared stuck
- (Linux) Fixed startup when /dev/dri didn't exist
- (UI) Changes software encoding settings to select menu instead of text input
- (Initialization) Do not terminate upon failure, allowing access to the web UI
**Dependencies**
- Bump third-party/moonlight-common-c from 07beb0f to c9426a6
- Bump babel from 2.11.0 to 2.12.1
- Bump @fortawesome/fontawesome-free from 6.2.1 to 6.4.0
- Bump third-party/ViGEmClient from 9e842ba to 726404e
- Bump ffmpeg
- Bump third-party/miniupnp from 014c9df to e439318
- Bump furo from 2022.12.7 to 2023.3.27
- Bump third-party/nanors from 395e5ad to e9e242e
**Misc**
- (GitHub) Shared feature request board with Moonlight
- (Docs) Improved application examples
- (Docs) Added WIP documentation for source code using Doxygen and Breathe
- (Build) Fix linux clang build errors
- (Build/Archlinux) Skip irrelevant submodules
- (Build/Archlinux) Disable download timeout
- (Build/macOS) Support compiling for earlier releases of macOS
- (Docs) Add favicon
- (Docs) Add missing config default values
- (Build) Fix compiler warnings due to depreciated elements in C++17
- (Build) Fix libcurl link errors
- (Clang) Adjusted formatting rules
## [0.18.4] - 2023-02-20
**Fixed**
- (Linux/AUR) Drop support of AUR package
- (Docker) General enhancements to docker images
## [0.18.3] - 2023-02-13
**Added**
- (Linux) Added PKGBUILD for Archlinux based distros to releases
- (Linux) Added precompiled package for Archlinux based distros to releases
- (Docker) Added archlinux docker image (x86_64 only)
## [0.18.2] - 2023-02-13
**Fixed**
- (Video/KMV/Linux) Fixed wayland capture on Nvidia for KMS
- (Video/Linux) Implement vaSyncBuffer stuf for libva <2.9.0
- (UI) Fix issue where mime type was not being set for node_modules when using a reverse proxy
- (UI/macOS) Added missing audio sink config options
- (Linux) Specify correct Boost dependency versions
- (Video/AMF) Add missing encoder tunables
## [0.18.1] - 2023-01-31
**Fixed**
- (Linux) Fixed missing dependencies for deb and rpm packages
- (Linux) Use dynamic boost
## [0.18.0] - 2023-01-29
Attention, this release contains critical security fixes. Please update as soon as possible. Additionally, we are
encouraging users to change your Sunshine password, especially if you expose the web UI (i.e. port 47790 by default)
to the internet, or have ever uploaded your logs with verbose output to a public resource.
**Added**
- (Windows) Add support for Intel QuickSync
- (Linux) Added aarch64 deb and rpm packages
- (Windows) Add support for hybrid graphics systems, such as laptops with both integrated and discrete GPUs
- (Linux) Add support for streaming from Steam Deck Gaming Mode
- (Windows) Add HDR support, see https://docs.lizardbyte.dev/projects/sunshine/en/latest/about/usage.html#hdr-support
**Fixed**
- (Network) Refactor code for UPnP port forwarding
- (Video) Enforce 10 FPS encoding frame rate minimum to improve static image quality
- (Linux) deb and rpm packages are now specific to destination distro and version
- (Docs) Add nvidia/nvenc preset migration guide
- (Network) Performance optimizations
- (Video/Windows) Fix streaming to multiple clients from hardware encoder
- (Linux) Fix child process spawning
- (Security) Fix security vulnerability in implementation of SimpleWebServer
- (Misc) Rename "Steam BigPicture" to "Steam Big Picture" in default apps.json
- (Security) Scrub basic authorization header from logs
- (Linux) The systemd service will now restart in the event of a crash
- (Video/KMS/Linux) Fixed error: `couldn't import RGB Image: 00003002 and 00003004`
- (Video/Windows) Fix stream freezing triggered by the resolution changed
- (Installer/Windows) Fixes silent installation and other miscellaneous improvements
- (CPU) Significantly improved CPU usage
## [0.17.0] - 2023-01-08
If you are running Sunshine as a service on Windows, we are strongly urging you to update to v0.17.0 as soon as
possible. Older Windows versions of Sunshine had a security flaw in which the binary was located in a user-writable
location which is problematic when running as a service or on a multi-user system. Additionally, when running Sunshine
as a service, games and applications were launched as SYSTEM. This could lead to issues with save files and other game
settings. In v0.17.0, games now run under your user account without elevated privileges.
**Breaking**
- (Apps) Removed automatic desktop entry (Re-add by adding an empty application named "Desktop" with no commands, "desktop.png" can be added as the image.)
- (Windows) Improved user upgrade experience (Suggest to manually uninstall existing Sunshine version before this upgrade. Do NOT select to remove everything, if prompted. Make a backup of config files before uninstall.)
- (Windows) Move config files to specific directory (files will be migrated automatically if using Windows installer)
- (Dependencies) Fix npm path (breaking change for package maintainers)
**Added**
- (macOS) Added initial support for arm64 on macOS through Macports portfile
- (Input) Added support for foreign keyboard input
- (Misc) Logs inside the WebUI and log to file
- (UI/Windows) Added an Apply button to configuration page when running as a service
- (Input/Windows) Enable Mouse Keys while streaming for systems with no physical mouse
**Fixed**
- (Video) Improved capture performance
- (Audio) Improved audio bitrate and quality handling
- (Apps/Windows) Fixed PATH environment variable handling
- (Apps/Windows) Use the proper environment variable for the Program Files (x86) folder
- (Service/Windows) Fix SunshineSvc hanging if an error occurs during startup
- (Service/Windows) Spawn Sunshine.exe in a job object, so it is terminated if SunshineSvc.exe dies
- (Video) windows/vram: fix fringing in NV12 colour conversion
- (Apps/Windows) Launch games under the correct user account
- (Video) nvenc, amdvce: rework all user presets/options
- (Network) Generate certificates with unique serial numbers
- (Service/Windows) Graceful termination on shutdown, logoff, and service stop
- (Apps/Windows) Fix launching apps when Sunshine is running as admin
- (Misc) Remove/fix calls to std::abort()
- (Misc) Remove prompt to press enter after Sunshine exits
- (Misc) Make log priority consistent for execution messages
- (Apps) Applications in Moonlight clients are now updated automatically after editing
- (Video/Linux) Fix wayland capture on nvidia
- (Audio) Fix 7.1 surround channel mapping
- (Video) Fix NVENC profile values not applying
- (Network) Fix origin_web_ui_allowed binding
- (Service/Windows) Self terminate/restart service if process hangs for 10 seconds
- (Input/Windows) Fix Windows masked cursor blending with GPU encoders
- (Video) Color conversion fixes and BT.2020 support
**Dependencies**
- Bump ffmpeg from 4.4 to 5.1
- ffmpeg_patches: add amfenc delay/buffering fix
- CBS moved to ffmpeg submodules
- Migrate to upstream Simple-Web-Server submodule
- Bump third-party/TPCircularBuffer from `bce9170` to `8833b3a`
- Bump third-party/moonlight-common-c from `8169a31` to `ef9ad52`
- Bump third-party/miniupnp from `6f848ae` to `207cf44`
- Bump third-party/ViGEmClient from `f719a1d` to `9e842ba`
- Bump bootstrap from 5.0.0 to 5.2.3
- Bump @fortawesome/fontawesome-free from 6.2.0 to 6.2.1
## [0.16.0] - 2022-12-13
**Added**
- Add cover finder
- (Docker) Add arm64 docker image
- (Flatpak) Add installation helper scripts
- (Windows) Add support for Unicode input messages
**Fixed**
- (Linux) Reintroduce Ubuntu 20.04 and 22.04 specific deb packages
- (Linux) Fixed udev and systemd file locations
**Dependencies**
- Bump babel from 2.10.3 to 2.11.0
- Bump sphinx-copybutton from 0.5.0 to 0.5.1
- Bump KSXGitHub/github-actions-deploy-aur from 2.5.0 to 2.6.0
- Use npm for web dependencies (breaking change for third-party package maintainers)
- Update moonlight-common-c
- Use pre-built ffmpeg from LizardByte/build-deps for all sunshine builds (breaking change for third-party package maintainers)
- Bump furo from 2022.9.29 to 2022.12.7
**Misc**
- Misc org level workflow updates
- Fix misc typos in docs
- Fix winget release
## [0.15.0] - 2022-10-30
**Added**
- (Windows) Add firewall rules scripts
- (Windows) Automatically add and remove firewall rules at install/uninstall
- (Windows) Automatically add and remove service at install/uninstall
- (Docker) Official image added
- (Linux) Add aarch64 flatpak package
**Changed**
- (Windows/Linux/MacOS) - Move default config and apps file to assets directory
- (MacOS) Bump boost to 1.80 for macport builds
- (Linux) Remove backup and restore of config files
**Fixed**
- (Linux) - Create sunshine config directory if it doesn't exist
- (Linux) Remove portable home and config directories for AppImage
- (Windows) Include service install and uninstall scripts again
- (Windows) Automatically delete start menu entry upon uninstall
- (Windows) Automatically delete program install directory upon uninstall, with user prompt
- (Linux) Handle the case of no default audio sink
- (Windows/Linux/MacOS) Fix default image paths
- (Linux) Fix CUDA RGBA to NV12 conversion
## [0.14.1] - 2022-08-09
**Added**
- (Linux) Flatpak package added
- (Linux) AUR package automated updates
- (Windows) Winget package automated updates
**Changed**
- (General) Moved repo to @LizardByte GitHub org
- (WebUI) Fixed button spacing on home page
- (WebUI) Added Discord WidgetBot Crate
**Fixed**
- (Linux/Mac) Default config and app files now copied to user home directory
- (Windows) Default config and app files now copied to working directory
## [0.14.0] - 2022-06-15
**Added**
- (Documentation) Added Sphinx documentation available at https://sunshinestream.readthedocs.io/en/latest/
- (Development) Initial support for Localization
- (Linux) Add rpm package as release asset
- (macOS) Add Portfile as release asset
- (Windows) Add DwmFlush() call to improve capture
- (Windows) Add Windows installer
**Fixed**
- (AMD) Fixed hwdevice being destroyed before context
- (Linux) Added missing dependencies to AppImage
- (Linux) Fixed rumble events causing game to freeze
- (Linux) Improved Pulse/Pipewire compatibility
- (Linux) Moved to single deb package
- (macOS) Fixed missing TPCircularBuffer submodule
- (Stream) Properly catch exceptions in stream broadcast handlers
- (Stream/Video) AVPacket fix
## [0.13.0] - 2022-02-27
**Added**
- (macOS) Initial support for macOS (#40)
## [0.12.0] - 2022-02-13
**Added**
- New command line argument `--version`
- Custom png poster support
**Changed**
- Correct software bitrate calculation
- Increase vbv-bufsize to 1/10 of requested bitrate
- Improvements to Web UI
## [0.11.1] - 2021-10-04
**Changed**
- (Linux) Fix search path for config file and assets
## [0.11.0] - 2021-10-04
**Added**
- (Linux) Added support for wlroots based compositors on Wayland.
- (Windows) Added an icon for the executable
**Changed**
- Fixed a bug causing segfault when connecting multiple controllers.
- (Linux) Improved NVENC, it now offloads converting images from RGB to NV12
- (Linux) Fixed a bug causes stuttering
## [0.10.1] - 2021-08-21
**Changed**
- (Linux) Re-enabled KMS
## [0.10.0] - 2021-08-20
**Added**
- Added support for Rumble with gamepads.
- Added support for keyboard shortcuts <--- See the README for details.
- (Windows) A very basic script has been added in Sunshine-Windows\tools <-- This will start Sunshine at boot with the highest privileges which is needed to display the login prompt.
**Changed**
- Some cosmetic changes to the WebUI.
- The first time the WebUI is opened, it will request the creation of a username/password pair from the user.
- Fixed audio crackling introduced in version 0.8.0
- (Linux) VAAPI hardware encoding now works on Intel i7-6700 at least. <-- For the best experience, using ffmpeg version 4.3 or higher is recommended.
- (Windows) Installing from debian package shouldn't overwrite your configuration files anymore. <-- It's recommended that you back up `/etc/sunshine/` before testing this.
## [0.9.0] - 2021-07-11
**Added**
- Added audio encryption
- (Linux) Added basic NVENC support on Linux
- (Windows) The Windows version can now capture the lock screen and the UAC prompt as long as it's run through `PsExec.exe` https://docs.microsoft.com/en-us/sysinternals/downloads/psexec
**Changed**
- Sunshine will now accept expired or not-yet-valid certificates, as long as they are signed properly.
- Fixed compatibility with iOS version of Moonlight
- Drastically reduced chance of being forced to skip error correction due to video frame size
- (Linux) sunshine.service will be installed automatically.
## [0.8.0] - 2021-06-30
**Added**
- Added mDNS support: Moonlight will automatically find Sunshine.
- Added UPnP support. It's off by default.
## [0.7.7] - 2021-06-24
**Added**
- (Linux) Added installation package for Debian
**Changed**
- Fixed incorrect scaling for absolute mouse coordinates when using multiple monitors.
- Fixed incorrect colors when scaling for software encoder
## [0.7.1] - 2021-06-18
**Changed**
- (Linux) Fixed an issue where it was impossible to start sunshine on ubuntu 20.04
## [0.7.0] - 2021-06-16
**Added**
- Added a Web Manager. Accessible through: https://localhost:47990 or https://<ip of your pc>:47990
- (Linux) Added hardware encoding support for AMD on Linux
**Changed**
- (Linux) Moved certificates and saved pairings generated during runtime to .config/sunshine on Linux
## [0.6.0] - 2021-05-26
**Added**
- Added support for surround audio
**Changed**
- Maintain aspect ratio when scaling video
- Fix issue where Sunshine is forced to drop frames when they are too large
## [0.5.0] - 2021-05-13
**Added**
- Added support for absolute mouse coordinates
- (Linux) Added support for streaming specific monitor on Linux
- (Windows) Added support for AMF on Windows
## [0.4.0] - 2020-05-03
**Changed**
- prep-cmd is now optional in apps.json
- Fixed bug causing video artifacts
- Fixed bug preventing Moonlight from closing app on exit
- Fixed bug causing preventing keyboard keys from repeating on latest version of Moonlight
- Fixed bug causing segfault when another session of sunshine was already running
- Fixed bug causing crash when monitor has resolution 1366x768
## [0.3.1] - 2020-04-24
**Changed**
- Fix a memory leak.
## [0.3.0] - 2020-04-23
**Changed**
- Hardware acceleration on NVidia GPU's for Video encoding on Windows
## [0.2.0] - 2020-03-21
**Changed**
- Multicasting is now supported: You can set the maximum simultaneous connections with the configurable option: channels
- Configuration variables can be overwritten on the command line: "name=value" --> it can be useful to set min_log_level=debug without modifying the configuration file
- Switches to make testing the pairing mechanism more convenient has been added, see "sunshine --help" for details
## [0.1.1] - 2020-01-30
**Added**
- (Linux) Added deb package and service for Linux
## [0.1.0] - 2020-01-27
**Added**
- The first official release for Sunshine!
[0.1.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.1.0
[0.1.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.1.1
[0.2.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.2.0
[0.3.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.3.0
[0.3.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.3.1
[0.4.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.4.0
[0.5.0]: https://github.com/LizardByte/Sunshine/releases/tag/0.5.0
[0.6.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.6.0
[0.7.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.7.0
[0.7.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.7.1
[0.7.7]: https://github.com/LizardByte/Sunshine/releases/tag/v0.7.7
[0.8.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.8.0
[0.9.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.9.0
[0.10.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.10.0
[0.10.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.10.1
[0.11.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.11.0
[0.11.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.11.1
[0.12.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.12.0
[0.13.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.13.0
[0.14.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.14.0
[0.14.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.14.1
[0.15.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.15.0
[0.16.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.16.0
[0.17.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.17.0
[0.18.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.18.0
[0.18.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.18.1
[0.18.2]: https://github.com/LizardByte/Sunshine/releases/tag/v0.18.2
[0.18.3]: https://github.com/LizardByte/Sunshine/releases/tag/v0.18.3
[0.18.4]: https://github.com/LizardByte/Sunshine/releases/tag/v0.18.4
[0.19.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.19.0
[0.19.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.19.1
[0.20.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.20.0
[0.21.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.21.0

3
NOTICE
View File

@ -1,3 +0,0 @@
©2018 Valve Corporation. Steam and the Steam logo are trademarks and/or
registered trademarks of Valve Corporation in the U.S. and/or other countries. All
rights reserved.

View File

@ -42,8 +42,6 @@ set(SUNSHINE_TARGET_FILES
src/video.h
src/video_colorspace.cpp
src/video_colorspace.h
src/audio.cpp
src/audio.h
src/platform/common.h
src/move_by_copy.h
src/thread_safe.h

View File

@ -200,7 +200,6 @@ list(APPEND PLATFORM_TARGET_FILES
src/platform/linux/graphics.cpp
src/platform/linux/misc.h
src/platform/linux/misc.cpp
src/platform/linux/audio.cpp
src/platform/linux/x11grab.h
src/platform/linux/wayland.h
third-party/glad/src/egl.c

View File

@ -24,8 +24,6 @@ set(APPLE_PLIST_FILE ${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/Info.plist)
set(SUNSHINE_TRAY 0)
set(PLATFORM_TARGET_FILES
src/platform/macos/av_audio.h
src/platform/macos/av_audio.m
src/platform/macos/av_img_t.h
src/platform/macos/av_video.h
src/platform/macos/av_video.m
@ -35,8 +33,6 @@ set(PLATFORM_TARGET_FILES
src/platform/macos/misc.h
src/platform/macos/nv12_zero_device.cpp
src/platform/macos/nv12_zero_device.h
third-party/TPCircularBuffer/TPCircularBuffer.c
third-party/TPCircularBuffer/TPCircularBuffer.h
${APPLE_PLIST_FILE})
if(SUNSHINE_ENABLE_TRAY)

View File

@ -36,7 +36,6 @@ set(PLATFORM_TARGET_FILES
src/platform/windows/display_base.cpp
src/platform/windows/display_vram.cpp
src/platform/windows/display_ram.cpp
src/platform/windows/audio.cpp
${NVPREFS_FILES})
set(OPENSSL_LIBRARIES

View File

@ -1,22 +0,0 @@
---
"base_path": "."
"base_url": "https://api.crowdin.com" # optional (for Crowdin Enterprise only)
"preserve_hierarchy": false # flatten tree on crowdin
"pull_request_labels": [
"crowdin",
"l10n"
]
"files": [
{
"source": "/locale/*.po",
"translation": "/locale/%two_letters_code%/LC_MESSAGES/%original_file_name%",
"languages_mapping": {
"two_letters_code": {
# map non-two letter codes here, left side is crowdin designation, right side is babel designation
"en-GB": "en_GB",
"en-US": "en_US"
}
}
}
]

File diff suppressed because it is too large Load Diff

View File

@ -1,20 +0,0 @@
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

View File

@ -1,35 +0,0 @@
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)
if "%1" == "" goto help
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
:end
popd

View File

@ -1,8 +0,0 @@
breathe==4.35.0
furo==2023.9.10
m2r2==0.3.3.post2
rstcheck[sphinx]==6.2.0
rstfmt==0.0.14
Sphinx==7.2.6
sphinx-copybutton==0.5.2
sphinx_inline_tabs==2023.4.21

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
.. mdinclude:: ../../../CHANGELOG.md

View File

@ -1 +0,0 @@
.. mdinclude:: ../../../DOCKER_README.md

View File

@ -1,267 +0,0 @@
App Examples
============
Since not all applications behave the same, we decided to create some examples to help you get started adding games
and applications to Sunshine.
.. Attention:: Throughout these examples, any fields not shown are left blank. You can enhance your experience by
adding an image or a log file (via the ``Output`` field).
Common Examples
---------------
Desktop
^^^^^^^
+----------------------+-----------------+
| **Field** | **Value** |
+----------------------+-----------------+
| Application Name | ``Desktop`` |
+----------------------+-----------------+
| Image | ``desktop.png`` |
+----------------------+-----------------+
Steam Big Picture
^^^^^^^^^^^^^^^^^
.. Note:: Steam is launched as a detached command because Steam starts with a process that self updates itself and the original
process is killed. Since the original process ends it will not work as a regular command.
+----------------------+------------------------------------------+----------------------------------+-----------------------------------+
| **Field** | **Linux** | **macOS** | **Windows** |
+----------------------+------------------------------------------+----------------------------------+-----------------------------------+
| Application Name | ``Steam Big Picture`` |
+----------------------+------------------------------------------+----------------------------------+-----------------------------------+
| Detached Commands | ``setsid steam steam://open/bigpicture`` | ``open steam://open/bigpicture`` | ``steam steam://open/bigpicture`` |
+----------------------+------------------------------------------+----------------------------------+-----------------------------------+
| Image | ``steam.png`` |
+----------------------+------------------------------------------+----------------------------------+-----------------------------------+
Epic Game Store game
^^^^^^^^^^^^^^^^^^^^
.. Note:: Using URI method will be the most consistent between various games, but does not allow a game to be launched
using the "Command" and therefore the stream will not end when the game ends.
URI (Epic)
""""""""""
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| **Field** | **Windows** |
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| Application Name | ``Surviving Mars`` |
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| Detached Commands | ``cmd /C "start com.epicgames.launcher://apps/d759128018124dcabb1fbee9bb28e178%3A20729b9176c241f0b617c5723e70ec2d%3AOvenbird?action=launch&silent=true"`` |
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
Binary (Epic w/ working directory)
""""""""""""""""""""""""""""""""""
+----------------------+-----------------------------------------------+
| **Field** | **Windows** |
+----------------------+-----------------------------------------------+
| Application Name | ``Surviving Mars`` |
+----------------------+-----------------------------------------------+
| Command | ``cmd /c "MarsEpic.exe"`` |
+----------------------+-----------------------------------------------+
| Working Directory | ``C:\Program Files\Epic Games\SurvivingMars`` |
+----------------------+-----------------------------------------------+
Binary (Epic w/o working directory)
"""""""""""""""""""""""""""""""""""
+----------------------+--------------------------------------------------------------+
| **Field** | **Windows** |
+----------------------+--------------------------------------------------------------+
| Application Name | ``Surviving Mars`` |
+----------------------+--------------------------------------------------------------+
| Command | ``"C:\Program Files\Epic Games\SurvivingMars\MarsEpic.exe"`` |
+----------------------+--------------------------------------------------------------+
Steam game
^^^^^^^^^^
.. Note:: Using URI method will be the most consistent between various games, but does not allow a game to be launched
using the "Command" and therefore the stream will not end when the game ends.
URI (Steam)
"""""""""""
+----------------------+-------------------------------------------+-----------------------------------+---------------------------------------------+
| **Field** | **Linux** | **macOS** | **Windows** |
+----------------------+-------------------------------------------+-----------------------------------+---------------------------------------------+
| Application Name | ``Surviving Mars`` |
+----------------------+-------------------------------------------+-----------------------------------+---------------------------------------------+
| Detached Commands | ``setsid steam steam://rungameid/464920`` | ``open steam://rungameid/464920`` | ``cmd /C "start steam://rungameid/464920"`` |
+----------------------+-------------------------------------------+-----------------------------------+---------------------------------------------+
Binary (Steam w/ working directory)
"""""""""""""""""""""""""""""""""""
+----------------------+-------------------------+-------------------------+------------------------------------------------------------------+
| **Field** | **Linux** | **macOS** | **Windows** |
+----------------------+-------------------------+-------------------------+------------------------------------------------------------------+
| Application Name | ``Surviving Mars`` |
+----------------------+-------------------------+-------------------------+------------------------------------------------------------------+
| Command | ``MarsSteam`` | ``cmd /c "MarsSteam.exe"`` |
+----------------------+-------------------------+-------------------------+------------------------------------------------------------------+
| Working Directory | ``~/.steam/steam/SteamApps/common/Survivng Mars`` | ``C:\Program Files (x86)\Steam\steamapps\common\Surviving Mars`` |
+----------------------+-------------------------+-------------------------+------------------------------------------------------------------+
Binary (Steam w/o working directory)
""""""""""""""""""""""""""""""""""""
+----------------------+------------------------------+------------------------------+----------------------------------------------------------------------------------+
| **Field** | **Linux** | **macOS** | **Windows** |
+----------------------+------------------------------+------------------------------+----------------------------------------------------------------------------------+
| Application Name | ``Surviving Mars`` |
+----------------------+------------------------------+------------------------------+----------------------------------------------------------------------------------+
| Command | ``~/.steam/steam/SteamApps/common/Survivng Mars/MarsSteam`` | ``"C:\Program Files (x86)\Steam\steamapps\common\Surviving Mars\MarsSteam.exe"`` |
+----------------------+------------------------------+------------------------------+----------------------------------------------------------------------------------+
Linux
-----
Changing Resolution and Refresh Rate (Linux - X11)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+----------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| **Field** | **Value** |
+----------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| Command Preparations | Do: ``sh -c "xrandr --output HDMI-1 --mode \"${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}\" --rate ${SUNSHINE_CLIENT_FPS}"`` |
| +---------------------------------------------------------------------------------------------------------------------------------------+
| | Undo: ``xrandr --output HDMI-1 --mode 3840x2160 --rate 120`` |
+----------------------+---------------------------------------------------------------------------------------------------------------------------------------+
.. hint::
The above only works if the xrandr mode already exists. You will need to create new modes to stream to macOS and iOS devices, since they use non standard resolutions.
You can update the ``Do`` command to this:
.. code-block:: bash
bash -c "${HOME}/scripts/set-custom-res.sh \"${SUNSHINE_CLIENT_WIDTH}\" \"${SUNSHINE_CLIENT_HEIGHT}\" \"${SUNSHINE_CLIENT_FPS}\""
The ``set-custom-res.sh`` will have this content:
.. code-block:: bash
#!/bin/bash
# Get params and set any defaults
width=${1:-1920}
height=${2:-1080}
refresh_rate=${3:-60}
# You may need to adjust the scaling differently so the UI/text isn't too small / big
scale=${4:-0.55}
# Get the name of the active display
display_output=$(xrandr | grep " connected" | awk '{ print $1 }')
# Get the modeline info from the 2nd row in the cvt output
modeline=$(cvt ${width} ${height} ${refresh_rate} | awk 'FNR == 2')
xrandr_mode_str=${modeline//Modeline \"*\" /}
mode_alias="${width}x${height}"
echo "xrandr setting new mode ${mode_alias} ${xrandr_mode_str}"
xrandr --newmode ${mode_alias} ${xrandr_mode_str}
xrandr --addmode ${display_output} ${mode_alias}
# Reset scaling
xrandr --output ${display_output} --scale 1
# Apply new xrandr mode
xrandr --output ${display_output} --primary --mode ${mode_alias} --pos 0x0 --rotate normal --scale ${scale}
# Optional reset your wallpaper to fit to new resolution
# xwallpaper --zoom /path/to/wallpaper.png
Changing Resolution and Refresh Rate (Linux - Wayland)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------+
| **Field** | **Value** |
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------+
| Command Preparations | Do: ``sh -c "wlr-xrandr --output HDMI-1 --mode \"${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}@${SUNSHINE_CLIENT_FPS}Hz\""`` |
| +-------------------------------------------------------------------------------------------------------------------------------------+
| | Undo: ``wlr-xrandr --output HDMI-1 --mode 3840x2160@120Hz`` |
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------+
Changing Resolution and Refresh Rate (Linux - KDE Plasma - Wayland and X11)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+----------------------+----------------------------------------------------------------------------------------------------------------------------------+
| **Field** | **Value** |
+----------------------+----------------------------------------------------------------------------------------------------------------------------------+
| Command Preparations | Do: ``sh -c "kscreen-doctor output.HDMI-A-1.mode.${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}@${SUNSHINE_CLIENT_FPS}"`` |
| +----------------------------------------------------------------------------------------------------------------------------------+
| | Undo: ``kscreen-doctor output.HDMI-A-1.mode.3840x2160@120`` |
+----------------------+----------------------------------------------------------------------------------------------------------------------------------+
Flatpak
^^^^^^^
.. Attention:: Because Flatpak packages run in a sandboxed environment and do not normally have access to the host,
the Flatpak of Sunshine requires commands to be prefixed with ``flatpak-spawn --host``.
macOS
-----
Changing Resolution and Refresh Rate (macOS)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. Note:: This example uses the `displayplacer` tool to change the resolution.
This tool can be installed following instructions in their
`GitHub repository <https://github.com/jakehilborn/displayplacer>`__.
+----------------------+-----------------------------------------------------------------------------------------------+
| **Field** | **Value** |
+----------------------+-----------------------------------------------------------------------------------------------+
| Command Preparations | Do: ``displayplacer "id:<screenId> res:1920x1080 hz:60 scaling:on origin:(0,0) degree:0"`` |
| +-----------------------------------------------------------------------------------------------+
| | Undo: ``displayplacer "id:<screenId> res:3840x2160 hz:120 scaling:on origin:(0,0) degree:0"`` |
+----------------------+-----------------------------------------------------------------------------------------------+
Windows
-------
Changing Resolution and Refresh Rate (Windows)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. Note:: This example uses the `QRes` tool to change the resolution and refresh rate.
This tool can be downloaded from their `SourceForge repository <https://sourceforge.net/projects/qres/>`__.
+----------------------+------------------------------------------------------------------------------------------------------------------+
| **Field** | **Value** |
+----------------------+------------------------------------------------------------------------------------------------------------------+
| Command Preparations | Do: ``cmd /C FullPath\qres.exe /x:%SUNSHINE_CLIENT_WIDTH% /y:%SUNSHINE_CLIENT_HEIGHT% /r:%SUNSHINE_CLIENT_FPS%`` |
| +------------------------------------------------------------------------------------------------------------------+
| | Undo: ``cmd /C FullPath\qres.exe /x:3840 /y:2160 /r:120`` |
+----------------------+------------------------------------------------------------------------------------------------------------------+
Elevating Commands (Windows)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you've installed Sunshine as a service (default), you can now specify if a command should be elevated with adminsitrative privileges.
Simply enable the elevated option in the WEB UI, or add it to the JSON configuration.
This is an option for both prep-cmd and regular commands and will launch the process with the current user without a UAC prompt.
.. Note:: It's important to write the values "true" and "false" as string values, not as the typical true/false values in most JSON.
**Example**
.. code-block:: json
{
"name": "Game With AntiCheat that Requires Admin",
"output": "",
"cmd": "ping 127.0.0.1",
"exclude-global-prep-cmd": "false",
"elevated": "true",
"prep-cmd": [
{
"do": "powershell.exe -command \"Start-Streaming\"",
"undo": "powershell.exe -command \"Stop-Streaming\"",
"elevated": "false"
}
],
"image-path": ""
}

View File

@ -1,10 +0,0 @@
Guides
======
Collection of guides written by the community!
.. toctree::
:maxdepth: 2
app_examples
linux/linux

View File

@ -1,526 +0,0 @@
Remote SSH Headless Setup
=========================
.. csv-table:: Remote SSH Headless Setup
:header-rows: 0
:stub-columns: 1
Author, `Eric Dong <https://github.com/e-dong>`__
Difficulty, Intermediate
This is a guide to setup remote SSH into host to startup X server and sunshine without physical login and dummy plug.
The virtual display is accelerated by the NVidia GPU using the TwinView configuration.
.. attention::
This guide is specific for Xorg and NVidia GPUs. I start the X server using the ``startx`` command.
I also only tested this on an Artix runit init system on LAN.
I didn't have to do anything special with pulseaudio (pipewire untested).
Keep your monitors plugged in until the `Checkpoint`_ step
.. tip::
Prior to editing any system configurations, you should make a copy of the original file.
This will allow you to use it for reference or revert your changes easily.
The Big Picture
---------------
Once you are done, you will need to perform these 3 steps:
#. Turn on the host machine
#. Start sunshine on remote host with a script that:
- Edits permissions of ``/dev/uinput`` (added sudo config to execute script with no password prompt)
- Starts X server with ``startx`` on virtual display
- Starts ``Sunshine``
#. Startup Moonlight on the client of interest and connect to host
.. hint::
As an alternative to SSH...
**Step 2** can be replaced with autologin and starting sunshine as a service or putting
``sunshine &`` in your ``.xinitrc`` file if you start your X server with ``startx``.
In this case, the workaround for ``/dev/uinput`` permissions is not needed because the udev rule would be triggered
for "physical" login. See :ref:`Linux Setup <about/usage:linux>`. I personally think autologin compromises the
security of the PC, so I went with the remote SSH route. I use the PC more than for gaming, so I don't need a
virtual display everytime I turn on the PC (E.g running updates, config changes, file/media server).
First we will setup the host and then the SSH Client (Which may not be the same as the machine running the
moonlight client)
Host Setup
----------
We will be setting up:
#. `Static IP Setup`_
#. `SSH Server Setup`_
#. `Virtual Display Setup`_
#. `Uinput Permissions Workaround`_
#. `Stream Launcher Script`_
Static IP Setup
^^^^^^^^^^^^^^^
Setup static IP Address for host. For LAN connections you can use DHCP reservation within your assigned range.
e.g. 192.168.x.x. This will allow you to ssh to the host consistently, so the assigned IP address does
not change. It is preferred to set this through your router config.
SSH Server Setup
^^^^^^^^^^^^^^^^
.. note::
Most distros have OpenSSH already installed. If it is not present, install OpenSSH using your package manager.
.. tab:: Debian/Ubuntu
.. code-block:: bash
sudo apt update
sudo apt install openssh-server
.. tab:: Arch/Artix
.. code-block:: bash
sudo pacman -S openssh
# Install openssh-<other_init> if you are not using SystemD
# e.g. sudo pacman -S openssh-runit
.. tab:: Alpine
.. code-block:: bash
sudo apk update
sudo apk add openssh
.. tab:: CentOS/RHEL/Fedora
**CentOS/RHEL 7**
.. code-block:: bash
sudo yum install openssh-server
**CentOS/Fedora/RHEL 8**
.. code-block:: bash
sudo dnf install openssh-server
Next make sure the OpenSSH daemon is enabled to run when the system starts.
.. tab:: SystemD
.. code-block:: bash
sudo systemctl enable sshd.service
sudo systemctl start sshd.service # Starts the service now
sudo systemctl status sshd.service # See if the service is running
.. tab:: Runit
.. code-block:: bash
sudo ln -s /etc/runit/sv/sshd /run/runit/service # Enables the OpenSSH daemon to run when system starts
sudo sv start sshd # Starts the service now
sudo sv status sshd # See if the service is running
.. tab:: OpenRC
.. code-block:: bash
rc-update add sshd # Enables service
rc-status # List services to verify sshd is enabled
rc-service sshd start # Starts the service now
**Disabling PAM in sshd**
I noticed when the ssh session is disconnected for any reason, ``pulseaudio`` would disconnect.
This is due to PAM handling sessions. When running ``dmesg``, I noticed ``elogind`` would say removed user session.
In this `Gentoo Forums post <https://forums.gentoo.org/viewtopic-t-1090186-start-0.html>`__,
someone had a similar issue. Starting the X server in the background and exiting out of the console would cause your
session to be removed.
.. caution::
According to this `article <https://devicetests.com/ssh-usepam-security-session-status>`__
disabling PAM increases security, but reduces certain functionality in terms of session handling.
*Do so at your own risk!*
Edit the ``sshd_config`` file with the following to disable PAM.
.. code-block:: text
usePAM no
After making changes to the ``sshd_config``, restart the sshd service for changes to take effect.
.. tip::
Run the command to check the ssh configuration prior to restarting the sshd service.
.. code-block:: bash
sudo sshd -t -f /etc/ssh/sshd_config
An incorrect configuration will prevent the sshd service from starting, which might mean
losing SSH access to the server.
.. tab:: SystemD
.. code-block:: bash
sudo systemctl restart sshd.service
.. tab:: Runit
.. code-block:: bash
sudo sv restart sshd
.. tab:: OpenRC
.. code-block:: bash
sudo rc-service sshd restart
Virtual Display Setup
^^^^^^^^^^^^^^^^^^^^^
As an alternative to a dummy dongle, you can use this config to create a virtual display.
.. important::
This is only available for NVidia GPUs using Xorg.
.. hint::
Use ``xrandr`` to see name of your active display output. Usually it starts with ``DP`` or ``HDMI``. For me, it is ``DP-0``.
Put this name for the ``ConnectedMonitor`` option under the ``Device`` section.
.. code-block:: bash
xrandr | grep " connected" | awk '{ print $1 }'
.. code-block:: xorg.conf
Section "ServerLayout"
Identifier "TwinLayout"
Screen 0 "metaScreen" 0 0
EndSection
Section "Monitor"
Identifier "Monitor0"
Option "Enable" "true"
EndSection
Section "Device"
Identifier "Card0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
Option "MetaModes" "1920x1080"
Option "ConnectedMonitor" "DP-0"
Option "ModeValidation" "NoDFPNativeResolutionCheck,NoVirtualSizeCheck,NoMaxPClkCheck,NoHorizSyncCheck,NoVertRefreshCheck,NoWidthAlignmentCheck"
EndSection
Section "Screen"
Identifier "metaScreen"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "True"
SubSection "Display"
Modes "1920x1080"
EndSubSection
EndSection
.. note::
The ``ConnectedMonitor`` tricks the GPU into thinking a monitor is connected,
even if there is none actually connected! This allows a virtual display to be created that is accelerated with
your GPU! The ``ModeValidation`` option disables valid resolution checks, so you can choose any
resolution on the host!
**References**
- `issue comment on virtual-display-linux
<https://github.com/dianariyanto/virtual-display-linux/issues/9#issuecomment-786389065>`__
- `Nvidia Documentation on Configuring TwinView
<https://download.nvidia.com/XFree86/Linux-x86/270.29/README/configtwinview.html>`__
- `Arch Wiki Nvidia#TwinView <https://wiki.archlinux.org/title/NVIDIA#TwinView>`__
- `Unix Stack Exchange - How to add virtual display monitor with Nvidia proprietary driver
<https://unix.stackexchange.com/questions/559918/how-to-add-virtual-monitor-with-nvidia-proprietary-driver>`__
Uinput Permissions Workaround
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
**Steps**
We can use ``chown`` to change the permissions from a script. Since this requires ``sudo``,
we will need to update the sudo configuration to execute this without being prompted for a password.
#. Create a ``sunshine-setup.sh`` script to update permissions on ``/dev/uinput``. Since we aren't logged into the host,
the udev rule doesn't apply.
#. Update user sudo configuration ``/etc/sudoers.d/<user>`` to allow the ``sunshine-setup.sh``
script to be executed with ``sudo``.
.. note::
After I setup the :ref:`udev rule <about/usage:linux>` to get access to ``/dev/uinput``,
I noticed when I sshed into the host without physical login, the ACL permissions on ``/dev/uinput`` were not changed.
So I asked `reddit
<https://www.reddit.com/r/linux_gaming/comments/14htuzv/does_sshing_into_host_trigger_udev_rule_on_the/>`__.
I discovered that SSH sessions are not the same as a physical login.
I suppose it's not possible for SSH to trigger a udev rule or create a physical login session.
**Setup Script**
This script will take care of any precondtions prior to starting up sunshine.
Run the following to create a script named something like ``sunshine-setup.sh``:
.. code-block:: bash
echo "chown $(id -un):$(id -gn) /dev/uinput" > sunshine-setup.sh &&\
chmod +x sunshine-setup.sh
(**Optional**) To Ensure ethernet is being used for streaming,
you can block WiFi with ``rfkill``.
Run this command to append the rfkill block command to the script:
.. code-block:: bash
echo "rfkill block $(rfkill list | grep "Wireless LAN" \
| sed 's/^\([[:digit:]]\).*/\1/')" >> sunshine-setup.sh
**Sudo Configuration**
We will manually change the permissions of ``/dev/uinput`` using ``chown``.
You need to use ``sudo`` to make this change, so add/update the entry in ``/etc/sudoers.d/${USER}``
.. danger::
Do so at your own risk! It is more secure to give sudo and no password prompt to a single script,
than a generic executable like chown.
.. warning::
Be very careful of messing this config up. If you make a typo, *YOU LOSE THE ABILITY TO USE SUDO*.
Fortunately, your system is not borked, you will need to login as root to fix the config.
You may want to setup a backup user / SSH into the host as root to fix the config if this happens.
Otherwise you will need to plug your machine back into a monitor and login as root to fix this.
To enable root login over SSH edit your SSHD config, and add ``PermitRootLogin yes``, and restart the SSH server.
#. First make a backup of your ``/etc/sudoers.d/${USER}`` file.
.. code-block:: bash
sudo cp /etc/sudoers.d/${USER} /etc/sudoers.d/${USER}.backup
#. ``cd`` to the parent dir of the ``sunshine-setup.sh`` script.
#. Execute the following to update your sudoer config file.
.. code-block:: bash
echo "${USER} ALL=(ALL:ALL) ALL, NOPASSWD: $(pwd)/sunshine-setup.sh" \
| sudo tee /etc/sudoers.d/${USER}
These changes allow the script to use sudo without being prompted with a password.
e.g. ``sudo $(pwd)/sunshine-setup.sh``
Stream Launcher Script
^^^^^^^^^^^^^^^^^^^^^^
This is the main entrypoint script that will run the ``sunshine-setup.sh`` script, start up X server, and Sunshine.
The client will call this script that runs on the host via ssh.
**Sunshine Startup Script**
This guide will refer to this script as ``~/scripts/sunshine.sh``.
The setup script will be referred as ``~/scripts/sunshine-setup.sh``
.. code-block:: bash
#!/bin/bash
export DISPLAY=:0
# Check existing X server
ps -e | grep X >/dev/null
[[ ${?} -ne 0 ]] && {
echo "Starting X server"
startx &>/dev/null &
[[ ${?} -eq 0 ]] && {
echo "X server started successfully"
} || echo "X server failed to start"
} || echo "X server already running"
# Check if sunshine is already running
ps -e | grep -e .*sunshine$ >/dev/null
[[ ${?} -ne 0 ]] && {
sudo ~/scripts/sunshine-setup.sh
echo "Starting Sunshine!"
sunshine > /dev/null &
[[ ${?} -eq 0 ]] && {
echo "Sunshine started successfully"
} || echo "Sunshine failed to start"
} || echo "Sunshine is already running"
# Add any other Programs that you want to startup automatically
# e.g.
# steam &> /dev/null &
# firefox &> /dev/null &
# kdeconnect-app &> /dev/null &
----
SSH Client Setup
----------------
We will be setting up:
#. `SSH Key Authentication Setup`_
#. `SSH Client Script (Optional)`_
SSH Key Authentication Setup
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. Setup your SSH keys with ``ssh-keygen`` and use ``ssh-copy-id`` to authorize remote login to your host.
Run ``ssh <user>@<ip_address>`` to login to your host.
SSH keys automate login so you don't need to input your password!
#. Optionally setup a ``~/.ssh/config`` file to simplify the ``ssh`` command
.. code-block:: text
Host <some_alias>
Hostname <ip_address>
User <username>
IdentityFile ~/.ssh/<your_private_key>
Now you can use ``ssh <some_alias>``.
``ssh <some_alias> <commands/script>`` will execute the command or script on the remote host.
Checkpoint
^^^^^^^^^^
As a sanity check, let's make sure your setup is working so far!
**Test Steps**
With your monitor still plugged into your Sunshine host PC:
#. ``ssh <alias>``
#. ``~/scripts/sunshine.sh``
#. ``nvidia-smi``
You should see the sunshine and Xorg processing running:
.. code-block:: bash
nvidia-smi
*Output:*
.. code-block:: console
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.104.05 Driver Version: 535.104.05 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce RTX 3070 Off | 00000000:01:00.0 On | N/A |
| 30% 46C P2 45W / 220W | 549MiB / 8192MiB | 2% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| 0 N/A N/A 1393 G /usr/lib/Xorg 86MiB |
| 0 N/A N/A 1440 C+G sunshine 293MiB |
+---------------------------------------------------------------------------------------+
#. Check ``/dev/uinput`` permissions
.. code-block:: bash
ls -l /dev/uinput
*Output:*
.. code-block:: console
crw------- 1 <user> <primary_group> 10, 223 Aug 29 17:31 /dev/uinput
#. Connect to Sunshine host from a moonlight client
Now kill X and sunshine by running ``pkill X`` on the host,
unplug your monitors from your GPU, and repeat steps 1 - 5.
You should get the same result.
With this setup you don't need to modify the Xorg config regardless if monitors are plugged in or not.
.. code-block:: bash
pkill X
SSH Client Script (Optional)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
At this point you have a working setup! For convenience I created this bash script to automate the
startup of the X server and Sunshine on the host.
This can be run on Unix systems, or on Windows using the ``git-bash`` or any bash shell.
For Android/iOS you can install Linux emulators, e.g. ``Userland`` for Android and ``ISH`` for iOS.
The neat part is that you can execute one script to launch Sunshine from your phone or tablet!
.. code-block:: bash
#!/bin/bash
ssh_args="<user>@192.168.X.X" # Or use alias set in ~/.ssh/config
check_ssh(){
result=1
# Note this checks infinitely, you could update this to have a max # of retries
while [[ $result -ne 0 ]]
do
echo "checking host..."
ssh $ssh_args "exit 0" 2>/dev/null
result=$?
[[ $result -ne 0 ]] && {
echo "Failed to ssh to $ssh_args, with exit code $result"
}
sleep 3
done
echo "Host is ready for streaming!"
}
start_stream(){
echo "Starting sunshine server on host..."
echo "Start moonlight on your client of choice"
# -f runs ssh in the background
ssh -f $ssh_args "~/scripts/sunshine.sh &"
}
check_ssh
start_stream
exit_code=${?}
sleep 3
exit ${exit_code}
Next Steps
----------
Congrats you can now stream your desktop headless! When trying this the first time,
keep your monitors close by incase something isn't working right.
If you have any feedback and any suggestions, feel free to make a post on Discord!
.. seealso::
Now that you have a virtual display, you may want to automate changing the resolution
and refresh rate prior to connecting to an app. See :ref:`Changing Resolution and
Refresh Rate <about/guides/app_examples:linux>` for more information.

View File

@ -1,9 +0,0 @@
Linux
======
Collection of Sunshine Linux host guides.
.. toctree::
:maxdepth: 1
headless_ssh

View File

@ -1,258 +0,0 @@
Installation
============
The recommended method for running Sunshine is to use the `binaries`_ bundled with the `latest release`_.
.. Attention:: Additional setup is required after installation. See
:ref:`Setup <about/usage:setup>`.
Binaries
--------
Binaries of Sunshine are created for each release. They are available for Linux, macOS, and Windows.
Binaries can be found in the `latest release`_.
.. Tip:: Some third party packages also exist. See
:ref:`Third Party Packages <about/third_party_packages:third party packages>`.
Docker
------
Docker images are available on `Dockerhub.io`_ and `ghcr.io`_.
See :ref:`Docker <about/docker:docker>` for additional information.
Linux
-----
Follow the instructions for your preferred package type below.
**CUDA Compatibility**
CUDA is used for NVFBC capture.
.. Tip:: See `CUDA GPUS <https://developer.nvidia.com/cuda-gpus>`__ to cross reference Compute Capability to your GPU.
.. table::
:widths: auto
=========================================== ============== ============== ================================
Package CUDA Version Min Driver CUDA Compute Capabilities
=========================================== ============== ============== ================================
PKGBUILD User dependent User dependent User dependent
sunshine.AppImage 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90
sunshine.pkg.tar.zst 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90
sunshine_{arch}.flatpak 12.0.0 525.60.13 50;52;60;61;62;70;75;80;86;90
sunshine-debian-bookworm-{arch}.deb 12.0.0 525.60.13 50;52;60;61;62;70;75;80;86;90
sunshine-debian-bullseye-{arch}.deb 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90
sunshine-fedora-37-{arch}.rpm 12.0.0 525.60.13 50;52;60;61;62;70;75;80;86;90
sunshine-fedora-38-{arch}.rpm unavailable unavailable none
sunshine-ubuntu-20.04-{arch}.deb 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90
sunshine-ubuntu-22.04-{arch}.deb 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90
=========================================== ============== ============== ================================
AppImage
^^^^^^^^
According to AppImageLint the supported distro matrix of the AppImage is below.
- [✖] Debian oldstable (buster)
- [✔] Debian stable (bullseye)
- [✔] Debian testing (bookworm)
- [✔] Debian unstable (sid)
- [✔] Ubuntu kinetic
- [✔] Ubuntu jammy
- [✔] Ubuntu focal
- [✖] Ubuntu bionic
- [✖] Ubuntu xenial
- [✖] Ubuntu trusty
- [✖] CentOS 7
#. Download ``sunshine.AppImage`` to your home directory.
#. Open terminal and run the following code.
.. code-block:: bash
./sunshine.AppImage --install
Start:
.. code-block:: bash
./sunshine.AppImage --install && ./sunshine.AppImage
Uninstall:
.. code-block:: bash
./sunshine.AppImage --remove
Archlinux PKGBUILD
^^^^^^^^^^^^^^^^^^
#. Open terminal and run the following code.
.. code-block:: bash
wget https://github.com/LizardByte/Sunshine/releases/latest/download/PKGBUILD
makepkg -fi
Uninstall:
.. code-block:: bash
pacman -R sunshine
Archlinux pkg
^^^^^^^^^^^^^
#. Open terminal and run the following code.
.. code-block:: bash
wget https://github.com/LizardByte/Sunshine/releases/latest/download/sunshine.pkg.tar.zst
pacman -U --noconfirm sunshine.pkg.tar.zst
Uninstall:
.. code-block:: bash
pacman -R sunshine
Debian Package
^^^^^^^^^^^^^^
#. Download ``sunshine-{ubuntu-version}.deb`` and run the following code.
.. code-block:: bash
sudo apt install -f ./sunshine-{ubuntu-version}.deb
.. Note:: The ``{ubuntu-version}`` is the version of ubuntu we built the package on. If you are not using Ubuntu and
have an issue with one package, you can try another.
.. Tip:: You can double click the deb file to see details about the package and begin installation.
Uninstall:
.. code-block:: bash
sudo apt remove sunshine
Flatpak Package
^^^^^^^^^^^^^^^
#. Install `Flatpak <https://flatpak.org/setup/>`__ as required.
#. Download ``sunshine_{arch}.flatpak`` and run the following code.
.. Note:: Be sure to replace ``{arch}`` with the architecture for your operating system.
System level (recommended)
.. code-block:: bash
flatpak install --system ./sunshine_{arch}.flatpak
User level
.. code-block:: bash
flatpak install --user ./sunshine_{arch}.flatpak
Additional installation (required)
.. code-block:: bash
flatpak run --command=additional-install.sh dev.lizardbyte.sunshine
Start:
X11 and NVFBC capture (X11 Only)
.. code-block:: bash
flatpak run dev.lizardbyte.sunshine
KMS capture (Wayland & X11)
.. code-block:: bash
sudo -i PULSE_SERVER=unix:$(pactl info | awk '/Server String/{print$3}') flatpak run dev.lizardbyte.sunshine
Uninstall:
.. code-block:: bash
flatpak run --command=remove-additional-install.sh dev.lizardbyte.sunshine
flatpak uninstall --delete-data dev.lizardbyte.sunshine
RPM Package
^^^^^^^^^^^
#. Add `rpmfusion` repositories by running the following code.
.. code-block:: bash
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
#. Download ``sunshine.rpm`` and run the following code.
.. code-block:: bash
sudo dnf install ./sunshine.rpm
.. Tip:: You can double click the rpm file to see details about the package and begin installation.
Uninstall:
.. code-block:: bash
sudo dnf remove sunshine
macOS
-----
Sunshine on macOS is experimental. Gamepads do not work. Other features may not work as expected.
dmg
^^^
.. Warning:: The `dmg` does not include runtime dependencies.
#. Download the ``sunshine.dmg`` file and install it.
Uninstall:
.. code-block:: bash
cd /etc/sunshine/assets
uninstall_pkg.sh
Portfile
^^^^^^^^
#. Install `MacPorts <https://www.macports.org>`__
#. Update the Macports sources.
.. code-block:: bash
sudo nano /opt/local/etc/macports/sources.conf
Add this line, replacing your username, below the line that starts with ``rsync``.
``file:///Users/<username>/ports``
``Ctrl+x``, then ``Y`` to exit and save changes.
#. Download the ``Portfile`` to ``~/Downloads`` and run the following code.
.. code-block:: bash
mkdir -p ~/ports/multimedia/sunshine
mv ~/Downloads/Portfile ~/ports/multimedia/sunshine/
cd ~/ports
portindex
sudo port install sunshine
#. The first time you start Sunshine, you will be asked to grant access to screen recording and your microphone.
Uninstall:
.. code-block:: bash
sudo port uninstall sunshine
Windows
-------
Installer
^^^^^^^^^
#. Download and install ``sunshine-windows-installer.exe``
.. Attention:: You should carefully select or unselect the options you want to install. Do not blindly install or enable
features.
To uninstall, find Sunshine in the list `here <ms-settings:installed-apps>`__ and select "Uninstall" from the overflow
menu. Different versions of Windows may provide slightly different steps for uninstall.
Standalone
^^^^^^^^^^
#. Download and extract ``sunshine-windows-portable.zip``
To uninstall, delete the extracted directory which contains the ``sunshine.exe`` file.
.. _latest release: https://github.com/LizardByte/Sunshine/releases/latest
.. _Dockerhub.io: https://hub.docker.com/repository/docker/lizardbyte/sunshine
.. _ghcr.io: https://github.com/orgs/LizardByte/packages?repo_name=sunshine

View File

@ -1 +0,0 @@
.. include:: ../../../README.rst

File diff suppressed because one or more lines are too long

View File

@ -1,314 +0,0 @@
Usage
=====
#. See the `setup`_ section for your specific OS.
#. If you did not install the service, then start sunshine with the following command, unless a start command is listed
in the specified package :ref:`installation <about/installation:installation>` instructions.
.. Note:: A service is a process that runs in the background. Running multiple instances of Sunshine is not
advised.
**Basic usage**
.. code-block:: bash
sunshine
**Specify config file**
.. code-block:: bash
sunshine <directory of conf file>/sunshine.conf
.. Note:: You do not need to specify a config file. If no config file is entered the default location will be used.
.. Attention:: The configuration file specified will be created if it doesn't exist.
**Start Sunshine over SSH (Linux/X11)**
Assuming you are already logged into the host, you can use this command
.. code-block:: bash
ssh <user>@<ip_address> 'export DISPLAY=:0; sunshine'
If you are logged into the host with only a tty (teletypewriter), you can use ``startx`` to start the
X server prior to executing sunshine.
You nay need to add ``sleep`` between ``startx`` and ``sunshine`` to allow more time for the display to be ready.
.. code-block:: bash
ssh <user>@<ip_address> 'startx &; export DISPLAY=:0; sunshine'
.. tip:: You could also utilize the ``~/.bash_profile`` or ``~/.bashrc`` files to setup the ``DISPLAY``
variable.
.. seealso::
See :ref:`Remote SSH Headless Setup
<about/guides/linux/headless_ssh:Remote SSH Headless Setup>` on
how to setup a headless streaming server without autologin and dummy plugs (X11 + NVidia GPUs)
#. Configure Sunshine in the web ui
The web ui is available on `https://localhost:47990 <https://localhost:47990>`__ by default. You may replace
`localhost` with your internal ip address.
.. Attention:: Ignore any warning given by your browser about "insecure website". This is due to the SSL certificate
being self signed.
.. Caution:: If running for the first time, make sure to note the username and password that you created.
**Add games and applications.**
This can be configured in the web ui.
.. Note:: Additionally, apps can be configured manually. `src_assets/<os>/config/apps.json` is an example of a
list of applications that are started just before running a stream. This is the directory within the GitHub
repo.
#. In Moonlight, you may need to add the PC manually.
#. When Moonlight request you insert the correct pin on sunshine:
- Login to the web ui
- Go to "PIN" in the Navbar
- Type in your PIN and press Enter, you should get a Success Message
- In Moonlight, select one of the Applications listed
Network
-------
The Sunshine user interface will be available on port 47990 by default.
.. Warning:: Exposing ports to the internet can be dangerous. Do this at your own risk.
Arguments
---------
To get a list of available arguments run the following:
.. code-block:: bash
sunshine --help
Setup
-----
Linux
^^^^^
The `deb`, `rpm`, `Flatpak` and `AppImage` packages handle these steps automatically. Third party packages may not.
Sunshine needs access to `uinput` to create mouse and gamepad events.
#. Create `udev` rules.
.. code-block:: bash
echo 'KERNEL=="uinput", SUBSYSTEM=="misc", OPTIONS+="static_node=uinput", TAG+="uaccess"' | \
sudo tee /etc/udev/rules.d/85-sunshine.rules
#. Optionally, configure autostart service
- filename: ``~/.config/systemd/user/sunshine.service``
- contents:
.. code-block:: cfg
[Unit]
Description=Sunshine self-hosted game stream host for Moonlight.
StartLimitIntervalSec=500
StartLimitBurst=5
[Service]
ExecStart=<see table>
Restart=on-failure
RestartSec=5s
#Flatpak Only
#ExecStop=flatpak kill dev.lizardbyte.sunshine
[Install]
WantedBy=graphical-session.target
.. table::
:widths: auto
======== ============================================== ===============
package ExecStart Auto Configured
======== ============================================== ===============
aur /usr/bin/sunshine ✔
deb /usr/bin/sunshine ✔
rpm /usr/bin/sunshine ✔
AppImage ~/sunshine.AppImage ✔
Flatpak flatpak run dev.lizardbyte.sunshine ✔
======== ============================================== ===============
**Start once**
.. code-block:: bash
systemctl --user start sunshine
**Start on boot**
.. code-block:: bash
systemctl --user enable sunshine
#. Additional Setup for KMS
.. Note:: ``cap_sys_admin`` may as well be root, except you don't need to be root to run it. It is necessary to
allow Sunshine to use KMS.
**Enable**
.. code-block:: bash
sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))
**Disable (for Xorg/X11)**
.. code-block:: bash
sudo setcap -r $(readlink -f $(which sunshine))
#. Reboot
.. code-block:: bash
sudo reboot now
macOS
^^^^^
Sunshine can only access microphones on macOS due to system limitations. To stream system audio use
`Soundflower <https://github.com/mattingalls/Soundflower>`__ or
`BlackHole <https://github.com/ExistentialAudio/BlackHole>`__.
.. Note:: Command Keys are not forwarded by Moonlight. Right Option-Key is mapped to CMD-Key.
.. Caution:: Gamepads are not currently supported.
Configure autostart service
**MacPorts**
.. code-block:: bash
sudo port load Sunshine
Windows
^^^^^^^
For gamepad support, install `Nefarius Virtual Gamepad <https://github.com/nefarius/ViGEmBus/releases/latest>`__
Sunshine firewall
**Add rule**
.. code-block:: batch
cd /d "C:\Program Files\Sunshine\scripts"
add-firewall-rule.bat
**Remove rule**
.. code-block:: batch
cd /d "C:\Program Files\Sunshine\scripts"
remove-firewall-rule.bat
Sunshine service
**Enable**
.. code-block:: batch
cd /d "C:\Program Files\Sunshine\scripts"
install-service.bat
**Disable**
.. code-block:: batch
cd /d "C:\Program Files\Sunshine\scripts"
uninstall-service.bat
Shortcuts
---------
All shortcuts start with ``CTRL + ALT + SHIFT``, just like Moonlight
- ``CTRL + ALT + SHIFT + N`` - Hide/Unhide the cursor (This may be useful for Remote Desktop Mode for Moonlight)
- ``CTRL + ALT + SHIFT + F1/F12`` - Switch to different monitor for Streaming
Application List
----------------
- Applications should be configured via the web UI.
- A basic understanding of working directories and commands is required.
- You can use Environment variables in place of values
- ``$(HOME)`` will be replaced by the value of ``$HOME``
- ``$$`` will be replaced by ``$``, e.g. ``$$(HOME)`` will be become ``$(HOME)``
- ``env`` - Adds or overwrites Environment variables for the commands/applications run by Sunshine
- ``"Variable name":"Variable value"``
- ``apps`` - The list of applications
- Advanced users may want to edit the application list manually. The format is ``json``.
- Example ``json`` application:
.. code-block:: json
{
"cmd": "command to open app",
"detached": [
"some-command",
"another-command"
],
"image-path": "/full-path/to/png-image",
"name": "An App",
"output": "/full-path/to/command-log-file",
"prep-cmd": [
{
"do": "some-command",
"undo": "undo-that-command"
}
],
"working-dir": "/full-path/to/working-directory"
}
- ``cmd`` - The main application
- ``detached`` - A list of commands to be run and forgotten about
- If not specified, a process is started that sleeps indefinitely
- ``image-path`` - The full path to the cover art image to use.
- ``name`` - The name of the application/game
- ``output`` - The file where the output of the command is stored
- ``auto-detach`` - Specifies whether the app should be treated as detached if it exits quickly
- ``prep-cmd`` - A list of commands to be run before/after the application
- If any of the prep-commands fail, starting the application is aborted
- ``do`` - Run before the application
- If it fails, all ``undo`` commands of the previously succeeded ``do`` commands are run
- ``undo`` - Run after the application has terminated
- Failures of ``undo`` commands are ignored
- ``working-dir`` - The working directory to use. If not specified, Sunshine will use the application directory.
- For more examples see :ref:`app examples <about/guides/app_examples:app examples>`.
Considerations
--------------
- On Windows, Sunshine uses the Desktop Duplication API which only supports capturing from the GPU used for display.
If you want to capture and encode on the eGPU, connect a display or HDMI dummy display dongle to it and run the games
on that display.
- When an application is started, if there is an application already running, it will be terminated.
- When the application has been shutdown, the stream shuts down as well.
- For example, if you attempt to run ``steam`` as a ``cmd`` instead of ``detached`` the stream will immediately fail.
This is due to the method in which the steam process is executed. Other applications may behave similarly.
- The "Desktop" app works the same as any other application except it has no commands. It does not start an application,
instead it simply starts a stream. If you removed it and would like to get it back, just add a new application with
the name "Desktop" and "desktop.png" as the image path.
- For the Linux flatpak you must prepend commands with ``flatpak-spawn --host``.
HDR Support
-----------
Streaming HDR content is supported for Windows hosts with NVIDIA, AMD, or Intel GPUs that support encoding HEVC Main 10.
You must have an HDR-capable display or EDID emulator dongle connected to your host PC to activate HDR in Windows.
- Ensure you enable the HDR option in your Moonlight client settings, otherwise the stream will be SDR.
- A good HDR experience relies on proper HDR display calibration both in Windows and in game. HDR calibration can differ significantly between client and host displays.
- We recommend calibrating the display by streaming the Windows HDR Calibration app to your client device and saving an HDR calibration profile to use while streaming.
- You may also need to tune the brightness slider or HDR calibration options in game to the different HDR brightness capabilities of your client's display.
- Older games that use NVIDIA-specific NVAPI HDR rather than native Windows 10 OS HDR support may not display in HDR.
- Some GPUs can produce lower image quality or encoding performance when streaming in HDR compared to SDR.
.. seealso::
`Arch wiki on HDR Support for Linux <https://wiki.archlinux.org/title/HDR_monitor_support>`__ and
`Reddit Guide for HDR Support for AMD GPUs
<https://www.reddit.com/r/linux_gaming/comments/10m2gyx/guide_alpha_test_hdr_on_linux>`__
Tutorials and Guides
--------------------
Tutorial videos are available `here <https://www.youtube.com/playlist?list=PLMYr5_xSeuXAbhxYHz86hA1eCDugoxXY0>`_.
Guides are available :doc:`here <./guides/guides>`.
.. admonition:: Community!
Tutorials and Guides are community generated. Want to contribute? Reach out to us on our discord server.

View File

@ -1,32 +0,0 @@
Build
=====
Sunshine binaries are built using `CMake <https://cmake.org/>`__. Cross compilation is not
supported. That means the binaries must be built on the target operating system and architecture.
Building Locally
----------------
Clone
^^^^^
Ensure `git <https://git-scm.com/>`__ is installed and run the following:
.. code-block:: bash
git clone https://github.com/lizardbyte/sunshine.git --recurse-submodules
cd sunshine && mkdir build && cd build
Compile
^^^^^^^
See the section specific to your OS.
- :ref:`Linux <building/linux:linux>`
- :ref:`macOS <building/macos:macos>`
- :ref:`Windows <building/windows:windows>`
Remote Build
------------
It may be beneficial to build remotely in some cases. This will enable easier building on different operating systems.
#. Fork the project
#. Activate workflows
#. Trigger the `CI` workflow manually
#. Download the artifacts/binaries from the workflow run summary

View File

@ -1,212 +0,0 @@
Linux
=====
Requirements
------------
Debian Bullseye/Bookworm
^^^^^^^^^^^^^^^^^^^^^^^^
End of Life (Bullseye): July, 2024
End of Life (Bookworm): TBD
Install Requirements
.. code-block:: bash
sudo apt update && sudo apt install \
build-essential \
cmake \
libavdevice-dev \
libayatana-appindicator3-dev \
libboost-filesystem-dev \
libboost-locale-dev \
libboost-log-dev \
libboost-program-options-dev \
libcap-dev \ # KMS
libcurl4-openssl-dev \
libdrm-dev \ # KMS
libevdev-dev \
libmfx-dev \ # x86_64 only
libnotify-dev \
libnuma-dev \
libopus-dev \
libpulse-dev \
libssl-dev \
libva-dev \
libvdpau-dev \
libwayland-dev \ # Wayland
libx11-dev \ # X11
libxcb-shm0-dev \ # X11
libxcb-xfixes0-dev \ # X11
libxcb1-dev \ # X11
libxfixes-dev \ # X11
libxrandr-dev \ # X11
libxtst-dev \ # X11
nodejs \
npm \
nvidia-cuda-dev \ # Cuda, NvFBC
nvidia-cuda-toolkit # Cuda, NvFBC
Fedora 37, 38
^^^^^^^^^^^^^
Install Requirements
.. code-block:: bash
sudo dnf update && \
sudo dnf group install "Development Tools" && \
sudo dnf install \
boost-devel \
cmake \
gcc \
gcc-c++ \
intel-mediasdk-devel \ # x86_64 only
libappindicator-gtk3-devel \
libcap-devel \
libcurl-devel \
libdrm-devel \
libevdev-devel \
libnotify-devel \
libva-devel \
libvdpau-devel \
libX11-devel \ # X11
libxcb-devel \ # X11
libXcursor-devel \ # X11
libXfixes-devel \ # X11
libXi-devel \ # X11
libXinerama-devel \ # X11
libXrandr-devel \ # X11
libXtst-devel \ # X11
mesa-libGL-devel \
npm \
numactl-devel \
openssl-devel \
opus-devel \
pulseaudio-libs-devel \
rpm-build \ # if you want to build an RPM binary package
wget \ # necessary for cuda install with `run` file
which # necessary for cuda install with `run` file
Ubuntu 20.04
^^^^^^^^^^^^
End of Life: April 2030
Install Requirements
.. code-block:: bash
sudo apt update && sudo apt install \
build-essential \
cmake \
g++-10 \
libayatana-appindicator3-dev \
libavdevice-dev \
libboost-filesystem-dev \
libboost-locale-dev \
libboost-log-dev \
libboost-program-options-dev \
libcap-dev \ # KMS
libdrm-dev \ # KMS
libevdev-dev \
libmfx-dev \ # x86_64 only
libnotify-dev \
libnuma-dev \
libopus-dev \
libpulse-dev \
libssl-dev \
libva-dev \
libvdpau-dev \
libwayland-dev \ # Wayland
libx11-dev \ # X11
libxcb-shm0-dev \ # X11
libxcb-xfixes0-dev \ # X11
libxcb1-dev \ # X11
libxfixes-dev \ # X11
libxrandr-dev \ # X11
libxtst-dev \ # X11
nodejs \
npm \
wget # necessary for cuda install with `run` file
Update gcc alias
.. code-block:: bash
update-alternatives --install \
/usr/bin/gcc gcc /usr/bin/gcc-10 100 \
--slave /usr/bin/g++ g++ /usr/bin/g++-10 \
--slave /usr/bin/gcov gcov /usr/bin/gcov-10 \
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-10 \
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-10
Ubuntu 22.04
^^^^^^^^^^^^
End of Life: April 2027
Install Requirements
.. code-block:: bash
sudo apt update && sudo apt install \
build-essential \
cmake \
libappindicator3-dev \
libavdevice-dev \
libboost-filesystem-dev \
libboost-locale-dev \
libboost-log-dev \
libboost-program-options-dev \
libcap-dev \ # KMS
libdrm-dev \ # KMS
libevdev-dev \
libmfx-dev \ # x86_64 only
libnotify-dev \
libnuma-dev \
libopus-dev \
libpulse-dev \
libssl-dev \
libwayland-dev \ # Wayland
libx11-dev \ # X11
libxcb-shm0-dev \ # X11
libxcb-xfixes0-dev \ # X11
libxcb1-dev \ # X11
libxfixes-dev \ # X11
libxrandr-dev \ # X11
libxtst-dev \ # X11
nodejs \
npm \
nvidia-cuda-dev \ # CUDA, NvFBC
nvidia-cuda-toolkit # CUDA, NvFBC
CUDA
----
If the version of CUDA available from your distro is not adequate, manually install CUDA.
.. Tip:: The version of CUDA you use will determine compatibility with various GPU generations.
See `CUDA compatibility <https://docs.nvidia.com/deploy/cuda-compatibility/index.html>`__ for more info.
Select the appropriate run file based on your desired CUDA version and architecture according to
`CUDA Toolkit Archive <https://developer.nvidia.com/cuda-toolkit-archive>`__.
.. code-block:: bash
wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run \
--progress=bar:force:noscroll -q --show-progress -O ./cuda.run
chmod a+x ./cuda.run
./cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm
rm ./cuda.run
npm dependencies
----------------
Install npm dependencies.
.. code-block:: bash
npm install
Build
-----
.. Attention:: Ensure you are in the build directory created during the clone step earlier before continuing.
.. code-block:: bash
cmake ..
make -j ${nproc}
cpack -G DEB # optionally, create a deb package
cpack -G RPM # optionally, create a rpm package

View File

@ -1,46 +0,0 @@
macOS
=====
Requirements
------------
macOS Big Sur and Xcode 12.5+
Use either `MacPorts <https://www.macports.org>`__ or `Homebrew <https://brew.sh>`__
MacPorts
""""""""
Install Requirements
.. code-block:: bash
sudo port install avahi boost180 cmake curl libopus npm9 pkgconfig
Homebrew
""""""""
Install Requirements
.. code-block:: bash
brew install boost cmake node opus pkg-config
# if there are issues with an SSL header that is not found:
cd /usr/local/include
ln -s ../opt/openssl/include/openssl .
npm dependencies
----------------
Install npm dependencies.
.. code-block:: bash
npm install
Build
-----
.. Attention:: Ensure you are in the build directory created during the clone step earlier before continuing.
.. code-block:: bash
cmake ..
make -j ${nproc}
cpack -G DragNDrop # optionally, create a macOS dmg package
If cmake fails complaining to find Boost, try to set the path explicitly.
``cmake -DBOOST_ROOT=[boost path] ..``, e.g., ``cmake -DBOOST_ROOT=/opt/local/libexec/boost/1.80 ..``

View File

@ -1,41 +0,0 @@
Windows
=======
Requirements
------------
First you need to install `MSYS2 <https://www.msys2.org>`__, then startup "MSYS2 MinGW 64-bit" and execute the following
codes.
Update all packages:
.. code-block:: bash
pacman -Suy
Install dependencies:
.. code-block:: bash
pacman -S base-devel cmake diffutils gcc git make mingw-w64-x86_64-binutils \
mingw-w64-x86_64-boost mingw-w64-x86_64-cmake mingw-w64-x86_64-curl \
mingw-w64-x86_64-onevpl mingw-w64-x86_64-openssl mingw-w64-x86_64-opus \
mingw-w64-x86_64-toolchain
npm dependencies
----------------
Install nodejs and npm. Downloads available `here <https://nodejs.org/en/download/>`__.
Install npm dependencies.
.. code-block:: bash
npm install
Build
-----
.. Attention:: Ensure you are in the build directory created during the clone step earlier before continuing.
.. code-block:: bash
cmake -G "MinGW Makefiles" ..
mingw32-make -j$(nproc)
cpack -G NSIS # optionally, create a windows installer
cpack -G ZIP # optionally, create a windows standalone package

View File

@ -1,111 +0,0 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# standard imports
from datetime import datetime
import os
import re
import subprocess
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
script_dir = os.path.dirname(os.path.abspath(__file__)) # the directory of this file
source_dir = os.path.dirname(script_dir) # the source folder directory
root_dir = os.path.dirname(source_dir) # the root folder directory
# -- Project information -----------------------------------------------------
project = 'Sunshine'
project_copyright = f'{datetime.now ().year}, {project}'
author = 'ReenigneArcher'
# The full version, including alpha/beta/rc tags
with open(os.path.join(root_dir, 'CMakeLists.txt'), 'r') as f:
version = re.search(r"project\(Sunshine VERSION ((\d+)\.(\d+)\.(\d+))", str(f.read())).group(1)
"""
To use cmake method for obtaining version instead of regex,
1. Within CMakeLists.txt add the following line without backticks:
``configure_file(docs/source/conf.py.in "${CMAKE_CURRENT_SOURCE_DIR}/docs/source/conf.py" @ONLY)``
2. Rename this file to ``conf.py.in``
3. Uncomment the next line
"""
# version = '@PROJECT_VERSION@' # use this for cmake configure_file method
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'breathe', # c++ support for sphinx with doxygen
'm2r2', # enable markdown files
'sphinx.ext.autosectionlabel',
'sphinx.ext.todo', # enable to-do sections
'sphinx.ext.graphviz', # enable graphs for breathe
'sphinx.ext.viewcode', # add links to view source code
'sphinx_copybutton', # add a copy button to code blocks
'sphinx_inline_tabs', # add tabs
]
# Add any paths that contain templates here, relative to this directory.
# templates_path = ['_templates']
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['toc.rst']
# Extensions to include.
source_suffix = ['.rst', '.md']
# -- Options for HTML output -------------------------------------------------
# images
html_favicon = os.path.join(root_dir, 'src_assets', 'common', 'assets', 'web', 'images', 'sunshine.ico')
html_logo = os.path.join(root_dir, 'sunshine.png')
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static']
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'furo'
html_theme_options = {
"top_of_page_button": "edit",
"source_edit_link": "https://github.com/lizardbyte/sunshine/tree/nightly/docs/source/{filename}",
}
# extension config options
autosectionlabel_prefix_document = True # Make sure the target is unique
breathe_default_project = 'src'
breathe_implementation_filename_extensions = ['.c', '.cc', '.cpp', '.mm']
breathe_order_parameters_first = False
breathe_projects = dict(
src="../build/doxyxml"
)
todo_include_todos = True
# disable epub mimetype warnings
# https://github.com/readthedocs/readthedocs.org/blob/eadf6ac6dc6abc760a91e1cb147cc3c5f37d1ea8/docs/conf.py#L235-L236
suppress_warnings = ["epub.unknown_project_files"]
# get doxygen version
doxy_proc = subprocess.run('doxygen --version', shell=True, cwd=source_dir, capture_output=True)
doxy_version = doxy_proc.stdout.decode('utf-8').strip()
print('doxygen version: ' + doxy_version)
# run doxygen
doxy_proc = subprocess.run('doxygen Doxyfile', shell=True, cwd=source_dir)
if doxy_proc.returncode != 0:
raise RuntimeError('doxygen failed with return code ' + str(doxy_proc.returncode))

View File

@ -1,5 +0,0 @@
Contributing
============
Read our contribution guide in our organization level
`docs <https://lizardbyte.readthedocs.io/en/latest/developers/contributing.html>`__.

View File

@ -1,71 +0,0 @@
Localization
============
Sunshine and related LizardByte projects are being localized into various languages. The default language is
`en` (English).
.. image:: https://badges.awesome-crowdin.com/translation-15178612-606145.png
CrowdIn
-------
The translations occur on `CrowdIn <https://translate.lizardbyte.dev/>`__. Anyone is free to contribute to
localization there.
**Translations Basics**
- The brand names `LizardByte` and `Sunshine` should never be translated.
- Other brand names should never be translated.
Examples:
- AMD
- Nvidia
**CrowdIn Integration**
How does it work?
When a change is made to sunshine source code, a workflow generates new translation templates
that get pushed to CrowdIn automatically.
When translations are updated on CrowdIn, a push gets made to the `l10n_nightly` branch and a PR is made against the
`nightly` branch. Once PR is merged, all updated translations are part of the project and will be included in the
next release.
Extraction
----------
There should be minimal cases where strings need to be extracted from source code; however it may be necessary in some
situations. For example if a system tray icon is added it should be localized as it is user interfacing.
- Wrap the string to be extracted in a function as shown.
.. code-block:: cpp
#include <boost/locale.hpp>
#include <string>
std::string msg = boost::locale::translate("Hello world!");
.. Tip:: More examples can be found in the documentation for
`boost locale <https://www.boost.org/doc/libs/1_70_0/libs/locale/doc/html/messages_formatting.html>`__.
.. Warning:: This is for information only. Contributors should never include manually updated template files, or
manually compiled language files in Pull Requests.
Strings are automatically extracted from the code to the `locale/sunshine.po` template file. The generated file is
used by CrowdIn to generate language specific template files. The file is generated using the
`.github/workflows/localize.yml` workflow and is run on any push event into the `nightly` branch. Jobs are only run if
any of the following paths are modified.
.. code-block:: yaml
- 'src/**'
When testing locally it may be desirable to manually extract, initialize, update, and compile strings. Python is
required for this, along with the python dependencies in the `./scripts/requirements.txt` file. Additionally,
`xgettext <https://www.gnu.org/software/gettext/>`__ must be installed.
**Extract, initialize, and update**
.. code-block:: bash
python ./scripts/_locale.py --extract --init --update
**Compile**
.. code-block:: bash
python ./scripts/_locale.py --compile

View File

@ -1,63 +0,0 @@
Testing
=======
Clang Format
------------
Source code is tested against the `.clang-format` file for linting errors. The workflow file responsible for clang
format testing is `.github/workflows/cpp-clang-format-lint.yml`.
Test clang-format locally.
.. code-block:: bash
find ./ -iname *.cpp -o -iname *.h -iname *.m -iname *.mm | xargs clang-format -i
Sphinx
------
Sunshine uses `Sphinx <https://www.sphinx-doc.org/en/master/>`__ for documentation building. Sphinx, along with other
required python dependencies are included in the `./docs/requirements.txt` file. Python is required to build
sphinx docs. Installation and setup of python will not be covered here.
Doxygen is used to generate the XML files required by Sphinx. Doxygen can be obtained from
`Doxygen downloads <https://www.doxygen.nl/download.html>`__. Ensure that the `doxygen` executable is in your path.
.. seealso::
Sphinx is configured to use the graphviz extension. To obtain the dot executable from the Graphviz library,
see the `librarys downloads section <https://graphviz.org/download/>`__.
The config file for Sphinx is `docs/source/conf.py`. This is already included in the repo and should not be modified.
The config file for Doxygen is `docs/Doxyfile`. This is already included in the repo and should not be modified.
Test with Sphinx
.. code-block:: bash
cd docs
make html
Alternatively
.. code-block:: bash
cd docs
sphinx-build -b html source build
Lint with rstcheck
.. code-block:: bash
rstcheck -r .
Check formatting with rstfmt
.. code-block:: bash
rstfmt --check --diff -w 120 .
Format inplace with rstfmt
.. code-block:: bash
rstfmt -w 120 .
Unit Testing
------------
.. Todo:: Sunshine does not currently have any unit tests. If you would like to help us improve please get in contact
with us, or make a PR with suggested changes.

View File

@ -1,28 +0,0 @@
GameStream
==========
Nvidia announced that their GameStream service for Nvidia Games clients will be discontinued in February 2023.
Luckily, Sunshine performance is now on par with Nvidia GameStream. Many users have even reported that Sunshine
outperforms GameStream, so rest assured that Sunshine will be equally performant moving forward.
Migration
---------
We have developed a simple migration tool to help you migrate your GameStream games and apps to Sunshine automatically.
Please check out our `GSMS <https://github.com/LizardByte/GSMS>`__ project if you're interested in an automated
migration option. At the time of writing this GSMS offers the ability to migrate your custom games and apps. The
working directory, command, and image are all set in Sunshine's ``apps.json`` file. The box-art image is also copied
to a specified directory.
Internet Streaming
------------------
If you are using the Moonlight Internet Hosting Tool, you can remove it from your system when you migrate to Sunshine.
To stream over the Internet with Sunshine and a UPnP-capable router, enable the UPnP option in the Sunshine Web UI.
.. note:: Running Sunshine together with versions of the Moonlight Internet Hosting Tool prior to v5.6 will cause UPnP
port forwarding to become unreliable. Either uninstall the tool entirely or update it to v5.6 or later.
Limitations
-----------
Sunshine does have some limitations, as compared to Nvidia GameStream.
- Automatic game/application list.
- Changing game settings automatically, to optimize streaming.

View File

@ -1,3 +0,0 @@
Table of Contents
=================
.. include:: toc.rst

View File

@ -1,21 +0,0 @@
Legal
=====
.. Attention:: This documentation is for informational purposes only and is not intended as legal advice. If you have
any legal questions or concerns about using Sunshine, we recommend consulting with a lawyer.
Sunshine is licensed under the GPL-3.0 license, which allows for free use and modification of the software.
The full text of the license can be reviewed `here <https://github.com/LizardByte/Sunshine/blob/master/LICENSE>`__.
Commercial Use
--------------
Sunshine can be used in commercial applications without any limitations. This means that businesses and organizations
can use Sunshine to create and sell products or services without needing to seek permission or pay a fee.
However, it is important to note that the GPL-3.0 license does not grant any rights to distribute or sell the encoders
contained within Sunshine. If you plan to sell access to Sunshine as part of their distribution, you are responsible
for obtaining the necessary licenses to do so. This may include obtaining a license from the
Motion Picture Experts Group (MPEG-LA) and/or any other necessary licensing requirements.
In summary, while Sunshine is free to use, it is the user's responsibility to ensure compliance with all applicable
licensing requirements when redistributing the software as part of a commercial offering. If you have any questions or
concerns about using Sunshine in a commercial setting, we recommend consulting with a lawyer.

View File

@ -1,86 +0,0 @@
src
===
We are in process of improving the source code documentation. Code should be documented using Doxygen syntax.
Some examples exist in `main.h` and `main.cpp`. In order for documentation within the code to appear in the
rendered docs, the definition of the object must be in a header file, although the documentation itself can (and
should) be in the source file.
Example Documentation Blocks
----------------------------
**file.h**
.. code-block:: c
// functions
int main(int argc, char *argv[]);
**file.cpp** (with markdown)
.. code-block:: cpp
/**
* @brief Main application entry point.
* @param argc The number of arguments.
* @param argv The arguments.
*
* EXAMPLES:
* ```cpp
* main(1, const char* args[] = {"hello", "markdown", nullptr});
* ```
*/
int main(int argc, char *argv[]) {
// do stuff
}
**file.cpp** (with ReStructuredText)
.. code-block:: cpp
/**
* @brief Main application entry point.
* @param argc The number of arguments.
* @param argv The arguments.
* @rst
* EXAMPLES:
*
* .. code-block:: cpp
* main(1, const char* args[] = {"hello", "rst", nullptr});
* @endrst
*/
int main(int argc, char *argv[]) {
// do stuff
}
Code
----
.. toctree::
:maxdepth: 2
:caption: src
src/main
src/audio
src/cbs
src/config
src/confighttp
src/crypto
src/httpcommon
src/input
src/move_by_copy
src/network
src/nvhttp
src/process
src/round_robin
src/rtsp
src/stream
src/sync
src/system_tray
src/task_pool
src/thread_pool
src/thread_safe
src/upnp
src/utility
src/uuid
src/video
src/platform

View File

@ -1,5 +0,0 @@
audio
=====
.. doxygenfile:: audio.h
:allow-dot-graphs:

View File

@ -1,5 +0,0 @@
cbs
===
.. doxygenfile:: cbs.h
:allow-dot-graphs:

View File

@ -1,5 +0,0 @@
config
======
.. doxygenfile:: config.h
:allow-dot-graphs:

View File

@ -1,5 +0,0 @@
confighttp
==========
.. doxygenfile:: confighttp.h
:allow-dot-graphs:

View File

@ -1,5 +0,0 @@
crypto
======
.. doxygenfile:: crypto.h
:allow-dot-graphs:

View File

@ -1,5 +0,0 @@
httpcommon
==========
.. doxygenfile:: httpcommon.h
:allow-dot-graphs:

View File

@ -1,5 +0,0 @@
input
=====
.. doxygenfile:: input.h
:allow-dot-graphs:

View File

@ -1,5 +0,0 @@
main
====
.. doxygenfile:: main.h
:allow-dot-graphs:

View File

@ -1,5 +0,0 @@
move_by_copy
============
.. doxygenfile:: move_by_copy.h
:allow-dot-graphs:

View File

@ -1,5 +0,0 @@
network
=======
.. doxygenfile:: network.h
:allow-dot-graphs:

View File

@ -1,5 +0,0 @@
nvhttp
======
.. doxygenfile:: nvhttp.h
:allow-dot-graphs:

View File

@ -1,10 +0,0 @@
platform
========
.. toctree::
:maxdepth: 1
platform/common
platform/linux
platform/macos
platform/windows

View File

@ -1,4 +0,0 @@
common
======
.. Todo:: Add common.h

View File

@ -1,12 +0,0 @@
linux
=====
.. toctree::
:maxdepth: 1
linux/cuda
linux/graphics
linux/misc
linux/vaapi
linux/wayland
linux/x11grab

View File

@ -1,5 +0,0 @@
cuda
====
.. doxygenfile:: platform/linux/cuda.h
:allow-dot-graphs:

View File

@ -1,4 +0,0 @@
graphics
========
.. Todo:: Add graphics.h

View File

@ -1,4 +0,0 @@
misc
====
.. Todo:: Add misc.h

View File

@ -1,5 +0,0 @@
vaapi
=====
.. doxygenfile:: platform/linux/vaapi.h
:allow-dot-graphs:

View File

@ -1,5 +0,0 @@
wayland
=======
.. doxygenfile:: platform/linux/wayland.h
:allow-dot-graphs:

View File

@ -1,4 +0,0 @@
x11grab
=======
.. Todo:: Add x11grab.h

View File

@ -1,11 +0,0 @@
macos
=====
.. toctree::
:maxdepth: 1
macos/av_audio
macos/av_img_t
macos/av_video
macos/misc
macos/nv12_zero_device

View File

@ -1,4 +0,0 @@
av_audio
========
.. Todo:: Add av_audio.h

View File

@ -1,4 +0,0 @@
av_img_t
========
.. Todo:: Add av_img_t.h

View File

@ -1,4 +0,0 @@
av_video
========
.. Todo:: Add av_video.h

View File

@ -1,5 +0,0 @@
misc
====
.. doxygenfile:: platform/macos/misc.h
:allow-dot-graphs:

View File

@ -1,4 +0,0 @@
nv12_zero_device
================
.. Todo:: Add nv12_zero_device.h

View File

@ -1,9 +0,0 @@
windows
=======
.. toctree::
:maxdepth: 1
windows/display
windows/misc
windows/PolicyConfig

View File

@ -1,4 +0,0 @@
PolicyConfig
============
.. Todo:: Add PolicyConfig.h

View File

@ -1,4 +0,0 @@
display
=======
.. Todo:: Add display.h

View File

@ -1,5 +0,0 @@
misc
====
.. doxygenfile:: platform/windows/misc.h
:allow-dot-graphs:

View File

@ -1,5 +0,0 @@
process
=======
.. doxygenfile:: process.h
:allow-dot-graphs:

View File

@ -1,5 +0,0 @@
round_robin
===========
.. doxygenfile:: round_robin.h
:allow-dot-graphs:

View File

@ -1,5 +0,0 @@
rtsp
====
.. doxygenfile:: rtsp.h
:allow-dot-graphs:

View File

@ -1,5 +0,0 @@
stream
======
.. doxygenfile:: stream.h
:allow-dot-graphs:

View File

@ -1,5 +0,0 @@
sync
====
.. doxygenfile:: sync.h
:allow-dot-graphs:

View File

@ -1,5 +0,0 @@
system_tray
===========
.. doxygenfile:: system_tray.h
:allow-dot-graphs:

View File

@ -1,5 +0,0 @@
task_pool
=========
.. doxygenfile:: task_pool.h
:allow-dot-graphs:

View File

@ -1,5 +0,0 @@
thread_pool
===========
.. doxygenfile:: thread_pool.h
:allow-dot-graphs:

View File

@ -1,5 +0,0 @@
thread_safe
===========
.. doxygenfile:: thread_safe.h
:allow-dot-graphs:

View File

@ -1,5 +0,0 @@
upnp
====
.. doxygenfile:: upnp.h
:allow-dot-graphs:

View File

@ -1,4 +0,0 @@
utility
=======
.. Todo:: Add utility.h

View File

@ -1,5 +0,0 @@
uuid
====
.. doxygenfile:: uuid.h
:allow-dot-graphs:

View File

@ -1,5 +0,0 @@
video
=====
.. doxygenfile:: video.h
:allow-dot-graphs:

View File

@ -1,56 +0,0 @@
.. toctree::
:maxdepth: 2
:caption: About
about/overview
about/installation
about/docker
about/third_party_packages
about/usage
about/guides/guides
about/advanced_usage
about/changelog
.. toctree::
:maxdepth: 2
:caption: GameStream
gamestream/gamestream
.. toctree::
:maxdepth: 2
:caption: Troubleshooting
troubleshooting/general
troubleshooting/linux
troubleshooting/macos
troubleshooting/windows
.. toctree::
:maxdepth: 2
:caption: Build
building/build
building/linux
building/macos
building/windows
.. toctree::
:maxdepth: 2
:caption: Contributing
contributing/contributing
contributing/localization
contributing/testing
.. toctree::
:maxdepth: 2
:caption: Legal
legal/legal
.. toctree::
:maxdepth: 2
:caption: source
source/src

View File

@ -1,24 +0,0 @@
General
=======
Forgotten Credentials
---------------------
If you forgot your credentials to the web UI, try this.
.. code-block:: bash
sunshine --creds {new-username} {new-password}
Web UI Access
-------------
Can't access the web UI?
#. Check firewall rules.
Nvidia issues
-------------
NvFBC, NvENC, or general issues with Nvidia graphics card.
- Consumer grade Nvidia cards are software limited to a specific number of encodes. See
`Video Encode and Decode GPU Support Matrix <https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new>`__
for more info.
- You can usually bypass the restriction with a driver patch. See Keylase's
`Linux <https://github.com/keylase/nvidia-patch>`__
or `Windows <https://github.com/keylase/nvidia-patch/blob/master/win>`__ patches for more guidance.

View File

@ -1,35 +0,0 @@
Linux
=====
Hardware Encoding fails
-----------------------
Due to legal concerns, Mesa has disabled hardware decoding and encoding by default.
.. code-block:: text
Error: Could not open codec [h264_vaapi]: Function not implemented
If you see the above error in the Sunshine logs, compiling `Mesa`
manually, may be required. See the official Mesa3D `Compiling and Installing <https://docs.mesa3d.org/install.html>`__
documentation for instructions.
.. Important:: You must re-enable the disabled encoders. You can do so, by passing the following argument to the build
system. You may also want to enable decoders, however that is not required for Sunshine and is not covered here.
.. code-block:: bash
-Dvideo-codecs=h264enc,h265enc
.. Note:: Other build options are listed in the
`meson options <https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/meson_options.txt>`__ file.
KMS Streaming fails
-------------------
If screencasting fails with KMS, you may need to run the following to force unprivileged screencasting.
.. code-block:: bash
sudo setcap -r $(readlink -f $(which sunshine))
Gamescope compatibility
-----------------------
Some users have reported stuttering issues when streaming games running within Gamescope.

View File

@ -1,13 +0,0 @@
macOS
=====
Dynamic session lookup failed
-----------------------------
If you get this error:
`Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that
org.freedesktop.dbus-session.plist is loaded!`
Try this.
.. code-block:: bash
launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist

View File

@ -1,6 +0,0 @@
Windows
=======
No gamepad detected
-------------------
#. Verify that you've installed `Nefarius Virtual Gamepad <https://github.com/nefarius/ViGEmBus/releases/latest>`__.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

View File

@ -1,412 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>LizardByte - Sunshine</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="Self-hosted game stream host for Moonlight." />
<meta name="author" content="" />
<!-- Open Graph/Twitter metadata -->
<meta property="og:site_name" content="LizardByte" />
<meta property="og:title" content="LizardByte | Sunshine" />
<meta property="og:type" content="website" />
<meta property="og:image" content="https://app.lizardbyte.dev/uno/github/openGraphImages/Sunshine_624x312.png" />
<meta property="og:url" content="https://app.lizardbyte.dev/Sunshine" />
<meta property="og:description" content="Self-hosted game stream host for Moonlight." />
<meta property="og:locale" content="en-US" />
<meta property="twitter:card" content="summary_large_image" />
<meta property="og:twitter_site" content="@lizardbytedev" />
<meta property="og:twitter_site:id" content="@lizardbytedev" />
<meta property="og:twitter_creator" content="@lizardbytedev" />
<meta property="og:twitter_creator:id" content="@lizardbytedev" />
<meta property="twitter:image" content="https://app.lizardbyte.dev/uno/github/openGraphImages/Sunshine_624x312.png" />
<!-- Favicon-->
<link rel="icon" type="image/x-icon" href="https://app.lizardbyte.dev/assets/images/favicon.ico" />
<!-- FontAwesome-->
<link href="https://app.lizardbyte.dev/node_modules/@fortawesome/fontawesome-free/css/all.min.css" rel="stylesheet" />
<!-- Bootstrap theme-->
<link href="https://app.lizardbyte.dev/node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
<!-- Custom css-->
<link href="https://app.lizardbyte.dev/css/custom.css" rel="stylesheet" />
<script src="https://app.lizardbyte.dev/node_modules/jquery/dist/jquery.min.js"></script>
<script src="https://app.lizardbyte.dev/node_modules/@popperjs/core/dist/umd/popper.min.js"></script>
<!-- Crowdin widget -->
<script src="https://app.lizardbyte.dev/js/crowdin.js"></script>
<script src="https://app.lizardbyte.dev/js/crowdin_web_widget.js"></script>
</head>
<body class="d-flex flex-column h-100 bg-dark-gray">
<main class="flex-shrink-0 overflow-hidden">
<!-- Navigation-->
<nav id="nav-container"></nav>
<!-- Header-->
<header class="bg-dark py-0">
<section class="offset-anchor" id="Top">
<div id="carousel1" class="carousel slide carousel-fade" data-bs-ride="carousel"
style="height:50vh">
<!--Indicators-->
<div class="carousel-indicators">
<button type="button" data-bs-target="#carousel1" data-bs-slide-to="0" class="active"
aria-current="true" aria-label="Slide 1"></button>
<button type="button" data-bs-target="#carousel1" data-bs-slide-to="1"
aria-label="Slide 2"></button>
<button type="button" data-bs-target="#carousel1" data-bs-slide-to="2"
aria-label="Slide 3"></button>
</div>
<!--/.Indicators-->
<!--Slides-->
<div class="carousel-inner" role="listbox">
<div class="carousel-item active">
<div class="view">
<img src="assets/images/AdobeStock_305732536_1920x1280.jpg" alt="">
<div class="mask rgba-black-light"></div>
</div>
<!-- <div class="carousel-caption">-->
<!-- <h3 class="h3-responsive">1</h3>-->
<!-- <p>First text</p>-->
<!-- </div>-->
</div>
<div class="carousel-item">
<!--Mask color-->
<div class="view">
<img src="assets/images/AdobeStock_231616343_1920x1280.jpg" alt="">
<div class="mask rgba-black-strong"></div>
</div>
<!-- <div class="carousel-caption">-->
<!-- <h3 class="h3-responsive">2</h3>-->
<!-- <p>Secondary text</p>-->
<!-- </div>-->
</div>
<div class="carousel-item">
<!--Mask color-->
<div class="view">
<img src="assets/images/AdobeStock_303330124_1920x1280.jpg" alt="">
<div class="mask rgba-black-slight"></div>
</div>
<!-- <div class="carousel-caption">-->
<!-- <h3 class="h3-responsive">3</h3>-->
<!-- <p>Third text</p>-->
<!-- </div>-->
</div>
</div>
<!--/.Slides-->
<div>
<h1 class="carousel-overlay-title display-5 fw-bolder text-white mb-2">Sunshine</h1>
<p class="carousel-overlay-subtitle lead fw-bolder text-white-50 mb-4">
A LizardByte project</p>
</div>
<!--Controls-->
<button class="carousel-control-prev" type="button" data-bs-target="#carousel1"
data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carousel1"
data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
<!--/.Controls-->
</div>
</section>
</header>
<!-- About section-->
<section class="offset-anchor py-5" id="About">
<div class="container px-auto">
<p class="lead text-center text-white mx-auto mt-0 mb-5">
Sunshine is a self-hosted game stream host for Moonlight. Offering low latency, cloud gaming
server capabilities with support for AMD, Intel, and Nvidia GPUs for hardware encoding. Software
encoding is also available. You can connect to Sunshine from any Moonlight client on a variety
of devices. A web UI is provided to allow configuration, and client pairing, from your favorite
web browser. Pair from the local server or any mobile device.
</p>
</div>
</section>
<!-- Features section-->
<section class="offset-anchor bg-dark py-5" id="Features">
<div class="container px-auto">
<h2 class="text-center text-white fw-bolder my-5">Features</h2>
<!-- Create a card for each feature -->
<div class="row gx-5">
<div class="col-md-6 col-lg-4 mb-5">
<div class="card bg-dark-gray text-white rounded-0">
<div class="card-body p-4">
<div class="d-flex align-items-center">
<div class="icon text-white">
<i class="fa-fw fa-2x fas fa-server"></i>
</div>
<div class="ms-3">
<h5 class="fw-bolder mb-0">Self-hosted</h5>
<p class="mb-0">
Run Sunshine on your own hardware. No need to pay monthly fees to a
cloud gaming provider.
</p>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6 col-lg-4 mb-5">
<div class="card bg-dark-gray text-white rounded-0">
<div class="card-body p-4">
<div class="d-flex align-items-center">
<div class="icon text-white">
<img height="40" src="https://moonlight-stream.org/images/moonlight.svg">
</div>
<div class="ms-3">
<h5 class="fw-bolder mb-0">Moonlight Support</h5>
<p class="mb-0">
Connect to Sunshine from any Moonlight client. Moonlight is available
for Windows, macOS, Linux, Android, iOS, Xbox, and more.
</p>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6 col-lg-4 mb-5">
<div class="card bg-dark-gray text-white rounded-0">
<div class="card-body p-4">
<div class="d-flex align-items-center">
<div class="icon text-white">
<i class="fa-fw fa-2x fas fa-microchip"></i>
</div>
<div class="ms-3">
<h5 class="fw-bolder mb-0">Hardware Encoding</h5>
<p class="mb-0">
Sunshine supports AMD, Intel, and Nvidia GPUs for hardware encoding.
Software encoding is also available.
</p>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6 col-lg-4 mb-5 mb-lg-0">
<div class="card bg-dark-gray text-white rounded-0">
<div class="card-body p-4">
<div class="d-flex align-items-center">
<div class="icon text-white">
<i class="fa-fw fa-2x fas fa-globe"></i>
</div>
<div class="ms-3">
<h5 class="fw-bolder mb-0">Low Latency</h5>
<p class="mb-0">
Sunshine is designed to provide the lowest latency possible to achieve optimal gaming performance.
</p>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6 col-lg-4 mb-5 mb-lg-0">
<div class="card bg-dark-gray text-white rounded-0">
<div class="card-body p-4">
<div class="d-flex align-items-center">
<div class="icon text-white">
<i class="fa-fw fa-2x fas fa-gamepad"></i>
</div>
<div class="ms-3">
<h5 class="fw-bolder mb-0">Control</h5>
<p class="mb-0">
Sunshine emulates an Xbox 360 or DS4 controller. Use nearly any
controller on your Moonlight client!<br>
<small>
<ul>
<li>DS4 emulation is only available on Windows.</li>
<li>Gamepad emulation is not currently supported on macOS.</li>
</ul>
</small>
</p>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6 col-lg-4 mb-5 mb-lg-0">
<div class="card bg-dark-gray text-white rounded-0">
<div class="card-body p-4">
<div class="d-flex align-items-center">
<div class="icon text-white">
<i class="fa-fw fa-2x fas fa-gear"></i>
</div>
<div class="ms-3">
<h5 class="fw-bolder mb-0">Configurable</h5>
<p class="mb-0">
Sunshine offers many configuration options to customize your experience.
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- More cards -->
<div class="container py-5 px-auto">
<div class="container col-md-10">
<!-- Docs section -->
<section class="offset-anchor py-4" id="Docs">
<div class="card bg-dark text-white rounded-0">
<div class="card-body p-4">
<div class="d-flex align-items-center">
<i class="fa-fw fa-2x fas fa-book"></i>
<div class="ms-3">
<h2 class="fw-bolder mb-0">Documentation</h2>
<p class="mb-0">
Read the documentation to learn how to install, use, and configure Sunshine.
</p>
</div>
</div>
</div>
<div class="card-footer p-3 ms-3">
<a class="btn btn-outline-light me-3 mb-3" href="https://docs.lizardbyte.dev/projects/sunshine" target="_blank">
<i class="fa-fw fas fa-book"></i>
Read the Docs
</a>
</div>
</div>
</section>
<!-- Download section -->
<section class="offset-anchor py-4" id="Download">
<div class="card bg-dark text-white rounded-0">
<div class="card-body p-4">
<div class="d-flex align-items-center">
<i class="fa-fw fa-2x fas fa-download"></i>
<div class="ms-3">
<h2 class="fw-bolder mb-0">Download</h2>
<p class="mb-0">
Download Sunshine for your platform.
</p>
</div>
</div>
</div>
<div class="card-footer p-3 ms-3">
<a class="btn btn-outline-light me-3 mb-3" href="https://github.com/LizardByte/Sunshine/releases/latest" target="_blank">
<i class="fa-fw fab fa-github"></i>
Latest
</a>
<a class="btn btn-outline-light me-3 mb-3" href="https://github.com/LizardByte/Sunshine/releases/tag/nightly-dev" target="_blank">
<i class="fa-fw fas fa-infinity"></i>
Nightly
</a>
<a class="btn btn-outline-light me-3 mb-3" href="https://hub.docker.com/r/lizardbyte/sunshine" target="_blank">
<i class="fa-fw fab fa-docker"></i>
Docker
</a>
</div>
</div>
</section>
</div>
</div>
<!-- Donate section -->
<section class="offset-anchor bg-dark p-5" id="Donate">
<div class="container mb-5 shadow border-0 bg-dark-gray rounded-0 col-md-7">
<div class="d-table-row g-0 text-white">
<div class="d-table-cell px-3 align-middle text-center">
<h1>
<i class="fa-fw fas fa-coins"></i>
</h1>
</div>
<div class="col-sm-auto border-white my-3 px-3 py-2 border-start">
<div class="container">
<h4 class="card-title mb-3 fw-bolder">Donate</h4>
</div>
<a
class="text-decoration-none"
href="https://github.com/sponsors/LizardByte"
target="_blank">
<img class="m-3"
alt="GitHub Sponsors"
src="https://img.shields.io/github/sponsors/lizardbyte?label=Github%20Sponsors&style=for-the-badge&color=green&logo=githubsponsors"
>
</a>
<a
class="text-decoration-none"
href="https://mee6.xyz/m/804382334370578482"
target="_blank">
<img class="m-3"
alt="MEE6"
src="https://img.shields.io/static/v1?style=for-the-badge&label=MEE6&message=Donate&color=green&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAklEQVR4AewaftIAAAG6SURBVJXBPWgTARiA4fe7H/WKCGoo0qAcIhUJHCSnoIgZYiq4ugk6BEuEimRxk04SwcEhU0pMDY5xcnSK0N22XCexYHSxkpBCB69gc58ntHCcEerzCCmVIMyjVEFLCi4xgT5ID6HV8Zw1EoR9D4LQMQwav8Y6DwiTqW1KO4qoLXtOSMwkNr8ROmON3kfKHUD4N4kUX9Eblx8tdleb9T2D2Fi1AVLk0KQ4Vm0Qk0oQ5lX1IyD8HxUR31DVKiDsU43YHQ1I290eolFEgqhq1RAokbDx+iXd8nl2vm1y4OfgO2/nLrC+9JwkgZKl4JIwc/Um4WCLqeksB46dzJC7/5izxdskKbgWKZlcgUyuQJJh2fi1Z0xiCfQVZkkJhz/Y+fqZP+zjJzh10SNNoG8p9IBZUkafAjaf3OW0bTO6doviizekKfQsEWmp6kNASMhen6O89I6Z7QEfrpSJ+IuKSMtcb9a38gtPs4BPyvDMOb64l9AjR0kTod3xpl4ZxEyRGugKh6YrpkiNmElstVnf8xcWu5Yp05FSAITJ1DalLci9Zc8JiQkplSDMo1RBSwouMYE+SA+h1fGcNRJ+A8xgoQAar6IXAAAAAElFTkSuQmCC"
>
</a>
<a
class="text-decoration-none"
href="https://www.patreon.com/LizardByte"
target="_blank">
<img class="m-3"
alt="Patreon"
src="https://img.shields.io/badge/dynamic/json?color=green&label=Patreon&style=for-the-badge&query=patron_count&url=https%3A%2F%2Fapp.lizardbyte.dev%2Funo%2Fpatreon%2FLizardByte.json&logo=patreon"
>
</a>
<a
class="text-decoration-none"
href="https://www.paypal.com/paypalme/ReenigneArcher"
target="_blank">
<img class="m-3"
alt="PayPal"
src="https://img.shields.io/static/v1?style=for-the-badge&label=PayPal&message=Donate&color=green&logo=paypal"
>
</a>
</div>
</div>
</div>
</section>
<!-- Support -->
<section class="offset-anchor bg-dark p-5" id="Support">
<div class="col-md-7 mx-auto mb-5">
<div class="container shadow border-0 bg-primary rounded-0">
<div class="d-table-row g-0 text-white">
<div class="d-table-cell px-4 align-middle text-center">
<div class="fs-3 fw-bold text-white">Support Center</div>
<div class="text-white">Find answers and ask questions.</div>
</div>
<div class="col-sm-auto border-white my-3 px-4 py-2 border-start">
<p class="card-text">
<em>The one who knows all the answers has not been asked all the questions.</em>
Confucius.
</p>
<div class="input-group mb-2">
<a href="support">
<button class="btn btn-outline-light rounded-0"
id="button-support"
type="button"
>Support</button>
</a>
</div>
</div>
</div>
</div>
</div>
</section>
</main>
<!-- Footer-->
<footer class="bg-dark py-4 mt-auto" id="footer-container"></footer>
<!-- Audio player bottom navbar -->
<nav id="player-navbar"></nav>
<!-- Bootstrap core JS-->
<script src="https://app.lizardbyte.dev/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<!-- Get navbar -->
<script src="https://app.lizardbyte.dev/js/navbar.js"></script>
<!-- Get footer -->
<script src="https://app.lizardbyte.dev/js/footer.js"></script>
<!-- Discord WidgetBot -->
<script src="https://app.lizardbyte.dev/js/discord.js"></script>
</body>
</html>

View File

@ -1,7 +0,0 @@
{
"dependencies": {
"@fortawesome/fontawesome-free": "6.4.2",
"bootstrap": "5.3.2",
"vue": "2.6.12"
}
}

View File

@ -1,109 +0,0 @@
#!/bin/bash
# custom AppRun for Sunshine AppImage
# path of the extracted AppRun
HERE="$(dirname "$(readlink -f "${0}")")"
SUNSHINE_PATH=/usr/bin/sunshine
SUNSHINE_BIN_HERE=$HERE/usr/bin/sunshine
SUNSHINE_SHARE_HERE=$HERE/usr/share/sunshine
# Set APPDIR when running directly from the AppDir:
if [ -z "$APPDIR" ]; then
ARGV0="AppRun"
fi
cd "$HERE" || exit 1
function help() {
echo "
------------------------------
Sunshine AppImage package.
------------------------------
sunshine.AppImage options
------------------------
Usage: $ARGV0 --help, -h
------ # This message
$ARGV0 --install, -i
# Install input rules sunshine.service files. Restart required.
$ARGV0 --remove, -r
# Remove input rules sunshine.service files.
$ARGV0 --appimage-help
# Show available AppImage options
sunshine options
----------------
"
# print sunshine binary help, replacing the sunshine command in usage statement
"$SUNSHINE_BIN_HERE" --help | sed -e "s#$SUNSHINE_BIN_HERE#$ARGV0#g"
}
function install() {
# user input rules
# shellcheck disable=SC2002
cat "$SUNSHINE_SHARE_HERE/udev/rules.d/85-sunshine.rules" | sudo tee /etc/udev/rules.d/85-sunshine.rules
# sunshine service
mkdir -p ~/.config/systemd/user
cp -r "$SUNSHINE_SHARE_HERE/systemd/user/" ~/.config/systemd/
# patch service executable path
sed -i -e "s#$SUNSHINE_PATH#$(readlink -f $ARGV0)#g" ~/.config/systemd/user/sunshine.service
# setcap
sudo setcap cap_sys_admin+p "$(readlink -f "$SUNSHINE_BIN_HERE")"
while true
do
read -r -p "This installation requires a reboot. Do you want to reboot NOW? [y/n] " input
case $input in
[yY][eE][sS]|[yY])
echo "Yes"
sudo reboot now
;;
[nN][oO]|[nN])
echo "No"
break
;;
*)
echo "Invalid input..."
;;
esac
done
}
function remove() {
# remove input rules
sudo rm -f /etc/udev/rules.d/85-sunshine.rules
# remove service
sudo rm -f ~/.config/systemd/user/sunshine.service
}
# process arguments
if [ "x$1" == "xhelp" ] || [ "x$1" == "x--help" ] || [ "x$1" == "x-h" ] ; then
help
exit $?
fi
if [ "x$1" == "xinstall" ] || [ "x$1" == "x--install" ] || [ "x$1" == "x-i" ] ; then
install
exit $?
fi
if [ "x$1" == "xremove" ] || [ "x$1" == "x--remove" ] || [ "x$1" == "x-r" ] ; then
remove
exit $?
fi
# create config directory if it doesn't exist
# https://github.com/LizardByte/Sunshine/issues/324
mkdir -p ~/.config/sunshine
# run sunshine
"$SUNSHINE_BIN_HERE" $@

View File

@ -1,12 +0,0 @@
[Desktop Entry]
Type=Application
Name=@PROJECT_NAME@
Exec=sunshine
Version=1.0
Comment=@PROJECT_DESCRIPTION@
Icon=sunshine
Categories=Utility;
Terminal=true
X-AppImage-Name=sunshine
X-AppImage-Version=@PROJECT_VERSION@
X-AppImage-Arch=x86_64

View File

@ -1,97 +0,0 @@
# Edit on github: https://github.com/LizardByte/Sunshine/tree/nightly/packaging/linux/aur/PKGBUILD
# Reference: https://wiki.archlinux.org/title/PKGBUILD
pkgname='sunshine'
pkgver=@PROJECT_VERSION@@SUNSHINE_SUB_VERSION@
pkgrel=1
pkgdesc="@PROJECT_DESCRIPTION@"
arch=('x86_64' 'aarch64')
url=@PROJECT_HOMEPAGE_URL@
license=('GPL3')
depends=('avahi'
'boost-libs'
'curl'
'libayatana-appindicator'
'libevdev'
'libmfx'
'libnotify'
'libpulse'
'libva'
'libvdpau'
'libx11'
'libxcb'
'libxfixes'
'libxrandr'
'libxtst'
'numactl'
'openssl'
'opus'
'udev')
makedepends=('boost'
'cmake'
'git'
'make'
'nodejs'
'npm')
optdepends=('cuda: NvFBC capture support'
'libcap'
'libdrm')
provides=('sunshine')
source=("$pkgname::git+@GITHUB_CLONE_URL@#commit=@GITHUB_COMMIT@")
sha256sums=('SKIP')
prepare() {
cd "$pkgname"
# Skip submodules that we don't want
if [[ $CARCH == "x86_64" ]]; then
git -c submodule."ffmpeg-macos-x86_64".update=none \
-c submodule."ffmpeg-windows-x86_64".update=none \
-c submodule."ffmpeg-linux-aarch64".update=none \
-c submodule."ffmpeg-macos-aarch64".update=none \
submodule update --recursive --init
elif [[ $CARCH == "aarch64" ]]; then
git -c submodule."ffmpeg-macos-x86_64".update=none \
-c submodule."ffmpeg-windows-x86_64".update=none \
-c submodule."ffmpeg-linux-x86_64".update=none \
-c submodule."ffmpeg-macos-aarch64".update=none \
submodule update --recursive --init
# It's unlikely that someone could get this far on a system with an incorrect arch, but we should handle it anyway
# Pull linux ffmpeg submodules
else
git -c submodule."ffmpeg-macos-x86_64".update=none \
-c submodule."ffmpeg-windows-x86_64".update=none \
-c submodule."ffmpeg-macos-aarch64".update=none \
submodule update --recursive --init
fi
}
build() {
pushd "$pkgname"
npm install
popd
export BRANCH="@GITHUB_BRANCH@"
export BUILD_VERSION="@GITHUB_BUILD_VERSION@"
export COMMIT="@GITHUB_COMMIT@"
export CFLAGS="${CFLAGS/-Werror=format-security/}"
export CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
cmake \
-S "$pkgname" \
-B build \
-Wno-dev \
-D CMAKE_INSTALL_PREFIX=/usr \
-D SUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
-D SUNSHINE_ASSETS_DIR="share/sunshine"
make -C build
}
package() {
make -C build install DESTDIR="$pkgdir"
}

Some files were not shown because too many files have changed in this diff Show More