Compare commits

...

308 Commits

Author SHA1 Message Date
TheElixZammuto
3888ec8da0 Merge branch 'nightly' into feat/new-session-system 2024-04-27 15:09:45 +02:00
Tejas Rao
7fb8c76590 Use C++20. (#2322) 2024-04-26 15:49:15 -04:00
TimmyOVO
9288775351 feat(macos/capture): support for capture display other than main display (#2449) 2024-04-22 14:16:26 -04:00
Cameron Gutman
067efc7912 Bump version to v0.23.1 (#2452) 2024-04-20 20:20:09 -04:00
ReenigneArcher
68c0f53bfc New Crowdin updates (#2392) 2024-04-20 16:38:27 -04:00
Hugo Locurcio
dc22e24744 Autofocus PIN input on Web UI pin page
This makes it faster to input the PIN after clicking on the PIN
notification on the desktop, since you no longer need to click
the PIN input or focus on it by pressing Tab many times.
2024-04-20 14:36:59 -05:00
ReenigneArcher
8eead6597e chore: repo updates (#2416) 2024-04-20 12:49:15 -04:00
ReenigneArcher
6c0b01737f ci(codecov): skip search (#2430) 2024-04-20 11:36:40 -04:00
dependabot[bot]
b4e6873649 build(deps): bump vue from 3.4.5 to 3.4.23 (#2434)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-19 23:05:44 -04:00
dependabot[bot]
24597178c7 build(deps): bump vue-i18n from 9.11.0 to 9.13.0 (#2442)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-19 21:41:18 -04:00
dependabot[bot]
05416bb9c2 build(deps): bump LizardByte/homebrew-release-action from 2024.409.24405 to 2024.417.220943 (#2441)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-19 20:34:41 -04:00
dependabot[bot]
15386f386a build(deps): bump third-party/wayland-protocols from 46f201b to 08d1c72 (#2443)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-19 19:33:17 -04:00
dependabot[bot]
38fa794009 build(deps): bump third-party/wlr-protocols from 4264185 to 2b8d433 (#2067)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-19 18:28:01 -04:00
dependabot[bot]
75fce21761 build(deps): bump packaging/linux/flatpak/deps/shared-modules from d022995 to ec91811 (#2428)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-19 17:26:14 -04:00
dependabot[bot]
abe256144a build(deps): bump actions-js/push from 1.4 to 1.5 (#2440)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-19 16:03:37 -04:00
dependabot[bot]
ad2483416d build(deps): bump packaging/linux/flatpak/deps/org.flatpak.Builder.BaseApp from 6e295e6 to 5532d43 (#2444)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-19 15:00:44 -04:00
Conn O'Griofa
87def6db85 fix(windows/amf): Revert RC/HRD defaults; improve documentation & config parsing (#2419) 2024-04-19 08:31:56 -04:00
Rick
9e0182be9c docs(linux): add guide for discord audio (#2447)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2024-04-18 23:06:20 -04:00
LizardByte-bot
50a02dbce5 chore: update global workflows (#2446) 2024-04-18 15:35:56 -04:00
ReenigneArcher
69191cafe9 fix: make version update check more robust (#2437) 2024-04-18 15:35:49 -04:00
ReenigneArcher
c896dabb82 ci: skip coverage upload if not in LizardByte org (#2436) 2024-04-17 18:50:23 -04:00
ReenigneArcher
ec8170cb40 ci: fix codeql prebuild steps for unix OSes (#2431) 2024-04-16 23:00:10 -04:00
ReenigneArcher
5db8af8a3f ci: update codeql to handle multiple OSes (#2425) 2024-04-16 17:41:56 -04:00
ReenigneArcher
76d08eb883 ci: fix coverage ignore directories (#2420) 2024-04-14 13:38:01 -04:00
ReenigneArcher
fb4d4f50ec fix(ui): fix quicksync locale strings (#2418) 2024-04-14 09:34:22 -04:00
Gilles Schintgen
358bb30c3c debug: fix codec debugging code 2024-04-13 19:52:22 -05:00
Cameron Gutman
25d8e2b478 Fix discarded std::clamp() result compiler warning 2024-04-13 18:53:00 -05:00
Cameron Gutman
a4d9ee3fa4 Fix crash when receiving abs input events prior to the display touchport 2024-04-13 18:53:00 -05:00
dependabot[bot]
f87bc86b4a build(deps): bump LizardByte/homebrew-release-action from 2024.314.134529 to 2024.409.24405 (#2394)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-12 20:52:00 -04:00
Gilles Schintgen
fcd4c07bd0 Improve frametiming for linux capture (#2333) 2024-04-12 19:36:56 -04:00
hdL6c
5c1bad7155 Musl Linux fixes (#2401) 2024-04-11 22:34:26 -05:00
dependabot[bot]
d14323244e build(deps): bump codecov/codecov-action from 3 to 4 (#2297)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-11 20:49:52 -04:00
ReenigneArcher
6a01e58f61 build(deps): use token for codecov/codecov-action (#2404) 2024-04-10 22:28:23 -04:00
ReenigneArcher
ad66fcb243 build(linux): fix ubuntu 24.04 build (#2402) 2024-04-10 19:59:11 -04:00
ReenigneArcher
ad5b816261 fix(linux): use correct setap command in logs (#2400) 2024-04-10 18:12:03 -04:00
ReenigneArcher
7602fa110c fix(ltray): re-order tray dep search (#2397) 2024-04-09 21:40:31 -04:00
ReenigneArcher
7e26d2fd30 build(tests): ensure tests can be disabled during build (#2386) 2024-04-08 19:17:19 -04:00
ReenigneArcher
116e59292a build(deps): remove libavdevice (#2380) 2024-04-07 22:23:32 -04:00
ReenigneArcher
1a48244a0a chore: bump version to v0.23.0 (#2367) 2024-04-06 21:41:09 -04:00
ReenigneArcher
33ba03c679 New Crowdin updates (#2372) 2024-04-06 20:31:40 -04:00
Cameron Gutman
93e622342c Quote the path to sunshinesvc.exe when launching the termination helper (#2379) 2024-04-06 19:21:03 -04:00
hdL6c
7f795f0e19 fix(linux/capture): fix logical comparison of texture size (#2349)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2024-04-06 18:03:54 -04:00
ReenigneArcher
b7aa8119f1 fix(security): ensure unpairing takes effect without restart (#2365) 2024-04-06 16:39:16 -04:00
ReenigneArcher
3c13027a61 build(linux)!: disable arm64 builds for Fedora (#2377) 2024-04-06 15:22:09 -04:00
ReenigneArcher
1e77d0a509 build(docker): increase job timeout (#2376) 2024-04-06 07:03:57 -04:00
ReenigneArcher
59ce8deb97 build(cmake): add prep/init.cmake (#2375)
Co-authored-by: James Le Cuirot <chewi@aura-online.co.uk>
2024-04-05 22:48:13 -04:00
ReenigneArcher
1ed22ab3b2 build: fix ubuntu 24.04 deps (#2374) 2024-04-05 21:45:15 -04:00
dependabot[bot]
42b4192a04 build(deps): bump vue-i18n from 9.10.2 to 9.11.0 (#2361)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 16:20:37 -04:00
ReenigneArcher
4fe3848d32 New Crowdin updates (#2290) 2024-04-05 13:21:13 -04:00
ReenigneArcher
89207a13f2 fix(docker): fix arm64 builds (#2368) 2024-04-04 23:12:17 -04:00
ReenigneArcher
cd465652f0 ci(macos): do not always run tests for macports build (#2360) 2024-04-04 09:36:40 -04:00
ReenigneArcher
699b2c160e build(linux)!: drop ubuntu 20.04 (#2327) 2024-04-03 22:52:37 -04:00
ReenigneArcher
e1588787f0 build(linux): add ubuntu 24.04 (#2326) 2024-04-03 21:50:03 -04:00
dependabot[bot]
73fe31dbd2 build(deps): bump @fortawesome/fontawesome-free from 6.5.1 to 6.5.2 (#2356)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-03 17:17:16 -04:00
ReenigneArcher
2da6fb050a fix(logging): add logging namespace and create logging::init method (#2336) 2024-04-02 20:57:57 -04:00
ReenigneArcher
a1edc246f5 fix(i18n): use correct key for welcome_success (#2354) 2024-04-02 18:22:30 -04:00
dependabot[bot]
bb7c2d50ef build(deps): bump third-party/build-deps from 6e23b58 to efd3a38 (#2346)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-01 08:56:31 -04:00
ReenigneArcher
6d1805b3fa docs(readme): use csv tables (#2341) 2024-03-31 15:44:45 -04:00
ReenigneArcher
9020c2c229 build(cmake): build web-ui target with cmd instead of bash on windows (#2340) 2024-03-31 13:00:01 -04:00
ReenigneArcher
b4739b05c6 build(cmake): copy asset files to build dir (#2338) 2024-03-31 11:52:25 -04:00
Zane Chua
1329c510b1 docs: update curl flag for macos portfile installation (#2337) 2024-03-31 09:19:11 -04:00
Lukas Senionis
991fab9370 Add mising _win postfix (#2330) 2024-03-30 13:52:37 -04:00
ReenigneArcher
376a2822bd fix(ui): could not submit pin due to localization updates (#2324)
Co-authored-by: Elia Zammuto <theelixzammuto@gmail.com>
2024-03-30 11:35:29 -04:00
ReenigneArcher
2b059c6797 fix(i18n): update localization docs and js strings (#2325) 2024-03-30 10:01:48 -04:00
Conn O'Griofa
ae71a6ad83 AMF: rate control improvements (#2251) 2024-03-29 21:07:24 -04:00
ReenigneArcher
2af0ce364d Revert "Add capture using WinRT Windows.Graphics.Capture API." (#2320) 2024-03-29 12:43:44 -04:00
ReenigneArcher
3b6a59af05 ci(macos): automatically determine default branch for homebrew formula (#2317) 2024-03-28 19:18:49 -04:00
KuleRucket
526121d81d Populate host latency for kms/x11 grab (#2273) 2024-03-28 17:52:53 -04:00
dependabot[bot]
e5ef0375f3 build(deps): bump packaging/linux/flatpak/deps/org.flatpak.Builder.BaseApp from 644487f to 6e295e6 (#2309)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-28 16:29:32 -04:00
ReenigneArcher
de97eacd30 ci(codecov): update codecov default branch (#2313) 2024-03-28 11:06:43 -04:00
lns103
1bd75bbeb0 Correct typo in Chinese Simplified locale option (#2308) 2024-03-28 09:32:55 -04:00
Tejas Rao
8f1692a5ac Add capture using WinRT Windows.Graphics.Capture API. (#2149)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2024-03-27 23:47:26 -04:00
dependabot[bot]
8eb3ea4fa3 build(deps): bump rstcheck[sphinx] from 6.2.0 to 6.2.1 (#2299)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-27 08:32:42 -04:00
ReenigneArcher
13aea3cbd8 ci(windows): update devcon (#2296) 2024-03-26 22:47:29 -04:00
ReenigneArcher
89e8b9628c ci(tests): add test framework (#1603) 2024-03-24 19:52:24 -04:00
ReenigneArcher
934f81182a fix(i18n): match two__letters code to crowdin (#2289) 2024-03-22 21:33:56 -04:00
ReenigneArcher
87774333f3 feat(i18n): add ui localization (#2279)
Co-authored-by: TheElixZammuto <6505622+TheElixZammuto@users.noreply.github.com>
2024-03-22 19:54:12 -04:00
Elia Zammuto
8ba64ffa32 Made C++ format Happy 2024-03-17 16:33:30 +01:00
Elia Zammuto
968b7963ee Migrated jwt-cpp to stable release, style fixes 2024-03-17 16:33:30 +01:00
Elia Zammuto
61df838356 clang-format 2024-03-17 16:33:30 +01:00
Elia Zammuto
d1845df0ea Logout 2024-03-17 16:33:30 +01:00
Elia Zammuto
9ef63ca829 First Working Draft of JWT Login System 2024-03-17 16:33:30 +01:00
ReenigneArcher
8316f44e10 ci(linux): refactor linux build (#2275) 2024-03-17 00:07:18 -04:00
ReenigneArcher
7534fa1023 refactor(video): move encoder declarations to header (#2185) 2024-03-16 09:04:29 -04:00
Cameron Gutman
bd5c50041c Update changelog and bump version to v0.22.2 2024-03-15 01:59:13 -05:00
Cameron Gutman
15c5e76ed4 Use a copy+delete instead of a move operation for config migration
This can handle migration across filesystems.
2024-03-15 01:59:13 -05:00
Cameron Gutman
8c9e14e335 Only attempt a config migration once per launch 2024-03-15 01:59:13 -05:00
Cameron Gutman
aa1985dec8 Avoid calling Boost logging functions in appdata()
The app data directory is needed prior to logging initialization.
2024-03-15 01:59:13 -05:00
Cameron Gutman
f66a7d5da6 Fix dereferencing a null pointer if SUNSHINE_MIGRATE_CONFIG doesn't exist 2024-03-15 01:59:13 -05:00
Cameron Gutman
b523945f48 Update tray submodule to fix broken tray icon on some systems 2024-03-14 21:28:47 -05:00
dependabot[bot]
476141d740 build(deps): bump LizardByte/homebrew-release-action from 2024.311.172824 to 2024.314.134529 (#2264)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-14 21:13:55 -04:00
Cameron Gutman
c43dd2489f Don't update tray icon after tray_exit() was called 2024-03-13 19:22:05 -04:00
ReenigneArcher
22736c4ce9 Fix(linux/fedora39) patch system headers so build succeeds with cuda (#2253)
Co-authored-by: Cameron Gutman <2695644+cgutman@users.noreply.github.com>
2024-03-13 18:05:45 -04:00
ReenigneArcher
3e49e25c63 chore: bump version to v0.22.1 (#2221)
Co-authored-by: Cameron Gutman <aicommander@gmail.com>
2024-03-13 10:44:31 -04:00
Crashdummy
0bfad20d4c fix(Linux/Fedora): re-enable CUDA and bump to 12.4.0 (#2247) 2024-03-13 09:48:13 -04:00
dependabot[bot]
1859e23cd5 build(deps): bump LizardByte/homebrew-release-action from 2024.309.150158 to 2024.311.172824 (#2245)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-13 09:04:41 -04:00
Cameron Gutman
c13a30db78 Allow NVENC to be forced to try capturing non-Nvidia GPUs 2024-03-13 01:23:47 -05:00
Cameron Gutman
d8877982ff Improve KMS debuggability and avoid known broken cases 2024-03-13 01:23:47 -05:00
Cameron Gutman
e383ab9956 Add note to prefer distro packages over Flatpak/AppImage 2024-03-12 19:54:20 -05:00
Cameron Gutman
97467ea355 Reorder and reword the KMS setup step 2024-03-12 19:54:20 -05:00
Cameron Gutman
3181d91edf Apply udev rules to /dev/uinput immediately after installation 2024-03-12 19:54:20 -05:00
Cameron Gutman
3117fa57ec Rename 85-sunshine.rules to 60-sunshine.rules
This ensures the rules are evaluated before 73-seat-late.rules which
enables uaccess tag application for existing logged on users.
2024-03-12 19:54:20 -05:00
Cameron Gutman
91744960c1 Avoid broken fallback to cross-adapter NVENC encoding with KMS 2024-03-11 19:02:16 -05:00
ReenigneArcher
a2785baf0a fix(linux): automatically migrate config directory (#2240) 2024-03-10 22:03:20 -04:00
brycerocky
bc0a4786f4 Use icon caching for system tray. (#2238) 2024-03-10 18:35:48 -04:00
Cameron Gutman
cb4bfaa2f4 Add the .INSTALL script needed for kmsgrab to work
This also removes the standalone PKGBUILD artifact because
our PKGBUILD has external dependencies now.
2024-03-09 18:56:44 -06:00
Cameron Gutman
74ce047a4b Add optdepends for Intel and AMD hardware encoding 2024-03-09 18:56:44 -06:00
Cameron Gutman
278567f72d Move kmsgrab dependencies from optdepends to depends
kmsgrab is the most fully featured capture backend for current
versions of Sunshine, so it should be built by default.

In addition to zero-copy capture and HDR support, it is the *only*
capture backend that can handle non-wlroots Wayland capture.
2024-03-09 18:56:44 -06:00
Cameron Gutman
9d5b01727e Replace WMIC-based check for ViGEmBus with a Powershell check
This version is simpler and much faster on machines with many installed apps.
2024-03-09 13:57:24 -06:00
ReenigneArcher
33e99e1feb build(macos)!: add homebrew formula and drop dmg (#2222) 2024-03-09 10:47:55 -05:00
Cameron Gutman
ce3b625983 Fix undefined behavior when computing cursor end pointer 2024-03-08 23:48:57 -06:00
Cameron Gutman
7cdd156bce Fix heap corruption with cursor pixel counts that aren't divisible by 8 2024-03-07 19:01:36 -06:00
Cameron Gutman
f5dd0d4eaf Update app examples to clarify new command syntax for Windows 2024-03-07 18:14:28 -06:00
Cameron Gutman
06c0ed1d1c Temporarily add the working directory to our path when starting an app
CreateProcess() doesn't search in the child's specified working directory by default.
2024-03-07 18:14:28 -06:00
Cameron Gutman
972e5d2b14 Strip quotes out of the working directory path 2024-03-07 18:14:28 -06:00
Cameron Gutman
6aeaaf5ec9 Fix process tree tracking when the cmd.exe trampoline is used 2024-03-07 18:14:28 -06:00
Cameron Gutman
3b3e6818f3 Make debuginfo artifacts harder to confuse with the Windows portable build 2024-03-06 19:03:14 -06:00
detiam
c86a4e112b Fix wrong path in desktop file (#2223)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2024-03-06 10:23:32 -05:00
Cameron Gutman
9e299c295d Fix predefined FPS values not taking effect 2024-03-05 23:16:27 -06:00
ReenigneArcher
3f215968ad fix(config): add missing resolution to default config ui (#2224) 2024-03-05 23:00:51 -05:00
ReenigneArcher
b99a9e92be build(macos): fix publishing of portfile (#2220) 2024-03-05 18:18:17 -05:00
ReenigneArcher
4ebc7b5cef build(macos): add build strategy matrix (#2211) 2024-03-05 08:56:09 -05:00
Cameron Gutman
9f94eebd32 Fix mismatched case and unhandled exception in open_drm_fd_for_cuda_device() 2024-03-05 00:07:04 -06:00
ReenigneArcher
cacadc4df4 build(linux): ensure pre-compiled arch pkg is not debug build (#2214) 2024-03-04 22:15:37 -05:00
Cameron Gutman
529f1b84f8 Fix CUDA context leak causing encoder init failures using X11 capture with NVENC 2024-03-03 19:57:46 -06:00
ReenigneArcher
8d5a9054ec chore: bump version to v0.22.0 (#2201)
Co-authored-by: Cameron Gutman <aicommander@gmail.com>
2024-03-03 16:50:20 -05:00
Cameron Gutman
5606840c89 Stop enumeration after finding a working capture backend 2024-03-02 12:08:35 -06:00
Cameron Gutman
1ab30aa70b Add log messages to indicate display numbers for KMS and Wlgrab 2024-03-02 12:08:35 -06:00
Cameron Gutman
75a97883e7 Rework dummy image handling to avoid RTX HDR driver bug
As a side effect, it avoids useless allocations and uploads of
a zeroed memory buffer to clear the dummy image textures.
2024-03-01 01:09:10 -06:00
Cameron Gutman
e430f51e2f Add friendly message when encoder detection fails 2024-02-29 18:35:30 -06:00
Cameron Gutman
cb57322190 Move and rename Files tab to be less prominent 2024-02-29 18:35:30 -06:00
Cameron Gutman
8081f4167e Add note to enclose paths with spaces in quotes 2024-02-29 18:35:30 -06:00
Cameron Gutman
2e97c55005 Move and rename Channels option to feature more prominently in the UI 2024-02-29 18:35:30 -06:00
Cameron Gutman
84316b5ccd Adjust wording of the nvenc_latency_over_power option 2024-02-29 18:35:30 -06:00
Cameron Gutman
dfb212cc3c Don't display automatic gamepad options on unsupported platforms 2024-02-29 18:35:30 -06:00
Cameron Gutman
e9bb5697b0 Move UPnP option to the top of the Network tab 2024-02-29 18:35:30 -06:00
Cameron Gutman
4252f5df7c Add option to allow HEVC usage on older Intel GPUs without low-power encoding 2024-02-29 18:35:30 -06:00
ReenigneArcher
15272fb47e fix(config): properly save global_prep_cmd and fps (#2192) 2024-02-29 10:33:19 -05:00
Cameron Gutman
a0d5973799 Avoid display switching unexpectedly when the UAC secure desktop appears 2024-02-27 23:12:31 -06:00
Cameron Gutman
1020d0c133 Install ViGEmBus before starting Sunshine 2024-02-27 22:32:10 -06:00
Cameron Gutman
83e3ea5aa7 Use a common function to abort for debugging purposes 2024-02-27 21:21:16 -06:00
dependabot[bot]
53b2217a34 build(deps): bump bootstrap from 5.3.2 to 5.3.3 (#2154)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-26 22:33:13 -05:00
dependabot[bot]
c605a4da2b build(deps): bump peter-evans/create-pull-request from 5 to 6 (#2083)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-26 21:36:59 -05:00
James Le Cuirot
11c5b64d39 Use nlohmann_json package instead of submodule (#2161) 2024-02-26 18:53:56 -05:00
ReenigneArcher
8a7a6c48f8 build(cmake) properly find evdev (#2176) 2024-02-26 12:55:34 -05:00
ReenigneArcher
c6f94e93e0 build(cmake): error build on warning (#2165) 2024-02-24 22:34:53 -05:00
dependabot[bot]
dde804f14b build(deps): bump third-party/ViGEmClient from 1920260 to 8d71f67 (#2168)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-23 21:48:41 -05:00
ReenigneArcher
341fdaad77 build(cmake): add option to skip cuda inheriting compile options (#2164) 2024-02-23 20:54:10 -05:00
ReenigneArcher
8074bf8c8d fix(main): fix version printing (#2167) 2024-02-23 20:00:53 -05:00
Cameron Gutman
d1a635809a Implement backwards compatibility for NVENC APIs back to Video Codec SDK v11.0
This allows NVENC on drivers 456.71 (October 2020) and later.
2024-02-16 22:31:48 -06:00
Cameron Gutman
56da68c863 Preserve backwards-compatible argument escaping behavior for executables 2024-02-15 18:29:33 -06:00
Cameron Gutman
6ddc4b7ba3 Properly re-escape arguments when processing %* 2024-02-15 18:29:33 -06:00
Cameron Gutman
69a3edd9b0 Use Win32 APIs for UTF-16<->UTF-8 conversion
std::codecvt is deprecated since C++17 and broken for some characters/locales
2024-02-12 18:43:44 -06:00
ReenigneArcher
8689469ea8 refactor(main): move remaining entry related code (#2127) 2024-02-11 14:15:45 -05:00
ReenigneArcher
a420760d36 ci(linux): increase root reserve for AppImage build (#2130) 2024-02-11 09:01:14 -05:00
Cameron Gutman
65493d09e8 Cloak MAC address from unpaired clients 2024-02-10 13:47:51 -06:00
Cameron Gutman
78ed91af5c Treat escape sequences like other replacements 2024-02-10 09:52:35 -06:00
Cameron Gutman
c0ad9639c4 Fix spacing of multi-argument %* substitutions 2024-02-10 09:52:35 -06:00
Cameron Gutman
11c8cf176c Simplify and fix handling of incomplete substitution strings 2024-02-10 09:52:35 -06:00
ReenigneArcher
cd2153f340 refactor(main): move file operation functions to new source (#2124) 2024-02-10 07:37:27 -05:00
ReenigneArcher
1c50bc502b refactor(main): move map_port to network (#2115) 2024-02-09 09:15:47 -05:00
ReenigneArcher
d91e2c9ecb docs(examples): update uri examples (#2118) 2024-02-08 10:18:10 -05:00
Cameron Gutman
358aac9277 Modernize the default Steam shortcut
With auto-detach and properly job tracking, we don't need to run Steam detached anymore. We can just use the plain URL now too.
2024-02-08 01:59:40 -06:00
Cameron Gutman
aa76b2398b Add support for starting URLs and regular files that aren't executable
This provides some limited ShellExecute-like behavior.
2024-02-08 01:59:40 -06:00
Cameron Gutman
ee93890d86 Don't attempt to get the working directory of a URL 2024-02-08 01:59:40 -06:00
ReenigneArcher
0aa4f06c39 refactor(logging): separate logging from main (#2110) 2024-02-07 09:59:24 -05:00
Cameron Gutman
8373a8b947 Avoid recreating the display when no display parameters have changed 2024-02-06 20:00:24 -06:00
Cameron Gutman
aee88f336a Don't fall back to undefined ref frame count on HEVC/AV1 if H.264 succeded with ref frame count specified
I don't think there are any encoders out there that support this for some codecs and not others.
2024-02-06 20:00:24 -06:00
Cameron Gutman
38d45b39ae Don't populate QP rate control fallbacks for encoders guaranteed to support CBR/VBR
It just needlessly slows down encoder probing when the encoder or codec is not supported.
2024-02-06 20:00:24 -06:00
Cameron Gutman
ff8c8ce3ab Skip encoder reprobing if no GPU changes have occurred 2024-02-06 20:00:24 -06:00
ReenigneArcher
040c3a6916 style(submodules): alphabetize gitmodules (#2104) 2024-02-04 19:25:58 -05:00
ReenigneArcher
76e160bb0a style(macos): various code style fixes (#2086) 2024-02-04 18:37:44 -05:00
Cameron Gutman
dea1155983 Inform clients of graceful termination when Sunshine exits 2024-02-04 16:43:59 -06:00
Cameron Gutman
be6f856840 Fix DSCP tagging for dual-stack sockets on Linux 2024-02-04 16:19:22 -06:00
ReenigneArcher
b7a3985807 build(docker): add docker toolchain for clion (#2098) 2024-02-03 20:57:14 -05:00
dependabot[bot]
71d88ef9c9 build(deps): bump third-party/moonlight-common-c
Bumps [third-party/moonlight-common-c](https://github.com/moonlight-stream/moonlight-common-c) from `3acba57` to `cbd0ec1`.
- [Commits](3acba578b1...cbd0ec1b25)

---
updated-dependencies:
- dependency-name: third-party/moonlight-common-c
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-03 17:02:36 -06:00
Cameron Gutman
3578727ff9 Require RTSP encryption when encryption mode is set to mandatory
This also lets us provide a friendly error to the client when it is rejected.
2024-02-03 15:05:43 -06:00
Cameron Gutman
f80b23750b Implement RTSP encryption support
RTSP encryption is mandatory for client that report core version 1 or later.
2024-02-03 15:05:43 -06:00
Cameron Gutman
ca29eac53a Refactor RTSP handling to be session-based rather than socket-based
This is required to support per-session attributes like encryption keys during RTSP message processing.
2024-02-03 15:05:43 -06:00
Cameron Gutman
e62d6915db Fix -Wreturn-local-addr warning in event_t::view() 2024-02-03 15:05:43 -06:00
ReenigneArcher
328a300550 build(cmake): use CMAKE_SOURCE_DIR property (#2091) 2024-02-03 15:29:09 -05:00
Cameron Gutman
2008bc0eaa Use CS6 instead of CS7 for audio traffic
CS7 is reserved for network control traffic.
2024-02-02 18:30:48 -06:00
Cameron Gutman
bb3b7984f3 Add refcounting to Mac and Linux QoS state to ensure it works properly with multiple clients
This means we can't control DSCP tagging per-client, but it shouldn't pose a big problem as routers that blackhole DSCP tagged traffic are pretty rare.
2024-02-02 18:30:48 -06:00
Cameron Gutman
5c9533f6d7 Allow DSCP tagging and local traffic prioritization to be enabled separately on Mac and Linux 2024-02-02 18:30:48 -06:00
Cameron Gutman
c7700f96fc Enable opportunistic QoS tagging for control messages 2024-02-02 18:30:48 -06:00
Cameron Gutman
fe8b0bad92 Implement workaround for qWAVE issues handling IPv4-mapped IPv6 addresses 2024-02-02 18:30:48 -06:00
dependabot[bot]
190ea41b2e build(deps): bump third-party/moonlight-common-c
Bumps [third-party/moonlight-common-c](https://github.com/moonlight-stream/moonlight-common-c) from `298f356` to `3acba57`.
- [Commits](298f356acb...3acba578b1)

---
updated-dependencies:
- dependency-name: third-party/moonlight-common-c
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-01 01:47:22 -06:00
ReenigneArcher
5e948dc835 docs(build): add missing libcurl build dep for ubuntu (#2081) 2024-01-31 19:59:11 -05:00
dependabot[bot]
f82c3cbc99 build(deps): bump furo from 2023.9.10 to 2024.1.29 (#2077)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-30 08:31:14 -05:00
Cameron Gutman
f70c3f1c0e Fix crash on monitor index not found in KMS 2024-01-28 14:00:46 -06:00
Cameron Gutman
cf416f55e1 Fix KMS cursor capture on Nvidia GPUs 2024-01-28 14:00:46 -06:00
Cameron Gutman
8182f592e8 Implement NVENC support for KMS and wlgrab capture methods 2024-01-28 14:00:46 -06:00
Cameron Gutman
9a3553db04 Refactor to use pixel format helpers in VAAPI 2024-01-27 21:32:29 -06:00
Cameron Gutman
3b11bc86b0 Rewrite software scaling to use new multi-threaded swscale API 2024-01-27 21:32:29 -06:00
Cameron Gutman
a15bd65391 Adjust default CPU thread count to 2
It's a tiny reduction of encoding quality for a major increase in performance
2024-01-27 21:32:29 -06:00
Cameron Gutman
9dfe97d405 Send the frame number in the encrypted video header 2024-01-25 23:43:30 -06:00
Cameron Gutman
65851407b1 Avoid unnecessary reallocation of the IV for every packet 2024-01-25 23:43:30 -06:00
Kelvie Wong
3f31400e7f Revert "Remove useless texture size queries for every frame in display_ram_t"
This reverts commit ebe01ce20b.

Looks like this commit undos the fix for #453, see also PRs #649 and #884.

This also adds a comment so hopefully it doesn't get removed again in
the future (or a proper fix is found).
2024-01-25 21:09:43 -06:00
ReenigneArcher
75b6e1f1d8 docs(setup): correct instruction for portfile install (#2058) 2024-01-25 20:21:05 -05:00
PVermeer
0d4dfcd708 Find the correct install paths for systemd units and udev rules (#2046) 2024-01-21 16:53:30 -05:00
ns6089
52511f3ccb Update docs for new nvenc options 2024-01-20 18:28:09 -06:00
ns6089
fe886632dc Add new nvenc options to legacy ffmpeg path 2024-01-20 18:28:09 -06:00
ns6089
6ded2a9577 Update config page for new nvenc/nvprefs options 2024-01-20 18:28:09 -06:00
ns6089
ede59e17d8 Expose more nvenc options
1. Spatial AQ, for some reason NVENC have problems recovering details on
   flat regions of static images over multiple frames, official docs
   recommend to enable it for "game-streaming"
2. Percentage increase of default single-frame VBV/HRD, can act as
   low latency variable bitrate substitute
2024-01-20 18:28:09 -06:00
ns6089
66150872b0 Add nvprefs user override options 2024-01-20 18:28:09 -06:00
ns6089
270716b862 Use safe string composition in tray tooltip 2024-01-20 18:28:09 -06:00
Lukas Senionis
bf1b9a20ec Add a dedicated library for working with JSON (#2047) 2024-01-20 17:05:35 -05:00
dependabot[bot]
bed58cf8b9 build(deps): bump vite from 4.4.9 to 4.5.2 (#2048)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-20 11:07:42 -05:00
Cameron Gutman
a10ec3a98a Drop unencrypted messages on the encrypted control stream 2024-01-19 18:57:58 -06:00
Cameron Gutman
c88fa655f5 Implement video encryption 2024-01-19 18:57:58 -06:00
Cameron Gutman
23fb07d4a2 Implement control stream v2 encryption 2024-01-19 18:57:58 -06:00
Cameron Gutman
2f80145b8e Change crypto::aes_t to variable size and cleanup some crypto code 2024-01-19 18:57:58 -06:00
Cameron Gutman
6b5a712506 Normalize IPv4-mapped IPv4 addresses before checking PC/LAN/WAN type 2024-01-19 18:57:58 -06:00
Cameron Gutman
3d6e7f447a Refactor audio encryption to use new encryption flags 2024-01-19 18:57:58 -06:00
Cameron Gutman
77b0bab374 Pass launch_session_t directly into session::alloc() 2024-01-19 18:57:58 -06:00
ReenigneArcher
6cdb7f7d03 docs(docker): add podman notes (#2035) 2024-01-18 21:53:33 -05:00
Rafael
2e995355dc fix(linux)!: use XDG spec for fetching Linux configuration directory (#2034) 2024-01-18 21:24:55 -05:00
Cameron Gutman
21e4450ee1 Fix stream disconnecting when reconfiguring display in X11 2024-01-18 19:14:45 -06:00
Cameron Gutman
404b434754 Fix starvation of encoder thread when not receiving new captured frames
This often happens when switching to the UAC secure desktop.
2024-01-18 19:14:45 -06:00
Cameron Gutman
f64712f277 Always reset the thread desktop before calling DuplicateOutput()
Otherwise capture will fail if the thread desktop is different than the current input desktop (ex: UAC secure desktop is active)
2024-01-18 19:14:45 -06:00
Cameron Gutman
8a86678d62 Reenumerate displays when the display is reinitialized or switched 2024-01-18 19:14:45 -06:00
Cameron Gutman
b94f8c0b50 Improve Name->DRM_MODE_CONNECTOR mapping with new types and names 2024-01-16 19:49:34 -06:00
Cameron Gutman
df2d728af7 Fix plane_it_t skipping the last entry when iterating 2024-01-16 19:49:34 -06:00
dependabot[bot]
35b785ebb8 build(deps): bump third-party/moonlight-common-c
Bumps [third-party/moonlight-common-c](https://github.com/moonlight-stream/moonlight-common-c) from `6e9ed87` to `298f356`.
- [Commits](6e9ed871bc...298f356acb)

---
updated-dependencies:
- dependency-name: third-party/moonlight-common-c
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-15 09:39:17 -06:00
ReenigneArcher
701b7081b1 build(linux deps): fix miniupnp dependency (#2022) 2024-01-14 15:48:46 -05:00
Cameron Gutman
d0049da2df Implement pen and touch support for Linux 2024-01-14 11:45:12 -06:00
Cameron Gutman
c1a3903d20 Fix absolute mouse motion being interpreted as touchscreen input 2024-01-14 11:45:12 -06:00
ReenigneArcher
bc3ab8a000 fix(ui): allow hash handler to accept tab ids (#2019) 2024-01-14 09:26:58 -05:00
ReenigneArcher
ec1ae4a3fe docs(advanced-usage): cross reference config UI (#2000) 2024-01-14 08:16:02 -05:00
ReenigneArcher
1ccda51df9 feat(ui): add hash handler for configuration ids (#2002) 2024-01-13 23:46:15 -05:00
ReenigneArcher
937d0d810c fix: add additional pin validation (#2007) 2024-01-13 22:03:49 -05:00
Cameron Gutman
545af98459 Add a fallback to retry codec init with more lenient config options
This allows use of low_power=1 for VAAPI to allow more performant
encoding on capable Intel hardware (like we do for QSV).

This also provides a low_power=0 fallback for QSV to allow use
on old/low-end Intel GPUs that don't support low power encoding.

Finally, this also implements a fallback to deal with the AMD
driver regression on pre-RDNA cards that causes H.264 encoding
to fail with AMF_VIDEO_ENCODER_USAGE_ULTRA_LOW_LATENCY.
2024-01-12 19:50:34 -06:00
Cameron Gutman
056281b745 Implement HDR support for Linux KMS capture backend (#1994)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2024-01-11 22:41:58 -06:00
dependabot[bot]
3fb384f868 build(deps): bump third-party/tray from 8bb9978 to 2bf1c61
Bumps [third-party/tray](https://github.com/LizardByte/tray) from `8bb9978` to `2bf1c61`.
- [Commits](8bb9978991...2bf1c61030)

---
updated-dependencies:
- dependency-name: third-party/tray
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-11 04:22:39 -08:00
Cameron Gutman
593e170da8 Implement graceful termination and group-based app tracking 2024-01-08 23:55:43 -06:00
ReenigneArcher
d05a67166e feat(ui): add href to logs in fatal error container (#1984) 2024-01-07 15:02:25 -05:00
ReenigneArcher
de7b81e3b4 fix(ui): reorder and add missing config options (#1993) 2024-01-07 13:32:32 -05:00
dependabot[bot]
d873c8b088 build(deps): bump vue from 3.2.25 to 3.4.5 (#1983)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-07 12:31:36 -05:00
ReenigneArcher
b5fae464b6 docs: refactor and general cleanup (#1992) 2024-01-07 11:58:13 -05:00
dependabot[bot]
88d46914ca build(deps): bump @vitejs/plugin-vue from 4.3.4 to 4.6.2 (#1965)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-07 11:30:30 -05:00
ReenigneArcher
60c95d6385 fix(web-api): allow trailing slash on endpoints (#1985) 2024-01-06 10:56:35 -05:00
Cameron Gutman
f88df0f596 Implement support for KMS cursor plane capture (#1981) 2024-01-05 23:02:39 -06:00
ReenigneArcher
791ed48a3f fix(macos): replace depreciated AbsoluteToNanoseconds (#1986)
Co-authored-by: Cameron Gutman <2695644+cgutman@users.noreply.github.com>
2024-01-05 23:28:50 -05:00
Cameron Gutman
7d751f050e Fix EGL import for modifiers that require aux planes 2024-01-05 21:25:06 -06:00
Cameron Gutman
c7e5df5976 Refactor EGLAttrib logic into a shared function 2024-01-05 21:25:06 -06:00
James Le Cuirot
bc6cc2078e build(linux) make vaapi optional without dlopen (#1979)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2024-01-05 10:59:41 -05:00
Cameron Gutman
0dff8b16fd Use the new VAAPI dummy image support for kmsgrab too 2024-01-04 22:26:39 -06:00
Cameron Gutman
ebe01ce20b Remove useless texture size queries for every frame in display_ram_t 2024-01-04 22:26:39 -06:00
Cameron Gutman
3adf9e5967 Don't busy loop during wlgrab capture 2024-01-04 22:26:39 -06:00
Cameron Gutman
e1771de37a Fix race condition causing hangs and EGL import errors due to concurrent snapshot() calls 2024-01-04 22:26:39 -06:00
Cameron Gutman
0403ad147a Fix capturing scaled output with wlgrab 2024-01-04 22:26:39 -06:00
Cameron Gutman
1bd45ca803 Fix low-res scrolling on Linux 2024-01-04 00:51:10 -06:00
Cameron Gutman
556d9586e9 Switch to LizardByte ViGEmClient submodule 2024-01-03 21:55:37 -06:00
Cameron Gutman
a01a15a54b Fix termination of child processes when the parent terminates 2024-01-03 16:50:08 -06:00
Cameron Gutman
43992e7e9b Don't fail kmsgrab init entirely if a single card doesn't work 2024-01-03 16:14:18 -06:00
Cameron Gutman
0f640b8dd9 Fix clear color when rendering to VA surfaces 2024-01-03 16:14:18 -06:00
Cameron Gutman
a9b459cdb1 Use P010 instead of YUV420P10 for 10-bit VAAPI encoding 2024-01-03 16:14:18 -06:00
Cameron Gutman
beb51cc925 Correctly passthrough plane format and modifiers when importing VA surface 2024-01-03 16:14:18 -06:00
Mariotaku
52e5662dd9 docs: add reset credential examples for unique pacakges (#1973) 2024-01-03 16:04:21 -05:00
Cameron Gutman
e7a3c485ee Only keep the ViGEmBus connection alive while gamepads are attached 2024-01-02 19:32:19 -06:00
ReenigneArcher
9a3106fcef fix(ui): fix missing favicon (#1972) 2024-01-02 17:25:32 -05:00
Cameron Gutman
caf5e02d8b Alphabetize defaultConfig 2024-01-01 19:53:57 -06:00
Cameron Gutman
3ca75bee19 Add option to disable native pen/touch support 2024-01-01 19:53:57 -06:00
Cameron Gutman
729922d2c0 Add option to disable high resolution scroll events 2024-01-01 19:53:57 -06:00
Cameron Gutman
6ea836c511 Add options to control gamepad autoselection heuristics
Also move gamepad type selection to the input tab while we're here
2024-01-01 19:53:57 -06:00
Cameron Gutman
97c921629a Move Alt to Windows mapping option to Input tab 2024-01-01 19:53:57 -06:00
ReenigneArcher
852db4877d refactor(process): re-order variables to avoid unused variable when tray is disabled (#1963) 2024-01-01 19:36:00 -05:00
ReenigneArcher
c0164caaaa builds(deps): use miniupnpc package instead of submodule (#1971)
Co-authored-by: Cameron Gutman <aicommander@gmail.com>
2024-01-01 18:48:27 -05:00
ReenigneArcher
a452402267 ci(macos): install boost from source (#1954) 2024-01-01 14:42:19 -05:00
James Le Cuirot
8d14e7c6f1 Optionally allow the system installation of wayland-protocols to be used (#1966) 2024-01-01 11:49:00 -05:00
Timo Gurr
faeeb7ec57 build(cmake): Use GNUInstallDirs to install data and lib directories (#1817) 2023-12-31 21:53:16 -05:00
James Le Cuirot
44b34d1e23 Optionally allow the system installation of MiniUPnP to be used (#1959) 2023-12-31 20:04:04 -05:00
ReenigneArcher
fe3bf0ee6f fix(tray): use PROJECT_NAME definition for tooltip (#1958) 2023-12-31 16:34:33 -05:00
James Le Cuirot
64be0aa67a Fix grabbing code when DRM is enabled and X11 is disabled (#1956) 2023-12-31 15:57:45 -05:00
James Le Cuirot
d97f724e3b Use dl handle for libva's vaTerminate rather than actual function (#1955) 2023-12-31 15:10:48 -05:00
ReenigneArcher
8efc15b58f build(cmake): do not include unneeded headers (#1957) 2023-12-31 14:25:18 -05:00
Cameron Gutman
a6ffeb4b53 Don't install/update ViGEmBus if 1.17 or later is already installed (#1953)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2023-12-30 21:48:48 -06:00
Cameron Gutman
66e31a21fb Compute the bitrate on the host side for supported clients 2023-12-30 18:27:37 -06:00
ReenigneArcher
7640c504fa build(deps): use a single submodule for ffmpeg (#1952) 2023-12-30 17:36:36 -05:00
LizardByte-bot
081936879b Bump ffmpeg (#1895) 2023-12-30 14:21:43 -05:00
Cameron Gutman
a9f2679a49 Implement new protocol extension to match client connections together
Fixes #1804
Fixes #1862
Fixes #1852
2023-12-30 11:26:53 -06:00
Cameron Gutman
11d472362c Print a fatal warning for lack of ViGEmBus
While this is not technically fatal, it's almost certainly not what the user wants.
2023-12-29 23:01:28 -06:00
Cameron Gutman
0d7811ad43 Demote FFmpeg fatal errors
Fixes #1849
2023-12-29 23:01:28 -06:00
Cameron Gutman
eca26e664b Make wording about fatal errors a little less strong
Some "fatal" errors might be expected for some esoteric configurations.
2023-12-29 23:01:28 -06:00
dependabot[bot]
1540f2cd52 build(deps): bump third-party/moonlight-common-c
Bumps [third-party/moonlight-common-c](https://github.com/moonlight-stream/moonlight-common-c) from `f78f213` to `6e9ed87`.
- [Commits](f78f2135fa...6e9ed871bc)

---
updated-dependencies:
- dependency-name: third-party/moonlight-common-c
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-28 19:59:37 -06:00
jensaymoo
b215fe0cd9 fix: ensure user supplied framerates are used (#1548)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2023-12-28 20:06:54 -05:00
dependabot[bot]
c27725c73b build(deps): bump babel from 2.13.0 to 2.14.0 (#1912)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-28 11:28:55 -05:00
dependabot[bot]
0e479bd476 build(deps): bump third-party/wayland-protocols from d70af2e to 46f201b (#1943)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-28 10:45:31 -05:00
dependabot[bot]
96e7443cab build(deps): bump @fortawesome/fontawesome-free from 6.4.2 to 6.5.1 (#1876)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-27 20:27:06 -05:00
TheElixZammuto
5bdbda90b5 Web UI migration to Vite and Vue3 and improvements to the UX (#1673)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2023-12-27 19:25:49 -05:00
LizardByte-bot
6b7b5996cc chore: update global workflows (#1921) 2023-12-19 16:41:03 -05:00
ReenigneArcher
068c3fa303 docs: use glob pattern to match source code docs (#1918) 2023-12-17 10:37:54 -05:00
dependabot[bot]
4c984cacb5 build(deps): bump actions/upload-artifact from 3 to 4 (#1915)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-15 17:50:06 -05:00
ReenigneArcher
88fc8f845b build(docker): add fedora 39 and drop fedora 37 (#1827) 2023-12-11 14:53:32 -05:00
LizardByte-bot
ef9ec40509 ci: update global workflows (#1907) 2023-12-10 10:01:58 -05:00
LizardByte-bot
09ab49a869 ci: update global workflows (#1906) 2023-12-09 19:06:42 -05:00
ReenigneArcher
1dbfdbcf4f docs: fix failing images (#1903) 2023-12-09 16:53:48 -05:00
LizardByte-bot
a932f6bee8 ci: update global workflows (#1904) 2023-12-09 14:38:22 -05:00
zoeyjodon
a851ef6068 Extend session timeout (#1890) 2023-12-09 09:31:04 -05:00
dependabot[bot]
a009d1314f build(deps): bump actions/setup-python from 4 to 5 (#1893)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-08 09:07:08 -05:00
LizardByte-bot
47b5fc1fc0 ci: update global python (#1896) 2023-12-07 11:48:02 -05:00
Cameron Gutman
4a2f7023ec Fix discovery of Windows hosts by Apple devices 2023-12-04 21:03:37 -06:00
LizardByte-bot
6dcc5e7c0f ci: update release notifier (#1891) 2023-12-04 18:12:14 -05:00
ReenigneArcher
bd03ef974c docs(windows): add drive permissions troubleshooting (#1883) 2023-12-03 17:20:47 -05:00
Cameron Gutman
3b9e37e1dd Don't hardcode the signature length to RSA-2048 (#1872) 2023-11-30 23:51:45 -06:00
LizardByte-bot
336062d467 ci: update global workflows (#1863) 2023-11-23 23:28:07 -05:00
ns6089
29a1b1539f Fix incorrect portrait mode rotation center on Windows (#1851) 2023-11-17 08:43:12 -05:00
Justin Dhillon
0a563947ea docs: fix broken links (#1813)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2023-11-05 00:47:22 -04:00
339 changed files with 19828 additions and 7988 deletions

View File

@@ -1,4 +1,5 @@
# install dependencies for C++ analysis
set -e
sudo apt-get update -y
sudo apt-get install -y \
@@ -15,6 +16,7 @@ sudo apt-get install -y \
libcurl4-openssl-dev \
libdrm-dev \
libevdev-dev \
libminiupnpc-dev \
libmfx-dev \
libnotify-dev \
libnuma-dev \
@@ -53,3 +55,12 @@ sudo wget \
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
# build
mkdir -p build
cd build || exit 1
cmake -G "Unix Makefiles" ..
make -j"$(nproc)"
# skip autobuild
echo "skip_autobuild=true" >> "$GITHUB_OUTPUT"

View File

@@ -0,0 +1,34 @@
# install dependencies for C++ analysis
set -e
# update pacman
pacman --noconfirm -Suy
# install dependencies
pacman --noconfirm -S \
base-devel \
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-miniupnpc \
mingw-w64-x86_64-nlohmann-json \
mingw-w64-x86_64-nodejs \
mingw-w64-x86_64-onevpl \
mingw-w64-x86_64-openssl \
mingw-w64-x86_64-opus \
mingw-w64-x86_64-rust \
mingw-w64-x86_64-toolchain
# build
mkdir -p build
cd build || exit 1
cmake -G "MinGW Makefiles" ..
mingw32-make -j"$(nproc)"
# skip autobuild
echo "skip_autobuild=true" >> "$GITHUB_OUTPUT"

View File

@@ -0,0 +1,20 @@
# install dependencies for C++ analysis
set -e
# install dependencies
brew install \
boost \
cmake \
miniupnpc \
node \
opus \
pkg-config
# build
mkdir -p build
cd build || exit 1
cmake -G "Unix Makefiles" ..
make -j"$(sysctl -n hw.logicalcpu)"
# skip autobuild
echo "skip_autobuild=true" >> "$GITHUB_OUTPUT"

View File

@@ -4,8 +4,11 @@
# do not ignore .git, needed for versioning
!/.git
# do not ignore .rstcheck.cfg, needed to test building docs
!/.rstcheck.cfg
# ignore repo directories and files
docs/
docker/
gh-pages-template/
scripts/
tools/
@@ -13,6 +16,7 @@ crowdin.yml
# ignore dev directories
build/
cmake-*/
venv/
# ignore artifacts

3
.gitattributes vendored Normal file
View File

@@ -0,0 +1,3 @@
# ensure dockerfiles are checked out with LF line endings
Dockerfile text eol=lf
*.dockerfile text eol=lf

View File

@@ -165,16 +165,12 @@ jobs:
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'false'
remove-docker-images: 'true'
- name: Checkout
uses: actions/checkout@v4
- name: Checkout Flathub Shared Modules
uses: actions/checkout@v4
with:
repository: flathub/shared-modules
path: build/shared-modules
submodules: recursive
- name: Setup Dependencies Linux Flatpak
run: |
@@ -185,8 +181,10 @@ jobs:
cmake \
flatpak \
qemu-user-static
sudo su $(whoami) -c "flatpak --user remote-add --if-not-exists flathub \
https://flathub.org/repo/flathub.flatpakrepo"
sudo su $(whoami) -c "flatpak --user install -y flathub \
org.flatpak.Builder \
org.freedesktop.Platform/${{ matrix.arch }}/${PLATFORM_VERSION} \
@@ -213,6 +211,7 @@ jobs:
then
echo "This is a PUSH event"
branch=${{ github.ref_name }}
build_version=${{ needs.check_changelog.outputs.next_version }}
commit=${{ github.sha }}
clone_url=${{ github.event.repository.clone_url }}
else
@@ -229,6 +228,7 @@ jobs:
cd build
cmake -DGITHUB_CLONE_URL=${clone_url} \
-DBUILD_VERSION=${build_version} \
-DGITHUB_BRANCH=${branch} \
-DGITHUB_COMMIT=${commit} \
-DSUNSHINE_CONFIGURE_FLATPAK_MAN=ON \
@@ -251,7 +251,7 @@ jobs:
../artifacts/sunshine_debug_${{ matrix.arch }}.flatpak dev.lizardbyte.sunshine.Debug'
- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: sunshine-linux-flatpak-${{ matrix.arch }}
path: artifacts/
@@ -280,76 +280,69 @@ jobs:
include: # package these differently
- type: AppImage
EXTRA_ARGS: '-DSUNSHINE_BUILD_APPIMAGE=ON'
dist: 20.04
dist: 22.04
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@v8
with:
root-reserve-mb: 20480
root-reserve-mb: 30720
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'false'
remove-docker-images: 'true'
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Dependencies Linux
- name: Install wget
run: |
sudo apt-get update -y
sudo apt-get install -y \
wget
- name: Install CUDA
env:
CUDA_VERSION: 11.8.0
CUDA_BUILD: 520.61.05
timeout-minutes: 4
run: |
url_base="https://developer.download.nvidia.com/compute/cuda/${CUDA_VERSION}/local_installers"
url="${url_base}/cuda_${CUDA_VERSION}_${CUDA_BUILD}_linux.run"
sudo wget -q -O /root/cuda.run ${url}
sudo chmod a+x /root/cuda.run
sudo /root/cuda.run --silent --toolkit --toolkitpath=/usr/local/cuda --no-opengl-libs --no-man-page --no-drm
sudo rm /root/cuda.run
- name: Setup Dependencies Linux
timeout-minutes: 5
run: |
# allow newer gcc
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
if [[ ${{ matrix.dist }} == "18.04" ]]; then
# Ubuntu 18.04 packages
sudo add-apt-repository ppa:savoury1/boost-defaults-1.71 -y
sudo apt-get update -y
sudo apt-get install -y \
libboost-filesystem1.71-dev \
libboost-locale1.71-dev \
libboost-log1.71-dev \
libboost-regex1.71-dev \
libboost-program-options1.71-dev
# Install cmake
wget https://cmake.org/files/v3.22/cmake-3.22.2-linux-x86_64.sh
chmod +x cmake-3.22.2-linux-x86_64.sh
mkdir /opt/cmake
./cmake-3.22.2-linux-x86_64.sh --prefix=/opt/cmake --skip-license
ln --force --symbolic /opt/cmake/bin/cmake /usr/local/bin/cmake
cmake --version
# install newer tar from focal... appimagelint fails on 18.04 without this
echo "original tar version"
tar --version
wget -O tar.deb http://security.ubuntu.com/ubuntu/pool/main/t/tar/tar_1.30+dfsg-7ubuntu0.20.04.2_amd64.deb
sudo apt-get -y install -f ./tar.deb
echo "new tar version"
tar --version
else
# Ubuntu 20.04+ packages
sudo apt-get update -y
sudo apt-get install -y \
cmake \
libboost-filesystem-dev \
libboost-locale-dev \
libboost-log-dev \
libboost-program-options-dev
fi
# allow libfuse2 for appimage on 22.04
sudo add-apt-repository universe
sudo apt-get install -y \
build-essential \
cmake \
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 \
libfuse2 \
libminiupnpc-dev \
libmfx-dev \
libnotify-dev \
libnuma-dev \
@@ -366,7 +359,7 @@ jobs:
libxfixes-dev \
libxrandr-dev \
libxtst-dev \
wget
python3
# clean apt cache
sudo apt-get clean
@@ -381,27 +374,29 @@ jobs:
--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
- name: Setup python
id: python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Build Linux
env:
BRANCH: ${{ github.head_ref || github.ref_name }}
BUILD_VERSION: ${{ needs.check_changelog.outputs.next_version_bare }}
BUILD_VERSION: ${{ needs.check_changelog.outputs.next_version }}
COMMIT: ${{ github.event.pull_request.head.sha || github.sha }}
timeout-minutes: 5
run: |
echo "nproc: $(nproc)"
mkdir -p build
mkdir -p artifacts
npm install
cd build
cmake -DCMAKE_BUILD_TYPE=Release \
cmake \
-DBUILD_WERROR=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CUDA_COMPILER:PATH=/usr/local/cuda/bin/nvcc \
-DCMAKE_INSTALL_PREFIX=/usr \
-DSUNSHINE_ASSETS_DIR=share/sunshine \
-DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
@@ -411,23 +406,12 @@ jobs:
-DSUNSHINE_ENABLE_CUDA=ON \
${{ matrix.EXTRA_ARGS }} \
..
make -j ${nproc}
- name: Package Linux - CPACK
# todo - this is no longer used
if: ${{ matrix.type == 'cpack' }}
working-directory: build
run: |
cpack -G DEB
mv ./cpack_artifacts/Sunshine.deb ../artifacts/sunshine-${{ matrix.dist }}.deb
if [[ ${{ matrix.dist }} == "20.04" ]]; then
cpack -G RPM
mv ./cpack_artifacts/Sunshine.rpm ../artifacts/sunshine.rpm
fi
make -j $(expr $(nproc) - 1) # use all but one core
- name: Set AppImage Version
if: ${{ matrix.type == 'AppImage' && ( needs.check_changelog.outputs.next_version_bare != needs.check_changelog.outputs.last_version ) }} # yamllint disable-line rule:line-length
if: |
matrix.type == 'AppImage' &&
(needs.check_changelog.outputs.next_version_bare != needs.check_changelog.outputs.last_version)
run: |
version=${{ needs.check_changelog.outputs.next_version_bare }}
echo "VERSION=${version}" >> $GITHUB_ENV
@@ -449,12 +433,12 @@ jobs:
# AppImage
# https://docs.appimage.org/packaging-guide/index.html
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage
# https://github.com/linuxdeploy/linuxdeploy-plugin-gtk
sudo apt-get install libgtk-3-dev librsvg2-dev -y
wget https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh
wget -q https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh
chmod +x linuxdeploy-plugin-gtk.sh
export DEPLOY_GTK_VERSION=3
@@ -472,22 +456,75 @@ jobs:
# permissions
chmod +x ../artifacts/sunshine.AppImage
- name: Delete cuda
# free up space on the runner
run: |
sudo rm -rf /usr/local/cuda
- name: Verify AppImage
if: ${{ matrix.type == 'AppImage' }}
run: |
wget https://github.com/TheAssassin/appimagelint/releases/download/continuous/appimagelint-x86_64.AppImage
chmod +x appimagelint-x86_64.AppImage
# rm -rf ~/.cache/appimagelint/
./appimagelint-x86_64.AppImage ./artifacts/sunshine.AppImage
- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: sunshine-linux-${{ matrix.type }}-${{ matrix.dist }}
path: artifacts/
- name: Install test deps
run: |
sudo apt-get update -y
sudo apt-get install -y \
doxygen \
graphviz \
python3-venv \
x11-xserver-utils \
xvfb
# clean apt cache
sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*
- name: Run tests
id: test
working-directory: build/tests
run: |
export DISPLAY=:1
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
./test_sunshine --gtest_color=yes
- name: Generate gcov report
# any except canceled or skipped
if: always() && (steps.test.outcome == 'success' || steps.test.outcome == 'failure')
id: test_report
working-directory: build
run: |
${{ steps.python.outputs.python-path }} -m pip install gcovr
${{ steps.python.outputs.python-path }} -m gcovr -r .. \
--exclude '.*tests/.*' \
--exclude '.*tests/.*' \
--xml-pretty \
-o coverage.xml
- name: Upload coverage
# any except canceled or skipped
if: >-
always() &&
(steps.test_report.outcome == 'success') &&
startsWith(github.repository, 'LizardByte/')
uses: codecov/codecov-action@v4
with:
disable_search: true
fail_ci_if_error: true
files: ./build/coverage.xml
flags: ${{ runner.os }}
token: ${{ secrets.CODECOV_TOKEN }}
- name: Create/Update GitHub Release
if: ${{ needs.setup_release.outputs.create_release == 'true' }}
uses: ncipollo/release-action@v1
@@ -502,78 +539,119 @@ jobs:
discussionCategory: announcements
prerelease: ${{ needs.setup_release.outputs.pre_release }}
build_mac:
name: MacOS
runs-on: macos-11
build_mac_brew:
needs: [check_changelog, setup_release]
strategy:
fail-fast: false # false to test all, true to fail entire job if any fail
matrix:
include:
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
# while GitHub has larger macOS runners, they are not available for our repos :(
- os_version: "12"
release: true
- os_version: "13"
- os_version: "14"
name: Homebrew (macOS-${{ matrix.os_version }})
runs-on: macos-${{ matrix.os_version }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Dependencies MacOS
- name: Setup Dependencies Homebrew
run: |
# install dependencies using homebrew
brew install boost cmake curl node opus pkg-config
brew install cmake
# fix openssl header not found
ln -sf /usr/local/opt/openssl/include/openssl /usr/local/include/openssl
- name: Build MacOS
env:
BRANCH: ${{ github.head_ref || github.ref_name }}
BUILD_VERSION: ${{ needs.check_changelog.outputs.next_version_bare }}
COMMIT: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Configure formula
run: |
npm install
# variables for formula
branch=${GITHUB_HEAD_REF}
# check the branch variable
if [ -z "$branch" ]
then
echo "This is a PUSH event"
build_version=${{ needs.check_changelog.outputs.next_version }}
clone_url=${{ github.event.repository.clone_url }}
branch="${{ github.ref_name }}"
commit=${{ github.sha }}
default_branch="${{ github.event.repository.default_branch }}"
else
echo "This is a PR event"
clone_url=${{ github.event.pull_request.head.repo.clone_url }}
branch="${{ github.event.pull_request.head.ref }}"
commit=${{ github.event.pull_request.head.sha }}
default_branch="${{ github.event.pull_request.head.repo.default_branch }}"
fi
echo "Branch: ${branch}"
echo "Clone URL: ${clone_url}"
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DSUNSHINE_ASSETS_DIR=local/sunshine/assets \
-DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
cmake \
-DBUILD_VERSION="${build_version}" \
-DGITHUB_BRANCH="${branch}" \
-DGITHUB_COMMIT="${commit}" \
-DGITHUB_CLONE_URL="${clone_url}" \
-DGITHUB_DEFAULT_BRANCH="${default_branch}" \
-DSUNSHINE_CONFIGURE_HOMEBREW=ON \
-DSUNSHINE_CONFIGURE_ONLY=ON \
..
make -j ${nproc}
cd ..
- name: Package MacOS
run: |
mkdir -p artifacts
cd build
# copy formula to artifacts
mkdir -p homebrew
cp -f ./build/sunshine.rb ./homebrew/sunshine.rb
# package
cpack -G DragNDrop
mv ./cpack_artifacts/Sunshine.dmg ../artifacts/sunshine.dmg
# cpack -G Bundle
# mv ./cpack_artifacts/Sunshine.dmg ../artifacts/sunshine-bundle.dmg
# testing
cat ./homebrew/sunshine.rb
- name: Upload Artifacts
uses: actions/upload-artifact@v3
if: ${{ matrix.release }}
uses: actions/upload-artifact@v4
with:
name: sunshine-macos
path: artifacts/
name: sunshine-homebrew
path: homebrew/
- name: Create/Update GitHub Release
if: ${{ needs.setup_release.outputs.create_release == 'true' }}
uses: ncipollo/release-action@v1
- name: Should Publish Homebrew Formula
id: homebrew_publish
run: |
PUBLISH=false
if [[ \
"${{ matrix.release }}" == "true" && \
"${{ github.repository_owner }}" == "LizardByte" && \
"${{ needs.setup_release.outputs.create_release }}" == "true" && \
"${{ github.ref }}" == "refs/heads/master" \
]]; then
PUBLISH=true
fi
echo "publish=${PUBLISH}" >> $GITHUB_OUTPUT
- name: Validate and Publish Homebrew Formula
uses: LizardByte/homebrew-release-action@v2024.417.220943
with:
name: ${{ needs.setup_release.outputs.release_name }}
tag: ${{ needs.setup_release.outputs.release_tag }}
commit: ${{ needs.setup_release.outputs.release_commit }}
artifacts: "*artifacts/*"
formula_file: ${{ github.workspace }}/homebrew/sunshine.rb
git_email: ${{ secrets.GH_BOT_EMAIL }}
git_username: ${{ secrets.GH_BOT_NAME }}
publish: ${{ steps.homebrew_publish.outputs.publish }}
token: ${{ secrets.GH_BOT_TOKEN }}
allowUpdates: true
body: ${{ needs.setup_release.outputs.release_body }}
discussionCategory: announcements
prerelease: ${{ needs.setup_release.outputs.pre_release }}
build_mac_port:
name: Macports
needs: [check_changelog, setup_release]
runs-on: macos-11
strategy:
fail-fast: false # false to test all, true to fail entire job if any fail
matrix:
include:
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
# while GitHub has larger macOS runners, they are not available for our repos :(
- os_version: "12"
release: true
- os_version: "13"
- os_version: "14"
name: Macports (macOS-${{ matrix.os_version }})
runs-on: macos-${{ matrix.os_version }}
steps:
- name: Checkout
@@ -597,6 +675,12 @@ jobs:
# install dependencies using homebrew
brew install cmake
- name: Setup python
id: python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Configure Portfile
run: |
# variables for Portfile
@@ -606,6 +690,8 @@ jobs:
if [ -z "$branch" ]
then
echo "This is a PUSH event"
branch="${{ github.ref_name }}"
build_version=${{ needs.check_changelog.outputs.next_version }}
commit=${{ github.sha }}
clone_url=${{ github.event.repository.clone_url }}
else
@@ -619,6 +705,8 @@ jobs:
mkdir build
cd build
cmake \
-DBUILD_VERSION=${build_version} \
-DGITHUB_BRANCH=${branch} \
-DGITHUB_COMMIT=${commit} \
-DGITHUB_CLONE_URL=${clone_url} \
-DSUNSHINE_CONFIGURE_PORTFILE=ON \
@@ -654,6 +742,7 @@ jobs:
- name: Build port
env:
subportlist: ${{ steps.subportlist.outputs.subportlist }}
id: build
run: |
subport="Sunshine"
@@ -675,14 +764,107 @@ jobs:
"$subport"
echo "::endgroup::"
- name: Build Logs
if: always()
run: |
logfile="/opt/local/var/macports/logs/_Users_runner_work_Sunshine_Sunshine_ports_multimedia_Sunshine/Sunshine/main.log"
cat "$logfile"
sudo mv "${logfile}" "${logfile}.bak"
- name: Upload Artifacts
uses: actions/upload-artifact@v3
if: ${{ matrix.release }}
uses: actions/upload-artifact@v4
with:
name: sunshine-macports
path: artifacts/
- name: Fix screen capture permissions
if: ${{ matrix.os_version != 12 }} # macOS-12 is okay
# can be removed if the following is fixed in the runner image
# https://github.com/actions/runner-images/issues/9529
# https://github.com/actions/runner-images/pull/9530
run: |
# https://apple.stackexchange.com/questions/362865/macos-list-apps-authorized-for-full-disk-access
# permissions for screen capture
values="'kTCCServiceScreenCapture','/opt/off/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159"
if [[ "${{ matrix.os_version }}" == "14" ]]; then
# TCC access table in Sonoma has extra 4 columns: pid, pid_version, boot_uuid, last_reminded
values="${values},NULL,NULL,'UNUSED',${values##*,}"
fi
# system and user databases
dbPaths=(
"/Library/Application Support/com.apple.TCC/TCC.db"
"$HOME/Library/Application Support/com.apple.TCC/TCC.db"
)
sqlQuery="INSERT OR IGNORE INTO access VALUES($values);"
for dbPath in "${dbPaths[@]}"; do
echo "Column names for $dbPath"
echo "-------------------"
sudo sqlite3 "$dbPath" "PRAGMA table_info(access);"
echo "Current permissions for $dbPath"
echo "-------------------"
sudo sqlite3 "$dbPath" "SELECT * FROM access WHERE service='kTCCServiceScreenCapture';"
sudo sqlite3 "$dbPath" "$sqlQuery"
echo "Updated permissions for $dbPath"
echo "-------------------"
sudo sqlite3 "$dbPath" "SELECT * FROM access WHERE service='kTCCServiceScreenCapture';"
done
- name: Run tests
id: test
timeout-minutes: 10
run: |
sudo port test "Sunshine"
- name: Test Logs
if: always()
run: |
logfile="/opt/local/var/macports/logs/_Users_runner_work_Sunshine_Sunshine_ports_multimedia_Sunshine/Sunshine/main.log"
cat "$logfile"
- name: Generate gcov report
# any except canceled or skipped
if: always() && (steps.test.outcome == 'success' || steps.test.outcome == 'failure')
id: test_report
working-directory:
/opt/local/var/macports/build/_Users_runner_work_Sunshine_Sunshine_ports_multimedia_Sunshine/Sunshine/work
run: |
base_dir=$(pwd)
build_dir=${base_dir}/build
# get the directory name that starts with Sunshine-*
dir=$(ls -d Sunshine-*)
cd ${build_dir}
${{ steps.python.outputs.python-path }} -m pip install gcovr
sudo ${{ steps.python.outputs.python-path }} -m gcovr -r ../${dir} \
--exclude '.*${dir}/tests/.*' \
--exclude '.*${dir}/third-party/.*' \
--gcov-object-directory $(pwd) \
--verbose \
--xml-pretty \
-o ${{ github.workspace }}/build/coverage.xml
- name: Upload coverage
# any except canceled or skipped
if: >-
always() &&
(steps.test_report.outcome == 'success') &&
startsWith(github.repository, 'LizardByte/')
uses: codecov/codecov-action@v4
with:
disable_search: true
fail_ci_if_error: false # todo: re-enable this when action is fixed
files: ./build/coverage.xml
flags: ${{ runner.os }}-${{ matrix.os_version }}
token: ${{ secrets.CODECOV_TOKEN }}
- name: Create/Update GitHub Release
if: ${{ needs.setup_release.outputs.create_release == 'true' }}
if: ${{ needs.setup_release.outputs.create_release == 'true' && matrix.release }}
uses: ncipollo/release-action@v1
with:
name: ${{ needs.setup_release.outputs.release_name }}
@@ -706,6 +888,110 @@ jobs:
with:
submodules: recursive
- name: Prepare tests
id: prepare-tests
if: false # todo: DirectX11 is not available, so even software encoder fails
run: |
# function to download and extract a zip file
function DownloadAndExtract {
param (
[string]$Uri,
[string]$OutFile
)
$maxRetries = 5
$retryCount = 0
$success = $false
while (-not $success -and $retryCount -lt $maxRetries) {
$retryCount++
Write-Host "Downloading $Uri to $OutFile, attempt $retryCount of $maxRetries"
try {
Invoke-WebRequest -Uri $Uri -OutFile $OutFile
$success = $true
} catch {
Write-Host "Attempt $retryCount of $maxRetries failed with error: $($_.Exception.Message). Retrying..."
Start-Sleep -Seconds 5
}
}
if (-not $success) {
Write-Host "Failed to download the file after $maxRetries attempts."
exit 1
}
# use .NET to get the base name of the file
$baseName = (Get-Item $OutFile).BaseName
# Extract the zip file
Expand-Archive -Path $OutFile -DestinationPath $baseName
}
# virtual display driver
DownloadAndExtract `
-Uri "https://www.amyuni.com/downloads/usbmmidd_v2.zip" `
-OutFile "usbmmidd_v2.zip"
# install
Set-Location -Path usbmmidd_v2/usbmmidd_v2
./deviceinstaller64 install usbmmidd.inf usbmmidd
# create the virtual display
./deviceinstaller64 enableidd 1
# move up a directory
Set-Location -Path ../..
# install devcon
DownloadAndExtract `
-Uri "https://github.com/Drawbackz/DevCon-Installer/releases/download/1.4-rc/Devcon.Installer.zip" `
-OutFile "Devcon.Installer.zip"
Set-Location -Path Devcon.Installer
# hash needs to match OS version
# https://github.com/Drawbackz/DevCon-Installer/blob/master/devcon_sources.json
Start-Process -FilePath "./Devcon Installer.exe" -Wait -ArgumentList `
'install', `
'-hash', '54004C83EE34F6A55380528A8B29F4C400E61FBB947A19E0AB9E5A193D7D961E', `
'-addpath', `
'-update', `
'-dir', 'C:\Windows\System32'
# disable Hyper-V Video
# https://stackoverflow.com/a/59490940
C:\Windows\System32\devcon.exe disable "VMBUS\{da0a7802-e377-4aac-8e77-0558eb1073f8}"
# move up a directory
Set-Location -Path ..
# multi monitor tool
DownloadAndExtract `
-Uri "http://www.nirsoft.net/utils/multimonitortool-x64.zip" `
-OutFile "multimonitortool.zip"
# enable the virtual display
# http://www.nirsoft.net/utils/multi_monitor_tool.html
Set-Location -Path multimonitortool
# Original Hyper-V is \\.\DISPLAY1, it will recreate itself as \\.\DISPLAY6 (or something higher than 2)
# USB Mobile Monitor Virtual Display is \\.\DISPLAY2
# these don't seem to work if not using runAs
# todo: do they work if not using runAs?
Start-Process powershell -Verb runAs -ArgumentList '-Command ./MultiMonitorTool.exe /enable \\.\DISPLAY2'
Start-Process powershell -Verb runAs -ArgumentList '-Command ./MultiMonitorTool.exe /SetPrimary \\.\DISPLAY2'
# wait a few seconds
Start-Sleep -s 5
# list monitors
./MultiMonitorTool.exe /stext monitor_list.txt
# wait a few seconds
Start-Sleep -s 5
# print the monitor list
Get-Content -Path monitor_list.txt
- name: Setup Dependencies Windows
uses: msys2/setup-msys2@v2
with:
@@ -713,14 +999,19 @@ jobs:
install: >-
base-devel
diffutils
doxygen
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-graphviz
mingw-w64-x86_64-miniupnpc
mingw-w64-x86_64-nlohmann-json
mingw-w64-x86_64-nodejs
mingw-w64-x86_64-nsis
mingw-w64-x86_64-onevpl
mingw-w64-x86_64-openssl
mingw-w64-x86_64-opus
mingw-w64-x86_64-toolchain
@@ -728,21 +1019,39 @@ jobs:
wget
yasm
- name: Install npm packages
- name: Setup python
# use this instead of msys2 python due to known issues using wheels, https://www.msys2.org/docs/python/
id: setup-python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Python Path
id: python-path
shell: msys2 {0}
run: |
npm install
# replace backslashes with double backslashes
python_path=$(echo "${{ steps.setup-python.outputs.python-path }}" | sed 's/\\/\\\\/g')
# step output
echo "python-path=${python_path}"
echo "python-path=${python_path}" >> $GITHUB_OUTPUT
- name: Build Windows
shell: msys2 {0}
env:
BRANCH: ${{ github.head_ref || github.ref_name }}
BUILD_VERSION: ${{ needs.check_changelog.outputs.next_version_bare }}
BUILD_VERSION: ${{ needs.check_changelog.outputs.next_version }}
COMMIT: ${{ github.event.pull_request.head.sha || github.sha }}
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
cmake \
-DBUILD_WERROR=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DSUNSHINE_ASSETS_DIR=assets \
-DTESTS_PYTHON_EXECUTABLE='${{ steps.python-path.outputs.python-path }}' \
-DTESTS_SOFTWARE_ENCODER_UNAVAILABLE='skip' \
-G "MinGW Makefiles" \
..
mingw32-make -j$(nproc)
@@ -761,17 +1070,56 @@ jobs:
mv ./cpack_artifacts/Sunshine.exe ../artifacts/sunshine-windows-installer.exe
mv ./cpack_artifacts/Sunshine.zip ../artifacts/sunshine-windows-portable.zip
- name: Run tests
id: test
shell: msys2 {0}
working-directory: build/tests
run: |
./test_sunshine.exe --gtest_color=yes
- name: Generate gcov report
# any except canceled or skipped
if: always() && (steps.test.outcome == 'success' || steps.test.outcome == 'failure')
id: test_report
shell: msys2 {0}
working-directory: build
run: |
${{ steps.python-path.outputs.python-path }} -m pip install gcovr
${{ steps.python-path.outputs.python-path }} -m gcovr -r .. \
--exclude '.*tests/.*' \
--exclude '.*tests/.*' \
--xml-pretty \
-o coverage.xml
- name: Upload coverage
# any except canceled or skipped
if: >-
always() &&
(steps.test_report.outcome == 'success') &&
startsWith(github.repository, 'LizardByte/')
uses: codecov/codecov-action@v4
with:
disable_search: true
fail_ci_if_error: true
files: ./build/coverage.xml
flags: ${{ runner.os }}
token: ${{ secrets.CODECOV_TOKEN }}
- name: Package Windows Debug Info
working-directory: build
run: |
# save the original binaries with debug info
# use .dbg file extension for binaries to avoid confusion with real packages
Get-ChildItem -File -Recurse | `
% { Rename-Item -Path $_.PSPath -NewName $_.Name.Replace(".exe",".dbg") }
# save the binaries with debug info
7z -r `
"-xr!CMakeFiles" `
"-xr!cpack_artifacts" `
a "../artifacts/sunshine-debuginfo-win32.zip" "*.exe"
a "../artifacts/sunshine-win32-debuginfo.7z" "*.dbg"
- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: sunshine-windows
path: artifacts/

View File

@@ -26,12 +26,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Autoapproving
uses: hmarr/auto-approve-action@v3
uses: hmarr/auto-approve-action@v4
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Label autoapproved
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_BOT_TOKEN }}
script: |
@@ -49,7 +49,7 @@ jobs:
steps:
- name: Automerging
uses: pascalgn/automerge-action@v0.15.6
uses: pascalgn/automerge-action@v0.16.3
env:
BASE_BRANCHES: nightly
GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }}

View File

@@ -395,7 +395,7 @@ jobs:
- name: Upload Artifacts
if: ${{ steps.prepare.outputs.artifacts == 'true' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Docker${{ matrix.tag }}
path: artifacts/

View File

@@ -1,292 +0,0 @@
---
# This action 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.
name: Qodana
on:
pull_request:
branches: [master, nightly]
types: [opened, synchronize, reopened]
push:
branches: [master, nightly]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
qodana_initial_check:
name: Qodana Initial Check
permissions:
actions: write # required to use workflow dispatch on fork PRs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare
id: prepare
run: |
# check the branch variable
if [ "${{ github.event_name }}" == "push" ]
then
echo "This is a PUSH event"
# use the branch name
destination=${{ github.ref_name }}
target=${{ github.ref_name }}
else
echo "This is a PR event"
# use the PR number
destination=${{ github.event.pull_request.number }}
target=${{ github.event.pull_request.base.ref }}
fi
echo "checkout_repo=$checkout_repo" >> $GITHUB_OUTPUT
echo "checkout_ref=$checkout_ref" >> $GITHUB_OUTPUT
echo "destination=$destination" >> $GITHUB_OUTPUT
echo "target=$target" >> $GITHUB_OUTPUT
# prepare urls
base=https://${{ github.repository_owner }}.github.io
report_url=${base}/qodana-reports/${{ github.event.repository.name }}/${destination}
echo "report_url=$report_url" >> $GITHUB_OUTPUT
# build matrix
files=$(find . -type f -iname "qodana*.yaml")
echo "files: ${files}"
# do not quote to keep this as a single line
echo files=${files} >> $GITHUB_OUTPUT
MATRIX_COMBINATIONS=""
REPORTS_MARKDOWN=""
for FILE in ${files}; do
# extract the language from file name after `qodana-` and before `.yaml`
language=$(echo $FILE | sed -r -z -e 's/(\.\/)*.*\/(qodana.yaml)/default/gm')
if [[ $language != "default" ]]; then
language=$(echo $FILE | sed -r -z -e 's/(\.\/)*.*qodana-(.*).yaml/\2/gm')
fi
MATRIX_COMBINATIONS="$MATRIX_COMBINATIONS {\"file\": \"$FILE\", \"language\": \"$language\"},"
REPORTS_MARKDOWN="$REPORTS_MARKDOWN <br> - [${language}](${report_url}/${language})"
done
# removes the last character (i.e. comma)
MATRIX_COMBINATIONS=${MATRIX_COMBINATIONS::-1}
# setup matrix for later jobs
matrix=$((
echo "{ \"include\": [$MATRIX_COMBINATIONS] }"
) | jq -c .)
echo $matrix
echo $matrix | jq .
echo "matrix=$matrix" >> $GITHUB_OUTPUT
echo "reports_markdown=$REPORTS_MARKDOWN" >> $GITHUB_OUTPUT
- name: Setup initial notification inputs
id: inputs
if: >-
startsWith(github.event_name, 'pull_request') &&
steps.prepare.outputs.files != ''
run: |
# workflow logs
workflow_url_a=https://github.com/${{ github.repository_owner }}/${{ github.event.repository.name }}
workflow_url=${workflow_url_a}/actions/runs/${{ github.run_id }}
# multiline message
message=$(cat <<- EOF
:warning: **Qodana is checking this PR** :warning:
Live results available [here](${workflow_url})
EOF
)
# escape json control characters
message=$(jq -n --arg message "$message" '$message' | sed -e 's/\\/\\\\/g' -e 's/"/\\"/g')
secondary_inputs=$(echo '{
"issue_message": "'"${message}"'",
"issue_message_id": "'"qodana"'",
"issue_number": "'"${{ github.event.number }}"'",
"issue_repo_owner": "'"${{ github.repository_owner }}"'",
"issue_repo_name": "'"${{ github.event.repository.name }}"'"
}' | jq -r .)
#escape json control characters
secondary_inputs=$(jq -n --arg secondary_inputs "$secondary_inputs" '$secondary_inputs' \
| sed -e 's/\\/\\\\/g' -e 's/"/\\"/g')
echo $secondary_inputs
# secondary input as string, not JSON
# todo - change dispatch_ref to master instead of nightly
primary_inputs=$(echo '{
"dispatch_repository": "'"${{ github.repository_owner }}/.github"'",
"dispatch_workflow": "'"dispatch-issue-comment.yml"'",
"dispatch_ref": "'"nightly"'",
"dispatch_inputs": "'"${secondary_inputs}"'"
}' | jq -c .)
echo $primary_inputs
echo $primary_inputs | jq .
echo "primary_inputs=$primary_inputs" >> $GITHUB_OUTPUT
- name: Workflow Dispatch
if: >-
startsWith(github.event_name, 'pull_request') &&
steps.prepare.outputs.files != ''
uses: benc-uk/workflow-dispatch@v1.2.2
continue-on-error: true # this might error if the workflow is not found, but we still want to run the next job
with:
ref: ${{ github.base_ref || github.ref_name }} # base ref for PR and branch name for push
workflow: dispatcher.yml
inputs: ${{ steps.inputs.outputs.primary_inputs }}
token: ${{ github.token }}
outputs:
destination: ${{ steps.prepare.outputs.destination }}
target: ${{ steps.prepare.outputs.target }}
files: ${{ steps.prepare.outputs.files }}
reports_markdown: ${{ steps.prepare.outputs.reports_markdown }}
matrix: ${{ steps.prepare.outputs.matrix }}
qodana:
if: ${{ needs.qodana_initial_check.outputs.files != '' }}
needs: [qodana_initial_check]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.qodana_initial_check.outputs.matrix) }}
name: Qodana-Scan-${{ matrix.language }}
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Get baseline
id: baseline
run: |
# check if destination is not an integer
if ! [[ "${{ needs.qodana_initial_check.outputs.destination }}" =~ ^[0-9]+$ ]]
then
echo "Running for a branch update"
echo "baseline_args=" >> $GITHUB_OUTPUT
else
echo "Running for a PR"
sarif_file=qodana.sarif.json
repo=${{ github.event.repository.name }}
target=${{ needs.qodana_initial_check.outputs.target }}
language=${{ matrix.language }}
baseline_file="${repo}/${target}/${language}/results/${sarif_file}"
baseline_file_url="https://lizardbyte.github.io/qodana-reports/${baseline_file}"
# don't fail if file does not exist
wget ${baseline_file_url} || true
# check if file exists
if [ -f ${sarif_file} ]
then
echo "baseline exists"
echo "baseline_args=--baseline,${sarif_file}" >> $GITHUB_OUTPUT
else
echo "baseline does not exist"
echo "baseline_args=" >> $GITHUB_OUTPUT
fi
fi
- name: Rename Qodana config file
id: rename
run: |
# rename the file
if [ "${{ matrix.file }}" != "./qodana.yaml" ]
then
mv -f ${{ matrix.file }} ./qodana.yaml
fi
- name: Qodana
id: qodana
continue-on-error: true # ensure dispatch-qodana job is run
uses: JetBrains/qodana-action@v2023.2.6
with:
additional-cache-hash: ${{ github.ref }}-${{ matrix.language }}
artifact-name: qodana-${{ matrix.language }} # yamllint disable-line rule:line-length
args: '--print-problems,${{ steps.baseline.outputs.baseline_args }}'
pr-mode: false
upload-result: true
use-caches: true
- name: Set output status
id: status
run: |
# check if qodana failed
echo "qodana_status=${{ steps.qodana.outcome }}" >> $GITHUB_OUTPUT
outputs:
qodana_status: ${{ steps.status.outputs.qodana_status }}
dispatch-qodana:
# trigger qodana-reports to download artifacts from the matrix runs
needs: [qodana_initial_check, qodana]
runs-on: ubuntu-latest
name: Dispatch Qodana
permissions:
actions: write # required to use workflow dispatch on fork PRs
if: ${{ needs.qodana_initial_check.outputs.files != '' }}
steps:
- name: Setup qodana publish inputs
id: inputs
run: |
# get the artifacts
artifacts=${{ toJson(steps.artifacts.outputs.result) }}
artifacts=$(echo $artifacts | jq -c .)
# get the target branch
target=${{ needs.qodana_initial_check.outputs.target }}
# get the destination branch
destination=${{ needs.qodana_initial_check.outputs.destination }}
# client payload
secondary_inputs=$(echo '{
"destination": "'"${destination}"'",
"ref": "'"${{ github.ref }}"'",
"repo": "'"${{ github.repository }}"'",
"repo_name": "'"${{ github.event.repository.name }}"'",
"run_id": "'"${{ github.run_id }}"'",
"reports_markdown": "'"${{ needs.qodana_initial_check.outputs.reports_markdown }}"'",
"status": "'"${{ needs.qodana.outputs.qodana_status }}"'"
}' | jq -r .)
#escape json control characters
secondary_inputs=$(jq -n --arg secondary_inputs "$secondary_inputs" '$secondary_inputs' \
| sed -e 's/\\/\\\\/g' -e 's/"/\\"/g')
echo $secondary_inputs
primary_inputs=$(echo '{
"dispatch_repository": "'"${{ github.repository_owner }}/qodana-reports"'",
"dispatch_workflow": "'"dispatch-qodana.yml"'",
"dispatch_ref": "'"master"'",
"dispatch_inputs": "'"$secondary_inputs"'"
}' | jq -c .)
echo $primary_inputs
echo $primary_inputs | jq .
echo "primary_inputs=$primary_inputs" >> $GITHUB_OUTPUT
- name: Workflow Dispatch
uses: benc-uk/workflow-dispatch@v1.2.2
continue-on-error: true # this might error if the workflow is not found, but we don't want to fail the workflow
with:
ref: ${{ github.base_ref || github.ref_name }} # base ref for PR and branch name for push
workflow: dispatcher.yml
inputs: ${{ steps.inputs.outputs.primary_inputs }}
token: ${{ github.token }}

View File

@@ -16,7 +16,7 @@ on:
- cron: '00 12 * * 0' # every Sunday at 12:00 UTC
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
@@ -28,7 +28,7 @@ jobs:
continue: ${{ steps.continue.outputs.result }}
steps:
- name: Get repo languages
uses: actions/github-script@v6
uses: actions/github-script@v7
id: lang
with:
script: |
@@ -57,10 +57,25 @@ jobs:
console.log(`Remapping language: ${key} to ${remap_languages[key.toLowerCase()]}`)
key = remap_languages[key.toLowerCase()]
}
if (supported_languages.includes(key.toLowerCase()) &&
!matrix['include'].includes({"language": key.toLowerCase()})) {
if (supported_languages.includes(key.toLowerCase())) {
console.log(`Found supported language: ${key}`)
matrix['include'].push({"language": key.toLowerCase()})
let osList = ['ubuntu-latest'];
if (key.toLowerCase() === 'swift') {
osList = ['macos-latest'];
} else if (key.toLowerCase() === 'cpp') {
osList = ['macos-latest', 'ubuntu-latest', 'windows-latest'];
}
for (let os of osList) {
// set name for matrix
if (osList.length == 1) {
name = key.toLowerCase()
} else {
name = `${key.toLowerCase()}, ${os}`
}
// add to matrix
matrix['include'].push({"language": key.toLowerCase(), "os": os, "name": name})
}
}
}
@@ -70,7 +85,7 @@ jobs:
return matrix
- name: Continue
uses: actions/github-script@v6
uses: actions/github-script@v7
id: continue
with:
script: |
@@ -84,10 +99,15 @@ jobs:
}
analyze:
name: Analyze
name: Analyze (${{ matrix.name }})
if: ${{ needs.languages.outputs.continue == 'true' }}
defaults:
run:
shell: ${{ matrix.os == 'windows-latest' && 'msys2 {0}' || 'bash' }}
env:
GITHUB_CODEQL_BUILD: true
needs: [languages]
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
@@ -100,6 +120,7 @@ jobs:
steps:
- name: Maximize build space
if: runner.os == 'Linux'
uses: easimon/maximize-build-space@v8
with:
root-reserve-mb: 20480
@@ -114,9 +135,15 @@ jobs:
with:
submodules: recursive
- name: Setup msys2
if: runner.os == 'Windows'
uses: msys2/setup-msys2@v2
with:
update: true
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -129,19 +156,23 @@ jobs:
# Pre autobuild
# create a file named .codeql-prebuild-${{ matrix.language }}.sh in the root of your repository
# create a file named .codeql-build-${{ matrix.language }}.sh in the root of your repository
- name: Prebuild
id: prebuild
run: |
# check if .qodeql-prebuild-${{ matrix.language }}.sh exists
if [ -f "./.codeql-prebuild-${{ matrix.language }}.sh" ]; then
echo "Running .codeql-prebuild-${{ matrix.language }}.sh"
./.codeql-prebuild-${{ matrix.language }}.sh
# check if prebuild script exists
filename=".codeql-prebuild-${{ matrix.language }}-${{ runner.os }}.sh"
if [ -f "./${filename}" ]; then
echo "Running prebuild script: ${filename}"
./${filename}
fi
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
- name: Autobuild
uses: github/codeql-action/autobuild@v2
if: steps.prebuild.outputs.skip_autobuild != 'true'
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"

View File

@@ -55,7 +55,7 @@ jobs:
- name: Clang format lint
if: ${{ steps.find_files.outputs.found_files }}
uses: DoozyX/clang-format-lint-action@v0.16.2
uses: DoozyX/clang-format-lint-action@v0.17
with:
source: ${{ steps.find_files.outputs.found_files }}
extensions: 'cpp,h,m,mm'
@@ -65,7 +65,7 @@ jobs:
- name: Upload Artifacts
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: clang-format-fixes
path: ${{ steps.find_files.outputs.found_files }}
@@ -79,7 +79,7 @@ jobs:
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'

View File

@@ -1,69 +0,0 @@
---
# This action 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.
# This action receives a dispatch event and passes it through to another repo. This is a workaround to avoid issues
# where fork PRs do not have access to secrets.
name: Dispatcher
on:
workflow_dispatch:
inputs:
dispatch_repository:
description: 'Repository to dispatch to'
required: true
dispatch_workflow:
description: 'Workflow to dispatch to'
required: true
dispatch_ref:
description: 'Ref/branch to dispatch to'
required: true
dispatch_inputs:
description: 'Inputs to send'
required: true
jobs:
dispatcher:
name: Repository Dispatch
runs-on: ubuntu-latest
steps:
- name: Unescape JSON control characters
id: inputs
run: |
# get the inputs
dispatch_inputs=${{ github.event.inputs.dispatch_inputs }}
echo "$dispatch_inputs"
# temporarily replace newlines with a placeholder
dispatch_inputs=$(echo ${dispatch_inputs} | sed 's/\\\\n/_!new_line!_/g')
# remove newline characters
dispatch_inputs=$(echo ${dispatch_inputs} | sed 's/\\n//g')
# replace placeholder with newline
dispatch_inputs=$(echo ${dispatch_inputs} | sed 's/_!new_line!_/\\n/g')
# replace escaped quotes with unescaped quotes
dispatch_inputs=$(echo ${dispatch_inputs} | sed 's/\\"//g')
# debug echo
echo "$dispatch_inputs"
# parse as JSON
dispatch_inputs=$(echo "$dispatch_inputs" | jq -c .)
# debug echo
echo "$dispatch_inputs"
echo "dispatch_inputs=$dispatch_inputs" >> $GITHUB_OUTPUT
- name: Workflow Dispatch
uses: benc-uk/workflow-dispatch@v1.2.2
with:
repo: ${{ github.event.inputs.dispatch_repository }}
ref: ${{ github.event.inputs.dispatch_ref || 'master' }} # default to master if not specified
workflow: ${{ github.event.inputs.dispatch_workflow }}
inputs: ${{ steps.inputs.outputs.dispatch_inputs }}
token: ${{ secrets.GH_BOT_TOKEN || github.token }} # fallback to default token if not specified

View File

@@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Stale
uses: actions/stale@v8
uses: actions/stale@v9
with:
close-issue-message: >
This issue was closed because it has been stalled for 10 days with no activity.
@@ -43,7 +43,7 @@ jobs:
repo-token: ${{ secrets.GH_BOT_TOKEN }}
- name: Invalid Template
uses: actions/stale@v8
uses: actions/stale@v9
with:
close-issue-message: >
This issue was closed because the the template was not completed after 5 days.

View File

@@ -20,6 +20,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Label Actions
uses: dessant/label-actions@v3
uses: dessant/label-actions@v4
with:
github-token: ${{ secrets.GH_BOT_TOKEN }}

View File

@@ -23,7 +23,7 @@ jobs:
uses: actions/checkout@v4
- name: Install Python 3.9
uses: actions/setup-python@v4 # https://github.com/actions/setup-python
uses: actions/setup-python@v5 # https://github.com/actions/setup-python
with:
python-version: '3.9'
@@ -77,7 +77,7 @@ jobs:
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Create/Update Pull Request
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
with:
add-paths: |
locale/*.po

View File

@@ -24,7 +24,7 @@ jobs:
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4 # https://github.com/actions/setup-python
uses: actions/setup-python@v5 # https://github.com/actions/setup-python
with:
python-version: '3.10'

View File

@@ -15,8 +15,8 @@ on:
jobs:
discord:
if: >-
startsWith(github.repository, 'LizardByte/') and
not(github.event.release.prerelease) and
startsWith(github.repository, 'LizardByte/') &&
not(github.event.release.prerelease) &&
not(github.event.release.draft)
runs-on: ubuntu-latest
steps:
@@ -34,8 +34,8 @@ jobs:
facebook_group:
if: >-
startsWith(github.repository, 'LizardByte/') and
not(github.event.release.prerelease) and
startsWith(github.repository, 'LizardByte/') &&
not(github.event.release.prerelease) &&
not(github.event.release.draft)
runs-on: ubuntu-latest
steps:
@@ -51,8 +51,8 @@ jobs:
facebook_page:
if: >-
startsWith(github.repository, 'LizardByte/') and
not(github.event.release.prerelease) and
startsWith(github.repository, 'LizardByte/') &&
not(github.event.release.prerelease) &&
not(github.event.release.draft)
runs-on: ubuntu-latest
steps:
@@ -68,8 +68,8 @@ jobs:
reddit:
if: >-
startsWith(github.repository, 'LizardByte/') and
not(github.event.release.prerelease) and
startsWith(github.repository, 'LizardByte/') &&
not(github.event.release.prerelease) &&
not(github.event.release.draft)
runs-on: ubuntu-latest
steps:
@@ -88,8 +88,8 @@ jobs:
twitter:
if: >-
startsWith(github.repository, 'LizardByte/') and
not(github.event.release.prerelease) and
startsWith(github.repository, 'LizardByte/') &&
not(github.event.release.prerelease) &&
not(github.event.release.draft)
runs-on: ubuntu-latest
steps:

View File

@@ -39,7 +39,7 @@ jobs:
- name: Upload Artifacts
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: gh-pages
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
@@ -51,7 +51,7 @@ jobs:
if: >-
(github.event_name == 'push' && github.ref == 'refs/heads/master') ||
(github.event_name == 'workflow_dispatch')
uses: actions-js/push@v1.4
uses: actions-js/push@v1.5
with:
github_token: ${{ secrets.GH_BOT_TOKEN }}
author_email: ${{ secrets.GH_BOT_EMAIL }}

50
.gitignore vendored
View File

@@ -1,13 +1,45 @@
build
cmake-build*
.DS_Store
.vscode
.vs
*.swp
*.kdev4
# Prerequisites
*.d
.cache
.idea
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
# JetBrains IDE
.idea/
# VSCode IDE
.vscode/
# build directories
build/
cmake-*/
# npm
node_modules/

78
.gitmodules vendored
View File

@@ -1,63 +1,55 @@
[submodule "packaging/linux/flatpak/deps/org.flatpak.Builder.BaseApp"]
path = packaging/linux/flatpak/deps/org.flatpak.Builder.BaseApp
url = https://github.com/flathub/org.flatpak.Builder.BaseApp
branch = branch/23.08
[submodule "packaging/linux/flatpak/deps/shared-modules"]
path = packaging/linux/flatpak/deps/shared-modules
url = https://github.com/flathub/shared-modules
branch = master
[submodule "third-party/build-deps"]
path = third-party/build-deps
url = https://github.com/LizardByte/build-deps.git
branch = dist
[submodule "third-party/googletest"]
path = third-party/googletest
url = https://github.com/google/googletest/
branch = v1.14.x
[submodule "third-party/jwt-cpp"]
path = third-party/jwt-cpp
url = https://github.com/Thalhammer/jwt-cpp.git
branch = master
[submodule "third-party/moonlight-common-c"]
path = third-party/moonlight-common-c
url = https://github.com/moonlight-stream/moonlight-common-c.git
branch = master
[submodule "third-party/Simple-Web-Server"]
path = third-party/Simple-Web-Server
url = https://gitlab.com/eidheim/Simple-Web-Server.git
branch = master
[submodule "third-party/ViGEmClient"]
path = third-party/ViGEmClient
url = https://github.com/nefarius/ViGEmClient
branch = master
[submodule "third-party/miniupnp"]
path = third-party/miniupnp
url = https://github.com/miniupnp/miniupnp
[submodule "third-party/nanors"]
path = third-party/nanors
url = https://github.com/sleepybishop/nanors.git
branch = master
[submodule "third-party/nv-codec-headers"]
path = third-party/nv-codec-headers
url = https://github.com/FFmpeg/nv-codec-headers
branch = sdk/12.0
[submodule "third-party/nvapi-open-source-sdk"]
path = third-party/nvapi-open-source-sdk
url = https://github.com/LizardByte/nvapi-open-source-sdk
branch = sdk
[submodule "third-party/Simple-Web-Server"]
path = third-party/Simple-Web-Server
url = https://gitlab.com/eidheim/Simple-Web-Server.git
branch = master
[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
branch = ffmpeg-windows-x86_64
[submodule "third-party/ffmpeg-macos-x86_64"]
path = third-party/ffmpeg-macos-x86_64
url = https://github.com/LizardByte/build-deps
branch = ffmpeg-macos-x86_64
[submodule "third-party/ffmpeg-linux-x86_64"]
path = third-party/ffmpeg-linux-x86_64
url = https://github.com/LizardByte/build-deps
branch = ffmpeg-linux-x86_64
[submodule "third-party/ffmpeg-linux-aarch64"]
path = third-party/ffmpeg-linux-aarch64
url = https://github.com/LizardByte/build-deps
branch = ffmpeg-linux-aarch64
[submodule "third-party/ffmpeg-macos-aarch64"]
path = third-party/ffmpeg-macos-aarch64
url = https://github.com/LizardByte/build-deps
branch = ffmpeg-macos-aarch64
[submodule "third-party/nanors"]
path = third-party/nanors
url = https://github.com/sleepybishop/nanors.git
branch = master
[submodule "third-party/tray"]
path = third-party/tray
url = https://github.com/LizardByte/tray
branch = master
[submodule "third-party/nvapi-open-source-sdk"]
path = third-party/nvapi-open-source-sdk
url = https://github.com/LizardByte/nvapi-open-source-sdk
branch = sdk
[submodule "third-party/ffmpeg-linux-powerpc64le"]
path = third-party/ffmpeg-linux-powerpc64le
url = https://github.com/LizardByte/build-deps
branch = ffmpeg-linux-powerpc64le
[submodule "third-party/ViGEmClient"]
path = third-party/ViGEmClient
url = https://github.com/LizardByte/Virtual-Gamepad-Emulation-Client.git
branch = master
[submodule "third-party/wayland-protocols"]
path = third-party/wayland-protocols
url = https://gitlab.freedesktop.org/wayland/wayland-protocols

View File

@@ -1,5 +1,230 @@
# Changelog
## [0.23.1] - 2024-04-20
**Fixed**
- (Capture/Windows) Disable HRD and CBR encoding options by default for AMD GPUs due to video quality regressions in v0.23.0
- (UI) Fix incorrect strings for QuickSync 'fast' and 'faster' presets
- (UI/Linux) Fix update prompt appearing even when running the latest version
- (Input) Fix crash when absolute input events are received prior to the display viewport being set
- (Input/Linux) Fix missing clamping of rumble intensity to valid range
- (Build/Tests) Fix error when attempting to disable compilation of tests
- (Build/Linux) Fix some compilation errors when using Musl libc
- (Logging) Fix broken debug messages for codec capability flags
- (Logging/Linux) Fix log messages to include the correct setcap command for resolving KMS permission errors
**Added**
- (Capture/Linux) Improve frame time consistency for all capture backends
- (UI) Set focus to the PIN textbox when navigating to the PIN tab
**Dependencies**
- Remove libavdevice dependency
**Misc**
- (Linux) Prefer ayatana-appindicator3 over appindicator3 if both are available
## [0.23.0] - 2024-04-06
Attention, this release contains critical security fixes. Please update as soon as possible.
**Breaking**
- (Linux) Drop support for Ubuntu 20.04
- (Linux) No longer provide arm64 rpm packages, due to extreme compile time on GitHub hosted runners
**Fixed**
- (Network) Ensure unpairing takes effect without restart
- (Capture/Linux) Fix logical comparison of texture size
- (Service/Windows) Quote the path to sunshinesvc.exe when launching the termination helper
**Added**
- (WebUI) Localization support
- (Capture/Linux) Populate host latency for kmx/x11 grab
- (Capture/Windows) AMF rate control improvements
- (Linux) Add support for Ubuntu 24.04 (x86_64 only)
**Dependencies**
- Bump rstcheck from 6.2.0 to 6.2.1
- Bump org.flatpak.Builder.BaseApp from 644487f to 6e295e6
- Bump ffmpeg
- Bump @fortawesome/fontawesome-free from 6.5.1 to 6.5.2
**Misc**
- (Style) Refactored video encoder declarations
- (CI) Refactored Linux build in CI
- (CI) Added unit testing and code coverage
- (Docs/macOS) Update curl command for Portfile install
- (Style) Refactor logging initialization
## [0.22.2] - 2024-03-15
**Fixed**
- (Tray/Windows) Fix broken system tray icon on some systems
- (Linux) Fix crash when XDG_CONFIG_HOME or CONFIGURATION_DIRECTORY are set
- (Linux) Fix config migration across filesystems and with non-existent parent directories
## [0.22.1] - 2024-03-13
**Breaking**
- (ArchLinux) Drop support for standalone PKGBUILD files. Use the binary Arch package or install via AUR instead.
- (macOS) Drop support for experimental dmg package. Use Homebrew or MacPorts instead.
**Added**
- (macOS) Added Homebrew support
**Changed**
- (Process/Windows) The working directory is now searched first when the command contains a relative path
- (ArchLinux) The kmsgrab capture backend is now compiled by default to support Wayland capture on non-wlroots-based compositors
- (Capture/Linux) X11 capture is now preferred over kmsgrab for cards that lack atomic modesetting support to ensure cursor capture works
- (Capture/Linux) Kmsgrab will only choose NVENC by default if the display is connected to the Nvidia GPU to avoid possible EGL import failures
**Fixed**
- (Config) Fix unsupported resolution error with some Moonlight clients
- (Capture/Windows) Fix crash when streaming Ryujinx, Red Alert 2, and other apps that use unusually sized monochrome cursors
- (Capture/Linux) Fix crash in KMS cursor capture when running on Arch-based distros
- (Capture/Linux) Fix crash if CUDA GPU has a PCI ID with hexadecimal digits greater than 9
- (Process/Windows) Fix starting apps when the working directory is enclosed in quotes
- (Process/Windows) Fix process tree tracking when the app is launched via a cmd.exe trampoline
- (Installer/Windows) Fix slow operation during ViGEmBus installation that may cause the installer to appear stuck
- (Build/macOS) Fix issues building on macOS 13 and 14
- (Build/Linux) Fix missing install script in the Arch binary package
- (Build/Linux) Fix missing optional dependencies in the Arch binary package
- (Build/Linux) Ensure correct Arch pkg is published to GitHub releases
- (Capture/Linux) Fix mismatched case and unhandled exception in CUDA device lookup
- (Config) Add missing resolution to default config ui
- (Linux) Fix udev rules for uinput access not working until after reboot
- (Linux) Fix wrong path in desktop files
- (Tray) Cache icons to avoid possible DRM issues
- (Tray) Fix attempt to update tray icon after it was destroyed
- (Linux) Migrate old config files to new location if env SUNSHINE_MIGRATE_CONFIG=1 is set (automatically set for Flatpak)
- (Linux/Fedora) Re-enable CUDA support and bump to 12.4.0
**Misc**
- (Build/Windows) Adjust Windows debuginfo artifact to reduce confusion with real release binaries
## [0.22.0] - 2024-03-03
**Breaking**
- (Network) Clients must now be paired with the host before they can use Wake-on-LAN
- (Build/Linux) Drop Fedora 37 support
**Added**
- (Input/Linux) Add native/pen touch support for Linux
- (Capture/Linux) Add HDR streaming support for Linux using KMS capture backend
- (Capture/Linux) Add KMS capture support for Nvidia GPUs running Wayland
- (Network) Add support for full E2E stream encryption, configurable for LAN and WAN independently
- (Process) Add process group tracking to automatically handle launchers that spawn other child processes
- (Capture/Windows) Add setting for controlling GPU power saving and encoding latency tradeoff for NVENC
- (Capture/Windows) Add additional encoding settings for NVENC
- (Process/Windows) Add experimental support for launching URLs and other non-exe files
- (Capture/Windows) Add setting to allow use of slower HEVC encoding on older Intel GPUs
- (Input/Windows) Add settings to control automatic gamepad type selection heuristics
- (Input/Windows) Add setting to allow DS4 back/select button to trigger touchpad click
- (Input) Add setting to disable high resolution scrolling and native pen/touch support
- (Network) Add support for certificates types other than RSA-2048
- (Build/Linux) Add Fedora 39 docker image and rpm package
- (Capture/Linux) Display monitor indexes in logs for wlroots and KMS capture backends
- (UI) Add link to logs inside fatal error container
- (UI) Add hash handler and ids for all configuration categories and settings
**Changed**
- (UI) Several configuration options have been moved to more suitable locations
- (Network) Client-selected bitrate is now adjusted for FEC percentage and other stream overhead
- (Capture/Linux) Improve VAAPI encoding performance on Intel GPUs
- (Capture) Connection establishment delay is reduced by eliminating many encoder probing operations
- (Process) Graceful termination of running processes is attempted first when stopping apps
- (Capture) Improve software encoding performance by enabling multi-threaded color conversion
- (Capture) Adjust default CPU thread count for software encoding from 1 to 2 for improved performance
- (Steam/Windows) Modernized the default Steam app shortcut to avoid depending on Steam's install location and support app termination
- (Linux) Updated desktop files
- (Config) Add 2560x1440 to default resolutions
- (Network) Use the configured ping timeout for the initial launch event timeout
- (UI) Migrate UI to Vite and Vue3, and various UX improvements
- (Logging) Adjust wording and severity of some log messages
- (Build) Use a single submodule for ffmpeg
- (Install/Windows) Skip ViGEmBus installation if a supported version is already installed
- (Build/Linux) Optionally, allow using the system installation of wayland-protocols
- (Build/Linux) Make vaapi optional
- (Windows) Replace boost::json with nlohmann/json
**Fixed**
- (Network/Windows) Fix auto-discovery of hosts by iOS/tvOS clients
- (Network) Fix immediate connection termination when streaming over some Internet connections
- (Capture/Linux) Fix missing mouse cursor when using KMS capture on a GPU with hardware cursor support
- (Capture/Windows) Add workaround for Nvidia driver bug causing Sunshine to crash when RTX HDR is globally enabled
- (Capture/Windows) Add workaround for AMD driver bug on pre-RDNA GPUs causing hardware encoding failure
- (Capture/Windows) Reintroduce support for NVENC on older Nvidia GPU drivers (v456.71-v522.25)
- (Capture/Windows) Fix encoding on old Intel GPUs that don't support low-power H.264 encoding
- (Capture/Linux) Fix GL errors or corrupt video output on GPUs that use aux planes such as Intel Arc
- (Capture/Linux) Fix GL errors or corrupt video output on GPUs that use DRM modifiers on YUV buffers
- (Input/Windows) Fix non-functional duplicate controllers appearing in rare cases
- (Input/Windows) Avoid triggering crash in ViGEmBus when the system goes to sleep
- (Input/Linux) Fix scrolling in applications that don't support high-resolution scrolling
- (Input/Linux) Fix absolute mouse input being interpreted as touch input
- (Capture/Linux) Fix wlroots capture causing GL errors and crashes
- (Capture/Linux) Fix wlroots capture failing when the display scale factor was not 1
- (Capture/Linux) Fix excessive CPU usage when using wlroots capture backend
- (Capture/Linux) Fix capture of virtual displays created by the amdgpu kernel driver
- (Audio/Windows) Fix audio capture failures on Insider Preview versions of Windows 11
- (Capture/Windows) Fix incorrect portrait mode rotation
- (Capture/Windows) Fix capture recovery when a driver update/crash occurs while streaming
- (Capture/Windows) Fix delay displaying UAC dialogs when the mouse cursor is not moving
- (Capture/Linux) Fix corrupt video output or stream disconnections if the display resolution changes while streaming
- (Capture/Linux) Fix color of aspect ratio padding in the capture image with VAAPI
- (Capture/Linux) Fix NVENC initialization error when using X11 capture with some GPUs
- (Tray/Linux) Fix random crash when the tray icon is updating
- (Network) Fix QoS tagging when running in IPv4+IPv6 mode
- (Process) Fix termination of child processes upon app quit when the parent has already terminated
- (Process) Fix notification of graceful termination to connected clients when Sunshine quits
- (Capture) Fix corrupt output or green aspect-ratio padding when using software encoding with some video resolutions
- (Windows) Fix crashes when processing file paths or other strings with certain non-ASCII characters
- (Capture) Ensure user supplied framerates are used exclusively in place of pre-defined framerates
- (CMake/Linux) Skip including unnecessary headers
- (Capture/Linux) Replace vaTerminate method with dl handle
- (Capture/Linux) Fix capture when DRM is enabled and x11 is disabled
- (Tray) Use PROJECT_NAME definition for tooltip
- (CMake) Use GNUInstallDirs to install data and lib directories
- (macOS) Replace deprecated code
- (API) Allow trailing slashes in on API endpoints
- (API) Add additional pin validation
- (Linux) Use XDG spec for fetching config directory
- (CMake) Properly find evdev
- (Config) Properly save global_prep_cmd and fps settings
**Dependencies**
- Bump third-party/wayland-protocols from 681c33c to 46f201b
- Bump third-party/nv-codec-headers from 9402b5a to 22441b5
- Bump third-party/nanors from 395e5ad to e9e242e
- Bump third-party/Simple-Web-Server from 2f29926 to 27b41f5
- Bump ffmpeg
- Bump third-party/tray from 2664388 to 2bf1c61
- Bump actions/setup-python from 4 to 5
- Bump actions/upload-artifact from 3 to 4
- Bump @fortawesome/fontawesome-free from 6.4.2 to 6.5.1
- Bump babel from 2.13.0 to 2.14.0
- Move miniupnpc from submodule to system installed package
- Bump furo from 2023.9.10 to 2024.1.29
- Bump third-party/moonlight-common-c from f78f213 to cbd0ec1
- Bump third-party/ViGEmClient from 1920260 to 8d71f67
- Bump peter-evans/create-pull-request from 5 to 6
- Bump bootstrap from 5.3.2 to 5.3.3
**Misc**
- (Build) Update global workflows
- (Docs/Linux) Add example for setting custom resolution with NVIDIA
- (Docs) Fix broken links
- (Docs/Windows) Add information about disk permissions
- (Docs) Fix failing images
- (Docs) Use glob pattern to match source code docs
- (CI/macOS) Install boost from source
- (Docs) Add reset credentials examples for unique packages
- (Docs) Refactor and general cleanup
- (Docs) Cross-reference config settings to the UI
- (Docs/Docker) Add podman notes
- (Build) Use CMAKE_SOURCE_DIR property everywhere
- (Build/Docker) Add docker toolchain file for CLion
- (macOS) Various code style fixes
- (Deps) Alphabetize git submodules
- (Docs/Examples) Update URI examples
- (Refactor) Refactored some code in preparation for unit testing implementation
- (CMake) Add option to skip cuda inheriting compile options
- (CMake) Add option to error build on warnings
## [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
@@ -592,3 +817,8 @@ settings. In v0.17.0, games now run under your user account without elevated pri
[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
[0.22.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.22.0
[0.22.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.22.1
[0.22.2]: https://github.com/LizardByte/Sunshine/releases/tag/v0.22.2
[0.23.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.23.0
[0.23.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.23.1

View File

@@ -1,10 +1,11 @@
cmake_minimum_required(VERSION 3.18)
# `CMAKE_CUDA_ARCHITECTURES` requires 3.18
# set_source_files_properties requires 3.18
# todo - set this conditionally
# todo - set version to 0.0.0 once confident in automated versioning
project(Sunshine VERSION 0.21.0
DESCRIPTION "Sunshine is a self-hosted game stream host for Moonlight."
project(Sunshine VERSION 0.23.1
DESCRIPTION "Self-hosted game stream host for Moonlight"
HOMEPAGE_URL "https://app.lizardbyte.dev/Sunshine")
set(PROJECT_LICENSE "GPL-3.0")
@@ -20,7 +21,7 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
endif()
# set the module path, used for includes
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
# set version info for this build
include(${CMAKE_MODULE_PATH}/prep/build_version.cmake)
@@ -28,6 +29,9 @@ include(${CMAKE_MODULE_PATH}/prep/build_version.cmake)
# cmake build flags
include(${CMAKE_MODULE_PATH}/prep/options.cmake)
# initial prep
include(${CMAKE_MODULE_PATH}/prep/init.cmake)
# configure special package files, such as sunshine.desktop, Flatpak manifest, Portfile , etc.
include(${CMAKE_MODULE_PATH}/prep/special_package_configuration.cmake)

View File

@@ -52,8 +52,9 @@ Create and run the container (substitute your `<values>`):
```bash
docker run -d \
--device /dev/dri/ \
--name=<image_name> \
--restart=unless-stopped
--restart=unless-stopped \
-e PUID=<uid> \
-e PGID=<gid> \
-e TZ=<timezone> \
@@ -86,6 +87,25 @@ services:
- "47998-48000:47998-48000/udp"
```
### Using podman run
Create and run the container (substitute your `<values>`):
```bash
podman run -d \
--device /dev/dri/ \
--name=<image_name> \
--restart=unless-stopped \
--userns=keep-id \
-e PUID=<uid> \
-e PGID=<gid> \
-e TZ=<timezone> \
-v <path to data>:/config \
-p 47984-47990:47984-47990/tcp \
-p 48010:48010 \
-p 47998-48000:47998-48000/udp \
<image>
```
### Parameters
You must substitute the `<values>` with your own settings.
@@ -132,8 +152,9 @@ The architectures supported by these images are shown in the table below.
| tag suffix | amd64/x86_64 | arm64/aarch64 |
|-----------------|--------------|---------------|
| archlinux | ✅ | ❌ |
| debian-bookworm | ✅ | ✅ |
| debian-bullseye | ✅ | ✅ |
| fedora-36 | ✅ | ✅ |
| fedora-37 | ✅ | ✅ |
| fedora-38 | ✅ | ✅ |
| fedora-39 | ✅ | ✅ |
| ubuntu-20.04 | ✅ | ✅ |
| ubuntu-22.04 | ✅ | ✅ |

View File

@@ -17,69 +17,48 @@ System Requirements
**Minimum Requirements**
+------------+------------------------------------------------------------+
| GPU | AMD: VCE 1.0 or higher, see `obs-amd hardware support`_ |
| +------------------------------------------------------------+
| | Intel: VAAPI-compatible, see: `VAAPI hardware support`_ |
| +------------------------------------------------------------+
| | Nvidia: NVENC enabled cards, see `nvenc support matrix`_ |
+------------+------------------------------------------------------------+
| CPU | AMD: Ryzen 3 or higher |
| +------------------------------------------------------------+
| | Intel: Core i3 or higher |
+------------+------------------------------------------------------------+
| RAM | 4GB or more |
+------------+------------------------------------------------------------+
| OS | Windows: 10+ (Windows Server not supported) |
| +------------------------------------------------------------+
| | macOS: 11.7+ |
| +------------------------------------------------------------+
| | Linux/Debian: 11 (bullseye) |
| +------------------------------------------------------------+
| | Linux/Fedora: 36+ |
| +------------------------------------------------------------+
| | Linux/Ubuntu: 20.04+ (focal) |
+------------+------------------------------------------------------------+
| Network | Host: 5GHz, 802.11ac |
| +------------------------------------------------------------+
| | Client: 5GHz, 802.11ac |
+------------+------------------------------------------------------------+
.. csv-table::
:widths: 15, 60
"GPU", "AMD: VCE 1.0 or higher, see: `obs-amd hardware support <https://github.com/obsproject/obs-amd-encoder/wiki/Hardware-Support>`_"
"", "Intel: VAAPI-compatible, see: `VAAPI hardware support <https://www.intel.com/content/www/us/en/developer/articles/technical/linuxmedia-vaapi.html>`_"
"", "Nvidia: NVENC enabled cards, see: `nvenc support matrix <https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new>`_"
"CPU", "AMD: Ryzen 3 or higher"
"", "Intel: Core i3 or higher"
"RAM", "4GB or more"
"OS", "Windows: 10+ (Windows Server does not support virtual gamepads)"
"", "macOS: 12+"
"", "Linux/Debian: 11 (bullseye)"
"", "Linux/Fedora: 38+"
"", "Linux/Ubuntu: 22.04+ (jammy)"
"Network", "Host: 5GHz, 802.11ac"
"", "Client: 5GHz, 802.11ac"
**4k Suggestions**
+------------+------------------------------------------------------------+
| GPU | AMD: Video Coding Engine 3.1 or higher |
| +------------------------------------------------------------+
| | Intel: HD Graphics 510 or higher |
| +------------------------------------------------------------+
| | Nvidia: GeForce GTX 1080 or higher |
+------------+------------------------------------------------------------+
| CPU | AMD: Ryzen 5 or higher |
| +------------------------------------------------------------+
| | Intel: Core i5 or higher |
+------------+------------------------------------------------------------+
| Network | Host: CAT5e ethernet or better |
| +------------------------------------------------------------+
| | Client: CAT5e ethernet or better |
+------------+------------------------------------------------------------+
.. csv-table::
:widths: 15, 60
"GPU", "AMD: Video Coding Engine 3.1 or higher"
"", "Intel: HD Graphics 510 or higher"
"", "Nvidia: GeForce GTX 1080 or higher"
"CPU", "AMD: Ryzen 5 or higher"
"", "Intel: Core i5 or higher"
"Network", "Host: CAT5e ethernet or better"
"", "Client: CAT5e ethernet or better"
**HDR Suggestions**
+------------+------------------------------------------------------------+
| GPU | AMD: Video Coding Engine 3.4 or higher |
| +------------------------------------------------------------+
| | Intel: UHD Graphics 730 or higher |
| +------------------------------------------------------------+
| | Nvidia: Pascal-based GPU (GTX 10-series) or higher |
+------------+------------------------------------------------------------+
| CPU | AMD: todo |
| +------------------------------------------------------------+
| | Intel: todo |
+------------+------------------------------------------------------------+
| Network | Host: CAT5e ethernet or better |
| +------------------------------------------------------------+
| | Client: CAT5e ethernet or better |
+------------+------------------------------------------------------------+
.. csv-table::
:widths: 15, 60
"GPU", "AMD: Video Coding Engine 3.4 or higher"
"", "Intel: UHD Graphics 730 or higher"
"", "Nvidia: Pascal-based GPU (GTX 10-series) or higher"
"CPU", "AMD: todo"
"", "Intel: todo"
"Network", "Host: CAT5e ethernet or better"
"", "Client: CAT5e ethernet or better"
Integrations
------------
@@ -96,6 +75,10 @@ Integrations
:alt: Read the Docs
:target: http://sunshinestream.readthedocs.io/
.. image:: https://img.shields.io/codecov/c/gh/LizardByte/Sunshine?token=SMGXQ5NVMJ&style=for-the-badge&logo=codecov&label=codecov
:alt: Codecov
:target: https://codecov.io/gh/LizardByte/Sunshine
Support
-------
@@ -122,7 +105,3 @@ Stats
.. image:: https://img.shields.io/github/stars/lizardbyte/sunshine.svg?logo=github&style=for-the-badge
:alt: GitHub stars
:target: https://github.com/LizardByte/Sunshine
.. _nvenc support matrix: https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new
.. _obs-amd hardware support: https://github.com/obsproject/obs-amd-encoder/wiki/Hardware-Support
.. _VAAPI hardware support: https://www.intel.com/content/www/us/en/developer/articles/technical/linuxmedia-vaapi.html

70
cmake/FindLibva.cmake Normal file
View File

@@ -0,0 +1,70 @@
# - Try to find Libva
# This module defines the following variables:
#
# * LIBVA_FOUND - The component was found
# * LIBVA_INCLUDE_DIRS - The component include directory
# * LIBVA_LIBRARIES - The component library Libva
# * LIBVA_DRM_LIBRARIES - The component library Libva DRM
# Use pkg-config to get the directories and then use these values in the
# find_path() and find_library() calls
# cmake-format: on
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(_LIBVA libva)
pkg_check_modules(_LIBVA_DRM libva-drm)
endif()
find_path(
LIBVA_INCLUDE_DIR
NAMES va/va.h va/va_drm.h
HINTS ${_LIBVA_INCLUDE_DIRS}
PATHS /usr/include /usr/local/include /opt/local/include)
find_library(
LIBVA_LIB
NAMES ${_LIBVA_LIBRARIES} libva
HINTS ${_LIBVA_LIBRARY_DIRS}
PATHS /usr/lib /usr/local/lib /opt/local/lib)
find_library(
LIBVA_DRM_LIB
NAMES ${_LIBVA_DRM_LIBRARIES} libva-drm
HINTS ${_LIBVA_DRM_LIBRARY_DIRS}
PATHS /usr/lib /usr/local/lib /opt/local/lib)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Libva REQUIRED_VARS LIBVA_INCLUDE_DIR LIBVA_LIB LIBVA_DRM_LIB)
mark_as_advanced(LIBVA_INCLUDE_DIR LIBVA_LIB LIBVA_DRM_LIB)
if(LIBVA_FOUND)
set(LIBVA_INCLUDE_DIRS ${LIBVA_INCLUDE_DIR})
set(LIBVA_LIBRARIES ${LIBVA_LIB})
set(LIBVA_DRM_LIBRARIES ${LIBVA_DRM_LIB})
if(NOT TARGET Libva::va)
if(IS_ABSOLUTE "${LIBVA_LIBRARIES}")
add_library(Libva::va UNKNOWN IMPORTED)
set_target_properties(Libva::va PROPERTIES IMPORTED_LOCATION "${LIBVA_LIBRARIES}")
else()
add_library(Libva::va INTERFACE IMPORTED)
set_target_properties(Libva::va PROPERTIES IMPORTED_LIBNAME "${LIBVA_LIBRARIES}")
endif()
set_target_properties(Libva::va PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBVA_INCLUDE_DIRS}")
endif()
if(NOT TARGET Libva::drm)
if(IS_ABSOLUTE "${LIBVA_DRM_LIBRARIES}")
add_library(Libva::drm UNKNOWN IMPORTED)
set_target_properties(Libva::drm PROPERTIES IMPORTED_LOCATION "${LIBVA_DRM_LIBRARIES}")
else()
add_library(Libva::drm INTERFACE IMPORTED)
set_target_properties(Libva::drm PROPERTIES IMPORTED_LIBNAME "${LIBVA_DRM_LIBRARIES}")
endif()
set_target_properties(Libva::drm PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBVA_INCLUDE_DIRS}")
endif()
endif()

34
cmake/FindSystemd.cmake Normal file
View File

@@ -0,0 +1,34 @@
# - Try to find Systemd
# Once done this will define
#
# SYSTEMD_FOUND - system has systemd
# SYSTEMD_USER_UNIT_INSTALL_DIR - the systemd system unit install directory
# SYSTEMD_SYSTEM_UNIT_INSTALL_DIR - the systemd user unit install directory
IF (NOT WIN32)
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(SYSTEMD "systemd")
endif()
if (SYSTEMD_FOUND)
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE}
--variable=systemduserunitdir systemd
OUTPUT_VARIABLE SYSTEMD_USER_UNIT_INSTALL_DIR)
string(REGEX REPLACE "[ \t\n]+" "" SYSTEMD_USER_UNIT_INSTALL_DIR
"${SYSTEMD_USER_UNIT_INSTALL_DIR}")
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE}
--variable=systemdsystemunitdir systemd
OUTPUT_VARIABLE SYSTEMD_SYSTEM_UNIT_INSTALL_DIR)
string(REGEX REPLACE "[ \t\n]+" "" SYSTEMD_SYSTEM_UNIT_INSTALL_DIR
"${SYSTEMD_SYSTEM_UNIT_INSTALL_DIR}")
mark_as_advanced(SYSTEMD_USER_UNIT_INSTALL_DIR SYSTEMD_SYSTEM_UNIT_INSTALL_DIR)
endif ()
ENDIF ()

28
cmake/FindUdev.cmake Normal file
View File

@@ -0,0 +1,28 @@
# - Try to find Udev
# Once done this will define
#
# UDEV_FOUND - system has udev
# UDEV_RULES_INSTALL_DIR - the udev rules install directory
IF (NOT WIN32)
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(UDEV "udev")
endif()
if (UDEV_FOUND)
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE}
--variable=udevdir udev
OUTPUT_VARIABLE UDEV_RULES_INSTALL_DIR)
string(REGEX REPLACE "[ \t\n]+" "" UDEV_RULES_INSTALL_DIR
"${UDEV_RULES_INSTALL_DIR}")
set(UDEV_RULES_INSTALL_DIR "${UDEV_RULES_INSTALL_DIR}/rules.d")
mark_as_advanced(UDEV_RULES_INSTALL_DIR)
endif ()
ENDIF ()

View File

@@ -3,7 +3,25 @@
list(APPEND SUNSHINE_COMPILE_OPTIONS -Wall -Wno-sign-compare)
# Wall - enable all warnings
# Werror - treat warnings as errors
# Wno-maybe-uninitialized/Wno-uninitialized - disable warnings for maybe uninitialized variables
# Wno-sign-compare - disable warnings for signed/unsigned comparisons
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# GCC specific compile options
# GCC 12 and higher will complain about maybe-uninitialized
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12)
list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-maybe-uninitialized)
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# Clang specific compile options
# Clang doesn't actually complain about this this, so disabling for now
# list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-uninitialized)
endif()
if(BUILD_WERROR)
list(APPEND SUNSHINE_COMPILE_OPTIONS -Werror)
endif()
# setup assets directory
if(NOT SUNSHINE_ASSETS_DIR)
@@ -23,72 +41,75 @@ elseif(UNIX)
endif()
endif()
include_directories(SYSTEM third-party/nv-codec-headers/include)
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/third-party/nv-codec-headers/include")
file(GLOB NVENC_SOURCES CONFIGURE_DEPENDS "src/nvenc/*.cpp" "src/nvenc/*.h")
list(APPEND PLATFORM_TARGET_FILES ${NVENC_SOURCES})
configure_file(src/version.h.in version.h @ONLY)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
configure_file("${CMAKE_SOURCE_DIR}/src/version.h.in" version.h @ONLY)
include_directories("${CMAKE_CURRENT_BINARY_DIR}") # required for importing version.h
set(SUNSHINE_TARGET_FILES
third-party/nanors/rs.c
third-party/nanors/rs.h
third-party/moonlight-common-c/src/Input.h
third-party/moonlight-common-c/src/Rtsp.h
third-party/moonlight-common-c/src/RtspParser.c
third-party/moonlight-common-c/src/Video.h
third-party/tray/tray.h
src/upnp.cpp
src/upnp.h
src/cbs.cpp
src/utility.h
src/uuid.h
src/config.h
src/config.cpp
src/main.cpp
src/main.h
src/crypto.cpp
src/crypto.h
src/nvhttp.cpp
src/nvhttp.h
src/httpcommon.cpp
src/httpcommon.h
src/confighttp.cpp
src/confighttp.h
src/rtsp.cpp
src/rtsp.h
src/stream.cpp
src/stream.h
src/video.cpp
src/video.h
src/video_colorspace.cpp
src/video_colorspace.h
src/input.cpp
src/input.h
src/audio.cpp
src/audio.h
src/platform/common.h
src/process.cpp
src/process.h
src/network.cpp
src/network.h
src/move_by_copy.h
src/system_tray.cpp
src/system_tray.h
src/task_pool.h
src/thread_pool.h
src/thread_safe.h
src/sync.h
src/round_robin.h
src/stat_trackers.h
src/stat_trackers.cpp
"${CMAKE_SOURCE_DIR}/third-party/nanors/rs.c"
"${CMAKE_SOURCE_DIR}/third-party/nanors/rs.h"
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/Input.h"
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/Rtsp.h"
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/RtspParser.c"
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/Video.h"
"${CMAKE_SOURCE_DIR}/third-party/tray/tray.h"
"${CMAKE_SOURCE_DIR}/src/upnp.cpp"
"${CMAKE_SOURCE_DIR}/src/upnp.h"
"${CMAKE_SOURCE_DIR}/src/cbs.cpp"
"${CMAKE_SOURCE_DIR}/src/utility.h"
"${CMAKE_SOURCE_DIR}/src/uuid.h"
"${CMAKE_SOURCE_DIR}/src/config.h"
"${CMAKE_SOURCE_DIR}/src/config.cpp"
"${CMAKE_SOURCE_DIR}/src/entry_handler.cpp"
"${CMAKE_SOURCE_DIR}/src/entry_handler.h"
"${CMAKE_SOURCE_DIR}/src/file_handler.cpp"
"${CMAKE_SOURCE_DIR}/src/file_handler.h"
"${CMAKE_SOURCE_DIR}/src/globals.cpp"
"${CMAKE_SOURCE_DIR}/src/globals.h"
"${CMAKE_SOURCE_DIR}/src/logging.cpp"
"${CMAKE_SOURCE_DIR}/src/logging.h"
"${CMAKE_SOURCE_DIR}/src/main.cpp"
"${CMAKE_SOURCE_DIR}/src/main.h"
"${CMAKE_SOURCE_DIR}/src/crypto.cpp"
"${CMAKE_SOURCE_DIR}/src/crypto.h"
"${CMAKE_SOURCE_DIR}/src/nvhttp.cpp"
"${CMAKE_SOURCE_DIR}/src/nvhttp.h"
"${CMAKE_SOURCE_DIR}/src/httpcommon.cpp"
"${CMAKE_SOURCE_DIR}/src/httpcommon.h"
"${CMAKE_SOURCE_DIR}/src/confighttp.cpp"
"${CMAKE_SOURCE_DIR}/src/confighttp.h"
"${CMAKE_SOURCE_DIR}/src/rtsp.cpp"
"${CMAKE_SOURCE_DIR}/src/rtsp.h"
"${CMAKE_SOURCE_DIR}/src/stream.cpp"
"${CMAKE_SOURCE_DIR}/src/stream.h"
"${CMAKE_SOURCE_DIR}/src/video.cpp"
"${CMAKE_SOURCE_DIR}/src/video.h"
"${CMAKE_SOURCE_DIR}/src/video_colorspace.cpp"
"${CMAKE_SOURCE_DIR}/src/video_colorspace.h"
"${CMAKE_SOURCE_DIR}/src/input.cpp"
"${CMAKE_SOURCE_DIR}/src/input.h"
"${CMAKE_SOURCE_DIR}/src/audio.cpp"
"${CMAKE_SOURCE_DIR}/src/audio.h"
"${CMAKE_SOURCE_DIR}/src/platform/common.h"
"${CMAKE_SOURCE_DIR}/src/process.cpp"
"${CMAKE_SOURCE_DIR}/src/process.h"
"${CMAKE_SOURCE_DIR}/src/network.cpp"
"${CMAKE_SOURCE_DIR}/src/network.h"
"${CMAKE_SOURCE_DIR}/src/move_by_copy.h"
"${CMAKE_SOURCE_DIR}/src/system_tray.cpp"
"${CMAKE_SOURCE_DIR}/src/system_tray.h"
"${CMAKE_SOURCE_DIR}/src/task_pool.h"
"${CMAKE_SOURCE_DIR}/src/thread_pool.h"
"${CMAKE_SOURCE_DIR}/src/thread_safe.h"
"${CMAKE_SOURCE_DIR}/src/sync.h"
"${CMAKE_SOURCE_DIR}/src/round_robin.h"
"${CMAKE_SOURCE_DIR}/src/stat_trackers.h"
"${CMAKE_SOURCE_DIR}/src/stat_trackers.cpp"
${PLATFORM_TARGET_FILES})
set_source_files_properties(src/upnp.cpp PROPERTIES COMPILE_FLAGS -Wno-pedantic)
set_source_files_properties(third-party/nanors/rs.c
PROPERTIES COMPILE_FLAGS "-include deps/obl/autoshim.h -ftree-vectorize")
if(NOT SUNSHINE_ASSETS_DIR_DEF)
set(SUNSHINE_ASSETS_DIR_DEF "${SUNSHINE_ASSETS_DIR}")
endif()
@@ -96,29 +117,21 @@ list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_ASSETS_DIR="${SUNSHINE_ASSETS_DIR_DEF}
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_TRAY=${SUNSHINE_TRAY})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories("${CMAKE_SOURCE_DIR}")
include_directories(
SYSTEM
${CMAKE_CURRENT_SOURCE_DIR}/third-party
${CMAKE_CURRENT_SOURCE_DIR}/third-party/moonlight-common-c/enet/include
${CMAKE_CURRENT_SOURCE_DIR}/third-party/nanors
${CMAKE_CURRENT_SOURCE_DIR}/third-party/nanors/deps/obl
"${CMAKE_SOURCE_DIR}/third-party"
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/enet/include"
"${CMAKE_SOURCE_DIR}/third-party/nanors"
"${CMAKE_SOURCE_DIR}/third-party/nanors/deps/obl"
"${CMAKE_SOURCE_DIR}/third-party/jwt-cpp/include"
${FFMPEG_INCLUDE_DIRS}
${PLATFORM_INCLUDE_DIRS}
)
string(TOUPPER "x${CMAKE_BUILD_TYPE}" BUILD_TYPE)
if("${BUILD_TYPE}" STREQUAL "XDEBUG")
if(WIN32)
set_source_files_properties(src/nvhttp.cpp PROPERTIES COMPILE_FLAGS -O2)
endif()
else()
add_definitions(-DNDEBUG)
endif()
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
libminiupnpc-static
${MINIUPNP_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
enet
opus

View File

@@ -8,10 +8,6 @@ if(${SUNSHINE_BUILD_APPIMAGE})
string(REPLACE "${CMAKE_INSTALL_PREFIX}" ".${CMAKE_INSTALL_PREFIX}" SUNSHINE_ASSETS_DIR_DEF ${SUNSHINE_ASSETS_DIR})
endif()
if(NOT DEFINED SUNSHINE_EXECUTABLE_PATH)
set(SUNSHINE_EXECUTABLE_PATH "sunshine")
endif()
# cuda
set(CUDA_FOUND OFF)
if(${SUNSHINE_ENABLE_CUDA})
@@ -89,11 +85,12 @@ if(${SUNSHINE_ENABLE_CUDA})
endif()
endif()
if(CUDA_FOUND)
include_directories(SYSTEM third-party/nvfbc)
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/third-party/nvfbc")
list(APPEND PLATFORM_TARGET_FILES
src/platform/linux/cuda.cu
src/platform/linux/cuda.cpp
third-party/nvfbc/NvFBC.h)
"${CMAKE_SOURCE_DIR}/src/platform/linux/cuda.h"
"${CMAKE_SOURCE_DIR}/src/platform/linux/cuda.cu"
"${CMAKE_SOURCE_DIR}/src/platform/linux/cuda.cpp"
"${CMAKE_SOURCE_DIR}/third-party/nvfbc/NvFBC.h")
add_compile_definitions(SUNSHINE_BUILD_CUDA)
endif()
@@ -110,7 +107,8 @@ if(LIBDRM_FOUND AND LIBCAP_FOUND)
add_compile_definitions(SUNSHINE_BUILD_DRM)
include_directories(SYSTEM ${LIBDRM_INCLUDE_DIRS} ${LIBCAP_INCLUDE_DIRS})
list(APPEND PLATFORM_LIBRARIES ${LIBDRM_LIBRARIES} ${LIBCAP_LIBRARIES})
list(APPEND PLATFORM_TARGET_FILES src/platform/linux/kmsgrab.cpp)
list(APPEND PLATFORM_TARGET_FILES
"${CMAKE_SOURCE_DIR}/src/platform/linux/kmsgrab.cpp")
list(APPEND SUNSHINE_DEFINITIONS EGL_NO_X11=1)
elseif(NOT LIBDRM_FOUND)
message(WARNING "Missing libdrm")
@@ -118,6 +116,32 @@ elseif(NOT LIBDRM_FOUND)
message(WARNING "Missing libcap")
endif()
# evdev
pkg_check_modules(PC_EVDEV libevdev REQUIRED)
find_path(EVDEV_INCLUDE_DIR libevdev/libevdev.h
HINTS ${PC_EVDEV_INCLUDE_DIRS} ${PC_EVDEV_INCLUDEDIR})
find_library(EVDEV_LIBRARY
NAMES evdev libevdev)
if(EVDEV_INCLUDE_DIR AND EVDEV_LIBRARY)
include_directories(SYSTEM ${EVDEV_INCLUDE_DIR})
list(APPEND PLATFORM_LIBRARIES ${EVDEV_LIBRARY})
endif()
# vaapi
if(${SUNSHINE_ENABLE_VAAPI})
find_package(Libva)
else()
set(LIBVA_FOUND OFF)
endif()
if(LIBVA_FOUND)
add_compile_definitions(SUNSHINE_BUILD_VAAPI)
include_directories(SYSTEM ${LIBVA_INCLUDE_DIR})
list(APPEND PLATFORM_LIBRARIES ${LIBVA_LIBRARIES} ${LIBVA_DRM_LIBRARIES})
list(APPEND PLATFORM_TARGET_FILES
"${CMAKE_SOURCE_DIR}/src/platform/linux/vaapi.h"
"${CMAKE_SOURCE_DIR}/src/platform/linux/vaapi.cpp")
endif()
# wayland
if(${SUNSHINE_ENABLE_WAYLAND})
find_package(Wayland)
@@ -127,8 +151,15 @@ endif()
if(WAYLAND_FOUND)
add_compile_definitions(SUNSHINE_BUILD_WAYLAND)
GEN_WAYLAND("wayland-protocols" "unstable/xdg-output" xdg-output-unstable-v1)
GEN_WAYLAND("wlr-protocols" "unstable" wlr-export-dmabuf-unstable-v1)
if(NOT SUNSHINE_SYSTEM_WAYLAND_PROTOCOLS)
set(WAYLAND_PROTOCOLS_DIR "${CMAKE_SOURCE_DIR}/third-party/wayland-protocols")
else()
pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
pkg_check_modules(WAYLAND_PROTOCOLS wayland-protocols REQUIRED)
endif()
GEN_WAYLAND("${WAYLAND_PROTOCOLS_DIR}" "unstable/xdg-output" xdg-output-unstable-v1)
GEN_WAYLAND("${CMAKE_SOURCE_DIR}/third-party/wlr-protocols" "unstable" wlr-export-dmabuf-unstable-v1)
include_directories(
SYSTEM
@@ -138,8 +169,9 @@ if(WAYLAND_FOUND)
list(APPEND PLATFORM_LIBRARIES ${WAYLAND_LIBRARIES})
list(APPEND PLATFORM_TARGET_FILES
src/platform/linux/wlgrab.cpp
src/platform/linux/wayland.cpp)
"${CMAKE_SOURCE_DIR}/src/platform/linux/wlgrab.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/linux/wayland.h"
"${CMAKE_SOURCE_DIR}/src/platform/linux/wayland.cpp")
endif()
# x11
@@ -152,22 +184,28 @@ if(X11_FOUND)
add_compile_definitions(SUNSHINE_BUILD_X11)
include_directories(SYSTEM ${X11_INCLUDE_DIR})
list(APPEND PLATFORM_LIBRARIES ${X11_LIBRARIES})
list(APPEND PLATFORM_TARGET_FILES src/platform/linux/x11grab.cpp)
list(APPEND PLATFORM_TARGET_FILES
"${CMAKE_SOURCE_DIR}/src/platform/linux/x11grab.h"
"${CMAKE_SOURCE_DIR}/src/platform/linux/x11grab.cpp")
endif()
if(NOT ${CUDA_FOUND} AND NOT ${WAYLAND_FOUND} AND NOT ${X11_FOUND} AND NOT (${LIBDRM_FOUND} AND ${LIBCAP_FOUND}))
message(FATAL_ERROR "Couldn't find either x11, wayland, cuda or (libdrm and libcap)")
if(NOT ${CUDA_FOUND}
AND NOT ${WAYLAND_FOUND}
AND NOT ${X11_FOUND}
AND NOT (${LIBDRM_FOUND} AND ${LIBCAP_FOUND})
AND NOT ${LIBVA_FOUND})
message(FATAL_ERROR "Couldn't find either cuda, wayland, x11, (libdrm and libcap), or libva")
endif()
# tray icon
if(${SUNSHINE_ENABLE_TRAY})
pkg_check_modules(APPINDICATOR appindicator3-0.1)
pkg_check_modules(APPINDICATOR ayatana-appindicator3-0.1)
if(APPINDICATOR_FOUND)
list(APPEND SUNSHINE_DEFINITIONS TRAY_LEGACY_APPINDICATOR=1)
list(APPEND SUNSHINE_DEFINITIONS TRAY_AYATANA_APPINDICATOR=1)
else()
pkg_check_modules(APPINDICATOR ayatana-appindicator3-0.1)
pkg_check_modules(APPINDICATOR appindicator3-0.1)
if(APPINDICATOR_FOUND)
list(APPEND SUNSHINE_DEFINITIONS TRAY_AYATANA_APPINDICATOR=1)
list(APPEND SUNSHINE_DEFINITIONS TRAY_LEGACY_APPINDICATOR=1)
endif ()
endif()
pkg_check_modules(LIBNOTIFY libnotify)
@@ -180,7 +218,7 @@ if(${SUNSHINE_ENABLE_TRAY})
include_directories(SYSTEM ${APPINDICATOR_INCLUDE_DIRS} ${LIBNOTIFY_INCLUDE_DIRS})
link_directories(${APPINDICATOR_LIBRARY_DIRS} ${LIBNOTIFY_LIBRARY_DIRS})
list(APPEND PLATFORM_TARGET_FILES third-party/tray/tray_linux.c)
list(APPEND PLATFORM_TARGET_FILES "${CMAKE_SOURCE_DIR}/third-party/tray/tray_linux.c")
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES ${APPINDICATOR_LIBRARIES} ${LIBNOTIFY_LIBRARIES})
endif()
else()
@@ -193,35 +231,28 @@ if (${SUNSHINE_TRAY} EQUAL 0 AND SUNSHINE_REQUIRE_TRAY)
endif()
list(APPEND PLATFORM_TARGET_FILES
src/platform/linux/publish.cpp
src/platform/linux/vaapi.h
src/platform/linux/vaapi.cpp
src/platform/linux/cuda.h
src/platform/linux/graphics.h
src/platform/linux/graphics.cpp
src/platform/linux/misc.h
src/platform/linux/misc.cpp
src/platform/linux/audio.cpp
src/platform/linux/input.cpp
src/platform/linux/x11grab.h
src/platform/linux/wayland.h
third-party/glad/src/egl.c
third-party/glad/src/gl.c
third-party/glad/include/EGL/eglplatform.h
third-party/glad/include/KHR/khrplatform.h
third-party/glad/include/glad/gl.h
third-party/glad/include/glad/egl.h)
"${CMAKE_SOURCE_DIR}/src/platform/linux/publish.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/linux/graphics.h"
"${CMAKE_SOURCE_DIR}/src/platform/linux/graphics.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/linux/misc.h"
"${CMAKE_SOURCE_DIR}/src/platform/linux/misc.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/linux/audio.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/linux/input.cpp"
"${CMAKE_SOURCE_DIR}/third-party/glad/src/egl.c"
"${CMAKE_SOURCE_DIR}/third-party/glad/src/gl.c"
"${CMAKE_SOURCE_DIR}/third-party/glad/include/EGL/eglplatform.h"
"${CMAKE_SOURCE_DIR}/third-party/glad/include/KHR/khrplatform.h"
"${CMAKE_SOURCE_DIR}/third-party/glad/include/glad/gl.h"
"${CMAKE_SOURCE_DIR}/third-party/glad/include/glad/egl.h")
list(APPEND PLATFORM_LIBRARIES
Boost::dynamic_linking
dl
evdev
numa
pulse
pulse-simple)
include_directories(
SYSTEM
/usr/include/libevdev-1.0
third-party/nv-codec-headers/include
third-party/glad/include)
"${CMAKE_SOURCE_DIR}/third-party/nv-codec-headers/include"
"${CMAKE_SOURCE_DIR}/third-party/glad/include")

View File

@@ -8,42 +8,43 @@ link_directories(/opt/homebrew/lib)
ADD_DEFINITIONS(-DBOOST_LOG_DYN_LINK)
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
${APP_KIT_LIBRARY}
${APP_SERVICES_LIBRARY}
${AV_FOUNDATION_LIBRARY}
${CORE_MEDIA_LIBRARY}
${CORE_VIDEO_LIBRARY}
${VIDEO_TOOLBOX_LIBRARY}
${FOUNDATION_LIBRARY})
${FOUNDATION_LIBRARY}
${VIDEO_TOOLBOX_LIBRARY})
set(PLATFORM_INCLUDE_DIRS
${Boost_INCLUDE_DIR})
set(APPLE_PLIST_FILE ${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/Info.plist)
set(APPLE_PLIST_FILE "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/Info.plist")
# todo - tray is not working on macos
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
src/platform/macos/display.mm
src/platform/macos/input.cpp
src/platform/macos/microphone.mm
src/platform/macos/misc.mm
src/platform/macos/misc.h
src/platform/macos/nv12_zero_device.cpp
src/platform/macos/nv12_zero_device.h
src/platform/macos/publish.cpp
third-party/TPCircularBuffer/TPCircularBuffer.c
third-party/TPCircularBuffer/TPCircularBuffer.h
"${CMAKE_SOURCE_DIR}/src/platform/macos/av_audio.h"
"${CMAKE_SOURCE_DIR}/src/platform/macos/av_audio.m"
"${CMAKE_SOURCE_DIR}/src/platform/macos/av_img_t.h"
"${CMAKE_SOURCE_DIR}/src/platform/macos/av_video.h"
"${CMAKE_SOURCE_DIR}/src/platform/macos/av_video.m"
"${CMAKE_SOURCE_DIR}/src/platform/macos/display.mm"
"${CMAKE_SOURCE_DIR}/src/platform/macos/input.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/macos/microphone.mm"
"${CMAKE_SOURCE_DIR}/src/platform/macos/misc.mm"
"${CMAKE_SOURCE_DIR}/src/platform/macos/misc.h"
"${CMAKE_SOURCE_DIR}/src/platform/macos/nv12_zero_device.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/macos/nv12_zero_device.h"
"${CMAKE_SOURCE_DIR}/src/platform/macos/publish.cpp"
"${CMAKE_SOURCE_DIR}/third-party/TPCircularBuffer/TPCircularBuffer.c"
"${CMAKE_SOURCE_DIR}/third-party/TPCircularBuffer/TPCircularBuffer.h"
${APPLE_PLIST_FILE})
if(SUNSHINE_ENABLE_TRAY)
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
${COCOA})
list(APPEND PLATFORM_TARGET_FILES
third-party/tray/tray_darwin.m)
"${CMAKE_SOURCE_DIR}/third-party/tray/tray_darwin.m")
endif()

View File

@@ -6,51 +6,53 @@ enable_language(RC)
set(CMAKE_RC_COMPILER windres)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
# gcc complains about misleading indentation in some mingw includes
list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-misleading-indentation)
# curl
add_definitions(-DCURL_STATICLIB)
include_directories(SYSTEM ${CURL_STATIC_INCLUDE_DIRS})
link_directories(${CURL_STATIC_LIBRARY_DIRS})
# miniupnpc
add_definitions(-DMINIUPNP_STATICLIB)
# extra tools/binaries for audio/display devices
add_subdirectory(tools) # todo - this is temporary, only tools for Windows are needed, for now
# nvidia
include_directories(SYSTEM third-party/nvapi-open-source-sdk)
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/third-party/nvapi-open-source-sdk")
file(GLOB NVPREFS_FILES CONFIGURE_DEPENDS
"third-party/nvapi-open-source-sdk/*.h"
"src/platform/windows/nvprefs/*.cpp"
"src/platform/windows/nvprefs/*.h")
"${CMAKE_SOURCE_DIR}/third-party/nvapi-open-source-sdk/*.h"
"${CMAKE_SOURCE_DIR}/src/platform/windows/nvprefs/*.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/windows/nvprefs/*.h")
# vigem
include_directories(SYSTEM third-party/ViGEmClient/include)
set_source_files_properties(third-party/ViGEmClient/src/ViGEmClient.cpp
PROPERTIES COMPILE_DEFINITIONS "UNICODE=1;ERROR_INVALID_DEVICE_OBJECT_PARAMETER=650")
set_source_files_properties(third-party/ViGEmClient/src/ViGEmClient.cpp
PROPERTIES COMPILE_FLAGS "-Wno-unknown-pragmas -Wno-misleading-indentation -Wno-class-memaccess")
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include")
# sunshine icon
if(NOT DEFINED SUNSHINE_ICON_PATH)
set(SUNSHINE_ICON_PATH "${CMAKE_CURRENT_SOURCE_DIR}/sunshine.ico")
set(SUNSHINE_ICON_PATH "${CMAKE_SOURCE_DIR}/sunshine.ico")
endif()
configure_file(src/platform/windows/windows.rs.in windows.rc @ONLY)
configure_file("${CMAKE_SOURCE_DIR}/src/platform/windows/windows.rs.in" windows.rc @ONLY)
set(PLATFORM_TARGET_FILES
"${CMAKE_CURRENT_BINARY_DIR}/windows.rc"
src/platform/windows/publish.cpp
src/platform/windows/misc.h
src/platform/windows/misc.cpp
src/platform/windows/input.cpp
src/platform/windows/display.h
src/platform/windows/display_base.cpp
src/platform/windows/display_vram.cpp
src/platform/windows/display_ram.cpp
src/platform/windows/audio.cpp
third-party/ViGEmClient/src/ViGEmClient.cpp
third-party/ViGEmClient/include/ViGEm/Client.h
third-party/ViGEmClient/include/ViGEm/Common.h
third-party/ViGEmClient/include/ViGEm/Util.h
third-party/ViGEmClient/include/ViGEm/km/BusShared.h
"${CMAKE_SOURCE_DIR}/src/platform/windows/publish.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/windows/misc.h"
"${CMAKE_SOURCE_DIR}/src/platform/windows/misc.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/windows/input.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/windows/display.h"
"${CMAKE_SOURCE_DIR}/src/platform/windows/display_base.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/windows/display_vram.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/windows/display_ram.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/windows/audio.cpp"
"${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/src/ViGEmClient.cpp"
"${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include/ViGEm/Client.h"
"${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include/ViGEm/Common.h"
"${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include/ViGEm/Util.h"
"${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include/ViGEm/km/BusShared.h"
${NVPREFS_FILES})
set(OPENSSL_LIBRARIES
@@ -70,9 +72,12 @@ list(PREPEND PLATFORM_LIBRARIES
userenv
synchronization.lib
avrt
iphlpapi
shlwapi
PkgConfig::NLOHMANN_JSON
${CURL_STATIC_LIBRARIES})
if(SUNSHINE_ENABLE_TRAY)
list(APPEND PLATFORM_TARGET_FILES
third-party/tray/tray_windows.c)
"${CMAKE_SOURCE_DIR}/third-party/tray/tray_windows.c")
endif()

View File

@@ -4,18 +4,20 @@
# submodules
# moonlight common library
set(ENET_NO_INSTALL ON CACHE BOOL "Don't install any libraries build for enet")
add_subdirectory(third-party/moonlight-common-c/enet)
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/enet")
# web server
add_subdirectory(third-party/Simple-Web-Server)
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/Simple-Web-Server")
# common dependencies
find_package(OpenSSL REQUIRED)
find_package(PkgConfig REQUIRED)
find_package(Threads REQUIRED)
pkg_check_modules(CURL REQUIRED libcurl)
# miniupnp
set(UPNPC_BUILD_SHARED OFF CACHE BOOL "No shared libraries")
set(UPNPC_BUILD_TESTS OFF CACHE BOOL "Don't build tests for miniupnpc")
set(UPNPC_BUILD_SAMPLE OFF CACHE BOOL "Don't build samples for miniupnpc")
set(UPNPC_NO_INSTALL ON CACHE BOOL "Don't install any libraries build for miniupnpc")
add_subdirectory(third-party/miniupnp/miniupnpc)
include_directories(SYSTEM third-party/miniupnp/miniupnpc/include)
pkg_check_modules(MINIUPNP miniupnpc REQUIRED)
include_directories(SYSTEM ${MINIUPNP_INCLUDE_DIRS})
# ffmpeg pre-compiled binaries
if(WIN32)
@@ -23,12 +25,12 @@ if(WIN32)
message(FATAL_ERROR "Unsupported system processor:" ${CMAKE_SYSTEM_PROCESSOR})
endif()
set(FFMPEG_PLATFORM_LIBRARIES mfplat ole32 strmiids mfuuid vpl)
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-windows-x86_64")
set(FFMPEG_PREPARED_BINARIES "${CMAKE_SOURCE_DIR}/third-party/build-deps/ffmpeg/windows-x86_64")
elseif(APPLE)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-macos-x86_64")
set(FFMPEG_PREPARED_BINARIES "${CMAKE_SOURCE_DIR}/third-party/build-deps/ffmpeg/macos-x86_64")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-macos-aarch64")
set(FFMPEG_PREPARED_BINARIES "${CMAKE_SOURCE_DIR}/third-party/build-deps/ffmpeg/macos-aarch64")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "powerpc")
message(FATAL_ERROR "PowerPC is not supported on macOS")
else()
@@ -38,49 +40,43 @@ elseif(UNIX)
set(FFMPEG_PLATFORM_LIBRARIES va va-drm va-x11 vdpau X11)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
list(APPEND FFMPEG_PLATFORM_LIBRARIES mfx)
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-linux-x86_64")
set(FFMPEG_PREPARED_BINARIES "${CMAKE_SOURCE_DIR}/third-party/build-deps/ffmpeg/linux-x86_64")
set(CPACK_DEB_PLATFORM_PACKAGE_DEPENDS "libmfx1,")
set(CPACK_RPM_PLATFORM_PACKAGE_REQUIRES "intel-mediasdk >= 22.3.0,")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-linux-aarch64")
set(FFMPEG_PREPARED_BINARIES "${CMAKE_SOURCE_DIR}/third-party/build-deps/ffmpeg/linux-aarch64")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64")
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-linux-powerpc64le")
set(FFMPEG_PREPARED_BINARIES "${CMAKE_SOURCE_DIR}/third-party/build-deps/ffmpeg/linux-powerpc64le")
else()
message(FATAL_ERROR "Unsupported system processor:" ${CMAKE_SYSTEM_PROCESSOR})
endif()
endif()
set(FFMPEG_INCLUDE_DIRS
${FFMPEG_PREPARED_BINARIES}/include)
if(EXISTS ${FFMPEG_PREPARED_BINARIES}/lib/libhdr10plus.a)
"${FFMPEG_PREPARED_BINARIES}/include")
if(EXISTS "${FFMPEG_PREPARED_BINARIES}/lib/libhdr10plus.a")
set(HDR10_PLUS_LIBRARY
${FFMPEG_PREPARED_BINARIES}/lib/libhdr10plus.a)
"${FFMPEG_PREPARED_BINARIES}/lib/libhdr10plus.a")
endif()
set(FFMPEG_LIBRARIES
${FFMPEG_PREPARED_BINARIES}/lib/libavcodec.a
${FFMPEG_PREPARED_BINARIES}/lib/libavutil.a
${FFMPEG_PREPARED_BINARIES}/lib/libcbs.a
${FFMPEG_PREPARED_BINARIES}/lib/libSvtAv1Enc.a
${FFMPEG_PREPARED_BINARIES}/lib/libswscale.a
${FFMPEG_PREPARED_BINARIES}/lib/libx264.a
${FFMPEG_PREPARED_BINARIES}/lib/libx265.a
"${FFMPEG_PREPARED_BINARIES}/lib/libavcodec.a"
"${FFMPEG_PREPARED_BINARIES}/lib/libavutil.a"
"${FFMPEG_PREPARED_BINARIES}/lib/libcbs.a"
"${FFMPEG_PREPARED_BINARIES}/lib/libSvtAv1Enc.a"
"${FFMPEG_PREPARED_BINARIES}/lib/libswscale.a"
"${FFMPEG_PREPARED_BINARIES}/lib/libx264.a"
"${FFMPEG_PREPARED_BINARIES}/lib/libx265.a"
${HDR10_PLUS_LIBRARY}
${FFMPEG_PLATFORM_LIBRARIES})
# common dependencies
find_package(OpenSSL REQUIRED)
find_package(PkgConfig REQUIRED)
find_package(Threads REQUIRED)
pkg_check_modules(CURL REQUIRED libcurl)
# platform specific dependencies
if(WIN32)
include(${CMAKE_MODULE_PATH}/dependencies/windows.cmake)
include("${CMAKE_MODULE_PATH}/dependencies/windows.cmake")
elseif(UNIX)
include(${CMAKE_MODULE_PATH}/dependencies/unix.cmake)
include("${CMAKE_MODULE_PATH}/dependencies/unix.cmake")
if(APPLE)
include(${CMAKE_MODULE_PATH}/dependencies/macos.cmake)
include("${CMAKE_MODULE_PATH}/dependencies/macos.cmake")
else()
include(${CMAKE_MODULE_PATH}/dependencies/linux.cmake)
include("${CMAKE_MODULE_PATH}/dependencies/linux.cmake")
endif()
endif()

View File

@@ -1,5 +1,6 @@
# macos specific dependencies
FIND_LIBRARY(APP_KIT_LIBRARY AppKit)
FIND_LIBRARY(APP_SERVICES_LIBRARY ApplicationServices)
FIND_LIBRARY(AV_FOUNDATION_LIBRARY AVFoundation)
FIND_LIBRARY(CORE_MEDIA_LIBRARY CoreMedia)

View File

@@ -1,6 +1,7 @@
# windows specific dependencies
set(Boost_USE_STATIC_LIBS ON) # cmake-lint: disable=C0103
# Boost >= 1.82.0 is required for boost::json::value::set_at_pointer() support
# todo - are we actually using json? I think this was attempted to be used in a PR, but we ended up not using json
find_package(Boost 1.82.0 COMPONENTS locale log filesystem program_options json REQUIRED)
find_package(Boost 1.71.0 COMPONENTS locale log filesystem program_options REQUIRED)
# nlohmann_json
pkg_check_modules(NLOHMANN_JSON nlohmann_json REQUIRED IMPORTED_TARGET)

View File

@@ -5,17 +5,17 @@ macro(GEN_WAYLAND wayland_directory subdirectory filename)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/generated-src)
message("wayland-scanner private-code \
${CMAKE_SOURCE_DIR}/third-party/${wayland_directory}/${subdirectory}/${filename}.xml \
${wayland_directory}/${subdirectory}/${filename}.xml \
${CMAKE_BINARY_DIR}/generated-src/${filename}.c")
message("wayland-scanner client-header \
${CMAKE_SOURCE_DIR}/third-party/${wayland_directory}/${subdirectory}/${filename}.xml \
${wayland_directory}/${subdirectory}/${filename}.xml \
${CMAKE_BINARY_DIR}/generated-src/${filename}.h")
execute_process(
COMMAND wayland-scanner private-code
${CMAKE_SOURCE_DIR}/third-party/${wayland_directory}/${subdirectory}/${filename}.xml
${wayland_directory}/${subdirectory}/${filename}.xml
${CMAKE_BINARY_DIR}/generated-src/${filename}.c
COMMAND wayland-scanner client-header
${CMAKE_SOURCE_DIR}/third-party/${wayland_directory}/${subdirectory}/${filename}.xml
${wayland_directory}/${subdirectory}/${filename}.xml
${CMAKE_BINARY_DIR}/generated-src/${filename}.h
RESULT_VARIABLE EXIT_INT

View File

@@ -12,9 +12,22 @@ set(CPACK_PACKAGE_ICON ${PROJECT_SOURCE_DIR}/sunshine.png)
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}")
set(CPACK_STRIP_FILES YES)
# install npm modules
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/node_modules"
DESTINATION "${SUNSHINE_ASSETS_DIR}/web")
# install common assets
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/"
DESTINATION "${SUNSHINE_ASSETS_DIR}"
PATTERN "web" EXCLUDE)
# copy assets to build directory, for running without install
file(GLOB_RECURSE ALL_ASSETS
RELATIVE "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/" "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/*")
list(FILTER ALL_ASSETS EXCLUDE REGEX "^web/.*$") # Filter out the web directory
foreach(asset ${ALL_ASSETS}) # Copy assets to build directory, excluding the web directory
file(COPY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/${asset}"
DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/assets")
endforeach()
# install built vite assets
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/assets/web"
DESTINATION "${SUNSHINE_ASSETS_DIR}")
# platform specific packaging
if(WIN32)

View File

@@ -2,16 +2,22 @@
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/assets/"
DESTINATION "${SUNSHINE_ASSETS_DIR}")
# copy assets to build directory, for running without install
file(COPY "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/assets/"
DESTINATION "${CMAKE_BINARY_DIR}/assets")
if(${SUNSHINE_BUILD_APPIMAGE} OR ${SUNSHINE_BUILD_FLATPAK})
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/85-sunshine.rules"
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/60-sunshine.rules"
DESTINATION "${SUNSHINE_ASSETS_DIR}/udev/rules.d")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service"
DESTINATION "${SUNSHINE_ASSETS_DIR}/systemd/user")
else()
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/85-sunshine.rules"
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/udev/rules.d")
find_package(Systemd)
find_package(Udev)
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/60-sunshine.rules"
DESTINATION "${UDEV_RULES_INSTALL_DIR}")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service"
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/systemd/user")
DESTINATION "${SYSTEMD_USER_UNIT_INSTALL_DIR}")
endif()
# Post install
@@ -38,6 +44,7 @@ set(CPACK_DEBIAN_PACKAGE_DEPENDS "\
libvdpau1, \
libwayland-client0, \
libx11-6, \
miniupnpc, \
openssl | libssl3")
set(CPACK_RPM_PACKAGE_REQUIRES "\
${CPACK_RPM_PLATFORM_PACKAGE_REQUIRES} \
@@ -54,6 +61,7 @@ set(CPACK_RPM_PACKAGE_REQUIRES "\
libvdpau >= 1.5, \
libwayland-client >= 1.20.0, \
libX11 >= 1.7.3.1, \
miniupnpc >= 2.2.4, \
numactl-libs >= 2.0.14, \
openssl >= 3.0.2, \
pulseaudio-libs >= 10.0")
@@ -63,19 +71,19 @@ set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF)
# application icon
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps")
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps")
# tray icon
if(${SUNSHINE_TRAY} STREQUAL 1)
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/status"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status"
RENAME "sunshine-tray.svg")
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/images/sunshine-playing.svg"
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/status")
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/images/sunshine-pausing.svg"
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/status")
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/images/sunshine-locked.svg"
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/status")
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-playing.svg"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status")
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-pausing.svg"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status")
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-locked.svg"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "\
${CPACK_DEBIAN_PACKAGE_DEPENDS}, \
@@ -89,17 +97,17 @@ endif()
# desktop file
# todo - validate desktop files with `desktop-file-validate`
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.desktop"
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications")
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
if(NOT ${SUNSHINE_BUILD_APPIMAGE})
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine_terminal.desktop"
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications")
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
endif()
if(${SUNSHINE_BUILD_FLATPAK})
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine_kms.desktop"
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications")
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
endif()
# metadata file
# todo - validate file with `appstream-util validate-relax`
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.appdata.xml"
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/metainfo")
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo")

View File

@@ -10,17 +10,16 @@ if(SUNSHINE_PACKAGE_MACOS) # todo
set(MAC_PREFIX "${CMAKE_PROJECT_NAME}.app/Contents")
set(INSTALL_RUNTIME_DIR "${MAC_PREFIX}/MacOS")
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/"
DESTINATION "${SUNSHINE_ASSETS_DIR}")
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/"
DESTINATION "${SUNSHINE_ASSETS_DIR}")
install(TARGETS sunshine
BUNDLE DESTINATION . COMPONENT Runtime
RUNTIME DESTINATION ${INSTALL_RUNTIME_DIR} COMPONENT Runtime)
else()
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/"
DESTINATION "${SUNSHINE_ASSETS_DIR}")
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/misc/uninstall_pkg.sh"
DESTINATION "${SUNSHINE_ASSETS_DIR}")
endif()
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/"
DESTINATION "${SUNSHINE_ASSETS_DIR}")
# copy assets to build directory, for running without install
file(COPY "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/"
DESTINATION "${CMAKE_BINARY_DIR}/assets")

View File

@@ -13,6 +13,3 @@ if(NOT CMAKE_INSTALL_PREFIX)
endif()
install(TARGETS sunshine RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/"
DESTINATION "${SUNSHINE_ASSETS_DIR}")

View File

@@ -36,15 +36,15 @@ install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/gamepad/"
COMPONENT gamepad)
# Sunshine assets
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/"
DESTINATION "${SUNSHINE_ASSETS_DIR}"
COMPONENT assets)
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/assets/"
DESTINATION "${SUNSHINE_ASSETS_DIR}"
COMPONENT assets)
# copy assets to build directory, for running without install
file(COPY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/assets/"
DESTINATION "${CMAKE_BINARY_DIR}/assets")
# set(CPACK_NSIS_MUI_HEADERIMAGE "") # TODO: image should be 150x57 bmp
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\sunshine.ico")
set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}\\\\sunshine.ico")
set(CPACK_NSIS_INSTALLED_ICON_NAME "${PROJECT__DIR}\\\\${PROJECT_EXE}")
# The name of the directory that will be created in C:/Program files/
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
@@ -60,8 +60,8 @@ SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
nsExec::ExecToLog 'icacls \\\"$INSTDIR\\\" /reset'
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\migrate-config.bat\\\"'
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\add-firewall-rule.bat\\\"'
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\install-service.bat\\\"'
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\install-gamepad.bat\\\"'
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\install-service.bat\\\"'
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\autostart-service.bat\\\"'
NoController:
")
@@ -103,7 +103,7 @@ set(CPACK_NSIS_DELETE_ICONS_EXTRA
# Checking for previous installed versions
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL "ON")
set(CPACK_NSIS_HELP_LINK "https://sunshinestream.readthedocs.io/about/installation.html")
set(CPACK_NSIS_HELP_LINK "https://sunshinestream.readthedocs.io/en/latest/about/installation.html")
set(CPACK_NSIS_URL_INFO_ABOUT "${CMAKE_PROJECT_HOMEPAGE_URL}")
set(CPACK_NSIS_CONTACT "${CMAKE_PROJECT_HOMEPAGE_URL}/support")

View File

@@ -14,12 +14,12 @@ if((DEFINED ENV{BRANCH}) AND (DEFINED ENV{BUILD_VERSION}) AND (DEFINED ENV{COMMI
else()
find_package(Git)
if(GIT_EXECUTABLE)
MESSAGE("${CMAKE_CURRENT_SOURCE_DIR}")
get_filename_component(SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
MESSAGE("${CMAKE_SOURCE_DIR}")
get_filename_component(SRC_DIR "${CMAKE_SOURCE_DIR}" DIRECTORY)
#Get current Branch
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
#WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
#WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE GIT_DESCRIBE_BRANCH
RESULT_VARIABLE GIT_DESCRIBE_ERROR_CODE
OUTPUT_STRIP_TRAILING_WHITESPACE
@@ -27,7 +27,7 @@ else()
# Gather current commit
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
#WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
#WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE GIT_DESCRIBE_VERSION
RESULT_VARIABLE GIT_DESCRIBE_ERROR_CODE
OUTPUT_STRIP_TRAILING_WHITESPACE
@@ -35,7 +35,7 @@ else()
# Check if Dirty
execute_process(
COMMAND ${GIT_EXECUTABLE} diff --quiet --exit-code
#WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
#WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
RESULT_VARIABLE GIT_IS_DIRTY
OUTPUT_STRIP_TRAILING_WHITESPACE
)

View File

@@ -1,5 +1,5 @@
# source assets will be installed from this directory
set(SUNSHINE_SOURCE_ASSETS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src_assets")
set(SUNSHINE_SOURCE_ASSETS_DIR "${CMAKE_SOURCE_DIR}/src_assets")
# enable system tray, we will disable this later if we cannot find the required package config on linux
set(SUNSHINE_TRAY 1)

9
cmake/prep/init.cmake Normal file
View File

@@ -0,0 +1,9 @@
if (WIN32)
elseif (APPLE)
elseif (UNIX)
include(GNUInstallDirs)
if(NOT DEFINED SUNSHINE_EXECUTABLE_PATH)
set(SUNSHINE_EXECUTABLE_PATH "sunshine")
endif()
endif ()

View File

@@ -1,10 +1,33 @@
option(BUILD_TESTS "Build tests" ON)
option(TESTS_ENABLE_PYTHON_TESTS "Enable Python tests" ON)
# DirectX11 is not available in GitHub runners, so even software encoding fails
set(TESTS_SOFTWARE_ENCODER_UNAVAILABLE "fail"
CACHE STRING "How to handle unavailable software encoders in tests. 'fail/skip'")
option(BUILD_WERROR "Enable -Werror flag." OFF)
# if this option is set, the build will exit after configuring special package configuration files
option(SUNSHINE_CONFIGURE_ONLY "Configure special files only, then exit." OFF)
option(SUNSHINE_ENABLE_TRAY "Enable system tray icon. This option will be ignored on macOS." ON)
option(SUNSHINE_REQUIRE_TRAY "Require system tray icon. Fail the build if tray requirements are not met." ON)
option(SUNSHINE_SYSTEM_WAYLAND_PROTOCOLS "Use system installation of wayland-protocols rather than the submodule." OFF)
option(CUDA_INHERIT_COMPILE_OPTIONS
"When building CUDA code, inherit compile options from the the main project. You may want to disable this if
your IDE throws errors about unknown flags after running cmake." ON)
if(UNIX)
# technically, the homebrew build could be on linux as well... no idea if it would actually work
option(SUNSHINE_BUILD_HOMEBREW
"Enable a Homebrew build." OFF)
endif ()
if(APPLE)
option(SUNSHINE_CONFIGURE_HOMEBREW
"Configure macOS Homebrew formula. Recommended to use with SUNSHINE_CONFIGURE_ONLY" OFF)
option(SUNSHINE_CONFIGURE_PORTFILE
"Configure macOS Portfile. Recommended to use with SUNSHINE_CONFIGURE_ONLY" OFF)
option(SUNSHINE_PACKAGE_MACOS
@@ -24,6 +47,8 @@ elseif(UNIX) # Linux
"Enable cuda specific code." ON)
option(SUNSHINE_ENABLE_DRM
"Enable KMS grab if available." ON)
option(SUNSHINE_ENABLE_VAAPI
"Enable building vaapi specific code." ON)
option(SUNSHINE_ENABLE_WAYLAND
"Enable building wayland specific code." ON)
option(SUNSHINE_ENABLE_X11

View File

@@ -2,6 +2,9 @@ if (APPLE)
if(${SUNSHINE_CONFIGURE_PORTFILE})
configure_file(packaging/macos/Portfile Portfile @ONLY)
endif()
if(${SUNSHINE_CONFIGURE_HOMEBREW})
configure_file(packaging/macos/sunshine.rb sunshine.rb @ONLY)
endif()
elseif (UNIX)
# configure the .desktop file
if(${SUNSHINE_BUILD_APPIMAGE})
@@ -24,11 +27,13 @@ elseif (UNIX)
# configure the arch linux pkgbuild
if(${SUNSHINE_CONFIGURE_PKGBUILD})
configure_file(packaging/linux/Arch/PKGBUILD PKGBUILD @ONLY)
configure_file(packaging/linux/Arch/sunshine.install sunshine.install @ONLY)
endif()
# configure the flatpak manifest
if(${SUNSHINE_CONFIGURE_FLATPAK_MAN})
configure_file(packaging/linux/flatpak/dev.lizardbyte.sunshine.yml dev.lizardbyte.sunshine.yml @ONLY)
file(COPY packaging/linux/flatpak/deps/ DESTINATION ${CMAKE_BINARY_DIR})
endif()
endif()

View File

@@ -3,6 +3,18 @@
add_executable(sunshine ${SUNSHINE_TARGET_FILES})
# Homebrew build fails the vite build if we set these environment variables
# this block must be before the platform specific code
if(${SUNSHINE_BUILD_HOMEBREW})
set(NPM_SOURCE_ASSETS_DIR "")
set(NPM_ASSETS_DIR "")
set(NPM_BUILD_HOMEBREW "true")
else()
set(NPM_SOURCE_ASSETS_DIR ${SUNSHINE_SOURCE_ASSETS_DIR})
set(NPM_ASSETS_DIR ${CMAKE_BINARY_DIR})
set(NPM_BUILD_HOMEBREW "")
endif()
# platform specific target definitions
if(WIN32)
include(${CMAKE_MODULE_PATH}/targets/windows.cmake)
@@ -24,12 +36,63 @@ endif()
target_link_libraries(sunshine ${SUNSHINE_EXTERNAL_LIBRARIES} ${EXTRA_LIBS})
target_compile_definitions(sunshine PUBLIC ${SUNSHINE_DEFINITIONS})
set_target_properties(sunshine PROPERTIES CXX_STANDARD 17
set_target_properties(sunshine PROPERTIES CXX_STANDARD 20
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR})
foreach(flag IN LISTS SUNSHINE_COMPILE_OPTIONS)
list(APPEND SUNSHINE_COMPILE_OPTIONS_CUDA "$<$<COMPILE_LANGUAGE:CUDA>:--compiler-options=${flag}>")
endforeach()
# CLion complains about unknown flags after running cmake, and cannot add symbols to the index for cuda files
if(CUDA_INHERIT_COMPILE_OPTIONS)
foreach(flag IN LISTS SUNSHINE_COMPILE_OPTIONS)
list(APPEND SUNSHINE_COMPILE_OPTIONS_CUDA "$<$<COMPILE_LANGUAGE:CUDA>:--compiler-options=${flag}>")
endforeach()
endif()
target_compile_options(sunshine PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${SUNSHINE_COMPILE_OPTIONS}>;$<$<COMPILE_LANGUAGE:CUDA>:${SUNSHINE_COMPILE_OPTIONS_CUDA};-std=c++17>) # cmake-lint: disable=C0301
# tests
if(BUILD_TESTS)
add_subdirectory(tests)
endif()
# custom compile flags, must be after adding tests
if (NOT BUILD_TESTS)
set(TEST_DIR "")
else()
set(TEST_DIR "${CMAKE_SOURCE_DIR}/tests")
endif()
# src/upnp
set_source_files_properties("${CMAKE_SOURCE_DIR}/src/upnp.cpp"
DIRECTORY "${CMAKE_SOURCE_DIR}" "${TEST_DIR}"
PROPERTIES COMPILE_FLAGS -Wno-pedantic)
# third-party/nanors
set_source_files_properties("${CMAKE_SOURCE_DIR}/third-party/nanors/rs.c"
DIRECTORY "${CMAKE_SOURCE_DIR}" "${TEST_DIR}"
PROPERTIES COMPILE_FLAGS "-include deps/obl/autoshim.h -ftree-vectorize")
# third-party/ViGEmClient
set(VIGEM_COMPILE_FLAGS "")
string(APPEND VIGEM_COMPILE_FLAGS "-Wno-unknown-pragmas ")
string(APPEND VIGEM_COMPILE_FLAGS "-Wno-misleading-indentation ")
string(APPEND VIGEM_COMPILE_FLAGS "-Wno-class-memaccess ")
string(APPEND VIGEM_COMPILE_FLAGS "-Wno-unused-function ")
string(APPEND VIGEM_COMPILE_FLAGS "-Wno-unused-variable ")
set_source_files_properties("${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/src/ViGEmClient.cpp"
DIRECTORY "${CMAKE_SOURCE_DIR}" "${TEST_DIR}"
PROPERTIES
COMPILE_DEFINITIONS "UNICODE=1;ERROR_INVALID_DEVICE_OBJECT_PARAMETER=650"
COMPILE_FLAGS ${VIGEM_COMPILE_FLAGS})
# src/nvhttp
string(TOUPPER "x${CMAKE_BUILD_TYPE}" BUILD_TYPE)
if("${BUILD_TYPE}" STREQUAL "XDEBUG")
if(WIN32)
set_source_files_properties("${CMAKE_SOURCE_DIR}/src/nvhttp.cpp"
DIRECTORY "${CMAKE_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/tests"
PROPERTIES COMPILE_FLAGS -O2)
endif()
else()
add_definitions(-DNDEBUG)
endif()

View File

@@ -1,2 +1,8 @@
# unix specific target definitions
# put anything here that applies to both linux and macos
#WebUI build
add_custom_target(web-ui ALL
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
COMMENT "Installing NPM Dependencies and Building the Web UI"
COMMAND sh -c \"npm install && SUNSHINE_BUILD_HOMEBREW=${NPM_BUILD_HOMEBREW} SUNSHINE_SOURCE_ASSETS_DIR=${NPM_SOURCE_ASSETS_DIR} SUNSHINE_ASSETS_DIR=${NPM_ASSETS_DIR} npm run build\") # cmake-lint: disable=C0301

View File

@@ -4,3 +4,9 @@ set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll")
find_library(ZLIB ZLIB1)
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
Wtsapi32.lib)
#WebUI build
add_custom_target(web-ui ALL
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
COMMENT "Installing NPM Dependencies and Building the Web UI"
COMMAND cmd /C "npm install && set \"SUNSHINE_SOURCE_ASSETS_DIR=${NPM_SOURCE_ASSETS_DIR}\" && set \"SUNSHINE_ASSETS_DIR=${NPM_ASSETS_DIR}\" && npm run build") # cmake-lint: disable=C0301

19
codecov.yml Normal file
View File

@@ -0,0 +1,19 @@
---
codecov:
branch: nightly
coverage:
status:
project:
default:
target: auto
threshold: 10%
comment:
layout: "diff, flags, files"
behavior: default
require_changes: false # if true: only post the comment if coverage changes
ignore:
- "tests"
- "third-party"

View File

@@ -1,7 +1,7 @@
---
"base_path": "."
"base_url": "https://api.crowdin.com" # optional (for Crowdin Enterprise only)
"preserve_hierarchy": false # flatten tree on crowdin
"preserve_hierarchy": true # false will flatten tree on crowdin, but doesn't work with dest option
"pull_request_labels": [
"crowdin",
"l10n"
@@ -10,6 +10,7 @@
"files": [
{
"source": "/locale/*.po",
"dest": "/%original_file_name%",
"translation": "/locale/%two_letters_code%/LC_MESSAGES/%original_file_name%",
"languages_mapping": {
"two_letters_code": {
@@ -17,6 +18,13 @@
"en-GB": "en_GB",
"en-US": "en_US"
}
}
},
"update_option": "update_as_unapproved"
},
{
"source": "/src_assets/common/assets/web/public/assets/locale/en.json",
"dest": "/sunshine.json",
"translation": "/src_assets/common/assets/web/public/assets/locale/%two_letters_code%.%file_extension%",
"update_option": "update_as_unapproved"
}
]

View File

@@ -34,7 +34,7 @@ ENV COMMIT=${COMMIT}
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# install dependencies
# cuda, libcap, and libdrm are optional dependencies for PKGBUILD
# cuda is an optional build-time dependency for PKGBUILD
RUN <<_DEPS
#!/bin/bash
set -e
@@ -43,9 +43,8 @@ pacman -Syu --disable-download-timeout --needed --noconfirm \
cmake \
cuda \
git \
libcap \
libdrm \
namcap
namcap \
xorg-server-xvfb
_DEPS
# Setup builder user
@@ -80,19 +79,22 @@ _MAKE
WORKDIR /build/sunshine/pkg
RUN mv /build/sunshine/build/PKGBUILD .
RUN mv /build/sunshine/build/sunshine.install .
# namcap and build PKGBUILD file
RUN <<_PKGBUILD
#!/bin/bash
set -e
export DISPLAY=:1
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
namcap -i PKGBUILD
makepkg -si --noconfirm
rm -f /build/sunshine/pkg/sunshine-debug*.pkg.tar.zst
ls -a
_PKGBUILD
FROM scratch as artifacts
COPY --link --from=sunshine-build /build/sunshine/pkg/PKGBUILD /PKGBUILD
COPY --link --from=sunshine-build /build/sunshine/pkg/sunshine*.pkg.tar.zst /sunshine.pkg.tar.zst
FROM sunshine-base as sunshine

View File

@@ -0,0 +1,132 @@
# syntax=docker/dockerfile:1.4
# artifacts: false
# platforms: linux/amd64
# platforms_pr: linux/amd64
# no-cache-filters: toolchain-base,toolchain
ARG BASE=ubuntu
ARG TAG=22.04
FROM ${BASE}:${TAG} AS toolchain-base
ENV DEBIAN_FRONTEND=noninteractive
FROM toolchain-base as toolchain
ARG TARGETPLATFORM
RUN echo "target_platform: ${TARGETPLATFORM}"
ENV DISPLAY=:0
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# install dependencies
RUN <<_DEPS
#!/bin/bash
set -e
apt-get update -y
apt-get install -y --no-install-recommends \
build-essential \
cmake=3.22.* \
ca-certificates \
doxygen \
gcc=4:11.2.* \
g++=4:11.2.* \
gdb \
git \
graphviz \
libayatana-appindicator3-dev \
libboost-filesystem-dev=1.74.* \
libboost-locale-dev=1.74.* \
libboost-log-dev=1.74.* \
libboost-program-options-dev=1.74.* \
libcap-dev \
libcurl4-openssl-dev \
libdrm-dev \
libevdev-dev \
libminiupnpc-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 \
python3.10 \
python3.10-venv \
udev \
wget \
x11-xserver-utils \
xvfb
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
apt-get install -y --no-install-recommends \
libmfx-dev
fi
apt-get clean
rm -rf /var/lib/apt/lists/*
_DEPS
#Install Node
# hadolint ignore=SC1091
RUN <<_INSTALL_NODE
#!/bin/bash
set -e
node_version="20.9.0"
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
source "$HOME/.nvm/nvm.sh"
nvm install "$node_version"
nvm use "$node_version"
nvm alias default "$node_version"
_INSTALL_NODE
# install cuda
WORKDIR /build/cuda
# versions: https://developer.nvidia.com/cuda-toolkit-archive
ENV CUDA_VERSION="11.8.0"
ENV CUDA_BUILD="520.61.05"
# hadolint ignore=SC3010
RUN <<_INSTALL_CUDA
#!/bin/bash
set -e
cuda_prefix="https://developer.download.nvidia.com/compute/cuda/"
cuda_suffix=""
if [[ "${TARGETPLATFORM}" == 'linux/arm64' ]]; then
cuda_suffix="_sbsa"
fi
url="${cuda_prefix}${CUDA_VERSION}/local_installers/cuda_${CUDA_VERSION}_${CUDA_BUILD}_linux${cuda_suffix}.run"
echo "cuda url: ${url}"
wget "$url" --progress=bar:force:noscroll -q --show-progress -O ./cuda.run
chmod a+x ./cuda.run
./cuda.run --silent --toolkit --toolkitpath=/usr/local --no-opengl-libs --no-man-page --no-drm
rm ./cuda.run
_INSTALL_CUDA
WORKDIR /
# Write a shell script that starts Xvfb and then runs a shell
RUN <<_ENTRYPOINT
#!/bin/bash
set -e
cat <<EOF > /entrypoint.sh
#!/bin/bash
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
if [ "\$#" -eq 0 ]; then
exec "/bin/bash"
else
exec "\$@"
fi
EOF
_ENTRYPOINT
# Make the script executable
RUN chmod +x /entrypoint.sh
# Note about CLion
RUN echo "ATTENTION: CLion will override the entrypoint, you can disable this in the toolchain settings"
# Use the shell script as the entrypoint
ENTRYPOINT ["/entrypoint.sh"]

View File

@@ -32,8 +32,9 @@ apt-get update -y
apt-get install -y --no-install-recommends \
build-essential \
cmake=3.25.* \
doxygen \
git \
libavdevice-dev \
graphviz \
libayatana-appindicator3-dev \
libboost-filesystem-dev=1.74.* \
libboost-locale-dev=1.74.* \
@@ -43,6 +44,7 @@ apt-get install -y --no-install-recommends \
libcurl4-openssl-dev \
libdrm-dev \
libevdev-dev \
libminiupnpc-dev \
libnotify-dev \
libnuma-dev \
libopus-dev \
@@ -60,7 +62,12 @@ apt-get install -y --no-install-recommends \
libxtst-dev \
nodejs \
npm \
wget
python3.11 \
python3.11-venv \
udev \
wget \
x11-xserver-utils \
xvfb
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
apt-get install -y --no-install-recommends \
libmfx-dev
@@ -95,9 +102,6 @@ _INSTALL_CUDA
WORKDIR /build/sunshine/
COPY --link .. .
# setup npm dependencies
RUN npm install
# setup build directory
WORKDIR /build/sunshine/build
@@ -106,6 +110,7 @@ RUN <<_MAKE
#!/bin/bash
set -e
cmake \
-DBUILD_WERROR=ON \
-DCMAKE_CUDA_COMPILER:PATH=/build/cuda/bin/nvcc \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
@@ -120,6 +125,17 @@ make -j "$(nproc)"
cpack -G DEB
_MAKE
# run tests
WORKDIR /build/sunshine/build/tests
# hadolint ignore=SC1091
RUN <<_TEST
#!/bin/bash
set -e
export DISPLAY=:1
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
./test_sunshine --gtest_color=yes
_TEST
FROM scratch AS artifacts
ARG BASE
ARG TAG

View File

@@ -31,9 +31,11 @@ set -e
apt-get update -y
apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
cmake=3.18.* \
doxygen \
git \
libavdevice-dev \
graphviz \
libayatana-appindicator3-dev \
libboost-filesystem-dev=1.74.* \
libboost-locale-dev=1.74.* \
@@ -43,6 +45,7 @@ apt-get install -y --no-install-recommends \
libcurl4-openssl-dev \
libdrm-dev \
libevdev-dev \
libminiupnpc-dev \
libnotify-dev \
libnuma-dev \
libopus-dev \
@@ -58,9 +61,12 @@ apt-get install -y --no-install-recommends \
libxfixes-dev \
libxrandr-dev \
libxtst-dev \
nodejs \
npm \
wget
python3.9 \
python3.9-venv \
udev \
wget \
x11-xserver-utils \
xvfb
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
apt-get install -y --no-install-recommends \
libmfx-dev
@@ -69,6 +75,17 @@ apt-get clean
rm -rf /var/lib/apt/lists/*
_DEPS
#Install Node
# hadolint ignore=SC1091
RUN <<_INSTALL_NODE
#!/bin/bash
set -e
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
source "$HOME/.nvm/nvm.sh"
nvm install 20.9.0
nvm use 20.9.0
_INSTALL_NODE
# install cuda
WORKDIR /build/cuda
# versions: https://developer.nvidia.com/cuda-toolkit-archive
@@ -95,17 +112,19 @@ _INSTALL_CUDA
WORKDIR /build/sunshine/
COPY --link .. .
# setup npm dependencies
RUN npm install
# setup build directory
WORKDIR /build/sunshine/build
# cmake and cpack
# hadolint ignore=SC1091
RUN <<_MAKE
#!/bin/bash
set -e
#Set Node version
source "$HOME/.nvm/nvm.sh"
nvm use 20.9.0
cmake \
-DBUILD_WERROR=ON \
-DCMAKE_CUDA_COMPILER:PATH=/build/cuda/bin/nvcc \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
@@ -120,6 +139,17 @@ make -j "$(nproc)"
cpack -G DEB
_MAKE
# run tests
WORKDIR /build/sunshine/build/tests
# hadolint ignore=SC1091
RUN <<_TEST
#!/bin/bash
set -e
export DISPLAY=:1
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
./test_sunshine --gtest_color=yes
_TEST
FROM scratch AS artifacts
ARG BASE
ARG TAG

View File

@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1.4
# artifacts: true
# platforms: linux/amd64,linux/arm64/v8
# platforms: linux/amd64
# platforms_pr: linux/amd64
# no-cache-filters: sunshine-base,artifacts,sunshine
ARG BASE=fedora
@@ -32,9 +32,11 @@ dnf -y group install "Development Tools"
dnf -y install \
boost-devel-1.78.0* \
cmake-3.27.* \
doxygen \
gcc-13.2.* \
gcc-c++-13.2.* \
git \
graphviz \
libappindicator-gtk3-devel \
libcap-devel \
libcurl-devel \
@@ -52,14 +54,17 @@ dnf -y install \
libXrandr-devel \
libXtst-devel \
mesa-libGL-devel \
nodejs-npm \
miniupnpc-devel \
nodejs \
numactl-devel \
openssl-devel \
opus-devel \
pulseaudio-libs-devel \
python3.10 \
rpm-build \
wget \
which
which \
xorg-x11-server-Xvfb
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
dnf -y install intel-mediasdk-devel
fi
@@ -67,46 +72,42 @@ dnf clean all
rm -rf /var/cache/yum
_DEPS
# todo - enable cuda once it's supported for gcc 13 and fedora 38
## install cuda
#WORKDIR /build/cuda
WORKDIR /build/cuda
## versions: https://developer.nvidia.com/cuda-toolkit-archive
#ENV CUDA_VERSION="12.0.0"
#ENV CUDA_BUILD="525.60.13"
ENV CUDA_VERSION="12.4.0"
ENV CUDA_BUILD="550.54.14"
## hadolint ignore=SC3010
#RUN <<_INSTALL_CUDA
##!/bin/bash
#set -e
#cuda_prefix="https://developer.download.nvidia.com/compute/cuda/"
#cuda_suffix=""
#if [[ "${TARGETPLATFORM}" == 'linux/arm64' ]]; then
# cuda_suffix="_sbsa"
#fi
#url="${cuda_prefix}${CUDA_VERSION}/local_installers/cuda_${CUDA_VERSION}_${CUDA_BUILD}_linux${cuda_suffix}.run"
#echo "cuda url: ${url}"
#wget "$url" --progress=bar:force:noscroll -q --show-progress -O ./cuda.run
#chmod a+x ./cuda.run
#./cuda.run --silent --toolkit --toolkitpath=/build/cuda --no-opengl-libs --no-man-page --no-drm
#rm ./cuda.run
#_INSTALL_CUDA
RUN <<_INSTALL_CUDA
#!/bin/bash
set -e
cuda_prefix="https://developer.download.nvidia.com/compute/cuda/"
cuda_suffix=""
if [[ "${TARGETPLATFORM}" == 'linux/arm64' ]]; then
cuda_suffix="_sbsa"
fi
url="${cuda_prefix}${CUDA_VERSION}/local_installers/cuda_${CUDA_VERSION}_${CUDA_BUILD}_linux${cuda_suffix}.run"
echo "cuda url: ${url}"
wget "$url" --progress=bar:force:noscroll -q --show-progress -O ./cuda.run
chmod a+x ./cuda.run
./cuda.run --silent --toolkit --toolkitpath=/build/cuda --no-opengl-libs --no-man-page --no-drm
rm ./cuda.run
_INSTALL_CUDA
# copy repository
WORKDIR /build/sunshine/
COPY --link .. .
# setup npm dependencies
RUN npm install
# setup build directory
WORKDIR /build/sunshine/build
# cmake and cpack
# todo - add cmake argument back in for cuda support "-DCMAKE_CUDA_COMPILER:PATH=/build/cuda/bin/nvcc \"
# todo - re-enable "DSUNSHINE_ENABLE_CUDA"
RUN <<_MAKE
#!/bin/bash
set -e
cmake \
-DCMAKE_CUDA_COMPILER:PATH=/build/cuda/bin/nvcc \
-DBUILD_WERROR=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DSUNSHINE_ASSETS_DIR=share/sunshine \
@@ -114,12 +115,23 @@ cmake \
-DSUNSHINE_ENABLE_WAYLAND=ON \
-DSUNSHINE_ENABLE_X11=ON \
-DSUNSHINE_ENABLE_DRM=ON \
-DSUNSHINE_ENABLE_CUDA=OFF \
-DSUNSHINE_ENABLE_CUDA=ON \
/build/sunshine
make -j "$(nproc)"
cpack -G RPM
_MAKE
# run tests
WORKDIR /build/sunshine/build/tests
# hadolint ignore=SC1091
RUN <<_TEST
#!/bin/bash
set -e
export DISPLAY=:1
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
./test_sunshine --gtest_color=yes
_TEST
FROM scratch AS artifacts
ARG BASE
ARG TAG

View File

@@ -1,10 +1,10 @@
# syntax=docker/dockerfile:1.4
# artifacts: true
# platforms: linux/amd64,linux/arm64/v8
# platforms: linux/amd64
# platforms_pr: linux/amd64
# no-cache-filters: sunshine-base,artifacts,sunshine
ARG BASE=fedora
ARG TAG=37
ARG TAG=39
FROM ${BASE}:${TAG} AS sunshine-base
FROM sunshine-base as sunshine-build
@@ -30,11 +30,13 @@ set -e
dnf -y update
dnf -y group install "Development Tools"
dnf -y install \
boost-devel-1.78.* \
boost-devel-1.81.0* \
cmake-3.27.* \
gcc-12.2.* \
gcc-c++-12.2.* \
doxygen \
gcc-13.2.* \
gcc-c++-13.2.* \
git \
graphviz \
libappindicator-gtk3-devel \
libcap-devel \
libcurl-devel \
@@ -52,14 +54,17 @@ dnf -y install \
libXrandr-devel \
libXtst-devel \
mesa-libGL-devel \
nodejs-npm \
miniupnpc-devel \
nodejs \
numactl-devel \
openssl-devel \
opus-devel \
pulseaudio-libs-devel \
python3.11 \
rpm-build \
wget \
which
which \
xorg-x11-server-Xvfb
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
dnf -y install intel-mediasdk-devel
fi
@@ -70,8 +75,8 @@ _DEPS
# install cuda
WORKDIR /build/cuda
# versions: https://developer.nvidia.com/cuda-toolkit-archive
ENV CUDA_VERSION="12.0.0"
ENV CUDA_BUILD="525.60.13"
ENV CUDA_VERSION="12.4.0"
ENV CUDA_BUILD="550.54.14"
# hadolint ignore=SC3010
RUN <<_INSTALL_CUDA
#!/bin/bash
@@ -80,6 +85,13 @@ cuda_prefix="https://developer.download.nvidia.com/compute/cuda/"
cuda_suffix=""
if [[ "${TARGETPLATFORM}" == 'linux/arm64' ]]; then
cuda_suffix="_sbsa"
# patch headers https://bugs.launchpad.net/ubuntu/+source/mumax3/+bug/2032624
sed -i 's/__Float32x4_t/int/g' /usr/include/bits/math-vector.h
sed -i 's/__Float64x2_t/int/g' /usr/include/bits/math-vector.h
sed -i 's/__SVFloat32_t/float/g' /usr/include/bits/math-vector.h
sed -i 's/__SVFloat64_t/float/g' /usr/include/bits/math-vector.h
sed -i 's/__SVBool_t/int/g' /usr/include/bits/math-vector.h
fi
url="${cuda_prefix}${CUDA_VERSION}/local_installers/cuda_${CUDA_VERSION}_${CUDA_BUILD}_linux${cuda_suffix}.run"
echo "cuda url: ${url}"
@@ -93,9 +105,6 @@ _INSTALL_CUDA
WORKDIR /build/sunshine/
COPY --link .. .
# setup npm dependencies
RUN npm install
# setup build directory
WORKDIR /build/sunshine/build
@@ -105,6 +114,7 @@ RUN <<_MAKE
set -e
cmake \
-DCMAKE_CUDA_COMPILER:PATH=/build/cuda/bin/nvcc \
-DBUILD_WERROR=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DSUNSHINE_ASSETS_DIR=share/sunshine \
@@ -118,6 +128,17 @@ make -j "$(nproc)"
cpack -G RPM
_MAKE
# run tests
WORKDIR /build/sunshine/build/tests
# hadolint ignore=SC1091
RUN <<_TEST
#!/bin/bash
set -e
export DISPLAY=:1
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
./test_sunshine --gtest_color=yes
_TEST
FROM scratch AS artifacts
ARG BASE
ARG TAG

View File

@@ -32,9 +32,11 @@ apt-get update -y
apt-get install -y --no-install-recommends \
build-essential \
cmake=3.22.* \
ca-certificates \
doxygen \
git \
graphviz \
libayatana-appindicator3-dev \
libavdevice-dev \
libboost-filesystem-dev=1.74.* \
libboost-locale-dev=1.74.* \
libboost-log-dev=1.74.* \
@@ -43,6 +45,7 @@ apt-get install -y --no-install-recommends \
libcurl4-openssl-dev \
libdrm-dev \
libevdev-dev \
libminiupnpc-dev \
libnotify-dev \
libnuma-dev \
libopus-dev \
@@ -58,9 +61,12 @@ apt-get install -y --no-install-recommends \
libxfixes-dev \
libxrandr-dev \
libxtst-dev \
nodejs \
npm \
wget
python3.10 \
python3.10-venv \
udev \
wget \
x11-xserver-utils \
xvfb
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
apt-get install -y --no-install-recommends \
libmfx-dev
@@ -69,6 +75,17 @@ apt-get clean
rm -rf /var/lib/apt/lists/*
_DEPS
#Install Node
# hadolint ignore=SC1091
RUN <<_INSTALL_NODE
#!/bin/bash
set -e
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
source "$HOME/.nvm/nvm.sh"
nvm install 20.9.0
nvm use 20.9.0
_INSTALL_NODE
# install cuda
WORKDIR /build/cuda
# versions: https://developer.nvidia.com/cuda-toolkit-archive
@@ -95,17 +112,20 @@ _INSTALL_CUDA
WORKDIR /build/sunshine/
COPY --link .. .
# setup npm dependencies
RUN npm install
# setup build directory
WORKDIR /build/sunshine/build
# cmake and cpack
# hadolint ignore=SC1091
RUN <<_MAKE
#!/bin/bash
set -e
#Set Node version
source "$HOME/.nvm/nvm.sh"
nvm use 20.9.0
#Actually build
cmake \
-DBUILD_WERROR=ON \
-DCMAKE_CUDA_COMPILER:PATH=/build/cuda/bin/nvcc \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
@@ -120,6 +140,17 @@ make -j "$(nproc)"
cpack -G DEB
_MAKE
# run tests
WORKDIR /build/sunshine/build/tests
# hadolint ignore=SC1091
RUN <<_TEST
#!/bin/bash
set -e
export DISPLAY=:1
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
./test_sunshine --gtest_color=yes
_TEST
FROM scratch AS artifacts
ARG BASE
ARG TAG

View File

@@ -1,10 +1,10 @@
# syntax=docker/dockerfile:1.4
# artifacts: true
# platforms: linux/amd64,linux/arm64/v8
# platforms: linux/amd64
# platforms_pr: linux/amd64
# no-cache-filters: sunshine-base,artifacts,sunshine
ARG BASE=ubuntu
ARG TAG=20.04
ARG TAG=24.04
FROM ${BASE}:${TAG} AS sunshine-base
ENV DEBIAN_FRONTEND=noninteractive
@@ -31,19 +31,23 @@ set -e
apt-get update -y
apt-get install -y --no-install-recommends \
build-essential \
gcc-10=10.5.* \
g++-10=10.5.* \
cmake=3.28.* \
ca-certificates \
doxygen \
gcc-11 \
g++-11 \
git \
graphviz \
libayatana-appindicator3-dev \
libavdevice-dev \
libboost-filesystem-dev=1.71.* \
libboost-locale-dev=1.71.* \
libboost-log-dev=1.71.* \
libboost-program-options-dev=1.71.* \
libboost-filesystem-dev=1.83.* \
libboost-locale-dev=1.83.* \
libboost-log-dev=1.83.* \
libboost-program-options-dev=1.83.* \
libcap-dev \
libcurl4-openssl-dev \
libdrm-dev \
libevdev-dev \
libminiupnpc-dev \
libnotify-dev \
libnuma-dev \
libopus-dev \
@@ -59,9 +63,12 @@ apt-get install -y --no-install-recommends \
libxfixes-dev \
libxrandr-dev \
libxtst-dev \
nodejs \
npm \
wget
python3.12 \
python3.12-venv \
udev \
wget \
x11-xserver-utils \
xvfb
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
apt-get install -y --no-install-recommends \
libmfx-dev
@@ -70,41 +77,31 @@ apt-get clean
rm -rf /var/lib/apt/lists/*
_DEPS
#Install Node
# hadolint ignore=SC1091
RUN <<_INSTALL_NODE
#!/bin/bash
set -e
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
source "$HOME/.nvm/nvm.sh"
nvm install 20.9.0
nvm use 20.9.0
_INSTALL_NODE
# Update gcc alias
# https://stackoverflow.com/a/70653945/11214013
RUN <<_GCC_ALIAS
#!/bin/bash
set -e
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
/usr/bin/gcc gcc /usr/bin/gcc-11 100 \
--slave /usr/bin/g++ g++ /usr/bin/g++-11 \
--slave /usr/bin/gcov gcov /usr/bin/gcov-11 \
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-11 \
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-11
_GCC_ALIAS
# install cmake
# sunshine requires cmake >= 3.18
WORKDIR /build/cmake
# https://cmake.org/download/
ENV CMAKE_VERSION="3.25.1"
# hadolint ignore=SC3010
RUN <<_INSTALL_CMAKE
#!/bin/bash
set -e
cmake_prefix="https://github.com/Kitware/CMake/releases/download/v"
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
cmake_arch="x86_64"
elif [[ "${TARGETPLATFORM}" == 'linux/arm64' ]]; then
cmake_arch="aarch64"
fi
url="${cmake_prefix}${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-${cmake_arch}.sh"
echo "cmake url: ${url}"
wget "$url" --progress=bar:force:noscroll -q --show-progress -O ./cmake.sh
sh ./cmake.sh --prefix=/usr/local --skip-license
rm ./cmake.sh
_INSTALL_CMAKE
# install cuda
WORKDIR /build/cuda
# versions: https://developer.nvidia.com/cuda-toolkit-archive
@@ -131,17 +128,20 @@ _INSTALL_CUDA
WORKDIR /build/sunshine/
COPY --link .. .
# setup npm dependencies
RUN npm install
# setup build directory
WORKDIR /build/sunshine/build
# cmake and cpack
# hadolint ignore=SC1091
RUN <<_MAKE
#!/bin/bash
set -e
#Set Node version
source "$HOME/.nvm/nvm.sh"
nvm use 20.9.0
#Actually build
cmake \
-DBUILD_WERROR=ON \
-DCMAKE_CUDA_COMPILER:PATH=/build/cuda/bin/nvcc \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
@@ -156,6 +156,17 @@ make -j "$(nproc)"
cpack -G DEB
_MAKE
# run tests
WORKDIR /build/sunshine/build/tests
# hadolint ignore=SC1091
RUN <<_TEST
#!/bin/bash
set -e
export DISPLAY=:1
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
./test_sunshine --gtest_color=yes
_TEST
FROM scratch AS artifacts
ARG BASE
ARG TAG
@@ -183,9 +194,9 @@ EXPOSE 48010
EXPOSE 47998-48000/udp
# setup user
ARG PGID=1000
ARG PGID=1001
ENV PGID=${PGID}
ARG PUID=1000
ARG PUID=1001
ENV PUID=${PUID}
ENV TZ="UTC"
ARG UNAME=lizard

View File

@@ -1,4 +1,4 @@
# Doxyfile 1.9.6
# Doxyfile 1.10.0
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.
@@ -42,7 +42,7 @@ DOXYFILE_ENCODING = UTF-8
# title of most generated pages and in a few other places.
# The default value is: My Project.
PROJECT_NAME = "Sunshine"
PROJECT_NAME = Sunshine
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
@@ -63,6 +63,12 @@ PROJECT_BRIEF = "Sunshine is a Gamestream host for Moonlight."
PROJECT_LOGO = ../sunshine.png
# With the PROJECT_ICON tag one can specify an icon that is included in the tabs
# when the HTML document is shown. Doxygen will copy the logo to the output
# directory.
PROJECT_ICON =
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is
# entered, it will be relative to the location where doxygen was started. If
@@ -365,6 +371,17 @@ MARKDOWN_SUPPORT = YES
TOC_INCLUDE_HEADINGS = 5
# The MARKDOWN_ID_STYLE tag can be used to specify the algorithm used to
# generate identifiers for the Markdown headings. Note: Every identifier is
# unique.
# Possible values are: DOXYGEN use a fixed 'autotoc_md' string followed by a
# sequence number starting at 0 and GITHUB use the lower case version of title
# with any whitespace replaced by '-' and punctuation characters removed.
# The default value is: DOXYGEN.
# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
MARKDOWN_ID_STYLE = DOXYGEN
# When enabled doxygen tries to link words that correspond to documented
# classes, or namespaces to their corresponding documentation. Such a link can
# be prevented in individual cases by putting a % sign in front of the word or
@@ -489,6 +506,14 @@ LOOKUP_CACHE_SIZE = 0
NUM_PROC_THREADS = 0
# If the TIMESTAMP tag is set different from NO then each generated page will
# contain the date or date and time when the page was generated. Setting this to
# NO can help when comparing the output of multiple runs.
# Possible values are: YES, NO, DATETIME and DATE.
# The default value is: NO.
TIMESTAMP = NO
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
@@ -874,7 +899,14 @@ WARN_IF_UNDOC_ENUM_VAL = NO
# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS
# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but
# at the end of the doxygen process doxygen will return with a non-zero status.
# Possible values are: NO, YES and FAIL_ON_WARNINGS.
# If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS_PRINT then doxygen behaves
# like FAIL_ON_WARNINGS but in case no WARN_LOGFILE is defined doxygen will not
# write the warning messages in between other messages but write them at the end
# of a run, in case a WARN_LOGFILE is defined the warning messages will be
# besides being in the defined file also be shown at the end of a run, unless
# the WARN_LOGFILE is defined as - i.e. standard output (stdout) in that case
# the behavior will remain as with the setting FAIL_ON_WARNINGS.
# Possible values are: NO, YES, FAIL_ON_WARNINGS and FAIL_ON_WARNINGS_PRINT.
# The default value is: NO.
WARN_AS_ERROR = NO
@@ -953,12 +985,12 @@ INPUT_FILE_ENCODING =
# Note the list of default checked file patterns might differ from the list of
# default file extension mappings.
#
# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
# *.hh, *.hxx, *.hpp, *.h++, *.l, *.cs, *.d, *.php, *.php4, *.php5, *.phtml,
# *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C
# comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd,
# *.vhdl, *.ucf, *.qsf and *.ice.
# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cxxm,
# *.cpp, *.cppm, *.ccm, *.c++, *.c++m, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl,
# *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, *.h++, *.ixx, *.l, *.cs, *.d,
# *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to
# be provided as doxygen C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
# *.f18, *.f, *.for, *.vhd, *.vhdl, *.ucf, *.qsf and *.ice.
FILE_PATTERNS = *.c \
*.cc \
@@ -1043,9 +1075,6 @@ EXCLUDE_PATTERNS =
# output. The symbol name can be a fully qualified name, a word, or if the
# wildcard * is used, a substring. Examples: ANamespace, AClass,
# ANamespace::AClass, ANamespace::*Test
#
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
EXCLUDE_SYMBOLS =
@@ -1159,7 +1188,8 @@ FORTRAN_COMMENT_AFTER = 72
SOURCE_BROWSER = NO
# Setting the INLINE_SOURCES tag to YES will include the body of functions,
# classes and enums directly into the documentation.
# multi-line macros, enums or list initialized variables directly into the
# documentation.
# The default value is: NO.
INLINE_SOURCES = NO
@@ -1428,15 +1458,6 @@ HTML_COLORSTYLE_SAT = 100
HTML_COLORSTYLE_GAMMA = 80
# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
# page will contain the date and time when the page was generated. Setting this
# to YES can help to show when doxygen was last run and thus if the
# documentation is up to date.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_TIMESTAMP = NO
# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
# documentation will contain a main index with vertical navigation menus that
# are dynamically created via JavaScript. If disabled, the navigation index will
@@ -1456,6 +1477,33 @@ HTML_DYNAMIC_MENUS = YES
HTML_DYNAMIC_SECTIONS = NO
# If the HTML_CODE_FOLDING tag is set to YES then classes and functions can be
# dynamically folded and expanded in the generated HTML source code.
# The default value is: YES.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_CODE_FOLDING = YES
# If the HTML_COPY_CLIPBOARD tag is set to YES then doxygen will show an icon in
# the top right corner of code and text fragments that allows the user to copy
# its content to the clipboard. Note this only works if supported by the browser
# and the web page is served via a secure context (see:
# https://www.w3.org/TR/secure-contexts/), i.e. using the https: or file:
# protocol.
# The default value is: YES.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_COPY_CLIPBOARD = YES
# Doxygen stores a couple of settings persistently in the browser (via e.g.
# cookies). By default these settings apply to all HTML pages generated by
# doxygen across all projects. The HTML_PROJECT_COOKIE tag can be used to store
# the settings under a project specific key, such that the user preferences will
# be stored separately.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_PROJECT_COOKIE =
# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
# shown in the various tree structured indices initially; the user can expand
# and collapse entries dynamically later on. Doxygen will expand the tree to
@@ -1586,6 +1634,16 @@ BINARY_TOC = NO
TOC_EXPAND = NO
# The SITEMAP_URL tag is used to specify the full URL of the place where the
# generated documentation will be placed on the server by the user during the
# deployment of the documentation. The generated sitemap is called sitemap.xml
# and placed on the directory specified by HTML_OUTPUT. In case no SITEMAP_URL
# is specified no sitemap is generated. For information about the sitemap
# protocol see https://www.sitemaps.org
# This tag requires that the tag GENERATE_HTML is set to YES.
SITEMAP_URL =
# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
@@ -2074,9 +2132,16 @@ PDF_HYPERLINKS = YES
USE_PDFLATEX = YES
# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
# command to the generated LaTeX files. This will instruct LaTeX to keep running
# if errors occur, instead of asking the user for help.
# The LATEX_BATCHMODE tag signals the behavior of LaTeX in case of an error.
# Possible values are: NO same as ERROR_STOP, YES same as BATCH, BATCH In batch
# mode nothing is printed on the terminal, errors are scrolled as if <return> is
# hit at every error; missing files that TeX tries to input or request from
# keyboard input (\read on a not open input stream) cause the job to abort,
# NON_STOP In nonstop mode the diagnostic message will appear on the terminal,
# but there is no possibility of user interaction just like in batch mode,
# SCROLL In scroll mode, TeX will stop only for missing files to input or if
# keyboard input is necessary and ERROR_STOP In errorstop mode, TeX will stop at
# each error, asking for user intervention.
# The default value is: NO.
# This tag requires that the tag GENERATE_LATEX is set to YES.
@@ -2097,14 +2162,6 @@ LATEX_HIDE_INDICES = NO
LATEX_BIB_STYLE = plain
# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
# page will contain the date and time when the page was generated. Setting this
# to NO can help when comparing the output of multiple runs.
# The default value is: NO.
# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_TIMESTAMP = NO
# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute)
# path from which the emoji images will be read. If a relative path is entered,
# it will be relative to the LATEX_OUTPUT directory. If left blank the
@@ -2270,13 +2327,39 @@ DOCBOOK_OUTPUT = doxydocbook
#---------------------------------------------------------------------------
# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures
# AutoGen Definitions (see https://autogen.sourceforge.net/) file that captures
# the structure of the code including all documentation. Note that this feature
# is still experimental and incomplete at the moment.
# The default value is: NO.
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# Configuration options related to Sqlite3 output
#---------------------------------------------------------------------------
# If the GENERATE_SQLITE3 tag is set to YES doxygen will generate a Sqlite3
# database with symbols found by doxygen stored in tables.
# The default value is: NO.
GENERATE_SQLITE3 = NO
# The SQLITE3_OUTPUT tag is used to specify where the Sqlite3 database will be
# put. If a relative path is entered the value of OUTPUT_DIRECTORY will be put
# in front of it.
# The default directory is: sqlite3.
# This tag requires that the tag GENERATE_SQLITE3 is set to YES.
SQLITE3_OUTPUT = sqlite3
# The SQLITE3_RECREATE_DB tag is set to YES, the existing doxygen_sqlite3.db
# database file will be recreated with each doxygen run. If set to NO, doxygen
# will warn if a database file is already found and not modify it.
# The default value is: YES.
# This tag requires that the tag GENERATE_SQLITE3 is set to YES.
SQLITE3_RECREATE_DB = YES
#---------------------------------------------------------------------------
# Configuration options related to the Perl module output
#---------------------------------------------------------------------------
@@ -2355,7 +2438,7 @@ SEARCH_INCLUDES = YES
# RECURSIVE has no effect here.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
INCLUDE_PATH = ../third-party/ffmpeg-linux-x86_64/include/
INCLUDE_PATH = ../third-party/build-deps/ffmpeg/linux-x86_64/include/
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
# patterns (like *.h and *.hpp) to filter out the header-files in the
@@ -2419,15 +2502,15 @@ TAGFILES =
GENERATE_TAGFILE =
# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
# the class index. If set to NO, only the inherited external classes will be
# listed.
# If the ALLEXTERNALS tag is set to YES, all external classes and namespaces
# will be listed in the class and namespace index. If set to NO, only the
# inherited external classes will be listed.
# The default value is: NO.
ALLEXTERNALS = NO
# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
# in the modules index. If set to NO, only the current project's groups will be
# in the topic index. If set to NO, only the current project's groups will be
# listed.
# The default value is: YES.
@@ -2441,16 +2524,9 @@ EXTERNAL_GROUPS = YES
EXTERNAL_PAGES = YES
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
# Configuration options related to diagram generator tools
#---------------------------------------------------------------------------
# You can include diagrams made with dia in doxygen documentation. Doxygen will
# then run dia to produce the diagram and insert it in the documentation. The
# DIA_PATH tag allows you to specify the directory where the dia binary resides.
# If left empty dia is assumed to be found in the default search path.
DIA_PATH =
# If set to YES the inheritance and collaboration graphs will hide inheritance
# and usage relations if the target is undocumented or is not a class.
# The default value is: YES.
@@ -2459,7 +2535,7 @@ HIDE_UNDOC_RELATIONS = YES
# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
# available from the path. This tool is part of Graphviz (see:
# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
# https://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
# Bell Labs. The other options in this section have no effect if this option is
# set to NO
# The default value is: NO.
@@ -2512,13 +2588,19 @@ DOT_NODE_ATTR = "shape=box,height=0.2,width=0.4"
DOT_FONTPATH =
# If the CLASS_GRAPH tag is set to YES (or GRAPH) then doxygen will generate a
# graph for each documented class showing the direct and indirect inheritance
# relations. In case HAVE_DOT is set as well dot will be used to draw the graph,
# otherwise the built-in generator will be used. If the CLASS_GRAPH tag is set
# to TEXT the direct and indirect inheritance relations will be shown as texts /
# links.
# Possible values are: NO, YES, TEXT and GRAPH.
# If the CLASS_GRAPH tag is set to YES or GRAPH or BUILTIN then doxygen will
# generate a graph for each documented class showing the direct and indirect
# inheritance relations. In case the CLASS_GRAPH tag is set to YES or GRAPH and
# HAVE_DOT is enabled as well, then dot will be used to draw the graph. In case
# the CLASS_GRAPH tag is set to YES and HAVE_DOT is disabled or if the
# CLASS_GRAPH tag is set to BUILTIN, then the built-in generator will be used.
# If the CLASS_GRAPH tag is set to TEXT the direct and indirect inheritance
# relations will be shown as texts / links. Explicit enabling an inheritance
# graph or choosing a different representation for an inheritance graph of a
# specific class, can be accomplished by means of the command \inheritancegraph.
# Disabling an inheritance graph can be accomplished by means of the command
# \hideinheritancegraph.
# Possible values are: NO, YES, TEXT, GRAPH and BUILTIN.
# The default value is: YES.
CLASS_GRAPH = YES
@@ -2526,15 +2608,21 @@ CLASS_GRAPH = YES
# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
# graph for each documented class showing the direct and indirect implementation
# dependencies (inheritance, containment, and class references variables) of the
# class with other documented classes.
# class with other documented classes. Explicit enabling a collaboration graph,
# when COLLABORATION_GRAPH is set to NO, can be accomplished by means of the
# command \collaborationgraph. Disabling a collaboration graph can be
# accomplished by means of the command \hidecollaborationgraph.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.
COLLABORATION_GRAPH = YES
# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
# groups, showing the direct groups dependencies. See also the chapter Grouping
# in the manual.
# groups, showing the direct groups dependencies. Explicit enabling a group
# dependency graph, when GROUP_GRAPHS is set to NO, can be accomplished by means
# of the command \groupgraph. Disabling a directory graph can be accomplished by
# means of the command \hidegroupgraph. See also the chapter Grouping in the
# manual.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.
@@ -2576,8 +2664,8 @@ DOT_UML_DETAILS = NO
# The DOT_WRAP_THRESHOLD tag can be used to set the maximum number of characters
# to display on a single line. If the actual line length exceeds this threshold
# significantly it will wrapped across multiple lines. Some heuristics are apply
# to avoid ugly line breaks.
# significantly it will be wrapped across multiple lines. Some heuristics are
# applied to avoid ugly line breaks.
# Minimum value: 0, maximum value: 1000, default value: 17.
# This tag requires that the tag HAVE_DOT is set to YES.
@@ -2594,7 +2682,9 @@ TEMPLATE_RELATIONS = NO
# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
# YES then doxygen will generate a graph for each documented file showing the
# direct and indirect include dependencies of the file with other documented
# files.
# files. Explicit enabling an include graph, when INCLUDE_GRAPH is is set to NO,
# can be accomplished by means of the command \includegraph. Disabling an
# include graph can be accomplished by means of the command \hideincludegraph.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.
@@ -2603,7 +2693,10 @@ INCLUDE_GRAPH = YES
# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
# set to YES then doxygen will generate a graph for each documented file showing
# the direct and indirect include dependencies of the file with other documented
# files.
# files. Explicit enabling an included by graph, when INCLUDED_BY_GRAPH is set
# to NO, can be accomplished by means of the command \includedbygraph. Disabling
# an included by graph can be accomplished by means of the command
# \hideincludedbygraph.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.
@@ -2643,7 +2736,10 @@ GRAPHICAL_HIERARCHY = YES
# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
# dependencies a directory has on other directories in a graphical way. The
# dependency relations are determined by the #include relations between the
# files in the directories.
# files in the directories. Explicit enabling a directory graph, when
# DIRECTORY_GRAPH is set to NO, can be accomplished by means of the command
# \directorygraph. Disabling a directory graph can be accomplished by means of
# the command \hidedirectorygraph.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.
@@ -2659,7 +2755,7 @@ DIR_GRAPH_MAX_DEPTH = 1
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
# generated by dot. For an explanation of the image formats see the section
# output formats in the documentation of the dot tool (Graphviz (see:
# http://www.graphviz.org/)).
# https://www.graphviz.org/)).
# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
# to make the SVG files visible in IE 9+ (other browsers do not have this
# requirement).
@@ -2696,11 +2792,12 @@ DOT_PATH =
DOTFILE_DIRS =
# The MSCFILE_DIRS tag can be used to specify one or more directories that
# contain msc files that are included in the documentation (see the \mscfile
# command).
# You can include diagrams made with dia in doxygen documentation. Doxygen will
# then run dia to produce the diagram and insert it in the documentation. The
# DIA_PATH tag allows you to specify the directory where the dia binary resides.
# If left empty dia is assumed to be found in the default search path.
MSCFILE_DIRS =
DIA_PATH =
# The DIAFILE_DIRS tag can be used to specify one or more directories that
# contain dia files that are included in the documentation (see the \diafile
@@ -2777,3 +2874,19 @@ GENERATE_LEGEND = YES
# The default value is: YES.
DOT_CLEANUP = YES
# You can define message sequence charts within doxygen comments using the \msc
# command. If the MSCGEN_TOOL tag is left empty (the default), then doxygen will
# use a built-in version of mscgen tool to produce the charts. Alternatively,
# the MSCGEN_TOOL tag can also specify the name an external tool. For instance,
# specifying prog as the value, doxygen will call the tool as prog -T
# <outfile_format> -o <outputfile> <inputfile>. The external tool should support
# output file formats "png", "eps", "svg", and "ismap".
MSCGEN_TOOL =
# The MSCFILE_DIRS tag can be used to specify one or more directories that
# contain msc files that are included in the documentation (see the \mscfile
# command).
MSCFILE_DIRS =

View File

@@ -3,7 +3,7 @@
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXOPTS ?= -W --keep-going
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

View File

@@ -9,6 +9,7 @@ if "%SPHINXBUILD%" == "" (
)
set SOURCEDIR=source
set BUILDDIR=build
set "SPHINXOPTS=-W --keep-going"
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
@@ -25,11 +26,11 @@ if errorlevel 9009 (
if "%1" == "" goto help
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% || exit /b %ERRORLEVEL%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% || exit /b %ERRORLEVEL%
:end
popd

View File

@@ -1,8 +1,9 @@
breathe==4.35.0
furo==2023.9.10
furo==2024.1.29
m2r2==0.3.3.post2
rstcheck[sphinx]==6.2.0
rstcheck[sphinx]==6.2.1
rstfmt==0.0.14
setuptools # required by m2r2, Ubuntu 24.04 doesn't include this
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

@@ -3,9 +3,11 @@ 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
.. 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).
.. note:: When a working directory is not specified, it defaults to the folder where the target application resides.
Common Examples
---------------
@@ -23,267 +25,328 @@ Desktop
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.
.. note:: Steam is launched as a detached command because Steam starts with a process that self updates itself and the original
process is killed.
+----------------------+------------------------------------------+----------------------------------+-----------------------------------+
| **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`` |
+----------------------+------------------------------------------+----------------------------------+-----------------------------------+
.. tab:: Linux
+----------------------+------------------------------------------+
| Application Name | ``Steam Big Picture`` |
+----------------------+------------------------------------------+
| Detached Commands | ``setsid steam steam://open/bigpicture`` |
+----------------------+------------------------------------------+
| Image | ``steam.png`` |
+----------------------+------------------------------------------+
.. tab:: macOS
+----------------------+----------------------------------+
| Application Name | ``Steam Big Picture`` |
+----------------------+----------------------------------+
| Detached Commands | ``open steam://open/bigpicture`` |
+----------------------+----------------------------------+
| Image | ``steam.png`` |
+----------------------+----------------------------------+
.. tab:: Windows
+----------------------+-----------------------------+
| Application Name | ``Steam Big Picture`` |
+----------------------+-----------------------------+
| Command | ``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.
.. note:: Using URI method will be the most consistent between various games.
URI (Epic)
""""""""""
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| **Field** | **Windows** |
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| Application Name | ``Surviving Mars`` |
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| Detached Commands | ``cmd /C "start com.epicgames.launcher://apps/d759128018124dcabb1fbee9bb28e178%3A20729b9176c241f0b617c5723e70ec2d%3AOvenbird?action=launch&silent=true"`` |
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
.. tab:: Windows
+----------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| Application Name | ``Surviving Mars`` |
+----------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| Command | ``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`` |
+----------------------+-----------------------------------------------+
.. tab:: Windows
+----------------------+-----------------------------------------------+
| Application Name | ``Surviving Mars`` |
+----------------------+-----------------------------------------------+
| Command | ``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"`` |
+----------------------+--------------------------------------------------------------+
.. tab:: 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.
.. note:: Using URI method will be the most consistent between various games.
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"`` |
+----------------------+-------------------------------------------+-----------------------------------+---------------------------------------------+
.. tab:: Linux
+----------------------+-------------------------------------------+
| Application Name | ``Surviving Mars`` |
+----------------------+-------------------------------------------+
| Detached Commands | ``setsid steam steam://rungameid/464920`` |
+----------------------+-------------------------------------------+
.. tab:: macOS
+----------------------+-----------------------------------+
| Application Name | ``Surviving Mars`` |
+----------------------+-----------------------------------+
| Detached Commands | ``open steam://rungameid/464920`` |
+----------------------+-----------------------------------+
.. tab:: Windows
+----------------------+------------------------------+
| Application Name | ``Surviving Mars`` |
+----------------------+------------------------------+
| Command | ``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`` |
+----------------------+-------------------------+-------------------------+------------------------------------------------------------------+
.. tab:: Linux
+----------------------+---------------------------------------------------+
| Application Name | ``Surviving Mars`` |
+----------------------+---------------------------------------------------+
| Command | ``MarsSteam`` |
+----------------------+---------------------------------------------------+
| Working Directory | ``~/.steam/steam/SteamApps/common/Survivng Mars`` |
+----------------------+---------------------------------------------------+
.. tab:: macOS
+----------------------+---------------------------------------------------+
| Application Name | ``Surviving Mars`` |
+----------------------+---------------------------------------------------+
| Command | ``MarsSteam`` |
+----------------------+---------------------------------------------------+
| Working Directory | ``~/.steam/steam/SteamApps/common/Survivng Mars`` |
+----------------------+---------------------------------------------------+
.. tab:: Windows
+----------------------+------------------------------------------------------------------+
| Application Name | ``Surviving Mars`` |
+----------------------+------------------------------------------------------------------+
| Command | ``MarsSteam.exe`` |
+----------------------+------------------------------------------------------------------+
| Working Directory | ``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"`` |
+----------------------+------------------------------+------------------------------+----------------------------------------------------------------------------------+
.. tab:: Linux
Linux
-----
+----------------------+-------------------------------------------------------------+
| Application Name | ``Surviving Mars`` |
+----------------------+-------------------------------------------------------------+
| Command | ``~/.steam/steam/SteamApps/common/Survivng Mars/MarsSteam`` |
+----------------------+-------------------------------------------------------------+
Changing Resolution and Refresh Rate (Linux - X11)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. tab:: macOS
+----------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| **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`` |
+----------------------+---------------------------------------------------------------------------------------------------------------------------------------+
+----------------------+-------------------------------------------------------------+
| Application Name | ``Surviving Mars`` |
+----------------------+-------------------------------------------------------------+
| Command | ``~/.steam/steam/SteamApps/common/Survivng Mars/MarsSteam`` |
+----------------------+-------------------------------------------------------------+
.. 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.
.. tab:: Windows
You can update the ``Do`` command to this:
.. code-block:: bash
+----------------------+----------------------------------------------------------------------------------+
| Application Name | ``Surviving Mars`` |
+----------------------+----------------------------------------------------------------------------------+
| Command | ``"C:\Program Files (x86)\Steam\steamapps\common\Surviving Mars\MarsSteam.exe"`` |
+----------------------+----------------------------------------------------------------------------------+
bash -c "${HOME}/scripts/set-custom-res.sh \"${SUNSHINE_CLIENT_WIDTH}\" \"${SUNSHINE_CLIENT_HEIGHT}\" \"${SUNSHINE_CLIENT_FPS}\""
Prep Commands
-------------
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`` |
+----------------------+----------------------------------------------------------------------------------------------------------------------------------+
Changing Resolution (Linux - NVIDIA)
Changing Resolution and Refresh Rate
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+----------------------+------------------------------------------------------------------------------------------------------+
| **Field** | **Value** |
+----------------------+------------------------------------------------------------------------------------------------------+
| Command Preparations | Do: ``sh -c "${HOME}/scripts/set-custom-res.sh ${SUNSHINE_CLIENT_WIDTH} ${SUNSHINE_CLIENT_HEIGHT}"`` |
| +------------------------------------------------------------------------------------------------------+
| | Undo: ``sh -c "${HOME}/scripts/set-custom-res.sh 3840 2160"`` |
+----------------------+------------------------------------------------------------------------------------------------------+
.. tab:: Linux
The ``set-custom-res.sh`` will have this content:
.. code-block:: bash
.. tab:: X11
#!/bin/bash
+----------------------+------------------------------------------------------------------------------------------------------------------------------------+
| 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`` |
+----------------------+------------------------------------------------------------------------------------------------------------------------------------+
# Get params and set any defaults
width=${1:-1920}
height=${2:-1080}
output=${3:-HDMI-1}
nvidia-settings -a CurrentMetaMode="${output}: nvidia-auto-select { ViewPortIn=${width}x${height}, ViewPortOut=${width}x${height}+0+0 }"
.. 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.
Flatpak
^^^^^^^
You can update the ``Do`` command to this:
.. code-block:: bash
.. 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``.
bash -c "${HOME}/scripts/set-custom-res.sh \"${SUNSHINE_CLIENT_WIDTH}\" \"${SUNSHINE_CLIENT_HEIGHT}\" \"${SUNSHINE_CLIENT_FPS}\""
macOS
-----
The ``set-custom-res.sh`` will have this content:
.. code-block:: bash
Changing Resolution and Refresh Rate (macOS)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#!/bin/bash
.. 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>`__.
# Get params and set any defaults
width=${1:-1920}
height=${2:-1080}
refresh_rate=${3:-60}
+----------------------+-----------------------------------------------------------------------------------------------+
| **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"`` |
+----------------------+-----------------------------------------------------------------------------------------------+
# You may need to adjust the scaling differently so the UI/text isn't too small / big
scale=${4:-0.55}
Windows
-------
# Get the name of the active display
display_output=$(xrandr | grep " connected" | awk '{ print $1 }')
Changing Resolution and Refresh Rate (Windows)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# 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}"
.. 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/>`__.
echo "xrandr setting new mode ${mode_alias} ${xrandr_mode_str}"
xrandr --newmode ${mode_alias} ${xrandr_mode_str}
xrandr --addmode ${display_output} ${mode_alias}
+----------------------+------------------------------------------------------------------------------------------------------------------+
| **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`` |
+----------------------+------------------------------------------------------------------------------------------------------------------+
# Reset scaling
xrandr --output ${display_output} --scale 1
Elevating Commands (Windows)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# Apply new xrandr mode
xrandr --output ${display_output} --primary --mode ${mode_alias} --pos 0x0 --rotate normal --scale ${scale}
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.
# Optional reset your wallpaper to fit to new resolution
# xwallpaper --zoom /path/to/wallpaper.png
.. Note:: It's important to write the values "true" and "false" as string values, not as the typical true/false values in most JSON.
.. tab:: Wayland
**Example**
.. code-block:: json
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------+
| 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`` |
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------+
{
"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": ""
}
.. tab:: KDE Plasma (Wayland, X11)
+----------------------+-------------------------------------------------------------------------------------------------------------------------------+
| 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`` |
+----------------------+-------------------------------------------------------------------------------------------------------------------------------+
.. tab:: NVIDIA
+----------------------+------------------------------------------------------------------------------------------------------+
| Command Preparations | Do: ``sh -c "${HOME}/scripts/set-custom-res.sh ${SUNSHINE_CLIENT_WIDTH} ${SUNSHINE_CLIENT_HEIGHT}"`` |
| +------------------------------------------------------------------------------------------------------+
| | Undo: ``sh -c "${HOME}/scripts/set-custom-res.sh 3840 2160"`` |
+----------------------+------------------------------------------------------------------------------------------------------+
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}
output=${3:-HDMI-1}
nvidia-settings -a CurrentMetaMode="${output}: nvidia-auto-select { ViewPortIn=${width}x${height}, ViewPortOut=${width}x${height}+0+0 }"
.. tab:: macOS
.. tab:: displayplacer
.. 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>`__.
+----------------------+-----------------------------------------------------------------------------------------------+
| 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"`` |
+----------------------+-----------------------------------------------------------------------------------------------+
.. tab:: Windows
.. tab:: QRes
.. 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/>`__.
+----------------------+------------------------------------------------------------------------------------------------------------------+
| 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`` |
+----------------------+------------------------------------------------------------------------------------------------------------------+
Additional Considerations
-------------------------
.. tab:: Linux
.. tab:: 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``.
.. tab:: Windows
**Elevating Commands (Windows)**
If you've installed Sunshine as a service (default), you can specify if a command should be elevated with
administrative 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 is 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

@@ -7,4 +7,4 @@ Collection of guides written by the community!
:maxdepth: 2
app_examples
linux/linux
linux

View File

@@ -5,5 +5,6 @@ Collection of Sunshine Linux host guides.
.. toctree::
:maxdepth: 1
:glob:
headless_ssh
linux/*

View File

@@ -0,0 +1,30 @@
How to not stream Discord call audio
====================================
#. Set your normal `Sound Output` volume to 100%
.. image:: ../../../images/discord_calls_01.png
#. Start Sunshine
#. Set `Sound Output` to `sink-sunshine-stereo` (if it isn't automatic)
.. image:: ../../../images/discord_calls_02.png
#. In Discord - `Right Click` - `Deafen` - Select your normal `Output Device`
This is also where you will need to adjust output volume for Discord calls
.. image:: ../../../images/discord_calls_03.png
#. Open `qpwgraph`
.. image:: ../../../images/discord_calls_04.png
#. Connect `sunshine [sunshine-record]` to your normal `Output Device`
* Drag `monitor_FL` to `playback_FL`
* Drag `monitor_FR` to `playback_FR`
.. image:: ../../../images/discord_calls_05.png

View File

@@ -42,7 +42,7 @@ Once you are done, you will need to perform these 3 steps:
**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
for "physical" login. See :ref:`Linux Setup <about/setup:install>`. 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).
@@ -264,7 +264,7 @@ we will need to update the sudo configuration to execute this without being prom
script to be executed with ``sudo``.
.. note::
After I setup the :ref:`udev rule <about/usage:linux>` to get access to ``/dev/uinput``,
After I setup the :ref:`udev rule <about/setup:install>` 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/>`__.
@@ -273,7 +273,7 @@ we will need to update the sudo configuration to execute this without being prom
**Setup Script**
This script will take care of any precondtions prior to starting up sunshine.
This script will take care of any preconditions prior to starting up sunshine.
Run the following to create a script named something like ``sunshine-setup.sh``:
.. code-block:: bash
@@ -522,5 +522,5 @@ If you have any feedback and any suggestions, feel free to make a post on Discor
.. 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.
and refresh rate prior to connecting to an app. See :ref:`Changing Resolution and Refresh Rate
<about/guides/app_examples:changing resolution and refresh rate>` for more information.

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

617
docs/source/about/setup.rst Normal file
View File

@@ -0,0 +1,617 @@
Setup
=====
.. _latest release: https://github.com/LizardByte/Sunshine/releases/latest
The recommended method for running Sunshine is to use the `binaries`_ bundled with the `latest release`_.
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>`.
No support will be provided for third party packages!
Install
-------
.. tab:: Docker
.. warning:: The Docker images are not recommended for most users. No support will be provided!
Docker images are available on `Dockerhub.io <https://hub.docker.com/repository/docker/lizardbyte/sunshine>`__
and `ghcr.io <https://github.com/orgs/LizardByte/packages?repo_name=sunshine>`__.
See :ref:`Docker <about/docker:docker>` for additional information.
.. tab:: Linux
**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
=========================================== ============== ============== ================================
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-38-{arch}.rpm 12.4.0 525.60.13 50;52;60;61;62;70;75;80;86;90
sunshine-fedora-39-{arch}.rpm 12.4.0 525.60.13 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
sunshine-ubuntu-24.04-{arch}.deb 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90
=========================================== ============== ============== ================================
.. tab:: AppImage
.. caution:: Use distro-specific packages instead of the AppImage if they are available.
According to AppImageLint the supported distro matrix of the AppImage is below.
- ✔ Debian bullseye
- ✔ Debian bookworm
- ✔ Debian trixie
- ✖ Debian sid
- ✔ Ubuntu mantic
- ✔ Ubuntu lunar
- ✔ Ubuntu jammy
- ✔ Ubuntu focal
- ✖ Ubuntu bionic
- ✖ Ubuntu xenial
- ✖ Ubuntu trusty
- ✖ CentOS 7
#. Download ``sunshine.AppImage`` to your home directory.
.. code-block:: bash
cd ~
wget https://github.com/LizardByte/Sunshine/releases/latest/download/sunshine.AppImage
#. 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
.. tab:: Arch Linux Package
#. 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
.. tab:: Debian/Ubuntu Package
#. Download ``sunshine-{distro}-{distro-version}-{arch}.deb`` and run the following code.
.. code-block:: bash
sudo apt install -f ./sunshine-{distro}-{distro-version}-{arch}.deb
.. note:: The ``{distro-version}`` is the version of the distro we built the package on. The ``{arch}`` is the
architecture of your operating system.
.. 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
.. tab:: Flatpak Package
.. caution:: Use distro-specific packages instead of the Flatpak if they are available.
.. important:: The instructions provided here are for the version supplied in the `latest release`_, which does
not necessarily match the version in the Flathub repository!
#. 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
.. tab:: 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-{distro}-{distro-version}-{arch}.rpm`` and run the following code.
.. code-block:: bash
sudo dnf install ./sunshine-{distro}-{distro-version}-{arch}.rpm
.. note:: The ``{distro-version}`` is the version of the distro we built the package on. The ``{arch}`` is the
architecture of your operating system.
.. 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
The `deb`, `rpm`, `zst`, `Flatpak` and `AppImage` packages should handle these steps automatically.
Third party packages may not.
Sunshine needs access to `uinput` to create mouse and gamepad events.
#. Create and reload `udev` rules for uinput.
.. code-block:: bash
echo 'KERNEL=="uinput", SUBSYSTEM=="misc", OPTIONS+="static_node=uinput", TAG+="uaccess"' | \
sudo tee /etc/udev/rules.d/60-sunshine.rules
sudo udevadm control --reload-rules
sudo udevadm trigger
sudo modprobe uinput
#. Enable permissions for KMS capture.
.. warning:: Capture of most Wayland-based desktop environments will fail unless this step is performed.
.. 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 capture.
**Enable**
.. code-block:: bash
sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))
**Disable (for Xorg/X11 only)**
.. code-block:: bash
sudo setcap -r $(readlink -f $(which sunshine))
#. 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
#. Reboot
.. code-block:: bash
sudo reboot now
.. tab:: macOS
.. important:: Sunshine on macOS is experimental. Gamepads do not work.
.. tab:: Homebrew
#. Install `Homebrew <https://docs.brew.sh/Installation>`__
#. Update the Homebrew sources and install Sunshine.
.. code-block:: bash
brew tap LizardByte/homebrew
brew install sunshine
.. tab:: 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 and install by running the following code.
.. code-block:: bash
mkdir -p ~/ports/multimedia/sunshine
cd ~/ports/multimedia/sunshine
curl -OL https://github.com/LizardByte/Sunshine/releases/latest/download/Portfile
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.
#. Optionally, install service
.. code-block:: bash
sudo port load Sunshine
Uninstall:
.. code-block:: bash
sudo port uninstall sunshine
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.
.. tab:: Windows
.. tab:: 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.
.. tab:: Standalone
.. warning:: By using this package instead of the installer, performance will be reduced. This package is not
recommended for most users. No support will be provided!
#. Download and extract ``sunshine-windows-portable.zip``
#. Open command prompt as administrator
#. Firewall rules
Install:
.. code-block:: bash
cd /d {path to extracted directory}
scripts/add-firewall-rule.bat
Uninstall:
.. code-block:: bash
cd /d {path to extracted directory}
scripts/delete-firewall-rule.bat
#. Virtual Gamepad Support
Install:
.. code-block:: bash
cd /d {path to extracted directory}
scripts/install-gamepad.bat
Uninstall:
.. code-block:: bash
cd /d {path to extracted directory}
scripts/uninstall-gamepad.bat
#. Windows service
Install:
.. code-block:: bash
cd /d {path to extracted directory}
scripts/install-service.bat
scripts/autostart-service.bat
Uninstall:
.. code-block:: bash
cd /d {path to extracted directory}
scripts/uninstall-service.bat
To uninstall, delete the extracted directory which contains the ``sunshine.exe`` file.
Usage
-----
#. If Sunshine is not installed/running as a service, then start sunshine with the following command, unless a start
command is listed in the specified package `install`_ instructions above.
.. note:: A service is a process that runs in the background. This is the default when installing Sunshine from the
Windows installer. 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.
#. Adjust any configuration settings as needed.
#. In Moonlight, you may need to add the PC manually.
#. When Moonlight requests for you insert the pin:
- 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:
.. tab:: General
.. code-block:: bash
sunshine --help
.. tab:: AppImage
.. code-block:: bash
./sunshine.AppImage --help
.. tab:: Flatpak
.. code-block:: bash
flatpak run --command=sunshine dev.lizardbyte.Sunshine --help
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
- ``wait-all`` - Specifies whether to wait for all processes to terminate rather than just the initial process
- ``exit-timeout`` - Specifies how long to wait in seconds for the process to gracefully exit (default: 5 seconds)
- ``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.
- This does not apply to ``detached`` applications.
- 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 officially supported on Windows hosts and experimentally supported for Linux hosts.
- General HDR support information and requirements:
- HDR must be activated in the host OS, which may require an HDR-capable display or EDID emulator dongle connected to your host PC.
- You must also enable the HDR option in your Moonlight client settings, otherwise the stream will be SDR (and probably overexposed if your host is HDR).
- A good HDR experience relies on proper HDR display calibration both in the OS and in game. HDR calibration can differ significantly between client and host displays.
- 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.
- Some GPUs video encoders can produce lower image quality or encoding performance when streaming in HDR compared to SDR.
- Additional information:
.. tab:: Windows
- HDR streaming is supported for Intel, AMD, and NVIDIA GPUs that support encoding HEVC Main 10 or AV1 10-bit profiles.
- 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.
- Older games that use NVIDIA-specific NVAPI HDR rather than native Windows HDR support may not display properly in HDR.
.. tab:: Linux
- HDR streaming is supported for Intel and AMD GPUs that support encoding HEVC Main 10 or AV1 10-bit profiles using VAAPI.
- The KMS capture backend is required for HDR capture. Other capture methods, like NvFBC or X11, do not support HDR.
- You will need a desktop environment with a compositor that supports HDR rendering, such as Gamescope or KDE Plasma 6.
.. 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.

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

@@ -15,7 +15,6 @@ Install Requirements
sudo apt update && sudo apt install \
build-essential \
cmake \
libavdevice-dev \
libayatana-appindicator3-dev \
libboost-filesystem-dev \
libboost-locale-dev \
@@ -25,13 +24,14 @@ Install Requirements
libcurl4-openssl-dev \
libdrm-dev \ # KMS
libevdev-dev \
libminiupnpc-dev \
libmfx-dev \ # x86_64 only
libnotify-dev \
libnuma-dev \
libopus-dev \
libpulse-dev \
libssl-dev \
libva-dev \
libva-dev \ # VA-API
libvdpau-dev \
libwayland-dev \ # Wayland
libx11-dev \ # X11
@@ -46,7 +46,7 @@ Install Requirements
nvidia-cuda-dev \ # Cuda, NvFBC
nvidia-cuda-toolkit # Cuda, NvFBC
Fedora 37, 38
Fedora 38, 39
^^^^^^^^^^^^^
Install Requirements
@@ -66,7 +66,7 @@ Install Requirements
libdrm-devel \
libevdev-devel \
libnotify-devel \
libva-devel \
libva-devel \ # VA-API
libvdpau-devel \
libX11-devel \ # X11
libxcb-devel \ # X11
@@ -77,6 +77,7 @@ Install Requirements
libXrandr-devel \ # X11
libXtst-devel \ # X11
mesa-libGL-devel \
miniupnpc-devel \
npm \
numactl-devel \
openssl-devel \
@@ -86,59 +87,8 @@ Install Requirements
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
@@ -147,20 +97,22 @@ Install Requirements
build-essential \
cmake \
libappindicator3-dev \
libavdevice-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 \
libminiupnpc-dev \
libmfx-dev \ # x86_64 only
libnotify-dev \
libnuma-dev \
libopus-dev \
libpulse-dev \
libssl-dev \
libva-dev \ # VA-API
libwayland-dev \ # Wayland
libx11-dev \ # X11
libxcb-shm0-dev \ # X11
@@ -174,11 +126,63 @@ Install Requirements
nvidia-cuda-dev \ # CUDA, NvFBC
nvidia-cuda-toolkit # CUDA, NvFBC
Ubuntu 24.04
^^^^^^^^^^^^
Install Requirements
.. code-block:: bash
sudo apt update && sudo apt install \
build-essential \
cmake \
gcc-11 \
g++-11 \
libappindicator3-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 \
libminiupnpc-dev \
libmfx-dev \ # x86_64 only
libnotify-dev \
libnuma-dev \
libopus-dev \
libpulse-dev \
libssl-dev \
libva-dev \ # VA-API
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
Update gcc alias
.. code-block:: bash
update-alternatives --install \
/usr/bin/gcc gcc /usr/bin/gcc-11 100 \
--slave /usr/bin/g++ g++ /usr/bin/g++-11 \
--slave /usr/bin/gcov gcov /usr/bin/gcov-11 \
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-11 \
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-11
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.
.. tip:: The version of CUDA you use will determine compatibility with various GPU generations.
At the time of writing, the recommended version to use is CUDA ~11.8.
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
@@ -192,16 +196,9 @@ If the version of CUDA available from your distro is not adequate, manually inst
./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.
.. attention:: Ensure you are in the build directory created during the clone step earlier before continuing.
.. code-block:: bash

View File

@@ -12,33 +12,40 @@ MacPorts
Install Requirements
.. code-block:: bash
sudo port install avahi boost180 cmake curl libopus npm9 pkgconfig
sudo port install avahi boost180 cmake curl doxygen graphviz libopus miniupnpc npm9 pkgconfig python311 py311-pip
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 .
brew install boost cmake doxygen graphviz miniupnpc node opus pkg-config python@3.11
npm dependencies
----------------
Install npm dependencies.
.. code-block:: bash
If there are issues with an SSL header that is not found:
.. tab:: Intel
npm install
.. code-block:: bash
pushd /usr/local/include
ln -s ../opt/openssl/include/openssl .
popd
.. tab:: Apple Silicon
.. code-block:: bash
pushd /opt/homebrew/include
ln -s ../opt/openssl/include/openssl .
popd
Build
-----
.. Attention:: Ensure you are in the build directory created during the clone step earlier before continuing.
.. attention:: Ensure you are in the build directory created during the clone step earlier before continuing.
.. code-block:: bash
cmake ..
make -j ${nproc}
make -j $(sysctl -n hw.ncpu)
cpack -G DragNDrop # optionally, create a macOS dmg package

View File

@@ -14,23 +14,33 @@ Update all packages:
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
pacman -S \
base-devel \
cmake \
diffutils \
doxygen \
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-graphviz \
mingw-w64-x86_64-miniupnpc \
mingw-w64-x86_64-nlohmann-json \
mingw-w64-x86_64-nodejs \
mingw-w64-x86_64-onevpl \
mingw-w64-x86_64-openssl \
mingw-w64-x86_64-opus \
mingw-w64-x86_64-rust \
mingw-w64-x86_64-toolchain \
python \
python-pip
Build
-----
.. Attention:: Ensure you are in the build directory created during the clone step earlier before continuing.
.. attention:: Ensure you are in the build directory created during the clone step earlier before continuing.
.. code-block:: bash

View File

@@ -7,7 +7,6 @@
# standard imports
from datetime import datetime
import os
import re
import subprocess
@@ -27,16 +26,8 @@ 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
# https://docs.readthedocs.io/en/stable/reference/environment-variables.html#envvar-READTHEDOCS_VERSION
version = os.getenv('READTHEDOCS_VERSION', 'dirty')
# -- General configuration ---------------------------------------------------
@@ -69,7 +60,7 @@ 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_favicon = os.path.join(root_dir, 'src_assets', 'common', 'assets', 'web', 'public', '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,
@@ -105,6 +96,17 @@ doxy_proc = subprocess.run('doxygen --version', shell=True, cwd=source_dir, capt
doxy_version = doxy_proc.stdout.decode('utf-8').strip()
print('doxygen version: ' + doxy_version)
# create build directories, as doxygen fails to create it in macports and docker
directories = [
os.path.join(source_dir, 'build'),
os.path.join(source_dir, 'build', 'doxyxml'),
]
for d in directories:
os.makedirs(
name=d,
exist_ok=True,
)
# run doxygen
doxy_proc = subprocess.run('doxygen Doxyfile', shell=True, cwd=source_dir)
if doxy_proc.returncode != 0:

View File

@@ -3,3 +3,23 @@ Contributing
Read our contribution guide in our organization level
`docs <https://lizardbyte.readthedocs.io/en/latest/developers/contributing.html>`__.
Web UI
------
The Web UI uses `Vite <https://vitejs.dev/>`__ as its build system, to handle the integration of the NPM libraries.
The HTML pages used by the Web UI are found in ``src_assets/common/assets/web``.
`EJS <https://www.npmjs.com/package/vite-plugin-ejs>`__ is used as a templating system for the pages (check ``template_header.html`` and ``template_header_main.html``).
The Style System is provided by `Bootstrap <https://getbootstrap.com/>`__.
The JS framework used by the more interactive pages is `Vue <https://vuejs.org/>`__.
Building
^^^^^^^^
Sunshine already builds the UI as part of its build process, but you can make faster changes by starting vite manually.
.. code-block:: bash
npm run dev

View File

@@ -3,7 +3,7 @@ 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
.. image:: https://app.lizardbyte.dev/uno/crowdin/LizardByte_graph.svg
CrowdIn
-------
@@ -30,42 +30,84 @@ localization there.
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
.. tab:: UI
#include <boost/locale.hpp>
#include <string>
Sunshine uses `Vue I18n <https://vue-i18n.intlify.dev/>`__ for localizing the UI.
The following is a simple example of how to use it.
std::string msg = boost::locale::translate("Hello world!");
- Add the string to `src_assets/common/assets/web/public/assets/locale/en.json`, in English.
.. code-block:: json
.. 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>`__.
{
"index": {
"welcome": "Hello, Sunshine!"
}
}
.. Warning:: This is for information only. Contributors should never include manually updated template files, or
manually compiled language files in Pull Requests.
.. note:: The json keys should be sorted alphabetically. You can use `jsonabc <https://novicelab.org/jsonabc/>`__
to sort the keys.
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.
.. attention:: Due to the integration with Crowdin, it is important to only add strings to the `en.json` file,
and to not modify any other language files. After the PR is merged, the translations can take place
on `CrowdIn <https://translate.lizardbyte.dev/>`__. Once the translations are complete, a PR will be made
to merge the translations into Sunshine.
.. code-block:: yaml
- Use the string in a Vue component.
.. code-block:: html
- 'src/**'
<template>
<div>
<p>{{ $t('index.welcome') }}</p>
</div>
</template>
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.
.. tip:: More formatting examples can be found in the
`Vue I18n guide <https://kazupon.github.io/vue-i18n/guide/formatting.html>`__.
**Extract, initialize, and update**
.. code-block:: bash
.. tab:: C++
python ./scripts/_locale.py --extract --init --update
There should be minimal cases where strings need to be extracted from C++ source code; however it may be necessary in
some situations. For example the system tray icon could be localized as it is user interfacing.
**Compile**
.. code-block:: bash
- Wrap the string to be extracted in a function as shown.
.. code-block:: cpp
python ./scripts/_locale.py --compile
#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
.. attention:: Due to the integration with Crowdin, it is important to not include any extracted or compiled files in
Pull Requests. The files are automatically generated and updated by the workflow. Once the PR is merged, the
translations can take place on `CrowdIn <https://translate.lizardbyte.dev/>`__. Once the translations are
complete, a PR will be made to merge the translations into Sunshine.

View File

@@ -59,5 +59,81 @@ Format inplace with rstfmt
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.
Sunshine uses `Google Test <https://github.com/google/googletest>`__ for unit testing. Google Test is included in the
repo as a submodule. The test sources are located in the `./tests` directory.
The tests need to be compiled into an executable, and then run. The tests are built using the normal build process, but
can be disabled by setting the `BUILD_TESTS` CMake option to `OFF`.
To run the tests, execute the following command from the build directory:
.. tab:: Linux
.. code-block:: bash
pushd tests
./test_sunshine
popd
.. tab:: macOS
.. code-block:: bash
pushd tests
./test_sunshine
popd
.. tab:: Windows
.. code-block:: bash
pushd tests
test_sunshine.exe
popd
To see all available options, run the tests with the `--help` option.
.. tab:: Linux
.. code-block:: bash
pushd tests
./test_sunshine --help
popd
.. tab:: macOS
.. code-block:: bash
pushd tests
./test_sunshine --help
popd
.. tab:: Windows
.. code-block:: bash
pushd tests
test_sunshine.exe --help
popd
Some tests rely on Python to run. CMake will search for Python and enable the docs tests if it is found, otherwise
cmake will fail. You can manually disable the tests by setting the `TESTS_ENABLE_PYTHON_TESTS` CMake option to
`OFF`.
.. tip::
See the googletest `FAQ <https://google.github.io/googletest/faq.html>`__ for more information on how to use
Google Test.
We use `gcovr <https://www.gcovr.com/>`__ to generate code coverage reports,
and `Codecov <https://about.codecov.io/>`__ to analyze the reports for all PRs and commits.
Codecov will fail a PR if the total coverage is reduced too much, or if not enough of the diff is covered by tests.
In some cases, the code cannot be covered when running the tests inside of GitHub runners. For example, any test that
needs access to the GPU will not be able to run. In these cases, the coverage can be omitted by adding comments to the
code. See the `gcovr documentation <https://gcovr.com/en/stable/guide/exclusion-markers.html#exclusion-markers>`__ for
more information.
Even if your changes cannot be covered in the CI, we still encourage you to write the tests for them. This will allow
maintainers to run the tests locally.

View File

@@ -8,7 +8,7 @@ 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
migration option. GSMS offers the ability to migrate your custom and auto-detected 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.

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

View File

@@ -1,6 +1,6 @@
Legal
=====
.. Attention:: This documentation is for informational purposes only and is not intended as legal advice. If you have
.. 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.

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,4 +0,0 @@
graphics
========
.. Todo:: Add graphics.h

View File

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

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,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

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