Compare commits

...

946 Commits

Author SHA1 Message Date
ReenigneArcher
8b21db64fb Merge pull request #2388 from LizardByte/nightly
v0.23.1
2024-04-20 21:49:43 -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
14ed89da0e Merge pull request #2274 from LizardByte/nightly
v0.23.0
2024-04-06 23:19:55 -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
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
ReenigneArcher
33c6c3e38f Merge pull request #2266 from LizardByte/nightly
v0.22.2
2024-03-15 07:05:12 -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
ReenigneArcher
00fbbc94bc Merge pull request #2216 from LizardByte/nightly
v0.22.1
2024-03-13 23:17:30 -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
ReenigneArcher
c63637f02f Merge pull request #1756 from LizardByte/nightly
v0.22.0
2024-03-04 06:28:33 -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
Timo Gurr
ca41c9d6f4 config: add 2K resolution (WQHD - 16:9) (#1816) 2023-11-04 20:48:52 -04:00
dependabot[bot]
df72135ea1 build(deps): bump third-party/tray from 2664388 to e08bdbe (#1802)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-30 22:29:04 -04:00
everything411
842a4cf7b2 fix(audio:windows): set cbSize correctly (#1787) 2023-10-27 09:28:29 -04:00
detiam
ab3ff2d355 Update linux sunshine.desktop (#1768) 2023-10-25 14:14:28 -04:00
Erick C
3212b036a1 Manual DS4 mode: Allow Back/Select to trigger Touchpad click (#1772)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2023-10-22 15:03:33 -04:00
Ehab Ajmal
5b052d7c2c Add guide for setting custom res with nvidia on linux (#1767)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2023-10-19 10:43:42 -04:00
LizardByte-bot
8096364a0a Bump ffmpeg (#1717) 2023-10-17 13:16:05 -04:00
dependabot[bot]
f80251f172 build(deps): bump third-party/miniupnp from e439318 to fb5c328 (#1511)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-17 11:31:15 -04:00
dependabot[bot]
2617241d7b build(deps): bump third-party/Simple-Web-Server from 2f29926 to 27b41f5 (#1217)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-17 10:56:05 -04:00
dependabot[bot]
48a6d2af6f Bump third-party/nanors from 395e5ad to e9e242e (#1090)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-17 09:52:13 -04:00
dependabot[bot]
e7fc2ed49a build(deps): bump third-party/nv-codec-headers from 9402b5a to 22441b5 (#1725)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-17 09:04:39 -04:00
dependabot[bot]
82d0ff6699 build(deps): bump third-party/wayland-protocols from 681c33c to d70af2e (#1753)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-16 23:10:29 -04:00
LizardByte-bot
ff688d9235 ci: update release notifier (#1755) 2023-10-16 09:11:27 -04:00
ReenigneArcher
5bca024899 Merge pull request #1334 from LizardByte/nightly
v0.21.0
2023-10-15 22:33:37 -04:00
ReenigneArcher
81d5816b63 docs: update changelog for v0.21.0 (#1629)
Co-authored-by: Cameron Gutman <aicommander@gmail.com>
2023-10-15 17:57:07 -04:00
Elia Zammuto
045044e7e7 Remove origin_pin_allowed 2023-10-15 14:00:34 -05:00
Elia Zammuto
329620dc1a Removed legacy pairing method 2023-10-15 14:00:34 -05:00
dependabot[bot]
1e8f407f70 build(deps): bump third-party/moonlight-common-c
Bumps [third-party/moonlight-common-c](https://github.com/moonlight-stream/moonlight-common-c) from `7a6d12f` to `f78f213`.
- [Commits](7a6d12fc4e...f78f2135fa)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-15 13:19:39 -05:00
ns6089
a003f02ec3 Improve tray icon images (#1736) 2023-10-15 13:18:11 -04:00
ns6089
adcf2cd5a3 Optimize png assets with oxipng (#1750) 2023-10-15 09:38:17 -04:00
Cameron Gutman
fe1832cda1 Revert "Use new 'remotegaming' scenario setting for QSV"
This causes Kaby Lake iGPUs to generate H.264 bitstreams with multiple
PPS NALUs which lead to some issues in current versions of Moonlight on
iOS and Android platforms.

This option also seems to override our max_dec_frame_buffering option
so it may increase latency on some Android devices too.

This reverts commit f838069a0e.
2023-10-14 01:49:47 -05:00
LizardByte-bot
5840c91248 ci: update global workflows (#1730) 2023-10-12 12:22:23 -04:00
ReenigneArcher
0c41101521 build(scripts): remove wayland-protocols from clang-format script (#1740) 2023-10-11 18:35:33 -04:00
Cameron Gutman
11361ac9b6 Send proper DS4 timestamp values in our input reports 2023-10-10 23:10:20 -05:00
ns6089
a0fcaf7d19 Properly join session monitor window thread 2023-10-10 21:10:40 -05:00
ReenigneArcher
f1cd94638f build(deps): use submodules for wayland protocols (#1731) 2023-10-10 16:13:52 -04:00
Cameron Gutman
395d572b17 Fix Super key regression after 8a7111a (#1728) 2023-10-09 19:39:40 -04:00
Elia Zammuto
da04f97a8c Remove false positive FATAL log 2023-10-08 18:12:06 -05:00
Cameron Gutman
8a7111a63b Use our own keycode mapping instead of relying on Windows
Loading the US English layout causes user-visible side effects.
2023-10-08 17:32:22 -05:00
ReenigneArcher
7166d2f1fd ci(codeql): fix build space issue (#1714) 2023-10-07 11:28:42 -04:00
Zack Elia
26261c18b6 Add missing dependencies for tray icon support (#1712) 2023-10-07 10:11:19 -04:00
Cameron Gutman
56d13bc7e8 Fix missing newline in SDP response 2023-10-06 21:07:14 -05:00
Cameron Gutman
ee1a9a618a Remove clang-format suppressions 2023-10-06 18:29:50 -05:00
Cameron Gutman
71024491e2 Allow the Misc button to work as Guide on emulated Xbox 360 controllers
It isn't physically present on Xbox 360 controllers, so we may as well use it for something.
2023-10-06 18:29:50 -05:00
Cameron Gutman
9c401f52aa Use the linuxdeploy GTK plugin to correctly deploy GTK3 dependencies (#1708) 2023-10-06 11:08:18 -04:00
ns6089
974c4bd4a1 Remove unused shader input layout
We don't use SV_Position in our vertex shaders.
2023-10-05 23:06:40 -05:00
ns6089
7f2b96b3e0 Refactor shaders 2023-10-05 23:06:40 -05:00
ns6089
2086cad96e Support #include in dx shader compiler 2023-10-05 23:06:40 -05:00
Cameron Gutman
a29978d3de Don't start the session monitor window when launched in command mode 2023-10-05 21:50:48 -05:00
LizardByte-bot
0057d22720 ci: update global workflows (#1705) 2023-10-05 12:24:58 -04:00
Cameron Gutman
a08e2b3de6 Add comments clarifying AVBufferRef usage and ownership 2023-10-04 22:36:16 -05:00
Cameron Gutman
dcb719ee5f Set prio_speed=1 on VideoToolbox encoder
This can massively improve encoding performance. See b67572c7c7
2023-10-04 22:36:16 -05:00
Cameron Gutman
c56ad91693 Implement zero-copy 8/10 bit encoding for macOS 2023-10-04 22:36:16 -05:00
Cameron Gutman
e535706a09 Fix CVPixelBuffer/CMSampleBuffer ownership issues 2023-10-04 22:36:16 -05:00
Cameron Gutman
ca041f2934 Use AVVideoScalingModeResizeAspect instead of abusing extended pixels
This not only eliminates the hand-rolled aspect ratio correction (which didn't actually handle scaling),
but it also avoids us having to write to the GPU frames to add padding which improves performance.
2023-10-04 22:36:16 -05:00
Cameron Gutman
a29d2e11ea Fix only capturing a single frame on macOS 2023-10-04 22:36:16 -05:00
Cameron Gutman
bee9215805 Fix loading dummy image in the sync encoding path 2023-10-04 22:36:16 -05:00
Cameron Gutman
3246428b7d Populate color properties on the AVFrame
VideoToolbox reads them from the AVFrame instead of the AVCodecContext.
2023-10-04 22:36:16 -05:00
ReenigneArcher
e9b529c46d docs: update localization (#1699) 2023-10-04 21:55:57 -04:00
ReenigneArcher
af0c81f570 fix(cmake): fix appimage assets directory (#1703) 2023-10-04 21:26:09 -04:00
Cameron Gutman
ed95b50f7a Automatically treat launcher-type apps as detached 2023-10-04 17:59:36 -05:00
Elia Zammuto
cfd78b5ce7 Fix shutdown when called from tray callback (#1691) 2023-10-04 11:25:38 -04:00
dependabot[bot]
84f1048c94 build(deps): bump babel from 2.12.1 to 2.13.0 (#1697)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-03 10:23:31 -04:00
ReenigneArcher
e716e56199 fix(installer): update vigembus (#1670) 2023-10-02 22:10:56 -04:00
Cameron Gutman
366c5ab675 Use oneVPL instead of legacy MFX library on Windows 2023-10-02 19:49:29 -05:00
Cameron Gutman
f838069a0e Use new 'remotegaming' scenario setting for QSV 2023-10-02 19:49:29 -05:00
Cameron Gutman
eeb22a3e54 AMF 'preanalysis' property is now named 'preencode'
See f593dc98bf
2023-10-02 19:49:29 -05:00
Cameron Gutman
da5559bf7a Remove usage of deprecated AVFrame key_frame field 2023-10-02 19:49:29 -05:00
LizardByte-bot
da6fc0826d Bump ffmpeg 2023-10-02 19:49:29 -05:00
Cameron Gutman
3e477647ff Use a render node to create our VADisplay
Since libva 2.20, vaInitialize() will fail if we pass a primary node and
lack permission to authenticate. Since we don't actually need to have a
primary node fd to encode, let's use a render node instead.
2023-10-02 17:33:17 -05:00
Cameron Gutman
1303defb67 Fix crash during UDP segmentation due to stack garbage
CMSG_NXTHDR() tries to read the _next_ message to check if it fits in
the provided control buffer length. If that part of the stack has some
large value stored in the uninitialized cmsg_len there, CMSG_NXTHDR()
will return NULL and we will crash.
2023-10-02 00:13:47 -05:00
ReenigneArcher
f76879eb0d feat(ui): add port mapping table (#1681) 2023-09-30 13:52:56 -04:00
Reece Humphreys
359c9ec3cd Link the /opt/homebrew/lib directory on macOS (#1685) 2023-09-30 12:39:58 -04:00
Reece Humphreys
c1b3a20b14 Updated Homebrew build requirements to include pkg-config (#1684) 2023-09-30 09:30:08 -04:00
Arthur Kasimov
17a320bfa5 Install icons to hicolor theme on Linux (#1669) 2023-09-23 23:20:46 -04:00
Arthur Kasimov
e2f59c521e Disable installation of enet headers and libraries (#1663) 2023-09-21 23:16:23 -04:00
ReenigneArcher
b989d33f03 ci: fix linux tray (#1650) 2023-09-18 18:14:53 -04:00
Chase Payne
376bb76409 Fix Command Failure on cold starts with Desktop (#1652) 2023-09-18 10:29:34 -04:00
Chase Payne
e3bd932ff6 Allow Desktop Streams if Prep Commands fail due to user not being logged in (#1207) 2023-09-17 15:36:04 -04:00
Elia Zammuto
47d4b619b1 Show Fatal Logs in Web UI (#1648) 2023-09-16 14:53:38 -04:00
Elia Zammuto
dc967ccc7b Event Ballons and Tray Icon improvements (#1561)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2023-09-15 20:48:51 -04:00
dependabot[bot]
fa7c16bd11 build(deps): bump bootstrap from 5.3.1 to 5.3.2 (#1642)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-15 08:44:07 -04:00
dependabot[bot]
c4db8594b3 build(deps): bump sphinx from 7.2.5 to 7.2.6 (#1636)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-14 14:24:07 -04:00
Eric Dong
b9bc4d6680 Documentation Update: Add linux ssh guide (#1527)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2023-09-14 13:42:35 -04:00
ReenigneArcher
997751ce48 ci(flatpak): fix boost url (#1637) 2023-09-14 13:01:59 -04:00
dependabot[bot]
ce31e60fc4 build(deps): bump bootstrap from 5.3.0 to 5.3.1 (#1472)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 12:03:30 -04:00
dependabot[bot]
9736e94f29 build(deps): bump @fortawesome/fontawesome-free from 6.4.0 to 6.4.2 (#1496)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 11:25:10 -04:00
ns6089
e98d7577bb Support capturing rotated displays on Windows (#1602) 2023-09-13 10:34:26 -04:00
dependabot[bot]
9dc76e3748 build(deps): bump rstcheck[sphinx] from 6.1.2 to 6.2.0 (#1618)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 10:05:13 -04:00
dependabot[bot]
bf3967977b build(deps): bump furo from 2023.8.19 to 2023.9.10 (#1617)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 09:26:58 -04:00
dependabot[bot]
78f0205370 build(deps): bump easimon/maximize-build-space from 7 to 8 (#1532)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 08:41:54 -04:00
LizardByte-bot
8e5516c123 ci: update global docker (#1630) 2023-09-13 00:09:09 -04:00
ReenigneArcher
515fafef2d fix: arch package version (#1628) 2023-09-12 14:07:47 -04:00
ReenigneArcher
6d19134581 docs: add crowdin translations to Sunshine website (#1627) 2023-09-12 13:29:21 -04:00
ns6089
b00d7af369 Update docs for new nvenc config 2023-09-07 18:03:19 -05:00
ns6089
bbad58dcf3 nvenc: reorder config.html dictionary 2023-09-07 18:03:19 -05:00
ns6089
646a569210 nvenc: add option to disable realtime hags 2023-09-07 18:03:19 -05:00
ns6089
cadb45ec3d msvc: misplaced calling convention 2023-09-07 18:03:19 -05:00
ns6089
dfd6eaefcb Don't use rounded refresh rate in info log 2023-09-07 18:03:19 -05:00
ns6089
8b40fa6dd5 nvenc: new config page 2023-09-07 18:03:19 -05:00
Cameron Gutman
11ebb47b3e Evaluate log_to_dbg value at encoder init 2023-09-05 22:37:44 -05:00
ns6089
dad7bb41d9 nvenc: rename format setters that don't do av1 2023-09-05 21:32:37 -05:00
ns6089
4094fef67a Bind constant buffers where you define them
And remove possible slot collisions.
2023-09-05 21:32:37 -05:00
ns6089
f2ed4bece9 nvenc: add chroma potition flag to vui 2023-09-05 21:32:37 -05:00
dependabot[bot]
533321fd42 build(deps): bump actions/checkout from 3 to 4 (#1604)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 20:09:25 -04:00
LizardByte-bot
8fc1940281 ci: update global cpp (#1609) 2023-09-05 18:46:54 -04:00
LizardByte-bot
a402d67d90 ci: update global docker (#1608) 2023-09-05 18:46:47 -04:00
LizardByte-bot
4a657b29a3 ci: update global workflows (#1606) 2023-09-05 18:46:45 -04:00
LizardByte-bot
9bba78c11a ci: update global python (#1607) 2023-09-05 18:46:38 -04:00
dependabot[bot]
da4bd6c6d3 build(deps): bump furo from 2023.7.26 to 2023.8.19 (#1558)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-04 21:07:15 -04:00
ReenigneArcher
92b4eeee55 refactor(cmake): split CMakeLists into modules (#1587) 2023-09-04 20:16:30 -04:00
Cameron Gutman
9543bc77d8 Fix pen tilt angle calculation 2023-09-02 11:12:59 -05:00
ReenigneArcher
6c760ff09d docs: update localization information (#1593) 2023-09-02 00:29:16 -04:00
dependabot[bot]
09afa2c614 build(deps): bump sphinx from 7.1.2 to 7.2.5 (#1583)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-01 23:35:09 -04:00
ReenigneArcher
23ec7db32b docs: update considerations (#1592) 2023-09-01 22:52:36 -04:00
ReenigneArcher
a3eec98ae1 docs: lint rst files (#1581) 2023-08-31 15:49:01 -04:00
ReenigneArcher
932748916b docs: remove depreciated system_packages option from rtd config (#1580) 2023-08-31 15:12:12 -04:00
ReenigneArcher
e7b112a2a6 ci: simplify macport build (#1586) 2023-08-31 14:38:14 -04:00
Cameron Gutman
f1452d25ad Implement UPnP IPv6 firewall control 2023-08-27 18:12:02 -05:00
Cameron Gutman
95c573e767 Switch to using Boost classes for IPv4/IPv6 ranges 2023-08-27 18:12:02 -05:00
Cameron Gutman
62a5cd959a Implement IPv6 support 2023-08-27 18:12:02 -05:00
ns6089
7662fe8616 Don't accumulate errors in capture frame pacing 2023-08-27 13:13:43 -05:00
ns6089
b494d06f89 Adjust capture rate to better match display 2023-08-27 13:13:43 -05:00
ns6089
6683ea2ac1 Rework capture sleeps for better frame stability 2023-08-27 13:13:43 -05:00
ns6089
42a77b247e Release duplication frame after snapshot 2023-08-27 13:13:43 -05:00
ns6089
730fce4b1c Move client frame interval to local variable 2023-08-27 13:13:43 -05:00
ns6089
d2a634ee09 Don't check AccumulatedFrames
AMF doesn't do it and MSDN is unclear about it.
2023-08-27 13:13:43 -05:00
ns6089
d81e2cecaa Add high_precision_sleep() method 2023-08-27 13:13:43 -05:00
ns6089
8dc51a21df Remove DwmFlush() 2023-08-27 13:13:43 -05:00
Lukas Senionis
9ae40d3d5a Remove "config-page" class from "Output Name" field (#1572) 2023-08-27 11:06:24 -04:00
Cameron Gutman
ebb6a7c9a9 Specify the source address for outbound audio and video traffic (#1569) 2023-08-26 16:37:04 -05:00
Cameron Gutman
b344af2d88 Tweak wording for codec mode options to avoid users changing it 2023-08-26 12:38:24 -05:00
Cameron Gutman
24e7bd20fd Allow displays to avoid probing HEVC or AV1 codecs even when H.264 is supported
This is the case for AMF which requires certain versions for HEVC Main10 and AV1 support.
2023-08-26 12:38:24 -05:00
Cameron Gutman
728a9cc66f Treat codec modes as soft requirements 2023-08-26 12:38:24 -05:00
Cameron Gutman
ef2279d627 Allow the display to reject unsupported codecs 2023-08-26 12:38:24 -05:00
ReenigneArcher
e9f4409853 ci(docker): fix arch linux cache issue (#1570) 2023-08-25 21:19:44 -04:00
Cameron Gutman
f9a00f3ed4 Fix FFmpeg logging going to stdout rather than our log file 2023-08-24 18:24:24 -05:00
Cameron Gutman
9d79018e9d Fix AMF debug logging to be conditional based on configured log level 2023-08-24 18:24:24 -05:00
ns6089
cea9f152d8 Add log message for audio capture buffer oveflow 2023-08-22 23:27:14 -05:00
ns6089
2c44c4dbd2 Add log message for audio buffer discontinuity 2023-08-22 23:27:14 -05:00
ns6089
3ceee008f3 Use MMCSS task in audio capture thread 2023-08-22 23:27:14 -05:00
ns6089
4d94bcc3b0 nvenc: improve rfi logic (#1542) 2023-08-22 22:24:47 -05:00
Cameron Gutman
4f748c5343 Disable libsvtav1 due to showstopping bugs 2023-08-19 18:36:48 -05:00
Cameron Gutman
625214776e Print an error if the encoder doesn't produce an IDR frame on demand 2023-08-19 18:36:48 -05:00
Cameron Gutman
d4d62b7b23 Remove nonsense operator combo 2023-08-19 18:36:48 -05:00
Cameron Gutman
190c9b4216 Move AMF version check into display_vram_t to avoid blocking software encoding 2023-08-19 18:36:48 -05:00
Cameron Gutman
8b05674290 Turn off AMF filler data to match other encoders 2023-08-19 18:36:48 -05:00
Cameron Gutman
69e720b44b Implement AV1 support 2023-08-19 18:36:48 -05:00
Cameron Gutman
67c1fa6da7 Populate the last payload length field in the video header 2023-08-19 18:36:48 -05:00
Elia Zammuto
a84dea3862 Windows Manifest improvements (#1557)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2023-08-19 14:06:35 -04:00
ReenigneArcher
5b93265053 ci(docker): fix ArchLinux image cache (#1554) 2023-08-17 21:49:59 -04:00
sitiom
828c064b2e Change Winget Releaser job to ubuntu-latest (#1551) 2023-08-17 10:17:30 -04:00
Cameron Gutman
22ab9948fa Pass the environment as a const reference so nobody else is tempted to modify it 2023-08-16 21:48:16 -05:00
Cameron Gutman
774f13aecb Fix race condition inserting new process into our job object
Before this fix, it could spawn a child that would escape our tracking if it ran before we added it to our job object.
2023-08-16 21:48:16 -05:00
LizardByte-bot
1086d4dfa2 Bump ffmpeg (#1544) 2023-08-15 21:26:34 -04:00
Chase Payne
06a6d94e87 removing debug code left from another commit 2023-08-15 18:37:24 -05:00
Chase Payne
2c953a3ce7 bugfix: fixed a bug that caused SUNSHINE_CLIENT_HDR to always be false 2023-08-15 18:37:24 -05:00
Chase Payne
980e396c4f Command Resource Exhaustion bug fix (#1531)
Co-authored-by: kirksaunders <kirksaunders12@gmail.com>
2023-08-14 19:50:23 -04:00
ns6089
def9b2d76f Add missing software device creation override 2023-08-13 15:15:32 -05:00
ns6089
f2f63cdfff nvenc: properly apply minqp to I-frames 2023-08-13 15:15:32 -05:00
ns6089
6c5fa8a08d Mark nvapi_QueryInterface as cdecl
Shouldn't matter on x64 since everything is fastcall here, but cdecl is
the correct declaration.
2023-08-13 07:01:09 -05:00
ns6089
68fa43a61c Add standalone NVENC encoder 2023-08-13 07:01:09 -05:00
ns6089
7fe52bc5f8 Update nv-codec-headers submodule 2023-08-13 07:01:09 -05:00
ns6089
b5816be104 Remove extra namespace typo 2023-08-13 07:01:09 -05:00
Cameron Gutman
166924427e Use existing H.264 SPS as a template rather than building it from scratch 2023-08-13 05:37:16 -05:00
Cameron Gutman
e465014433 Fix stack exhaustion in make_sps_hevc() 2023-08-13 05:37:16 -05:00
ReenigneArcher
3017a405af ci(codeql): detect cpp and charp (#1526) 2023-08-12 15:53:45 -04:00
LizardByte-bot
9f4f2aa583 ci: update global workflows (#1525) 2023-08-12 14:52:16 -04:00
Cameron Gutman
cadd3da9a7 Use UTF-8 conversion for log output and C standard library functions 2023-08-11 20:15:14 -05:00
Cameron Gutman
4186d83027 Disable HDR encoding for AMF versions below 1.4.23 2023-08-11 18:27:39 -05:00
ReenigneArcher
5a97b86fe3 ci(docker): bump cmake from 3.26 to 3.27 for Fedora (#1522) 2023-08-11 17:29:40 -04:00
dependabot[bot]
be01fb112d build(deps): bump sphinx from 7.0.1 to 7.1.2 (#1495)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-10 22:27:51 -04:00
dependabot[bot]
90a192309d build(deps): bump furo from 2023.5.20 to 2023.7.26 (#1474)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-10 21:23:31 -04:00
LizardByte-bot
5528f5c7e8 ci: update global cpp (#1519)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2023-08-10 20:32:43 -04:00
LizardByte-bot
2c81518dda ci: update global workflows (#1518) 2023-08-09 09:08:57 -04:00
Cameron Gutman
eafb018516 Fix clamping mouse position to aspect ratio adjusted viewport
Fixes #1512
2023-08-08 23:42:29 -05:00
ReenigneArcher
3fee592669 ci(windows): prevent winget action from creating an update when running on forks (#1505) 2023-08-04 18:52:51 -04:00
Cameron Gutman
21dbde9467 Fix touch input on UAC secure desktop and login screen 2023-08-03 23:04:13 -05:00
Cameron Gutman
d7c76cfd2b Update gamepad touch support with latest protocol changes 2023-08-03 19:16:09 -05:00
Cameron Gutman
bd68aebe4c Implement pen and touch support for Windows 2023-08-03 19:16:09 -05:00
Django
43463a9d1e Add default_value parameter to get_env for use in make_launch_session (#1490) 2023-08-01 23:08:45 -04:00
ahmadali shafiee
172a2193d3 Fix QRes command typo (#1488)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2023-07-31 15:50:09 -04:00
ReenigneArcher
e2577193f0 ci(docker): bump gcc-10 in ubuntu 20.04 image (#1489) 2023-07-31 15:20:38 -04:00
Cameron Gutman
f3a257b150 Fix QoS code build with new MinGW headers 2023-07-30 16:35:24 -04:00
Cameron Gutman
d07f5dbd1b Fix audio code build with new MinGW headers 2023-07-30 16:35:24 -04:00
dependabot[bot]
ba8c5ef3db build(deps): bump third-party/moonlight-common-c
Bumps [third-party/moonlight-common-c](https://github.com/moonlight-stream/moonlight-common-c) from `49fef03` to `f2cea4d`.
- [Commits](49fef03830...f2cea4d6b0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-30 16:35:24 -04:00
ReenigneArcher
79085f0d5c ci(linux): free additional space on runner (#1480) 2023-07-30 15:36:33 -04:00
Elia Zammuto
3b2a098640 Expose Connection environment variables to the app start (#1430)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2023-07-29 14:21:58 -04:00
ReenigneArcher
4b986b26c2 build(deps): use submodule for nvapi opensource (#1458) 2023-07-21 08:48:15 -04:00
ReenigneArcher
f541f22137 docs(website): add gh-pages (#1395) 2023-07-20 11:44:02 -04:00
ns6089
f245f777f7 Modify and restore NVIDIA control panel settings
Namely:
- Power profile for sunshine.exe
- Global OpenGL/Vulkan DXGI swapchain
2023-07-19 01:14:08 -05:00
ns6089
6992d424a8 Add nvapi-opensource files 2023-07-19 01:14:08 -05:00
ReenigneArcher
16d69f40fd build(distro): add debian bookworm package (#1455) 2023-07-18 16:29:03 -04:00
ReenigneArcher
48f05aa8c4 build(docker): free additional space on runners (#1450) 2023-07-18 15:01:56 -04:00
Vitorvlv
1193f07559 docs(app_examples): Add Plasma-Compatible Resolution Example (#1448) 2023-07-15 19:44:32 -04:00
ReenigneArcher
9e882ed4b7 style(clang-format): ignore third-party directory (#1449) 2023-07-15 10:07:01 -04:00
Cameron Gutman
50f353d183 Fix handling of gamepad feedback with multiple clients connected
We need to use the client-relative index rather than the global index
when sending feedback to the client.
2023-07-10 21:45:37 -05:00
Cameron Gutman
65b2e19b07 Rework active gamepad mask handling to be multi-channel-safe
We may get activeGamepadMask changes out of order between different
controller channels, so only check the bit of the mask corresponding to the
controller number specified in the event itself.

This also fixes the "ControllerNumber not allocated" warning each time a
gamepad is removed.
2023-07-10 21:45:37 -05:00
Cameron Gutman
3acc7ef557 Remove unused variable 2023-07-10 21:45:37 -05:00
Cameron Gutman
2ed2dd5e0e Implement touch, motion, and battery for DS4 2023-07-10 21:45:37 -05:00
Cameron Gutman
309fcc4142 Convert rumble_queue into a generic feedback_queue for gamepad messages 2023-07-10 21:45:37 -05:00
Cameron Gutman
fd77230964 Stub controller battery, touch, and motion packets 2023-07-10 21:45:37 -05:00
Cameron Gutman
1ef8cb1111 Send feature flags in RTSP DESCRIBE response 2023-07-10 21:45:37 -05:00
lns103
d3578e9711 fix(installer): use the system proxy to download ViGEmBus if it is enabled (#1406) 2023-07-10 19:51:13 -04:00
Vitorvlv
e1b0c98496 docs(troubleshooting): add warning about usage with Gamescope (#1438)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2023-07-10 09:44:41 -04:00
ns6089
6dfe56518c Decrease gpu scheduling priority for NVIDIA
Fixes #1031
2023-07-09 18:50:10 -05:00
Cameron Gutman
c5bf78176e Remove GetAsyncKeyState() check before sending mouse button events
It's unnecessary and breaks in cases where event processing is slow

Fixes #1433
2023-07-08 22:58:12 -05:00
jcj83429
d075424225 Add support for Applications (context menu) key in the Windows platform
I will add corresponding support in moonlight-qt.
2023-07-08 21:21:18 -05:00
Casey Korver
f3871c4449 Correct typos on web portal 2023-07-08 19:56:56 -05:00
Casey Korver
881af5b566 Correct typos in logging 2023-07-08 19:56:56 -05:00
Casey Korver
b1ffa8a6c5 Correct typos in comments 2023-07-08 18:56:27 -05:00
Cameron Gutman
70dc582f38 Refactor gamepad emulation code to use the DS4 extended report format
This has the side-effect of fixing #1407 due to the incorrect assumption that
it's safe to cast our gamepad_state_t to a XUSB_REPORT.
2023-07-08 11:34:16 -05:00
Cameron Gutman
b248e8b6b8 Clear additional disk space for Flatpak builds 2023-07-08 10:47:29 -05:00
aetheryx
c972fa880f fix: consider link-local addresses as LAN 2023-07-06 22:53:38 -05:00
Cameron Gutman
810945f5bf Allow use of multiple ENet channels 2023-07-04 15:48:31 -05:00
Cameron Gutman
11aedf56a2 Implement controller arrival metadata support 2023-06-30 20:47:29 -05:00
Cameron Gutman
12e6774035 Fix max gamepad count to match protocol limitation 2023-06-27 21:11:19 -05:00
Cameron Gutman
feedede6f9 Implement extended controller button support 2023-06-27 21:11:19 -05:00
Cameron Gutman
737be029ec Move input packet debug prints off the control stream thread
The control stream thread is extremely performance-sensitive.
2023-06-27 18:53:01 -05:00
Cameron Gutman
62606a62f9 Implement input batching for reduced latency 2023-06-27 18:53:01 -05:00
Cameron Gutman
99225c0256 Pull in latest protocol extension from moonlight-common-c 2023-06-27 18:53:01 -05:00
Era Dorta
ed74492e4e fix(deps): replace libboost chrono and thread with standard chrono and thread (#1364)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2023-06-26 11:50:10 -04:00
ReenigneArcher
29fc20671d fix(ui): fix nightly release notifications (#1394) 2023-06-25 17:10:35 -04:00
ReenigneArcher
5c6b383b60 docs(linux): add information about mesa (#1393) 2023-06-24 17:00:46 -04:00
ReenigneArcher
5b61b7230a docs: add linux ssh example (#1388) 2023-06-22 20:48:02 -04:00
Elia Zammuto
8ff2022aaf Fix WebUI Stable Update notification (#1358) 2023-06-06 18:31:15 -04:00
ReenigneArcher
cdbc0e699c docs(badges): force badges to use svg (#1342) 2023-05-31 22:07:26 -04:00
dependabot[bot]
262bed6a0d build(deps): bump bootstrap from 5.2.3 to 5.3.0 (#1339)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-31 07:11:33 -04:00
Conn O'Griofa
72d63aae68 windows: fix header conflict for msys2-w32api-headers 11.0.1+ (#1332) 2023-05-29 20:00:52 -04:00
ReenigneArcher
31e8b798da Merge pull request #1115 from LizardByte/nightly
v0.20.0
2023-05-29 01:11:33 -04:00
Cameron Gutman
7cc6fcd612 v0.20.0 release prep (#1321) 2023-05-28 20:20:35 -05:00
Cameron Gutman
8090fb496b Fix software encoding defaulting to HEVC instead of H.264
Regression introduced by d973e5bbc7
2023-05-28 19:29:07 -05:00
Cameron Gutman
f734d6684f Reset the default audio device on startup if Steam Streaming Speakers are selected
Fixes lack of audio device restoration if Sunshine crashes while streaming
2023-05-27 14:24:38 -05:00
Cameron Gutman
bca61bfc0d Always change the sink if it differs from the active sink
Fixes audio sink field not changing devices properly
2023-05-27 14:24:38 -05:00
dependabot[bot]
1bafa5a856 build(deps): bump sphinx from 6.2.0 to 7.0.1 (#1286)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-26 20:52:39 -04:00
dependabot[bot]
f37914d320 build(deps): bump furo from 2023.3.27 to 2023.5.20 (#1299)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-26 19:46:54 -04:00
Cameron Gutman
9a65c91671 Rename SunshineSvc to SunshineService
This avoids a MalwareBytes false positive.

Fixes #1126
2023-05-26 17:54:38 -05:00
Cameron Gutman
60ebafd15a Expand core component group by default 2023-05-26 17:54:38 -05:00
Cameron Gutman
fe62b10324 Add an option to control whether Sunshine starts on boot 2023-05-26 17:54:38 -05:00
Cameron Gutman
a87d8335bd Add a friendly name for SunshineSvc 2023-05-26 17:54:38 -05:00
Cameron Gutman
5c9750a6fb Clean up installer options now that the service is mandatory 2023-05-26 17:54:38 -05:00
Cameron Gutman
8da919f411 Rename Back Button Timeout and disable it by default
Users don't expect long presses of the back button to not work out of the box.
2023-05-25 20:03:53 -05:00
Cameron Gutman
b3f57cf90d Fix emulated Home/Guide presses being missed
Fixes #1048
2023-05-25 20:03:53 -05:00
Cameron Gutman
2f4cc9ace0 Add option to always send scancodes
Default is enabled to match v0.19.1 behavior

Fixes #1233
2023-05-25 19:31:39 -05:00
Cameron Gutman
0f1dc1bb05 Print a warning if GameStream is using conflicting ports 2023-05-25 19:07:13 -05:00
Cameron Gutman
f22ce25dad Fix systray after Explorer restart 2023-05-25 18:38:49 -05:00
Cameron Gutman
0e2eacb0ee Reduce opacity of placeholder text
This makes it more obvious that it's a placeholder
2023-05-24 20:34:13 -05:00
Cameron Gutman
fbb77aa7cd Prefer virtual sink over audio sink if host playback is disabled
Fixes "Play audio on host PC" option not working when audio sink is manually set
2023-05-24 20:34:13 -05:00
Cameron Gutman
78737d7611 Adjust descriptions on the A/V page to discourage manual settings 2023-05-24 20:34:13 -05:00
Cameron Gutman
f5e3353f82 Fix resolutions reported by dxgi-info.exe on high DPI systems 2023-05-24 18:23:32 -05:00
Cameron Gutman
5a4fd95765 Rewrite UPnP support
- Fixes port mappings expiring after a day
- Fixes support for IGDv1 gateways
- Fixes handling of gateway reboots/resets
2023-05-22 22:53:36 -05:00
Cameron Gutman
25e0244705 Stop reporting ExternalIP field to clients
At best, it doesn't help compared to Moonlight's STUN logic.

At worst, it makes things worse by providing an incorrect WAN address that overrides STUN.
2023-05-22 22:53:36 -05:00
Cameron Gutman
85af19150c Fix leak of AVPackets 2023-05-22 19:44:04 -05:00
Cameron Gutman
5b24148cfa Fix leak of VA driver resources on each encoder init 2023-05-22 19:44:04 -05:00
Cameron Gutman
8a9eed2f6f Fix leak of X509 on each HTTPS request 2023-05-22 19:44:04 -05:00
Cameron Gutman
31f72cdbff Remove Boost_NO_BOOST_CMAKE=ON to fix Windows build (#1298) 2023-05-22 09:55:13 -04:00
Arthur Kasimov
8da2caf764 Do not add 'lizard' user inside Fedora 38 container to 'input' group (#1291) 2023-05-17 10:41:54 -04:00
Cameron Gutman
32ca9d41de Fix crash on exit if a process is currently running 2023-05-15 19:11:51 -06:00
Cameron Gutman
9955890023 Fix console session changes via fast user switching
We need to respawn Sunshine.exe in the new console session.
2023-05-15 19:11:51 -06:00
ReenigneArcher
f41e57ea8c ci!: remove fedora 36 (#1244) 2023-05-15 20:12:35 -04:00
Cameron Gutman
33dafbc801 Add warning when Desktop Duplication API masks protected content from capture 2023-05-14 14:28:03 -05:00
Cameron Gutman
17124deb22 Fix const-correctness bugs in round_robin.h 2023-05-11 20:52:44 -05:00
Cameron Gutman
fabadaad2a Fix const-correctness bugs in uniq_ptr and code that uses it 2023-05-11 20:52:44 -05:00
Cameron Gutman
0fa406dbb7 Remove unnecessary moves in return statements 2023-05-11 20:52:44 -05:00
Cameron Gutman
ff046bb707 Fix and enable -Wmissing-braces 2023-05-11 20:52:44 -05:00
Cameron Gutman
390dc1c245 Fix unused-but-set-variable warnings on Mac and Linux 2023-05-11 20:52:44 -05:00
Cameron Gutman
2571682886 Fix pessimizing move warnings on Clang 2023-05-11 20:52:44 -05:00
Cameron Gutman
8db0ad0cc6 Fix and enable -Wmaybe-uninitialized 2023-05-11 20:52:44 -05:00
Cameron Gutman
f08ba0fd7c Fix missing override specifier on set_frame() 2023-05-11 20:52:44 -05:00
Cameron Gutman
a4f788f853 Replace Win32 UTF-16 conversion with std::wstring_convert
Removes VLA that upsets Clang and MSVC
2023-05-11 20:52:44 -05:00
Cameron Gutman
1c83a44222 Fix const reference and const pointer types in wrap_ptr
They were const refs to a T rather than a ref to a const T.
2023-05-11 20:52:44 -05:00
Cameron Gutman
f4bb410277 Treat dependency includes as system headers to suppress warnings 2023-05-11 20:52:44 -05:00
dependabot[bot]
8c85bcf64b build(deps): bump third-party/nv-codec-headers
Bumps [third-party/nv-codec-headers](https://github.com/FFmpeg/nv-codec-headers) from `2055784` to `2cd175b`.
- [Release notes](https://github.com/FFmpeg/nv-codec-headers/releases)
- [Commits](2055784e5d...2cd175b303)

---
updated-dependencies:
- dependency-name: third-party/nv-codec-headers
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-11 20:02:30 -05:00
istori1
9e23b39634 Add NO_RC_BUF_LIMIT vaapi 2023-05-11 18:59:13 -05:00
Cameron Gutman
71dcef8259 Fix systray icon sometimes not appearing after login 2023-05-11 18:32:33 -05:00
Cameron Gutman
53125ffeca Add support for installing the Steam Streaming Speakers driver (#1262)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2023-05-09 20:02:28 -05:00
Cameron Gutman
4ae412b219 Allow localAudioPlayMode to change on /resume
Newer clients send all /launch parameters to /resume too
2023-05-08 18:57:55 -05:00
Cameron Gutman
66989a4690 Set the default back to the virtual sink if it's changed
Fixes #976
2023-05-08 18:57:55 -05:00
Cameron Gutman
bc392093a3 Reinitialize capture if the default audio device changes
We already reinitialized if the default device was removed, but we didn't in the case a new default device was set without removing the old one.
2023-05-08 18:57:55 -05:00
Cameron Gutman
ccdc882c13 Fix pessimising move warning with GCC 13.1 2023-05-08 18:57:55 -05:00
ReenigneArcher
7e8c43c796 fix(ui): use release url for nightly releases (#1260) 2023-05-07 21:03:20 -04:00
ReenigneArcher
4ca6dc6c8e docs: update file level doxygen blocks (#1258) 2023-05-07 18:12:39 -04:00
ReenigneArcher
07808de447 docs: correct typo for task_pool (#1257) 2023-05-07 17:41:48 -04:00
ReenigneArcher
8f6ee0bc3c ci: add fedora 38 (#1114) 2023-05-07 15:46:14 -04:00
ReenigneArcher
979f7f4e60 docs: improvements to source code documentation (#1236) 2023-05-07 15:01:44 -04:00
Cameron Gutman
97f18d6353 Fix audio capture reinitialization
We returned instead of continuing, so audio never worked after reinit.

We also had no retry logic if no audio device was available.
2023-05-07 11:52:57 -05:00
Cameron Gutman
86c854ce97 Allow streaming even if no audio sink is available 2023-05-07 11:52:57 -05:00
Cameron Gutman
e8963b8255 Only modify channel-related format attributes
Specifying sample rate will fail on devices using 192 KHz sample rate
2023-05-07 11:52:57 -05:00
Cameron Gutman
e1651461fb Add 5.1 Side and Quadraphonic configs 2023-05-07 11:52:57 -05:00
Cameron Gutman
e821f4d140 Fix misleading channel support information
All formats except the mix format were reported as unsupported, even if they were subsets of the mix format
2023-05-07 11:52:57 -05:00
Cameron Gutman
1d6ea8c759 Allow audio sinks to match on device names
Names are more stable than IDs on Windows
2023-05-07 11:52:57 -05:00
Cameron Gutman
3fa5f74635 Archive Win32 binaries with debug info for crash analysis
These can be used with cv2pdb to symbolicate memory dumps in WinDbg
2023-05-06 22:34:42 -05:00
kodemeister
343f200c75 Remove group and mode assignment from the udev rule 2023-05-06 14:37:45 -05:00
kodemeister
89b8cada0a Do not add 'lizard' user inside Docker container to 'input' group 2023-05-06 14:37:45 -05:00
kodemeister
3e2cb07774 Fix path to udev rules in AppRun script 2023-05-06 14:37:45 -05:00
kodemeister
f6b3cdf842 Remove setup of 'input' group from documentation 2023-05-06 14:37:45 -05:00
kodemeister
5d3034701d Remove setup of 'input' group from Linux packaging scripts 2023-05-06 14:37:45 -05:00
kodemeister
06a1609aef Change udev rule to automatically grant access to virtual input devices 2023-05-06 14:37:45 -05:00
dependabot[bot]
ba3b0be2c9 build(deps): bump peter-evans/create-pull-request from 4 to 5 (#1138)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-06 09:18:00 -04:00
ReenigneArcher
91460f3c72 fix(ui): allow case-insensitive username (#1249) 2023-05-06 08:45:35 -04:00
Cameron Gutman
f21b1951b4 Add notes about GPU, display, and encoder compatibility 2023-05-05 23:14:04 -05:00
Cameron Gutman
020d5cd8c3 Add status messages for client errors 2023-05-05 23:14:04 -05:00
Cameron Gutman
6a3b7708bb Remove unnecessary uniqueid check for /applist
We already perform access control via client certificates
2023-05-05 23:14:04 -05:00
Cameron Gutman
b59b885dbd Fix pairing error handling when the hash doesn't match
We shouldn't proceed to signature verification if we already failed hash verification
2023-05-05 23:14:04 -05:00
Cameron Gutman
663bf750d9 Add missing cstdint include 2023-05-05 22:49:39 -05:00
Cameron Gutman
a7c1252fd9 Fix accidental concatenation of resolution strings
Spotted by @ns6089
2023-05-05 17:42:59 -05:00
Cameron Gutman
27f9d6d3a5 Clear the PIN field after a successful pairing 2023-05-05 17:42:59 -05:00
Cameron Gutman
2fca9cd0da Fix launching apps with a log file specified 2023-05-05 17:42:59 -05:00
Cameron Gutman
a6d295b273 Wait for pending sessions to connect before breaking on app termination
If we don't wait, clients may fail control stream establishment if the app terminates early.
2023-05-05 17:42:59 -05:00
Cameron Gutman
eb8aaf0093 Fix graceful termination messages being discarded by Moonlight 2023-05-05 17:42:59 -05:00
Cameron Gutman
10ea67719e Fix crash if capture is stopped before completing startup 2023-05-05 17:42:59 -05:00
Cameron Gutman
df1286ac88 Fix crash if the app terminates before the control stream is connected 2023-05-05 17:42:59 -05:00
ReenigneArcher
5779a4bd89 packaging: fix macos dmg (#1141) 2023-05-04 21:07:41 -04:00
Cameron Gutman
81aecff301 Pass the SID instead of the group name to icacls
Group names are localized but well-known SIDs work everywhere.
2023-05-03 20:35:33 -05:00
Cameron Gutman
c706ba4ca2 Add Windows-specific warnings if Sunshine is unable to access config or credentials
http::init() failure must be fatal because attempting to start the web servers will crash due to null creds.
2023-05-03 00:33:06 -05:00
Cameron Gutman
e8f3dfe32c Reset ACLs on the config directory and migrated config files 2023-05-03 00:33:06 -05:00
Cameron Gutman
65b7f2373c Fix merging user environment variables during process launch 2023-05-03 00:33:06 -05:00
Cameron Gutman
292ef7eca3 Don't show a console window when opening a URL 2023-05-03 00:33:06 -05:00
Cameron Gutman
c4c04694ac Restore the start menu shortcut as a proper launcher for the UI and service 2023-05-03 00:33:06 -05:00
Cameron Gutman
14fd7ad498 Don't recursively reset ACLs on our install directory
This will wipe out our stricter credential dir ACLs
2023-05-03 00:33:06 -05:00
Cameron Gutman
4730f4a3af Ensure the credentials dir exists before setting ACLs on it 2023-05-03 00:33:06 -05:00
Cameron Gutman
c8d4fd9f69 Keep/turn the display on during streaming
IDXGIDuplication::DuplicateOutput() may fail with 0x80070005 if the display is off and cause streaming to fail
2023-05-03 00:07:01 -05:00
ns6089
8347824eee Print frame processing latency to debug log 2023-05-02 23:41:13 -05:00
ns6089
bd533dc31b Extend packet header with frame processing latency 2023-05-02 23:41:13 -05:00
ReenigneArcher
590733b313 build(deps): unpin docker dependencies (#1243) 2023-05-02 23:04:33 -04:00
ReenigneArcher
3cfb520217 fix(audio)!: remove policy config for Windows Vista (#1235) 2023-04-30 20:41:45 -04:00
Cameron Gutman
50f689ff80 Implement restart support for all platforms 2023-04-29 21:22:18 -05:00
Cameron Gutman
4668ff59e5 Fix ringing with non-truthy values in alarm_t
The Windows mDNS registration code does this in the failure path and ends up deadlocking.
2023-04-29 20:43:16 -05:00
Cameron Gutman
d05dc731be Add RFC 6598 CGN CIDR block to LAN addresses list 2023-04-29 20:01:45 -05:00
Cameron Gutman
4c407c1662 Fix Fedora 37 build 2023-04-29 19:35:12 -05:00
Chase Payne
430a439698 Elevated Commands Redesign (#1123) 2023-04-29 00:22:01 -05:00
Cameron Gutman
18ab7dcf6c Remove 3-byte NALU prefix fixup
The bug in Moonlight that required it has been fixed since the middle of last year.
2023-04-28 22:20:09 -05:00
ReenigneArcher
82d6bc28c3 docs(diagrams): add diagrams using graphviz (#1228) 2023-04-27 18:28:16 -04:00
Zach Sirotto
eed4df1eee fix: header guards on system tray (#1222)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2023-04-27 10:19:33 -04:00
ReenigneArcher
4459e54583 docs(doxygen): enable macro expansion (#1226) 2023-04-27 09:50:22 -04:00
ReenigneArcher
db5c03282c refactor(tray icon): update header definitions (#1221) 2023-04-26 09:27:08 -04:00
istori1
5ad5699456 build(linux): honor install prefix for tray icon (#1208) 2023-04-25 21:45:32 -04:00
dependabot[bot]
5a8b6c3ed0 build(deps): bump sphinx from 6.1.3 to 6.2.0 (#1212)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-24 10:16:38 -04:00
ReenigneArcher
2138d0c9bc docs(advanced_usage): fix nvlax url (#1205) 2023-04-22 20:41:32 -04:00
ReenigneArcher
25d0f434c5 build(deps): update fedora dependencies (#1206) 2023-04-22 17:43:01 -04:00
ReenigneArcher
2215ab98b4 fix(web ui): add response headers (#1190) 2023-04-18 17:41:45 -04:00
ReenigneArcher
91afe331be build(deps): bump git from 2.39.2 to 2.40.0 for fedora 37 (#1196) 2023-04-18 17:15:13 -04:00
ReenigneArcher
820a20dc70 build(docker): update dependencies (#1193) 2023-04-17 10:56:51 -04:00
Cameron Gutman
f51876893e Stop the service if the user quits via the tray icon 2023-04-16 16:16:03 -05:00
Cameron Gutman
dd6fcbd7b8 Grant everyone SYNCHRONIZE access to our systray thread
Explorer requires this access right to remove our tray icon if we terminate unexpectedly
2023-04-16 16:16:03 -05:00
Cameron Gutman
d33bd00bb4 Fix HEVC mode if the encoder changes 2023-04-16 15:53:02 -05:00
Cameron Gutman
006a6984c3 Use a faster probe for launch-time encoders that weren't available before 2023-04-16 15:53:02 -05:00
Cameron Gutman
d973e5bbc7 Avoid unnecessary encoder probing during startup and launch 2023-04-16 15:53:02 -05:00
Cameron Gutman
8f74c3b482 Leave reference frames unspecified if REF_FRAMES_RESTRICT is not supported
FFmpeg codecs specify their own defaults that we shouldn't override.
2023-04-16 15:53:02 -05:00
dependabot[bot]
808187397d build(deps): bump sphinx-copybutton from 0.5.1 to 0.5.2 (#1182)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-16 12:02:54 -04:00
ns6089
7da33f7951 Remove unnecessary reference 2023-04-15 15:16:14 -05:00
ns6089
045d4b81a4 Switch between img and surface in last frame 2023-04-15 15:16:14 -05:00
ns6089
7b11b48317 Delayed capture buffer trim 2023-04-15 14:37:23 -05:00
Cameron Gutman
242a146712 Add DXGI_FORMAT_B8G8R8X8_UNORM as a supported capture format 2023-04-14 19:34:06 -05:00
Cameron Gutman
b5c8bbaa24 Fix color conversion for SDR FP16 capture formats 2023-04-14 19:34:06 -05:00
Morgan Helton
010440dbd3 add X11 to PLATFORM_LIBARIES when found 2023-04-11 21:20:24 -05:00
ns6089
7038c1aeb0 Create config directories recursively 2023-04-11 20:48:55 -05:00
Cameron Gutman
6467e10def Reprobe encoders each time streaming begins
Available encoders can change due to driver updates, GPU hotplugging, primary monitor changes, etc.
2023-04-11 20:21:18 -05:00
Cameron Gutman
44f89de33b Respect modifier flags in keyboard events
Fixes capital letters from Android soft keyboard
2023-04-11 19:53:46 -05:00
Cameron Gutman
4e04604696 Add support for keyboard input that is not normalized to US English layout
This is used by the soft keyboards on Android and iOS
2023-04-11 19:53:46 -05:00
ns6089
ae7ae8a870 Raise capture buffer normal size to 2
Temporal measure until dynamic resize is merged.
2023-04-11 18:17:48 -05:00
ns6089
eed27d3c0a Decrease normal capture buffer to single image 2023-04-11 18:17:48 -05:00
Chase Payne
191b929ab0 Make installer DPI aware so it doesn't appear blurry to 4k screens 2023-04-11 00:00:33 -05:00
Cameron Gutman
a9b7fd7fa3 Remove useless Flush() call 2023-04-08 20:36:23 -05:00
ns6089
abf4ab42a0 Don't zero-initialize non-dummy textures 2023-04-08 19:41:22 -05:00
aseligmann
0e92bdd29c Use DS4_BUTTON_SHARE as BACK action 2023-04-08 16:27:48 -05:00
Cameron Gutman
036aa2e470 Free dummy images when they are no longer needed 2023-04-08 15:15:02 -05:00
Cameron Gutman
bd443395c6 Don't test HDR encoding with H.264
It doesn't work on any GPU, and even if it did, Moonlight doesn't support it.
2023-04-06 22:37:05 -05:00
Cameron Gutman
65268212ee Saturate RGB values in non-PQ shaders to improve SDR streams of HDR displays
This avoids color shift caused by RGB values > 1.0f.
2023-04-06 22:37:05 -05:00
Cameron Gutman
f04d5e12de Combine the separate HDR and SDR capture formats
Since we support multi-encoding from a single display context, we have
to ensure our capture format allows for HDR color even if the initial
encoding session is SDR.
2023-04-06 22:37:05 -05:00
ns6089
290c9b3e20 Fix compilation on macOS (#1132) 2023-04-05 20:54:49 -05:00
ReenigneArcher
809d7f9d0e config: fix 4K resolution typo (#1139) 2023-04-05 10:12:02 -04:00
ReenigneArcher
01167569ab versioning: fix release versions (#1122) 2023-04-01 16:52:34 -04:00
ReenigneArcher
fd7760b553 docs: use project_copyright alias (#1110) 2023-03-30 16:09:59 -04:00
ReenigneArcher
d70d084f9f Merge pull request #1105 from LizardByte/nightly
v0.19.1
2023-03-30 14:08:17 -04:00
LizardByte-bot
240266cc39 ci: update global workflows (#1109) 2023-03-30 09:57:33 -04:00
ReenigneArcher
ee3522fb6d v0.19.1 prep (#1108) 2023-03-30 09:10:58 -04:00
LizardByte-bot
bf76c1e0f2 ci: update global workflows (#1106) 2023-03-30 08:34:29 -04:00
KuleRucket
cd2fe18140 Hotfix - keep platform guard in scope (#1104)
Co-authored-by: KuleRucket <luke.d.tucker@gmail.com>
2023-03-30 08:06:19 -04:00
ReenigneArcher
483e2259d4 Merge pull request #969 from LizardByte/nightly
v0.19.0
2023-03-29 22:21:15 -04:00
ReenigneArcher
972f726ff9 installer: auto install vigembus (#1100) 2023-03-29 17:15:33 -04:00
ReenigneArcher
f169c6d116 v0.19.0 release prep (#1097) 2023-03-29 10:00:40 -04:00
KuleRucket
70674325ba Fix system tray Open Sunshine (#1095)
Co-authored-by: KuleRucket <luke.d.tucker@gmail.com>
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2023-03-28 18:51:10 -04:00
KuleRucket
57a722a3fb Continue in the face of failure (#1094)
Co-authored-by: KuleRucket <luke.d.tucker@gmail.com>
2023-03-28 17:54:46 -04:00
luk1337
1ab1b7920e Don't skip disconnected X11 outputs (#1071) 2023-03-28 16:44:32 -04:00
dependabot[bot]
44f1984af0 Bump third-party/moonlight-common-c from d3cb813 to c9426a6 (#1089)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-28 14:34:59 -04:00
dependabot[bot]
4b2f5befce Bump @fortawesome/fontawesome-free from 6.3.0 to 6.4.0 (#1088)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-28 13:57:49 -04:00
dependabot[bot]
c222e343b0 Bump third-party/miniupnp from 014c9df to e439318 (#1093)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-28 10:53:49 -04:00
luk1337
648df66b98 Fix X11 fallback during init (#1087) 2023-03-28 10:01:11 -04:00
ReenigneArcher
21eb4eb6dd clang: adjust formatting rules (#1015) 2023-03-27 21:45:29 -04:00
pgrunzjr
79cf382cd9 Add missing setup for default global prep command exclusion dropdown (#1085) 2023-03-27 20:55:28 -04:00
ns6089
be74b740f5 Properly handle libcurl flags in CMakeLists.txt on Windows (#1079) 2023-03-27 18:59:35 -04:00
ReenigneArcher
014ca7e8a1 commands: fix prep commands when empty (#1083) 2023-03-27 16:46:25 -04:00
ReenigneArcher
e1fddcc99c versioning: fix dirty commit notifications (#1084) 2023-03-27 15:55:21 -04:00
dependabot[bot]
3791edcec1 Bump third-party/nanors from 395e5ad to e9e242e (#1039)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-27 15:01:06 -04:00
dependabot[bot]
1dfe9ea0f6 Bump third-party/moonlight-common-c from 02f12e4 to c9426a6 (#1038)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-27 13:06:16 -04:00
dependabot[bot]
e18e4f433b Bump furo from 2023.3.23 to 2023.3.27 (#1082)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-27 12:42:27 -04:00
pgrunzjr
8c86baf627 Add support for global prep commands (#977) 2023-03-27 12:02:20 -04:00
Chase Payne
c2fba6f651 Add Support for Safely Elevating Administrator Privileges (#1036) 2023-03-27 10:51:48 -04:00
pgrunzjr
6a914f7016 Execute do/undo commands non-elevated (#1022) 2023-03-27 10:15:35 -04:00
ReenigneArcher
6f02274dc4 docs: suppress epub mimetype warnings (#1081) 2023-03-27 09:30:22 -04:00
Conn O'Griofa
bf24d0e7a6 Flatpak: update to org.freedesktop.Platform 22.08 (#936)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2023-03-26 21:00:41 -04:00
Chase Payne
9b0e0565b1 Nightly Notification Bug Fixes (#1073) 2023-03-26 19:28:57 -04:00
KuleRucket
a487fb31ea Fix compiler warnings due to deprecated elements in C++17 (#1077)
Co-authored-by: KuleRucket <luke.d.tucker@gmail.com>
2023-03-25 21:52:46 -04:00
KuleRucket
c6548f4271 Provide ability to force a capture method via configuration. (#1063)
Co-authored-by: KuleRucket <luke.d.tucker@gmail.com>
2023-03-25 21:26:28 -04:00
luk1337
455155a1c9 Add missing <string> include (#1057) 2023-03-24 19:37:06 -04:00
ReenigneArcher
a0d7250c33 docs: update config defaults (#1070) 2023-03-24 19:00:27 -04:00
KuleRucket
8162d5f0d0 Change text input to select (#1067) 2023-03-24 18:18:14 -04:00
ReenigneArcher
5cdc0accad qodana: use workflow dispatch (#1069) 2023-03-24 17:41:30 -04:00
dependabot[bot]
79991654d0 Bump furo from 2022.12.7 to 2023.3.23 (#1065)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-24 08:14:50 -04:00
ReenigneArcher
c820f0a670 qodana: fix notification conditions (#1053) 2023-03-21 16:41:27 -04:00
ReenigneArcher
744b54ffd4 ci: add qodana (#1052) 2023-03-21 15:37:36 -04:00
Mathias Tillman
a192c504cd Use xdg-desktop-autostart.target for systemd service. (#901) 2023-03-20 10:47:14 -04:00
ReenigneArcher
e20ca7a8f0 tray-icon: execute as user (#1046) 2023-03-17 08:59:13 -04:00
ReenigneArcher
7e9b18458d ui: fix apply settings (#1045) 2023-03-16 11:27:48 -04:00
ReenigneArcher
d85b234f1b docs: add favicon (#1044) 2023-03-15 23:33:42 -04:00
ReenigneArcher
afc6966f10 config: only save non default values (#1023) 2023-03-15 17:05:06 -04:00
ReenigneArcher
014d693112 add tray icon (#1035) 2023-03-15 16:30:18 -04:00
dependabot[bot]
237f21573b Bump third-party/miniupnp from 014c9df to e439318 (#944)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-11 13:16:14 -05:00
ReenigneArcher
27c9c0e521 docs: add wayland resolution example (#1028) 2023-03-11 11:24:31 -05:00
Mark Dietzer
fbe5e2486f Fix startup when /dev/dri doesn't exist (#1027) 2023-03-11 10:27:07 -05:00
LizardByte-bot
21a728ccd2 Bump ffmpeg (#1026) 2023-03-10 13:32:45 -05:00
dependabot[bot]
a72b77de71 Bump third-party/moonlight-common-c from d3cb813 to 02f12e4 (#1003)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-10 12:00:12 -05:00
Brian Kendall
80aa61b6e4 Support compiling for earlier releases of macOS (#960) 2023-03-10 09:53:29 -05:00
ReenigneArcher
6d54356166 logging: change client verified messages to debug (#1020) 2023-03-10 09:05:52 -05:00
ReenigneArcher
dfb5293224 archlinux: disable downlaod timeout (#1024) 2023-03-10 08:19:42 -05:00
Joe
bf4ed899d9 Skip irrelevant submodules when building on Arch (#817)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2023-03-09 22:29:06 -05:00
Elia Zammuto
c29c917474 Versioning improvements (#768)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2023-03-09 18:13:57 -05:00
ReenigneArcher
889b93da2d input: invert default config settings (#1017) 2023-03-08 21:44:11 -05:00
Mathias Tillman
c3f3e1606d Fix linux clang build errors (#879)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2023-03-08 18:05:38 -05:00
ReenigneArcher
8f1465d950 Docs improve source code documentation (#1016) 2023-03-08 17:31:19 -05:00
dependabot[bot]
c89fd83040 Bump third-party/ViGEmClient from 9e842ba to 726404e (#913)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-08 12:03:46 -05:00
dependabot[bot]
91f5d39540 Bump @fortawesome/fontawesome-free from 6.2.1 to 6.3.0 (#900)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-08 11:19:39 -05:00
Mark Dietzer
8227e8f8e5 Add XTest input fallback (#997) 2023-03-08 09:26:06 -05:00
ABeltramo
7d01b50498 feat: implemented unicode input mode (#966)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2023-03-08 08:35:34 -05:00
Brian Kendall
f238cf5303 Add setting for suppressing input from mouse, keyboard, or gamepads (#941) 2023-03-08 07:47:19 -05:00
ReenigneArcher
31885434f2 docs: add doxygen (#1004) 2023-03-07 20:26:03 -05:00
dependabot[bot]
a1e6f441e4 Bump babel from 2.11.0 to 2.12.1 (#991)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-07 16:34:10 -05:00
ReenigneArcher
4ac8c5c8ec docs: improve examples (#1000) 2023-03-06 11:10:40 -05:00
Conn O'Griofa
845749d525 windows: input: activate US keyboard layout for scancode mapping (#975) 2023-02-25 14:08:42 -05:00
ReenigneArcher
9e0c72e45d github: move feature requests to moonlight board (#970) 2023-02-24 09:05:01 -05:00
dependabot[bot]
e229d80466 Bump third-party/moonlight-common-c from 07beb0f to d3cb813 (#968)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-21 09:20:19 -05:00
ReenigneArcher
0dfbcfdbc4 Merge pull request #954 from LizardByte/nightly
v0.18.4
2023-02-20 21:26:37 -05:00
ReenigneArcher
e113ac6918 ci: rename windows artifacts (#953) 2023-02-20 17:39:49 -05:00
ReenigneArcher
77deff12a6 docker: updates to docker images (#942) 2023-02-20 15:03:03 -05:00
ReenigneArcher
e5d5256aed build(deps): add pkg-config for macOS build (#952) 2023-02-18 16:14:52 -05:00
ReenigneArcher
956341930b Merge pull request #929 from LizardByte/nightly
v0.18.3
2023-02-13 21:40:32 -05:00
ReenigneArcher
032680ca9d aur: move docker build (#895) 2023-02-13 15:27:51 -05:00
ReenigneArcher
446825b73d Merge pull request #877 from LizardByte/nightly
v0.18.2
2023-02-13 14:19:40 -05:00
ReenigneArcher
0d100a57a6 changelog: v0.18.2 (#925) 2023-02-13 09:58:10 -05:00
Conn O'Griofa
55a225d21c AMF: add missing encoder tunables (#902) 2023-02-13 09:23:29 -05:00
dependabot[bot]
ae12424279 Bump vedantmgoyal2009/winget-releaser from 1 to 2 (#921)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-13 08:58:06 -05:00
Conn O'Griofa
3c223eb289 CMake: CPack: use correct Boost dependency versions (#920) 2023-02-12 21:03:35 -05:00
ReenigneArcher
9ac1e3dcd6 web: ui: add macos audio sink (#912) 2023-02-09 19:41:52 -05:00
ReenigneArcher
a21e231cae web: api: add mimes type map (#890) 2023-02-08 21:35:02 -05:00
LizardByte-bot
2c4e293e21 Bump ffmpeg (#898)
Co-authored-by: LizardByte-bot <108553330+RetroArcher-bot@users.noreply.github.com>
2023-02-07 16:26:12 -05:00
Conn O'Griofa
1b45b57d07 Linux/VAAPI: implement vaSyncBuffer stub for libva <2.9.0 (#886) 2023-02-07 16:02:42 -05:00
LizardByte-bot
905904960d ci: update global docker (#897) 2023-02-07 14:21:42 -05:00
LizardByte-bot
48559a5876 ci: update global workflows (#896) 2023-02-07 13:52:39 -05:00
Grider
d2461e1908 Fix wayland capture on nvidia for kms (#884) 2023-02-05 18:41:35 -05:00
dependabot[bot]
f8819d32e3 Bump m2r2 from 0.3.3 to 0.3.3.post2 (#861)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-31 21:04:06 -05:00
ReenigneArcher
09dff34105 Merge pull request #866 from LizardByte/nightly
v0.18.1
2023-01-31 20:44:20 -05:00
ReenigneArcher
16e2789197 cmake: v0.18.1 (#874) 2023-01-31 16:43:38 -05:00
ReenigneArcher
08ac580bc6 changelog: v0.18.1 (#873) 2023-01-31 16:02:16 -05:00
Conn O'Griofa
cdfcdf2dc7 CMake: CPack: set Intel MediaSDK as arch-specfic depend (#868) 2023-01-31 08:39:20 -05:00
Conn O'Griofa
fb7c9e22ff CMake: Linux: update dependencies & use dynamic Boost (#864) 2023-01-30 21:29:44 -05:00
ReenigneArcher
b2c5da2cfc Merge pull request #738 from LizardByte/nightly
v0.18.0
2023-01-29 22:26:36 -05:00
ReenigneArcher
98d61b16f6 changelog: fix parsing issue with single quotes (#858) 2023-01-29 18:38:47 -05:00
ReenigneArcher
df6e15f1f7 changelog: fix v0.18.0 formatting (#857) 2023-01-29 17:42:53 -05:00
ReenigneArcher
6cc13b8ef6 docs: update changelog for v0.18.0 (#836) 2023-01-29 17:00:14 -05:00
Cameron Gutman
592f3a70a3 Display initialization and frame ownership fixes (#850) 2023-01-28 23:15:37 -06:00
istori1
9155e39e91 Flatpak build improvements (#784) 2023-01-28 15:21:16 -05:00
Cameron Gutman
142f06714f Windows installer fixes (#843) 2023-01-27 19:16:32 -06:00
Cameron Gutman
a3e2c4fa31 Free AVFrame before calling eglTerminate() (#842) 2023-01-27 09:21:05 -06:00
Conn O'Griofa
8b507d2b30 Fix image leak of hardware parallel encoder on display reinit (#823) 2023-01-26 12:12:49 -05:00
manteuffel723
0698210ce1 Fix Error: Couldn't import RGB Image: 00003002 and 00003004 (#761) 2023-01-26 11:23:44 -05:00
Костадин Дамянов
d33e3a2882 Restart the systemd service in case of a crash (#830) 2023-01-26 09:10:13 -05:00
Cameron Gutman
bcd5188ac5 Implement HDR support for Windows (#825) 2023-01-25 19:48:55 -06:00
Jari
1f2ad8da00 Scrub basic auth header from logs (#834) 2023-01-25 19:14:59 -05:00
Aaron Rumpler
5a60090ddc Rename 'Steam BigPicture' to 'Steam Big Picture' in apps.json (#827) 2023-01-25 18:16:03 -05:00
ReenigneArcher
3bb784b379 update docker tag information (#785) 2023-01-25 17:00:21 -05:00
Jari
35b660851c Fix SimpleWeb arbitrary file read vulnurability (#829) 2023-01-25 16:26:41 -05:00
Jari
d625dda4ea Steam Deck Gamingmode fix (#711) 2023-01-24 20:47:52 -06:00
Cameron Gutman
9181028bcf HDR prep work (#808) 2023-01-23 20:54:08 -06:00
LizardByte-bot
fa6c279efc ci: update global workflows (#816) 2023-01-22 17:13:33 -05:00
ReenigneArcher
9d6d59aa55 cd: fix aur publish conditions (#815) 2023-01-22 13:23:24 -05:00
ReenigneArcher
9df6283da4 cd: fix aur publish conditions (#814) 2023-01-22 12:24:25 -05:00
ReenigneArcher
c8c80807da fix aur nightly publishing (#813) 2023-01-22 11:44:36 -05:00
ReenigneArcher
3f202be09a docker build dependent on event type (#812) 2023-01-22 09:53:42 -05:00
Cameron Gutman
4b642f6e01 Implement horizontal scrolling and Sunshine detection for Moonlight (#793) 2023-01-21 17:42:08 -06:00
Cameron Gutman
da390c37db Improve reliability of hybrid graphics detection (#801) 2023-01-20 22:12:16 -06:00
Cameron Gutman
7242202291 CMake: Default to Release build and stop hardcoding optimization flags (#777) 2023-01-20 00:18:30 -06:00
LizardByte-bot
f213aae7b8 ci: update global docker (#803) 2023-01-19 17:08:47 -05:00
LizardByte-bot
bfd1e81a25 ci: update global workflows (#802) 2023-01-19 12:35:16 -05:00
Lukas Senionis
c81aa99c38 Fix child process spawning on linux (#773) 2023-01-19 00:40:12 -06:00
Cameron Gutman
c4c0413f9e Fix streaming to multiple clients from hardware encoder on Windows (#798) 2023-01-18 07:47:00 -06:00
Cameron Gutman
49fc618682 Add support for hybrid graphics systems (NVIDIA Optimus) (#782) 2023-01-17 23:55:44 -06:00
Cameron Gutman
1fbbab9df7 QSV performance optimization and HEVC hang fix (#786) 2023-01-17 18:12:14 -06:00
Cameron Gutman
7f6383833c Replace frame capture busy loop with waitable timer (#778) 2023-01-17 09:09:15 -05:00
KuleRucket
4ef97c755a Fix multi-character character constant compiler warning (#765)
Co-authored-by: KuleRucket <luke.d.tucker@gmail.com>
2023-01-16 22:19:26 -05:00
Cameron Gutman
fa14b6ead7 Network performance optimizations (#771) 2023-01-16 18:17:04 -05:00
LizardByte-bot
42f6634e85 Bump ffmpeg (#769) 2023-01-16 12:52:09 -05:00
Brad Richardson
e88dec22ee Link mfx on Linux (#781) 2023-01-16 07:31:03 -05:00
Conn O'Griofa
f44ae4cc8d nvenc: add nvidia preset migration guide to docs (#685) 2023-01-15 22:20:10 -05:00
ReenigneArcher
3510b8636a build with docker and improve CUDA compute capability support (#714) 2023-01-15 09:31:37 -05:00
Cameron Gutman
9fe539f87d Avoid redundant padding fills in display_vram_t::convert() (#763) 2023-01-14 20:14:55 -05:00
Cameron Gutman
4fc444b5b3 Intel QuickSync support for Windows (#758) 2023-01-14 16:23:49 -05:00
Cameron Gutman
5480d3d59d Switch to faster nanors Reed-Solomon implementation (#753) 2023-01-14 09:45:12 -05:00
Cameron Gutman
696a11942c Enforce 10 FPS encoding frame rate floor to improve static image quality (#754) 2023-01-11 11:02:53 -05:00
dependabot[bot]
43d47c6f3c Bump third-party/miniupnp from 207cf44 to 014c9df (#734)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-10 16:54:01 -05:00
Conn O'Griofa
b405888088 CMake: Windows: harden install by including zlib1.dll (#743) 2023-01-10 16:25:09 -05:00
dependabot[bot]
3771062499 Bump sphinx from 6.1.1 to 6.1.3 (#749)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-10 15:46:53 -05:00
Cameron Gutman
44ad28ebf4 Fix a reference leak of hw_frames_ctx and prepare for QSV (#736) 2023-01-10 14:52:15 -05:00
Tony Langhammer
5477f58f18 Move the check for UPnP enabled up to avoid error messages (#748) 2023-01-10 13:25:16 -05:00
ReenigneArcher
7dbd5b41b2 Fix typo in Shortcuts section (#744) 2023-01-10 09:26:42 -05:00
dependabot[bot]
f210b89dd7 Bump third-party/nv-codec-headers from b550d40 to 2055784 (#704)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-09 10:53:39 -05:00
LizardByte-bot
6ff236727f Bump ffmpeg (#693)
Co-authored-by: LizardByte-bot <108553330+RetroArcher-bot@users.noreply.github.com>
2023-01-09 10:07:27 -05:00
Brad Richardson
3af1744c9b FFmpeg updates with QSV-enabled builds (#730) 2023-01-09 08:24:21 -05:00
ReenigneArcher
b2fe0423d2 Merge pull request #567 from LizardByte/nightly
v0.17.0
2023-01-08 21:03:16 -05:00
ReenigneArcher
009975dc7b prepare v0.17.0 (#708) 2023-01-08 20:10:13 -05:00
ReenigneArcher
23ef23159a revert windows build libpsl version lock (#729) 2023-01-08 19:41:33 -05:00
Conn O'Griofa
d51afbe19d CMake: win32: fix API version, disable boost-cmake detection (#732) 2023-01-08 19:06:56 -05:00
ReenigneArcher
a26877a917 fix submodule names (#725) 2023-01-08 10:05:29 -05:00
Cameron Gutman
6607062648 Fix divisor for YUV range (#728) 2023-01-08 09:04:07 -05:00
Cameron Gutman
77d3a7e2ab Color conversion fixes and BT.2020 support (#723) 2023-01-07 22:28:47 -05:00
Cameron Gutman
7770b5f708 Enable Mouse Keys while streaming for systems with no mouse plugged in (#721) 2023-01-07 15:11:14 -05:00
Cameron Gutman
e2fce257b5 Fix Windows masked cursor blending with GPU encoders (#720) 2023-01-07 14:25:02 -05:00
Cameron Gutman
c95f54f874 Migrate Windows config files into specific config directory (#716) 2023-01-07 13:34:06 -05:00
Brad Richardson
9b6d0b7a06 Generated app id with hashed input data (#715) 2023-01-07 09:42:40 -05:00
dependabot[bot]
effa98f76a Bump sphinx from 6.0.0 to 6.1.1 (#713)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-05 19:59:41 -05:00
Cameron Gutman
65574a02d4 Add an Apply button to the Web UI when running as a Win32 Service (#700) 2023-01-05 14:26:54 -05:00
Cameron Gutman
5980e520b9 Improve robustness of encoder selection (#710) 2023-01-05 12:28:40 -05:00
Cameron Gutman
00aa23b342 Fix hang on stream termination if no frames can be captured (#709) 2023-01-05 11:21:38 -05:00
Cameron Gutman
f1c225fccc Terminate Sunshine if a session doesn't terminate for more than 10 seconds (#707) 2023-01-05 09:05:25 -05:00
Cameron Gutman
08cb5fc2f2 Minor UI fixes (#696) 2023-01-04 18:44:23 -05:00
Dmitry Khlestkov
1a929cc37b Fix origin_web_ui_allowed binding (#697) 2023-01-04 12:24:20 -05:00
Cameron Gutman
c72aeef67b Only increase rc_buffer_size when software encoding with more than one slice (#692) 2023-01-04 11:50:36 -05:00
Cameron Gutman
76896eba88 Fix NVENC profile values not applying (#695) 2023-01-04 11:18:28 -05:00
Cameron Gutman
1c1a7fa8c0 Fix 7.1 surround channel mapping (#694) 2023-01-04 10:08:33 -05:00
Jackson Garner
ff883058e6 Fix wayland capture on nvidia (#649) 2023-01-04 09:13:09 -05:00
dependabot[bot]
a3922d9eef Bump third-party/moonlight-common-c from 9da6329 to ef9ad52 (#690)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-03 22:41:25 -05:00
Cameron Gutman
cc688c7845 Implement process and thread priority adjustments (#691) 2023-01-03 22:05:00 -05:00
dependabot[bot]
997e8c6e5a Bump @fortawesome/fontawesome-free from 6.2.0 to 6.2.1 (#639)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-03 19:50:59 -05:00
dependabot[bot]
e410426257 Bump bootstrap from 5.0.0 to 5.2.3 (#638)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-03 19:07:03 -05:00
Tony Langhammer
30a790ba40 Fix UPnP IGD detection (#689) 2023-01-03 16:09:07 -05:00
Brad Richardson
052297a1a5 Update app id on edit (#670)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2023-01-02 21:02:10 -05:00
ReenigneArcher
12efe96297 fix docs badges for epub (#679) 2023-01-02 18:18:29 -05:00
ReenigneArcher
952e142ffa fix aur publish trigger event (#680) 2023-01-02 17:24:39 -05:00
Cameron Gutman
0439d7a83a Use separate encoding and capture devices to enable parallel encoding and capture (#668) 2023-01-02 15:56:58 -05:00
Cameron Gutman
76ffa2a0b5 Fix unexpected format switching in display_vram (#667) 2023-01-02 12:11:45 -05:00
ReenigneArcher
f9963ed39b update clang-format (#666) 2023-01-02 11:17:02 -05:00
LizardByte-bot
a7a9df3b9d ci: update global workflows (#673) 2023-01-02 10:12:06 -05:00
ReenigneArcher
cfe7129100 windows: pin libpsl version (#669) 2023-01-01 23:59:53 -05:00
LizardByte-bot
97b1790d0c ci: update release notifier (#665) 2023-01-01 09:36:24 -05:00
LizardByte-bot
9ae46e1325 ci: update global docker (#663) 2023-01-01 00:35:39 -05:00
LizardByte-bot
e5dedbbe46 ci: update global python (#662) 2023-01-01 00:09:29 -05:00
LizardByte-bot
17cd230c55 ci: update global workflows (#661) 2022-12-31 22:38:46 -05:00
Elia Zammuto
a5213c6225 Logs inside the WebUI (#634) 2022-12-31 20:12:36 -05:00
Cameron Gutman
248b1bfa19 Fix launching apps when Sunshine is running as admin (#659) 2022-12-31 19:05:22 -05:00
Cameron Gutman
0c6d0edacf Dynamic capture format selection (IDXGIOutput5) (#654)
Co-authored-by: Conn O'Griofa <connogriofa@gmail.com>
2022-12-31 17:38:29 -05:00
Cameron Gutman
03b62730ae Convert keyboard input to scancodes using the US English layout (#651) 2022-12-30 13:30:11 -05:00
ReenigneArcher
91f4f15c49 set concurrency limit for CI workflow (#657) 2022-12-30 12:24:35 -05:00
dependabot[bot]
3b53734eab Bump sphinx from 5.3.0 to 6.0.0 (#653)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-30 11:46:31 -05:00
dependabot[bot]
2dc150761c Bump third-party/ViGEmClient from f719a1d to 9e842ba (#558)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-30 11:02:46 -05:00
ReenigneArcher
8aaf9fd141 remove automatic desktop entry (#652) 2022-12-30 09:31:50 -05:00
ReenigneArcher
8b3b00059e Merge pull request #650 from cgutman/term_logging_feedback
Remove Enter prompt on exit and make log levels for execution messages consistent
2022-12-29 15:27:32 -05:00
Cameron Gutman
e00aa4f0f3 Make log priority consistent for execution messages 2022-12-29 12:47:44 -06:00
Cameron Gutman
a95a553970 Remove prompt to press enter after Sunshine exits 2022-12-29 12:47:20 -06:00
Cameron Gutman
d6db10afb4 Remove/fix calls to std::abort() (#648) 2022-12-29 11:09:11 -05:00
Cameron Gutman
8ad7af86c0 Graceful termination on shutdown, logoff, and service stop (#647) 2022-12-29 09:32:23 -05:00
ReenigneArcher
dc5571ba98 add cmake-lint action (#646) 2022-12-29 08:24:13 -05:00
ReenigneArcher
88a450bf1f update docs (#574) 2022-12-28 16:30:32 -05:00
Conn O'Griofa
27919697a7 CMake: NSIS: improve user upgrade experience (#587) 2022-12-28 15:39:05 -05:00
Cameron Gutman
a996902a33 Generate certificates with unique serial numbers (#645) 2022-12-28 14:03:41 -05:00
LizardByte-bot
ad20572dde ci: update global workflows (#643) 2022-12-28 10:48:29 -05:00
Cameron Gutman
f4a48f44e4 Rework audio bitrate and quality handling (#642) 2022-12-28 09:30:51 -05:00
Cameron Gutman
c7fe8f65bd windows: Fix audio when host is not using 48 KHz sample rate (#640) 2022-12-28 08:53:58 -05:00
Conn O'Griofa
215c86455f nvenc, amdvce: rework all user presets/options (#623) 2022-12-27 21:27:47 -05:00
Cameron Gutman
05f5370efe Launch games under the correct user account on Windows (#600) 2022-12-27 15:52:41 -05:00
ReenigneArcher
c1f0daa024 fix npm path (#635) 2022-12-27 14:03:00 -05:00
Conn O'Griofa
c0b042fa8a windows/vram: fix fringing in NV12 colour conversion (#622) 2022-12-27 11:05:57 -05:00
LizardByte-bot
d69d540031 Bump ffmpeg (#631) 2022-12-27 10:24:19 -05:00
Brad Richardson
95437d15f3 FFmpeg 5 and pre-built CBS (#509) 2022-12-27 09:13:54 -05:00
Brad Richardson
cbb5ec3f29 Remove duplicate boost port (#630) 2022-12-27 08:11:01 -05:00
Conn O'Griofa
c3ec53c0ae CMake: win32: further fix for boost linker incompatibility (#632) 2022-12-26 23:20:46 -05:00
LizardByte-bot
5adbd2988c ci: update global workflows (#613) 2022-12-22 22:47:24 -05:00
Cameron Gutman
1e037db7bd Fix pixel pitch handling for DXGI_FORMAT_R16G16B16A16_FLOAT (#605) 2022-12-22 21:58:39 -05:00
Cameron Gutman
bb092c0723 Fix streaming with non-B8G8R8A8 desktop mode (#609) 2022-12-22 20:48:31 -05:00
Cameron Gutman
1041f87a5d Spawn Sunshine.exe in a job object, so it is terminated if SunshineSvc.exe dies (#602) 2022-12-22 13:09:45 -05:00
LizardByte-bot
2b1514b547 Bump ffmpeg (#603) 2022-12-21 23:04:58 -05:00
Cameron Gutman
8a99187562 Fix SunshineSvc hanging if an error occurs during startup (#598) 2022-12-21 16:41:48 -05:00
ReenigneArcher
b1ac4bc57c Merge pull request #599 from cgutman/path_env
Fix PATH variable handling on Windows
2022-12-21 11:44:47 -05:00
Cameron Gutman
6c5a323b4a Use the proper environment variable for the Program Files (x86) folder 2022-12-21 09:48:30 -06:00
Cameron Gutman
dfb8d9d87f Fix PATH environment variable handling on Windows
PATH needs to be matched case-insensitively on Windows or we will just clobber the pre-existing PATH
2022-12-21 09:48:30 -06:00
Brad Richardson
7a23d6aa81 macOS arm64 (#591) 2022-12-20 14:38:50 -05:00
Conn O'Griofa
302bf58631 CMakeLists: win32: fix build against boost 1.81.0-1+ (#576) 2022-12-17 15:16:35 -05:00
dependabot[bot]
66f1ac664a Bump third-party/miniupnp from 6f848ae to 207cf44 (#557)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2022-12-16 18:48:09 -05:00
ReenigneArcher
223e87f30b set submodule branches (#570) 2022-12-16 17:27:28 -05:00
Cameron Gutman
633f0035c2 Send a valid PTS in the RTP video header (#529) 2022-12-16 15:56:44 -05:00
Cameron Gutman
66f46ab341 Send valid frame type value in frame header (#516) 2022-12-16 14:53:34 -05:00
Cameron Gutman
f4edce318c Avoid using functions deprecated in OpenSSL 3.0 (#515) 2022-12-15 21:21:57 -05:00
Conn O'Griofa
a54830cf39 video: vaapi: reduce async_depth to 1 (#545) 2022-12-15 20:37:55 -05:00
dependabot[bot]
63c105bfb1 Bump third-party/moonlight-common-c from 8169a31 to 9da6329 (#559)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-15 16:43:57 -05:00
dependabot[bot]
a1d07ff0e0 Bump third-party/TPCircularBuffer from bce9170 to 8833b3a (#555)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-15 16:07:24 -05:00
Cameron Gutman
5e6a42abb2 Migrate to upstream Simple-Web-Server submodule (#517) 2022-12-15 15:32:31 -05:00
Conn O'Griofa
3fd38b3a2e video: reduce nvenc delay/async_depth to 0 (#507) 2022-12-15 14:18:11 -05:00
Conn O'Griofa
cb406bce06 Video: revert software bitrate change & use more conservative bufsize (#482) 2022-12-15 13:12:25 -05:00
Conn O'Griofa
a4a5d30603 AMD encoder improvements (#480) 2022-12-15 11:23:59 -05:00
ReenigneArcher
5e40248fdf update ffmpeg submodules (#565) 2022-12-15 09:31:45 -05:00
ReenigneArcher
08d623ce44 Merge pull request #467 from LizardByte/nightly
v0.16.0
2022-12-14 10:35:31 -05:00
ReenigneArcher
12f1ec6b25 update issue template (#554) 2022-12-14 09:52:06 -05:00
ReenigneArcher
8c8a7bb886 update ffmpeg submodules (#552) 2022-12-14 06:51:42 -05:00
Conn O'Griofa
37c0f794b0 CMake: Linux: use standard FreeDesktop udev/systemd paths (#550) 2022-12-13 22:19:44 -05:00
ReenigneArcher
fe1321f33c Merge pull request #548 from LizardByte/prepare/v0.16.0
prepare v0.16.0
2022-12-12 21:49:32 -05:00
ReenigneArcher
5b239c17d0 prepare v0.16.0 2022-12-12 21:16:19 -05:00
LizardByte-bot
c60ebb76b9 ci: update global workflows (#547) 2022-12-12 20:04:06 -05:00
dependabot[bot]
6f369398b3 Bump furo from 2022.9.29 to 2022.12.7 (#531)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-11 21:16:33 -05:00
ReenigneArcher
84fdc7ee08 change linux build matrix (#468) 2022-12-11 20:26:25 -05:00
Brad Richardson
e8aa7499af Sunshine prebuilts (#510) 2022-12-11 17:46:19 -05:00
LizardByte-bot
a7b19f48fe ci: update release notifier (#534) 2022-12-10 10:45:09 -05:00
LizardByte-bot
a6e47ff033 ci: update global workflows (#532) 2022-12-10 10:27:26 -05:00
LizardByte-bot
dbe56ee583 ci: update global cpp (#533) 2022-12-10 10:02:33 -05:00
ReenigneArcher
ed5ee24efb Merge pull request #530 from psyke83/restrict_boost_ver
CMake: win32: fix linker errors with mingw boost 1.80.0-2
2022-12-10 08:11:23 -05:00
ReenigneArcher
97716fa0c8 fix aur build 2022-12-10 04:17:51 +00:00
Conn O'Griofa
7648496b89 CMake: win32: fix linker errors with mingw boost 1.80.0-2 2022-12-08 14:57:21 +00:00
ReenigneArcher
5ed17fb89d Merge pull request #511 from cgutman/utf8_events
Add support for UTF-8 input messages on Windows
2022-12-08 09:11:23 -05:00
Cameron Gutman
e39d9bc662 Add support for Unicode input messages on Windows 2022-11-23 21:45:26 -06:00
Cameron Gutman
d912cce5ba Update moonlight-common-c to pick up new input structures 2022-11-23 21:45:26 -06:00
ReenigneArcher
fbd6807eb8 Merge pull request #504 from LizardByte/update/use-npm-dependencies 2022-11-20 12:41:20 -05:00
ReenigneArcher
f0cfc4aa8a update build instructions 2022-11-19 18:58:37 -05:00
ReenigneArcher
67a569c0b8 Merge branch 'nightly' into update/use-npm-dependencies 2022-11-19 12:58:58 -05:00
ReenigneArcher
981d878082 use npm dependencies 2022-11-19 12:58:29 -05:00
istori1
4c1371aaeb Add install scripts (Flatpak) (#471)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2022-11-18 18:52:58 -05:00
LizardByte-bot
9af770e217 ci: update global workflows (#505) 2022-11-18 17:14:22 -05:00
LizardByte-bot
4cbf8c01d2 ci: update global docker (#502) 2022-11-18 12:30:39 -05:00
LizardByte-bot
8132c82b07 ci: update global workflows (#501) 2022-11-18 12:09:31 -05:00
ReenigneArcher
4a924acbc3 Merge pull request #498 from LizardByte/dependabot/github_actions/nightly/KSXGitHub/github-actions-deploy-aur-2.6.0
Bump KSXGitHub/github-actions-deploy-aur from 2.5.0 to 2.6.0
2022-11-18 11:33:29 -05:00
dependabot[bot]
390c664e84 Bump KSXGitHub/github-actions-deploy-aur from 2.5.0 to 2.6.0
Bumps [KSXGitHub/github-actions-deploy-aur](https://github.com/KSXGitHub/github-actions-deploy-aur) from 2.5.0 to 2.6.0.
- [Release notes](https://github.com/KSXGitHub/github-actions-deploy-aur/releases)
- [Commits](https://github.com/KSXGitHub/github-actions-deploy-aur/compare/v2.5.0...v2.6.0)

---
updated-dependencies:
- dependency-name: KSXGitHub/github-actions-deploy-aur
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-18 16:13:29 +00:00
Mariotaku
01b8ba353a Cover Finder (#216)
Adds functionality to search and add game cover images automatically.

Co-authored-by: Conn O'Griofa <connogriofa@gmail.com>
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2022-11-18 11:07:22 -05:00
ReenigneArcher
66615a0be0 Merge pull request #500 from LizardByte/dependabot/pip/nightly/sphinx-copybutton-0.5.1
Bump sphinx-copybutton from 0.5.0 to 0.5.1
2022-11-16 09:08:01 -05:00
dependabot[bot]
e924e2eedb Bump sphinx-copybutton from 0.5.0 to 0.5.1
Bumps [sphinx-copybutton](https://github.com/executablebooks/sphinx-copybutton) from 0.5.0 to 0.5.1.
- [Release notes](https://github.com/executablebooks/sphinx-copybutton/releases)
- [Changelog](https://github.com/executablebooks/sphinx-copybutton/blob/master/CHANGELOG.md)
- [Commits](https://github.com/executablebooks/sphinx-copybutton/compare/v0.5.0...v0.5.1)

---
updated-dependencies:
- dependency-name: sphinx-copybutton
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-16 00:31:17 +00:00
ReenigneArcher
4190667d94 Merge pull request #473 from LizardByte/add/docker-platform-arm64
add linux/arm64/v8 docker platform
2022-11-02 18:46:36 -04:00
ReenigneArcher
0bdb887e2c add linux/arm64/v8 docker platform 2022-11-02 18:11:37 -04:00
ReenigneArcher
92f5c49685 Merge pull request #472 from LizardByte/fix/CI-winget-releaser
fix winget release
2022-11-02 10:29:03 -04:00
ReenigneArcher
89a0109fa7 fix winget release
Fixes #464
2022-11-02 10:09:01 -04:00
ReenigneArcher
cf2de6e81e Merge pull request #470 from LizardByte/dependabot/pip/nightly/babel-2.11.0
Bump babel from 2.10.3 to 2.11.0
2022-11-02 09:21:43 -04:00
dependabot[bot]
6a2a485435 Bump babel from 2.10.3 to 2.11.0
Bumps [babel](https://github.com/python-babel/babel) from 2.10.3 to 2.11.0.
- [Release notes](https://github.com/python-babel/babel/releases)
- [Changelog](https://github.com/python-babel/babel/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-babel/babel/compare/v2.10.3...v2.11.0)

---
updated-dependencies:
- dependency-name: babel
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-02 12:40:43 +00:00
ReenigneArcher
b310436bdb Merge pull request #469 from CrazyStevenz/patch-1
Fix credentials command typo in docs
2022-11-01 22:25:26 -04:00
Stefanos Papanatsios
bea78dd3eb Fix credentials command typo in docs 2022-11-01 19:32:04 +02:00
ReenigneArcher
447a00936b Merge pull request #466 from bananaman2020/patch-1
fix typo
2022-11-01 12:11:20 -04:00
Kuba
ca3bab3242 fix typo 2022-10-31 20:35:03 +00:00
511 changed files with 65730 additions and 71977 deletions

View File

@@ -7,7 +7,7 @@
BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: Consecutive
AlignConsecutiveAssignments: false
AlignOperands: Align
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
@@ -18,8 +18,9 @@ AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: Yes
AlignTrailingComments: false
AlwaysBreakAfterReturnType: All
AlwaysBreakTemplateDeclarations: MultiLine
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
@@ -37,32 +38,32 @@ BraceWrapping:
SplitEmptyRecord: true
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: false
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterColon
ColumnLimit: 0
CompactNamespaces: false
ContinuationIndentWidth: 2
IndentCaseLabels: false
IndentPPDirectives: None
IndentCaseLabels: true
IndentPPDirectives: BeforeHash
IndentWidth: 2
KeepEmptyLinesAtTheStartOfBlocks: true
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
ObjCSpaceAfterProperty: false
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PointerAlignment: Right
ReflowComments: false
SpaceAfterCStyleCast: false
ReflowComments: true
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: Never
SpaceBeforeCtorInitializerColon: false
SpaceBeforeInheritanceColon: false
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesBeforeTrailingComments: 2
SpacesInAngles: Never
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false

View File

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

@@ -1 +0,0 @@
linux/amd64

View File

@@ -1,16 +1,23 @@
# ignore git files
.git*
# ignore hidden files
.*
# 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/
packaging/
docker/
gh-pages-template/
scripts/
tools/
crowdin.yml
# ignore dev directories
build/
cmake-*/
venv/
# ignore artifacts
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

@@ -22,6 +22,13 @@ body:
options:
- label: I have read the documentation
required: true
- type: checkboxes
attributes:
label: Is your issue present in the nightly release?
description: Please test the [nightly](https://github.com/LizardByte/Sunshine/releases/tag/nightly-dev) release
options:
- label: This issue is present in the nightly release
required: true
- type: textarea
id: description
attributes:
@@ -50,6 +57,8 @@ body:
- macOS
- Windows
- other, n/a
validations:
required: true
- type: input
id: os-version
attributes:
@@ -66,11 +75,13 @@ body:
- 64 bit
- arm
- other, n/a
validations:
required: true
- type: input
id: version
attributes:
label: Sunshine commit or version
placeholder: eg. 0.14.0
placeholder: eg. 0.18.0
validations:
required: true
- type: dropdown
@@ -80,17 +91,28 @@ body:
description: The package you installed
options:
- Linux - AppImage
- Linux - AUR (Third Party)
- Linux - deb
- Linux - Docker
- Linux - flatpak
- Linux - nixpkgs (Third Party)
- Linux - PKGBUILD
- Linux - pkg.tar.zst
- Linux - rpm
- Linux - solus (Third Party)
- macOS - dmg
- macOS - Portfile
- macOS - pkg
- Windows - Chocolatey (Third Party)
- Windows - installer
- Windows - portable
- Windows - Scoop (Third Party)
- Windows - Winget (Third Party)
- other (not listed)
- other (self built)
- other (fork of this repo)
- n/a
validations:
required: true
- type: dropdown
id: graphics_type
attributes:
@@ -101,6 +123,9 @@ body:
- Intel
- Nvidia
- none (software encoding)
- n/a
validations:
required: true
- type: input
id: graphics_model
attributes:
@@ -125,6 +150,24 @@ body:
placeholder: e.g. PipeWire/KVM/X11/KMS
validations:
required: false
- type: textarea
id: config
attributes:
label: Config
description: |
Please copy and paste your config (`sunshine.conf`) file.
render: Shell
validations:
required: true
- type: textarea
id: apps
attributes:
label: Apps
description: |
If this is an issue with launching a game or app, please copy and paste your `apps.json` file.
render: json
validations:
required: false
- type: textarea
id: logs
attributes:
@@ -132,9 +175,6 @@ body:
description: |
Please copy and paste any relevant log output. This will be automatically formatted into code,
so no need for backticks.
render: Shell
- type: markdown
attributes:
value: |
Make sure to close your issue when it's solved! If you found the solution yourself please comment
so that others benefit from it.
render: shell
validations:
required: true

View File

@@ -9,5 +9,5 @@ contact_links:
url: https://app.lizardbyte.dev/support
about: Official LizardByte support
- name: Feature request
url: https://app.lizardbyte.dev/feedback
about: Share your suggestions or ideas to help us improve
url: https://ideas.moonlight-stream.org
about: Share your suggestions or ideas to help Moonlight and Sunshine improve

View File

@@ -9,30 +9,40 @@ updates:
directory: "/"
schedule:
interval: "daily"
time: "00:00"
target-branch: "nightly"
time: "08:00"
open-pull-requests-limit: 10
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
time: "00:00"
target-branch: "nightly"
time: "08:30"
open-pull-requests-limit: 10
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
time: "00:00"
target-branch: "nightly"
time: "09:00"
open-pull-requests-limit: 10
- package-ecosystem: "nuget"
directory: "/"
schedule:
interval: "daily"
time: "09:30"
open-pull-requests-limit: 10
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
time: "00:00"
target-branch: "nightly"
time: "10:00"
open-pull-requests-limit: 10
- package-ecosystem: "gitsubmodule"
directory: "/"
schedule:
interval: "daily"
time: "10:30"
open-pull-requests-limit: 10

View File

@@ -17,8 +17,12 @@ This PR was created automatically.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Dependency update (updates to dependencies)
- [ ] Documentation update (changes to documentation)
- [ ] Repository update (changes to repository files)
- [ ] Repository update (changes to repository files, e.g. `.github/...`)
## Branch Updates
- [x] I want maintainers to keep my branch updated
## Changelog Summary
<!--- Summarize all the changes in a bulleted list. --->

File diff suppressed because it is too large Load Diff

View File

@@ -3,6 +3,9 @@
# 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 workflow creates a PR automatically when anything is merged/pushed into the `nightly` branch. The PR is created
# against the `master` (default) branch.
name: Auto create PR
on:
@@ -12,11 +15,12 @@ on:
jobs:
create_pr:
if: startsWith(github.repository, 'LizardByte/')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Create Pull Request
uses: repo-sync/pull-request@v2

View File

@@ -3,6 +3,8 @@
# 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 workflow will, first, automatically approve PRs created by @LizardByte-bot. Then it will automerge relevant PRs.
name: Automerge PR
on:
@@ -11,20 +13,25 @@ on:
- opened
- synchronize
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
autoapprove:
if: >
if: >-
contains(fromJson('["LizardByte-bot"]'), github.event.pull_request.user.login) &&
contains(fromJson('["LizardByte-bot"]'), github.actor)
contains(fromJson('["LizardByte-bot"]'), github.actor) &&
startsWith(github.repository, 'LizardByte/')
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: |
@@ -36,20 +43,18 @@ jobs:
})
automerge:
if: startsWith(github.repository, 'LizardByte/')
needs: [autoapprove]
runs-on: ubuntu-latest
concurrency:
group: automerge-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Automerging
uses: pascalgn/automerge-action@v0.15.5
uses: pascalgn/automerge-action@v0.16.3
env:
BASE_BRANCHES: nightly
GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
GITHUB_LOGIN: ${{ secrets.GH_BOT_NAME }}
MERGE_LABELS: ""
MERGE_LABELS: "!dependencies"
MERGE_METHOD: "squash"
MERGE_COMMIT_MESSAGE: "{pullRequest.title} (#{pullRequest.number})"
MERGE_DELETE_BRANCH: true

View File

@@ -1,32 +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 workflow is designed to work with:
# - automerge workflows
# It uses GitHub Action that auto-updates pull requests branches, when changes are pushed to their destination branch.
# Auto-updating to the latest destination branch works only in the context of upstream repo and not forks.
name: autoupdate
on:
push:
branches:
- 'nightly'
jobs:
autoupdate-for-bot:
name: Autoupdate autoapproved PR created in the upstream
if: startsWith(github.repository, 'LizardByte/')
runs-on: ubuntu-latest
steps:
- name: Update
uses: docker://chinthakagodawita/autoupdate-action:v1
env:
GITHUB_TOKEN: '${{ secrets.GH_BOT_TOKEN }}'
PR_FILTER: "labelled"
PR_LABELS: "autoupdate"
PR_READY_STATE: "ready_for_review"
MERGE_CONFLICT_ACTION: "ignore"

View File

@@ -3,6 +3,21 @@
# 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 workflow is intended to work with all our organization Docker projects. A readme named `DOCKER_README.md`
# will be used to update the description on Docker hub.
# custom comments in dockerfiles:
# `# platforms: `
# Comma separated list of platforms, i.e. `# platforms: linux/386,linux/amd64`. Docker platforms can alternatively
# be listed in a file named `.docker_platforms`.
# `# platforms_pr: `
# Comma separated list of platforms to run for PR events, i.e. `# platforms_pr: linux/amd64`. This will take
# precedence over the `# platforms: ` directive.
# `# artifacts: `
# `true` to build in two steps, stopping at `artifacts` build stage and extracting the image from there to the
# GitHub runner.
name: CI Docker
on:
@@ -13,62 +28,65 @@ on:
branches: [master, nightly]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check_dockerfile:
name: Check Dockerfile
check_dockerfiles:
name: Check Dockerfiles
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Check
id: check
- name: Find dockerfiles
id: find
run: |
if [ -f "./Dockerfile" ]
then
FOUND=true
else
FOUND=false
fi
dockerfiles=$(find . -type f -iname "Dockerfile" -o -iname "*.dockerfile")
echo "dockerfile=${FOUND}" >> $GITHUB_OUTPUT
echo "found dockerfiles: ${dockerfiles}"
# do not quote to keep this as a single line
echo dockerfiles=${dockerfiles} >> $GITHUB_OUTPUT
MATRIX_COMBINATIONS=""
for FILE in ${dockerfiles}; do
# extract tag from file name
tag=$(echo $FILE | sed -r -z -e 's/(\.\/)*.*\/(Dockerfile)/None/gm')
if [[ $tag == "None" ]]; then
MATRIX_COMBINATIONS="$MATRIX_COMBINATIONS {\"dockerfile\": \"$FILE\"},"
else
tag=$(echo $FILE | sed -r -z -e 's/(\.\/)*.*\/(.+)(\.dockerfile)/-\2/gm')
MATRIX_COMBINATIONS="$MATRIX_COMBINATIONS {\"dockerfile\": \"$FILE\", \"tag\": \"$tag\"},"
fi
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
outputs:
dockerfile: ${{ steps.check.outputs.dockerfile }}
lint_dockerfile:
name: Lint Dockerfile
needs: [check_dockerfile]
if: ${{ needs.check_dockerfile.outputs.dockerfile == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Hadolint
id: hadolint
uses: hadolint/hadolint-action@v2.1.0
with:
dockerfile: ./Dockerfile
ignore: DL3008,DL3013,DL3016,DL3018,DL3028,DL3059
output-file: ./hadolint.log
verbose: true
- name: Log
if: failure()
run: |
echo "Hadolint outcome: ${{ steps.hadolint.outcome }}" >> $GITHUB_STEP_SUMMARY
cat "./hadolint.log" >> $GITHUB_STEP_SUMMARY
dockerfiles: ${{ steps.find.outputs.dockerfiles }}
matrix: ${{ steps.find.outputs.matrix }}
check_changelog:
name: Check Changelog
needs: [check_dockerfile]
if: ${{ needs.check_dockerfile.outputs.dockerfile == 'true' }}
needs: [check_dockerfiles]
if: ${{ needs.check_dockerfiles.outputs.dockerfiles }}
runs-on: ubuntu-latest
steps:
- name: Checkout
if: ${{ github.ref == 'refs/heads/master' || github.base_ref == 'master' }}
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Verify Changelog
id: verify_changelog
@@ -79,34 +97,138 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
outputs:
next_version: ${{ steps.verify_changelog.outputs.changelog_parser_version }}
next_version_bare: ${{ steps.verify_changelog.outputs.changelog_parser_version_bare }}
last_version: ${{ steps.verify_changelog.outputs.latest_release_tag_name }}
release_body: ${{ steps.verify_changelog.outputs.changelog_parser_description }}
setup_release:
name: Setup Release
needs: check_changelog
runs-on: ubuntu-latest
steps:
- name: Set release details
id: release_details
env:
RELEASE_BODY: ${{ needs.check_changelog.outputs.release_body }}
run: |
# determine to create a release or not
if [[ $GITHUB_EVENT_NAME == "push" ]]; then
RELEASE=true
else
RELEASE=false
fi
# set the release tag
COMMIT=${{ github.sha }}
if [[ $GITHUB_REF == refs/heads/master ]]; then
TAG="${{ needs.check_changelog.outputs.next_version }}"
RELEASE_NAME="${{ needs.check_changelog.outputs.next_version }}"
RELEASE_BODY="$RELEASE_BODY"
PRE_RELEASE="false"
elif [[ $GITHUB_REF == refs/heads/nightly ]]; then
TAG="nightly-dev"
RELEASE_NAME="nightly"
RELEASE_BODY="automated nightly release - $(date -u +'%Y-%m-%dT%H:%M:%SZ') - ${COMMIT}"
PRE_RELEASE="true"
fi
echo "create_release=${RELEASE}" >> $GITHUB_OUTPUT
echo "release_tag=${TAG}" >> $GITHUB_OUTPUT
echo "release_commit=${COMMIT}" >> $GITHUB_OUTPUT
echo "release_name=${RELEASE_NAME}" >> $GITHUB_OUTPUT
echo "pre_release=${PRE_RELEASE}" >> $GITHUB_OUTPUT
# this is stupid but works for multiline strings
echo "RELEASE_BODY<<EOF" >> $GITHUB_ENV
echo "$RELEASE_BODY" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
outputs:
create_release: ${{ steps.release_details.outputs.create_release }}
release_tag: ${{ steps.release_details.outputs.release_tag }}
release_commit: ${{ steps.release_details.outputs.release_commit }}
release_name: ${{ steps.release_details.outputs.release_name }}
release_body: ${{ env.RELEASE_BODY }}
pre_release: ${{ steps.release_details.outputs.pre_release }}
lint_dockerfile:
needs: [check_dockerfiles]
if: ${{ needs.check_dockerfiles.outputs.dockerfiles }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.check_dockerfiles.outputs.matrix) }}
name: Lint Dockerfile${{ matrix.tag }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Hadolint
id: hadolint
uses: hadolint/hadolint-action@v3.1.0
with:
dockerfile: ${{ matrix.dockerfile }}
ignore: DL3008,DL3013,DL3016,DL3018,DL3028,DL3059
output-file: ./hadolint.log
verbose: true
- name: Log
if: failure()
run: |
echo "Hadolint outcome: ${{ steps.hadolint.outcome }}" >> $GITHUB_STEP_SUMMARY
cat "./hadolint.log" >> $GITHUB_STEP_SUMMARY
docker:
name: Docker
needs: [check_dockerfile, check_changelog]
if: ${{ needs.check_dockerfile.outputs.dockerfile == 'true' }}
needs: [check_dockerfiles, check_changelog, setup_release]
if: ${{ needs.check_dockerfiles.outputs.dockerfiles }}
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.check_dockerfiles.outputs.matrix) }}
name: Docker${{ matrix.tag }}
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@v8
with:
root-reserve-mb: 30720 # https://github.com/easimon/maximize-build-space#caveats
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
- name: Prepare
id: prepare
env:
NEXT_VERSION: ${{ needs.check_changelog.outputs.next_version }}
NV: ${{ needs.check_changelog.outputs.next_version }}
run: |
# get branch name
BRANCH=${GITHUB_HEAD_REF}
if [ -z "$BRANCH" ]
then
RELEASE=false
if [ -z "$BRANCH" ]; then
echo "This is a PUSH event"
BRANCH=${{ github.ref_name }}
COMMIT=${{ github.sha }}
CLONE_URL=${{ github.event.repository.clone_url }}
if [[ $BRANCH == "master" ]]; then
RELEASE=true
fi
else
echo "This is a PULL REQUEST event"
COMMIT=${{ github.event.pull_request.head.sha }}
CLONE_URL=${{ github.event.pull_request.head.repo.clone_url }}
fi
# determine to push image to dockerhub and ghcr or not
@@ -119,68 +241,132 @@ jobs:
# setup the tags
REPOSITORY=${{ github.repository }}
BASE_TAG=$(echo $REPOSITORY | tr '[:upper:]' '[:lower:]')
COMMIT=${{ github.sha }}
TAGS="${BASE_TAG}:${COMMIT:0:7},ghcr.io/${BASE_TAG}:${COMMIT:0:7}"
TAGS="${BASE_TAG}:${COMMIT:0:7}${{ matrix.tag }},ghcr.io/${BASE_TAG}:${COMMIT:0:7}${{ matrix.tag }}"
if [[ $GITHUB_REF == refs/heads/master ]]; then
TAGS="${TAGS},${BASE_TAG}:latest,ghcr.io/${BASE_TAG}:latest"
TAGS="${TAGS},${BASE_TAG}:master,ghcr.io/${BASE_TAG}:master"
TAGS="${TAGS},${BASE_TAG}:latest${{ matrix.tag }},ghcr.io/${BASE_TAG}:latest${{ matrix.tag }}"
TAGS="${TAGS},${BASE_TAG}:master${{ matrix.tag }},ghcr.io/${BASE_TAG}:master${{ matrix.tag }}"
elif [[ $GITHUB_REF == refs/heads/nightly ]]; then
TAGS="${TAGS},${BASE_TAG}:nightly,ghcr.io/${BASE_TAG}:nightly"
TAGS="${TAGS},${BASE_TAG}:nightly${{ matrix.tag }},ghcr.io/${BASE_TAG}:nightly${{ matrix.tag }}"
else
TAGS="${TAGS},${BASE_TAG}:test,ghcr.io/${BASE_TAG}:test"
TAGS="${TAGS},${BASE_TAG}:test${{ matrix.tag }},ghcr.io/${BASE_TAG}:test${{ matrix.tag }}"
fi
if [[ ${NEXT_VERSION} != "" ]]; then
TAGS="${TAGS},${BASE_TAG}:${NEXT_VERSION},ghcr.io/${BASE_TAG}:${NEXT_VERSION}"
if [[ ${NV} != "" ]]; then
TAGS="${TAGS},${BASE_TAG}:${NV}${{ matrix.tag }},ghcr.io/${BASE_TAG}:${NV}${{ matrix.tag }}"
fi
# read the platforms from `.docker_platforms`
PLATFORMS=$(<.docker_platforms)
# parse custom directives out of dockerfile
# try to get the platforms from the dockerfile custom directive, i.e. `# platforms: xxx,yyy`
# directives for PR event, i.e. not push event
if [[ ${PUSH} == "false" ]]; then
while read -r line; do
if [[ $line == "# platforms_pr: "* && $PLATFORMS == "" ]]; then
# echo the line and use `sed` to remove the custom directive
PLATFORMS=$(echo -e "$line" | sed 's/# platforms_pr: //')
elif [[ $PLATFORMS != "" ]]; then
# break while loop once all custom "PR" event directives are found
break
fi
done <"${{ matrix.dockerfile }}"
fi
# directives for all events... above directives will not be parsed if they were already found
while read -r line; do
if [[ $line == "# platforms: "* && $PLATFORMS == "" ]]; then
# echo the line and use `sed` to remove the custom directive
PLATFORMS=$(echo -e "$line" | sed 's/# platforms: //')
elif [[ $line == "# artifacts: "* && $ARTIFACTS == "" ]]; then
# echo the line and use `sed` to remove the custom directive
ARTIFACTS=$(echo -e "$line" | sed 's/# artifacts: //')
elif [[ $line == "# no-cache-filters: "* && $NO_CACHE_FILTERS == "" ]]; then
# echo the line and use `sed` to remove the custom directive
NO_CACHE_FILTERS=$(echo -e "$line" | sed 's/# no-cache-filters: //')
elif [[ $PLATFORMS != "" && $ARTIFACTS != "" && $NO_CACHE_FILTERS != "" ]]; then
# break while loop once all custom directives are found
break
fi
done <"${{ matrix.dockerfile }}"
# if PLATFORMS is blank, fall back to the legacy method of reading from the `.docker_platforms` file
if [[ $PLATFORMS == "" ]]; then
# read the platforms from `.docker_platforms`
PLATFORMS=$(<.docker_platforms)
fi
# if PLATFORMS is still blank, fall back to `linux/amd64`
if [[ $PLATFORMS == "" ]]; then
PLATFORMS="linux/amd64"
fi
echo "branch=${BRANCH}" >> $GITHUB_OUTPUT
echo "build_date=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
echo "commit=${COMMIT}" >> $GITHUB_OUTPUT
echo "clone_url=${CLONE_URL}" >> $GITHUB_OUTPUT
echo "release=${RELEASE}" >> $GITHUB_OUTPUT
echo "artifacts=${ARTIFACTS}" >> $GITHUB_OUTPUT
echo "no_cache_filters=${NO_CACHE_FILTERS}" >> $GITHUB_OUTPUT
echo "platforms=${PLATFORMS}" >> $GITHUB_OUTPUT
echo "push=${PUSH}" >> $GITHUB_OUTPUT
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
- name: Set Up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
id: buildx
- name: Cache Docker Layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
key: Docker-buildx${{ matrix.tag }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
Docker-buildx${{ matrix.tag }}-
- name: Log in to Docker Hub
if: ${{ steps.prepare.outputs.push == 'true' }} # PRs do not have access to secrets
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Log in to the Container registry
if: ${{ steps.prepare.outputs.push == 'true' }} # PRs do not have access to secrets
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.GH_BOT_NAME }}
password: ${{ secrets.GH_BOT_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
- name: Build artifacts
if: ${{ steps.prepare.outputs.artifacts == 'true' }}
id: build_artifacts
uses: docker/build-push-action@v5
with:
context: ./
file: ./Dockerfile
file: ${{ matrix.dockerfile }}
target: artifacts
outputs: type=local,dest=artifacts
push: false
platforms: ${{ steps.prepare.outputs.platforms }}
build-args: |
BRANCH=${{ steps.prepare.outputs.branch }}
BUILD_DATE=${{ steps.prepare.outputs.build_date }}
BUILD_VERSION=${{ needs.check_changelog.outputs.next_version }}
COMMIT=${{ steps.prepare.outputs.commit }}
CLONE_URL=${{ steps.prepare.outputs.clone_url }}
RELEASE=${{ steps.prepare.outputs.release }}
tags: ${{ steps.prepare.outputs.tags }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
no-cache-filters: ${{ steps.prepare.outputs.no_cache_filters }}
- name: Build and push
id: build
uses: docker/build-push-action@v5
with:
context: ./
file: ${{ matrix.dockerfile }}
push: ${{ steps.prepare.outputs.push }}
platforms: ${{ steps.prepare.outputs.platforms }}
build-args: |
@@ -188,9 +374,45 @@ jobs:
BUILD_DATE=${{ steps.prepare.outputs.build_date }}
BUILD_VERSION=${{ needs.check_changelog.outputs.next_version }}
COMMIT=${{ steps.prepare.outputs.commit }}
CLONE_URL=${{ steps.prepare.outputs.clone_url }}
RELEASE=${{ steps.prepare.outputs.release }}
tags: ${{ steps.prepare.outputs.tags }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
no-cache-filters: ${{ steps.prepare.outputs.no_cache_filters }}
- name: Arrange Artifacts
if: ${{ steps.prepare.outputs.artifacts == 'true' }}
working-directory: artifacts
run: |
# artifacts will be in sub directories named after the docker target platform, e.g. `linux_amd64`
# so move files to the artifacts directory
# https://unix.stackexchange.com/a/52816
find ./ -type f -exec mv -t ./ -n '{}' +
# remove provenance file
rm -f ./provenance.json
- name: Upload Artifacts
if: ${{ steps.prepare.outputs.artifacts == 'true' }}
uses: actions/upload-artifact@v4
with:
name: Docker${{ matrix.tag }}
path: artifacts/
- name: Create/Update GitHub Release
if: ${{ needs.setup_release.outputs.create_release == 'true' && steps.prepare.outputs.artifacts == 'true' }}
uses: ncipollo/release-action@v1
with:
name: ${{ needs.setup_release.outputs.release_name }}
tag: ${{ needs.setup_release.outputs.release_tag }}
commit: ${{ needs.setup_release.outputs.release_commit }}
artifacts: "*artifacts/*"
token: ${{ secrets.GH_BOT_TOKEN }}
allowUpdates: true
body: ${{ needs.setup_release.outputs.release_body }}
discussionCategory: announcements
prerelease: ${{ needs.setup_release.outputs.pre_release }}
- name: Update Docker Hub Description
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}

178
.github/workflows/codeql.yml vendored Normal file
View File

@@ -0,0 +1,178 @@
---
# 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 workflow will analyze all supported languages in the repository using CodeQL Analysis.
name: "CodeQL"
on:
push:
branches: ["master", "nightly"]
pull_request:
branches: ["master", "nightly"]
schedule:
- cron: '00 12 * * 0' # every Sunday at 12:00 UTC
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
languages:
name: Get language matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.lang.outputs.result }}
continue: ${{ steps.continue.outputs.result }}
steps:
- name: Get repo languages
uses: actions/github-script@v7
id: lang
with:
script: |
// CodeQL supports ['cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift']
// Use only 'java' to analyze code written in Java, Kotlin or both
// Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
// Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
const supported_languages = ['cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift']
const remap_languages = {
'c++': 'cpp',
'c#': 'csharp',
'kotlin': 'java',
'typescript': 'javascript',
}
const repo = context.repo
const response = await github.rest.repos.listLanguages(repo)
let matrix = {
"include": []
}
for (let [key, value] of Object.entries(response.data)) {
// remap language
if (remap_languages[key.toLowerCase()]) {
console.log(`Remapping language: ${key} to ${remap_languages[key.toLowerCase()]}`)
key = remap_languages[key.toLowerCase()]
}
if (supported_languages.includes(key.toLowerCase())) {
console.log(`Found supported language: ${key}`)
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})
}
}
}
// print languages
console.log(`matrix: ${JSON.stringify(matrix)}`)
return matrix
- name: Continue
uses: actions/github-script@v7
id: continue
with:
script: |
// if matrix['include'] is an empty list return false, otherwise true
const matrix = ${{ steps.lang.outputs.result }} // this is already json encoded
if (matrix['include'].length == 0) {
return false
} else {
return true
}
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.os || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.languages.outputs.matrix) }}
steps:
- name: Maximize build space
if: runner.os == 'Linux'
uses: easimon/maximize-build-space@v8
with:
root-reserve-mb: 20480
remove-dotnet: ${{ (matrix.language == 'csharp' && 'false') || 'true' }}
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'false'
remove-docker-images: 'true'
- name: Checkout repository
uses: actions/checkout@v4
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@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# yamllint disable-line rule:line-length
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# 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 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
if: steps.prebuild.outputs.skip_autobuild != 'true'
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"

View File

@@ -1,60 +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: Clang Format Lint
on:
pull_request:
branches: [master, nightly]
types: [opened, synchronize, reopened]
jobs:
check_src:
name: Check src
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check
id: check
run: |
if [ -d "./src" ]
then
FOUND=true
else
FOUND=false
fi
echo "src=${FOUND}" >> $GITHUB_OUTPUT
outputs:
src: ${{ steps.check.outputs.src }}
lint:
name: Clang Format Lint
needs: [check_src]
if: ${{ needs.check_src.outputs.src == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Clang format lint
uses: DoozyX/clang-format-lint-action@v0.14
with:
source: './src'
extensions: 'cpp,h,m,mm'
clangFormatVersion: 13
style: file
inplace: false
- name: Upload Artifacts
if: failure()
uses: actions/upload-artifact@v3
with:
name: clang-format-fixes
path: src/

120
.github/workflows/cpp-lint.yml vendored Normal file
View File

@@ -0,0 +1,120 @@
---
# 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.
# Lint c++ source files and cmake files.
name: C++ Lint
on:
pull_request:
branches: [master, nightly]
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
clang-format:
name: Clang Format Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Find cpp files
id: find_files
run: |
# find files
found_files=$(find . -type f -iname "*.cpp" -o -iname "*.h" -o -iname "*.m" -o -iname "*.mm")
ignore_files=$(find . -type f -iname ".clang-format-ignore")
# Loop through each C++ file
for file in $found_files; do
for ignore_file in $ignore_files; do
ignore_directory=$(dirname "$ignore_file")
# if directory of ignore_file is beginning of file
if [[ "$file" == "$ignore_directory"* ]]; then
echo "ignoring file: ${file}"
found_files="${found_files//${file}/}"
break 1
fi
done
done
# remove empty lines
found_files=$(echo "$found_files" | sed '/^\s*$/d')
echo "found cpp files: ${found_files}"
# do not quote to keep this as a single line
echo found_files=${found_files} >> $GITHUB_OUTPUT
- name: Clang format lint
if: ${{ steps.find_files.outputs.found_files }}
uses: DoozyX/clang-format-lint-action@v0.17
with:
source: ${{ steps.find_files.outputs.found_files }}
extensions: 'cpp,h,m,mm'
clangFormatVersion: 16
style: file
inplace: false
- name: Upload Artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: clang-format-fixes
path: ${{ steps.find_files.outputs.found_files }}
cmake-lint:
name: CMake Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools cmakelang
- name: Find cmake files
id: find_files
run: |
# find files
found_files=$(find . -type f -iname "CMakeLists.txt" -o -iname "*.cmake")
ignore_files=$(find . -type f -iname ".cmake-lint-ignore")
# Loop through each C++ file
for file in $found_files; do
for ignore_file in $ignore_files; do
ignore_directory=$(dirname "$ignore_file")
# if directory of ignore_file is beginning of file
if [[ "$file" == "$ignore_directory"* ]]; then
echo "ignoring file: ${file}"
found_files="${found_files//${file}/}"
break 1
fi
done
done
# remove empty lines
found_files=$(echo "$found_files" | sed '/^\s*$/d')
echo "found cmake files: ${found_files}"
# do not quote to keep this as a single line
echo found_files=${found_files} >> $GITHUB_OUTPUT
- name: Test with cmake-lint
run: |
cmake-lint --line-width 120 --tab-size 4 ${{ steps.find_files.outputs.found_files }}

View File

@@ -3,19 +3,22 @@
# 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.
# Manage stale issues and PRs.
name: Stale Issues / PRs
on:
schedule:
- cron: '00 00 * * *'
- cron: '00 10 * * *'
jobs:
stale:
name: Check Stale Issues / PRs
if: startsWith(github.repository, 'LizardByte/')
runs-on: ubuntu-latest
steps:
- name: Stale
uses: actions/stale@v6
uses: actions/stale@v9
with:
close-issue-message: >
This issue was closed because it has been stalled for 10 days with no activity.
@@ -28,16 +31,19 @@ jobs:
exempt-pr-labels: 'dependencies,l10n'
stale-issue-label: 'stale'
stale-issue-message: >
This issue is stale because it has been open for 90 days with no activity.
Comment or remove the stale label, otherwise this will be closed in 10 days.
It seems this issue hasn't had any activity in the past 90 days.
If it's still something you'd like addressed, please let us know by leaving a comment.
Otherwise, to help keep our backlog tidy, we'll be closing this issue in 10 days. Thanks!
stale-pr-label: 'stale'
stale-pr-message: >
This PR is stale because it has been open for 90 days with no activity.
Comment or remove the stale label, otherwise this will be closed in 10 days.
It looks like this PR has been idle for 90 days.
If it's still something you're working on or would like to pursue,
please leave a comment or update your branch.
Otherwise, we'll be closing this PR in 10 days to reduce our backlog. Thanks!
repo-token: ${{ secrets.GH_BOT_TOKEN }}
- name: Invalid Template
uses: actions/stale@v6
uses: actions/stale@v9
with:
close-issue-message: >
This issue was closed because the the template was not completed after 5 days.
@@ -45,7 +51,6 @@ jobs:
This PR was closed because the the template was not completed after 5 days.
days-before-stale: 0
days-before-close: 5
exempt-pr-labels: 'dependencies,l10n'
only-labels: 'invalid:template-incomplete'
stale-issue-label: 'invalid:template-incomplete'
stale-issue-message: >

View File

@@ -3,6 +3,8 @@
# 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.
# Label and un-label actions using `../label-actions.yml`.
name: Issues
on:
@@ -14,9 +16,10 @@ on:
jobs:
label:
name: Label Actions
if: startsWith(github.repository, 'LizardByte/')
runs-on: ubuntu-latest
steps:
- name: Label Actions
uses: dessant/label-actions@v2
uses: dessant/label-actions@v4
with:
github-token: ${{ secrets.GH_BOT_TOKEN }}

View File

@@ -20,10 +20,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
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@v4
uses: peter-evans/create-pull-request@v6
with:
add-paths: |
locale/*.po

View File

@@ -1,27 +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: Pull Requests
on:
pull_request_target:
types: [opened, synchronize, edited, reopened]
jobs:
check-pull-request:
name: Check Pull Request
runs-on: ubuntu-latest
steps:
- uses: Vankka/pr-target-branch-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
target: master
exclude: nightly # Don't prevent going from nightly -> master
change-to: nightly
comment: |
Your PR was set to `master`, PRs should be sent to `nightly`.
The base branch of this PR has been automatically changed to `nightly`.
Please check that there are no merge conflicts

View File

@@ -3,6 +3,8 @@
# 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.
# Lint python files with flake8.
name: flake8
on:
@@ -10,21 +12,26 @@ on:
branches: [master, nightly]
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
flake8:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
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'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools flake8
# pin flake8 before v6.0.0 due to removal of support for type comments (required for Python 2.7 type hints)
python -m pip install --upgrade pip setuptools "flake8<6"
- name: Test with flake8
run: |

View File

@@ -3,6 +3,8 @@
# 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.
# Send release notification to various platforms.
name: Release Notifications
on:
@@ -12,10 +14,14 @@ on:
jobs:
discord:
if: >-
startsWith(github.repository, 'LizardByte/') &&
not(github.event.release.prerelease) &&
not(github.event.release.draft)
runs-on: ubuntu-latest
steps:
- name: discord
uses: sarisia/actions-status-discord@v1 # https://github.com/sarisia/actions-status-discord
uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ secrets.DISCORD_RELEASE_WEBHOOK }}
nodetail: true
@@ -27,10 +33,14 @@ jobs:
color: 0xFF4500
facebook_group:
if: >-
startsWith(github.repository, 'LizardByte/') &&
not(github.event.release.prerelease) &&
not(github.event.release.draft)
runs-on: ubuntu-latest
steps:
- name: facebook-post-action
uses: ReenigneArcher/facebook-post-action@v1 # https://github.com/ReenigneArcher/facebook-post-action
uses: ReenigneArcher/facebook-post-action@v1
with:
page_id: ${{ secrets.FACEBOOK_GROUP_ID }}
access_token: ${{ secrets.FACEBOOK_ACCESS_TOKEN }}
@@ -40,10 +50,14 @@ jobs:
url: ${{ github.event.release.html_url }}
facebook_page:
if: >-
startsWith(github.repository, 'LizardByte/') &&
not(github.event.release.prerelease) &&
not(github.event.release.draft)
runs-on: ubuntu-latest
steps:
- name: facebook-post-action
uses: ReenigneArcher/facebook-post-action@v1 # https://github.com/ReenigneArcher/facebook-post-action
uses: ReenigneArcher/facebook-post-action@v1
with:
page_id: ${{ secrets.FACEBOOK_PAGE_ID }}
access_token: ${{ secrets.FACEBOOK_ACCESS_TOKEN }}
@@ -53,10 +67,14 @@ jobs:
url: ${{ github.event.release.html_url }}
reddit:
if: >-
startsWith(github.repository, 'LizardByte/') &&
not(github.event.release.prerelease) &&
not(github.event.release.draft)
runs-on: ubuntu-latest
steps:
- name: reddit
uses: bluwy/release-for-reddit-action@v1 # https://github.com/bluwy/release-for-reddit-action
uses: bluwy/release-for-reddit-action@v2
with:
username: ${{ secrets.REDDIT_USERNAME }}
password: ${{ secrets.REDDIT_PASSWORD }}
@@ -69,13 +87,17 @@ jobs:
comment: ${{ github.event.release.body }}
twitter:
if: >-
startsWith(github.repository, 'LizardByte/') &&
not(github.event.release.prerelease) &&
not(github.event.release.draft)
runs-on: ubuntu-latest
steps:
- name: twitter
uses: ethomson/send-tweet-action@v1 # https://github.com/ethomson/send-tweet-action
uses: nearform-actions/github-action-notify-twitter@v1
with:
consumer-key: ${{ secrets.TWITTER_API_KEY }}
consumer-secret: ${{ secrets.TWITTER_API_SECRET }}
access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
status: ${{ github.event.release.html_url }}
message: ${{ github.event.release.html_url }}
twitter-app-key: ${{ secrets.TWITTER_API_KEY }}
twitter-app-secret: ${{ secrets.TWITTER_API_SECRET }}
twitter-access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
twitter-access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}

62
.github/workflows/update-pages.yml vendored Normal file
View File

@@ -0,0 +1,62 @@
---
name: Build GH-Pages
on:
pull_request:
branches: [master, nightly]
types: [opened, synchronize, reopened]
push:
branches: [master]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
update_pages:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout gh-pages
uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of the personal token
fetch-depth: 0 # otherwise, will fail to push refs to dest repo
- name: Prepare gh-pages
run: |
# empty contents
rm -f -r ./gh-pages/*
# copy template back to pages
cp -f -r ./gh-pages-template/. ./gh-pages/
- name: Upload Artifacts
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
uses: actions/upload-artifact@v4
with:
name: gh-pages
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
path: |
${{ github.workspace }}/gh-pages
!**/*.git
- name: Deploy to gh-pages
if: >-
(github.event_name == 'push' && github.ref == 'refs/heads/master') ||
(github.event_name == 'workflow_dispatch')
uses: actions-js/push@v1.5
with:
github_token: ${{ secrets.GH_BOT_TOKEN }}
author_email: ${{ secrets.GH_BOT_EMAIL }}
author_name: ${{ secrets.GH_BOT_NAME }}
directory: gh-pages
branch: gh-pages
force: false
message: sync gh-pages to ${{ github.sha }}

View File

@@ -3,6 +3,8 @@
# 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.
# Lint yaml files.
name: yaml lint
on:
@@ -10,12 +12,16 @@ on:
branches: [master, nightly]
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
yaml-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Find additional files
id: find-files
@@ -56,6 +62,5 @@ jobs:
file_or_dir: . ${{ steps.find-files.outputs.found }}
- name: Log
if: failure()
run: |
cat "${{ steps.yaml-lint.outputs.logfile }}" >> $GITHUB_STEP_SUMMARY

62
.gitignore vendored
View File

@@ -1,23 +1,49 @@
build
cmake-build*
.DS_Store
.vscode
.vs
*.swp
*.kdev4
# Prerequisites
*.d
.cache
.idea
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Extra FontAwesome files
/src_assets/common/assets/web/fonts/fontawesome-free-web/css/*.css
!/src_assets/common/assets/web/fonts/fontawesome-free-web/css/*min.css
/src_assets/common/assets/web/fonts/fontawesome-free-web/js/
/src_assets/common/assets/web/fonts/fontawesome-free-web/less/
/src_assets/common/assets/web/fonts/fontawesome-free-web/metadata/
/src_assets/common/assets/web/fonts/fontawesome-free-web/scss/
/src_assets/common/assets/web/fonts/fontawesome-free-web/sprites/
/src_assets/common/assets/web/fonts/fontawesome-free-web/svgs/
# 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/
package-lock.json
# Translations
*.mo

58
.gitmodules vendored
View File

@@ -1,18 +1,56 @@
[submodule "moonlight-common-c"]
[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/moonlight-common-c"]
path = third-party/moonlight-common-c
url = https://github.com/moonlight-stream/moonlight-common-c.git
[submodule "Simple-Web-Server"]
path = third-party/Simple-Web-Server
url = https://github.com/loki-47-6F-64/Simple-Web-Server.git
[submodule "ViGEmClient"]
path = third-party/ViGEmClient
url = https://github.com/ViGEm/ViGEmClient
[submodule "third-party/miniupnp"]
path = third-party/miniupnp
url = https://github.com/miniupnp/miniupnp
branch = master
[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/tray"]
path = third-party/tray
url = https://github.com/LizardByte/tray
branch = master
[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
branch = main
[submodule "third-party/wlr-protocols"]
path = third-party/wlr-protocols
url = https://gitlab.freedesktop.org/wlroots/wlr-protocols
branch = master

View File

@@ -8,27 +8,22 @@ version: 2
# Set the version of Python
build:
os: ubuntu-20.04
os: ubuntu-22.04
tools:
python: "3.10"
python: "3.11"
apt_packages:
- graphviz # required to build diagrams
- libboost-locale-dev # required for rstcheck in cpp code block
jobs:
post_build:
- find ./third-party -iname "*.rst" -type f -delete # find and delete rst files in third-party
- rstcheck -r . # lint rst files
# - rstfmt --check --diff -w 120 . # check rst formatting
## apt packages required packages to run cmake on sunshine, note that additional packages are required
# apt_packages:
# - cmake
# - ffmpeg
# - libboost-filesystem-dev
# - libboost-log-dev
# - libboost-thread-dev
## run cmake
# jobs:
# pre_build:
# - cmake .
## Include the submodules, required for cmake
# submodules:
# include: all
# recursive: true
# submodules required for include statements
submodules:
include: all
recursive: true
# Build documentation in the docs/ directory with Sphinx
sphinx:
@@ -42,4 +37,3 @@ formats: all
python:
install:
- requirements: ./docs/requirements.txt
system_packages: true

10
.rstcheck.cfg Normal file
View File

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

View File

@@ -1,17 +1,618 @@
# 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
- (Input/Windows) Add support for Applications (context menu) key
- (Input/Windows) Implement touchpad, motion sensors, battery state, and LED control for the emulated DualShock 4 controller
- (Input) Advertise support for new input features to clients
- (Linux/Debian) Added Debian Bookworm package
- (Prep-Commands) Expose connection environment variables
- (Input/Windows) Implement pen and touch support
- (Capture/Windows) Add standalone NVENC encoder
- (Capture) Implement AV1 encoding
- (Network) Implement IPv6 support
- (Capture/Windows) Add option to disable realtime hags
- (Graphics/NVIDIA) Add an option to decrease GPU scheduling priority to workaround HAGS video hang
- (Capture/Linux) Add FFmpeg powerpc64le architecture for self compiling Sunshine
- (Capture/Windows) Add support for capturing rotated displays
- (System Tray) Implement streaming event notifications
- (UI) Add port configuration table
- (Applications) Added option to automatically treat launcher type apps as detached commands
- (Input/Gamepad) Allow the Misc button to work as Guide on emulated Xbox 360 controllers
**Changed**
- (Input) Reduce latency by implementing input batching
- (Logging) Move input packet debug prints off the control stream thread
- (Input) Refactor gamepad emulation code to use DS4 extended report format
- (Graphics/NVIDIA) Modify and restore NVIDIA control panel settings before and after stream, respectively
- (Graphics/NVIDIA) New config page for NVENC
- (Graphics/Windows) Refactor DX shaders
- (Input/Windows) Use our own keycode mapping to avoid installing the US English keyboard layout
**Fixed**
- (UI) Fix update notifications
- (Dependencies/Linux) Replace libboost chrono and thread with standard chrono and thread
- (Input) Increase maximum gamepad limit to 16
- (Network) Allow use of multiple ENet channels
- (Network) Consider link-local addresses on LAN
- (Input) Fixed issue where button may sometimes stick on Windows
- (Input) Fix "ControllerNumber not allocated" warning when a gamepad is removed
- (Input) Fix handling of gamepad feedback with multiple clients connected
- (Input) Fix clamping mouse position to aspect ratio adjusted viewport
- (Graphics/AMD) Fix crash during startup on some older AMD GPUs
- (Logging) Fix crash when non-ASCII characters are logged
- (Prep-Commands) Fix resource exhaustion bug which could occur when many prep commands were used
- (Subprocesses) Fix race condition when inserting new processes
- (Logging) Log error if encoder doesn't produce IDR frame on demand
- (Audio) Improve audio capture logic and logging
- (Logging) Fix AMF logging to match configured log level
- (Logging) Log FFmpeg to log file instead of stdout
- (Capture) Reject codecs that are not supported by display device
- (Capture) Add fallbacks for unsupported codec settings
- (Capture) Avoid probing HEVC or AV1 codecs in some cases
- (Caputre) Remove DwmFlush()
- (Capture/Windows) Improvements to capture sleeps for better frame stability
- (Capture/Windows) Adjust capture rate to better match with display
- (Linux/ArchLinux) Fix package version in PKGBUILD and precompiled package
- (UI) Highlight fatal log messages in web ui
- (Commands) Allow stream if prep command fails
- (Capture/Linux) Fix KMS grab VRAM capture with libva 2.20
- (Capture/macOS) Fix video capture backend
- (Misc/Windows) Don't start the session monitor window when launched in command mode
- (Linux/AppImage) Use the linuxdeploy GTK plugin to correctly deploy GTK3 dependencies
- (Input/Windows) Fix reWASD not recognizing emulated DualShock 4 input
**Dependencies**
- Bump bootstrap from 5.2.3 to 5.3.2
- Bump third-party/moonlight-common-c from c9426a6 to 7a6d12f
- Bump gcc-10 in Ubuntu 20.04 docker image
- Bump furo from 2023.5.20 to 2023.9.10
- Bump sphinx from 7.0.1 to 7.2.6
- Bump cmake from 3.26 to 3.27 in Fedora docker images
- Move third-party/nv-codec-headers from sdk/11.1 branch to sdk/12.0 branch
- Automatic bump ffmpeg
- Bump actions/checkout from 3 to 4
- Bump boost from 1.80 to 1.81 in Macport manifest
- Bump @fortawesome/fontawesome-free from 6.4.0 to 6.4.2
**Misc**
- (Docs) Force badges to use svg
- (Docs) Add Linux SSH example
- (Docs) Add information about mesa for Linux
- (CI) Free additional space on Docker, Flatpak, and AppImage builds due to internal changes on GitHub runners
- (Docs/Logging/UI) Corrected various typos
- (Docs) Add blurb about Gamescope compatibility
- (Installer/Windows) Use system proxy to download ViGEmBus
- (CI) Ignore third-party directory for clang-format
- (Docs/Linux) Add Plasma-Compatible resolution example
- (Docs) Add Sunshine website available at https://app.lizardbyte.dev/Sunshine
- (Build/Windows) Fix audio code build with new MinGW headers
- (Build/Windows) Fix QoS code build with new MinGW headers
- (CI/Windows) Prevent winget action from creating an update when running in a fork
- (CI/Windows) Change winget job to ubuntu-latest runner
- (CI) Add CodeQL analysis
- (CI/Docker) Fix ArchLinux image caching issue
- (Windows) Manifest improvements
- (CI/macOS) Simplify macport build
- (Docs) Remove deprecated options from readthedocs config
- (CI/Docs) Lint rst files
- (Docs) Update localization information (after consolidating Crowdin projects)
- (Cmake) Split CMakelists into modules
- (Docs) Add Linux Headless/SSH Guide
## [0.20.0] - 2023-05-28
**Breaking**
- (Windows) The Windows installer version of Sunshine is now always launched by the Sunshine Service. Manually launching Sunshine.exe from Program Files is no longer supported. This was necessary to address security issues caused by non-admin users having access to Sunshine's config data. If you have set up Task Scheduler or other mechanisms to launch Sunshine automatically, remove those from your system before updating.
- (Windows) The Start Menu shortcut has been redesigned for use with the Sunshine Service. It now launches Sunshine in the background (if not already running) and opens the Web UI, avoiding the persistent Command Prompt window present in prior versions. The Start Menu shortcut is now the recommended method for opening the Web UI and launching Sunshine.
- (Network/UPnP) If the Moonlight Internet Hosting Tool is installed alongside Sunshine, you must remove it or upgrade to v5.6 or later to prevent conflicts with Sunshine's UPnP support. As a reminder, the Moonlight Internet Hosting Tool is not required to stream over the Internet with Sunshine. Instead, simply enable UPnP in the Sunshine Web UI.
- (Windows) If Steam is installed, the Steam Streaming Speakers driver will be automatically installed when starting a stream for the first time. This behavior can be disabled in the Audio/Video tab of the Web UI. This Steam driver enables support for surround sound and muting host audio without requiring any manual configuration.
- (Input) The Back Button Timeout option has been renamed to Guide Button Emulation Timeout and has been disabled by default to ensure long presses on the Back button work by default. The previous behavior can be restored by setting the Guide Button Emulation Timeout to 2000.
- (Windows) The service name of SunshineSvc has been changed to SunshineService to address a false positive in MalwareBytes. If you have any scripts or other logic on your system that is using the service name, you will need to update that for the new name.
- (Windows) To support new installer features, install-service.bat no longer sets the service to auto-start by default. Users executing install-service.bat manually on the Sunshine portable build must also execute autostart-service.bat to start Sunshine on boot. However, installing the service manually like this is not recommended. Instead, use the Sunshine installer which handles service installation and configuration automatically.
- (Linux/Fedora) Fedora 36 builds are removed due to upstream end of support
**Added**
- (Windows) Added an option to launch apps and prep/undo commands as administrator
- (Installer/Windows) Added an option to choose whether Sunshine launches on boot. If not configured to launch on boot, use the Start Menu shortcut to start Sunshine when desired.
- (Input/Windows) Added option to send VK codes instead of scancodes for compatibility with iOS/Android devices using non-English keyboard layouts
- (UI) The Apply/Restart option is now available in the Web UI for all platforms
- (Systray) Added a Restart option to the system tray context menu
- (Video/Windows) Added host latency data to video frames. This requires future updates to Moonlight to display in the on-screen overlay.
- (Audio) Added support for matching Audio Sink and Virtual Sink values on device names
- (Client) Added friendly error messages for clients when streaming fails to start
- (Video/Windows) Added warning log messages when Windows is hiding DRM-protected content from display capture
- (Interop/Windows) Added warning log messages when GeForce Experience is currently using the same ports as Sunshine
- (Linux/Fedora) Fedora 38 builds are now available
**Changed**
- (Video) Encoder selection now happens at each stream start for more reliable GPU detection
- (Video/Windows) The host display now stays on while clients are actively streaming
- (Audio) Streaming will no longer fail if audio capture is unavailable
- (Audio/Windows) Sunshine will automatically switch back to the Virtual Sink if the default audio device is changed while streaming
- (Audio) Changes to the host audio playback option will now take effect when resuming a session from Moonlight
- (Audio/Windows) Sunshine will switch to a different default audio device if Steam Streaming Speakers are the default when Sunshine starts. This handles cases where Sunshine terminates unexpectedly without restoring the default audio device.
- (Apps) The Connection Terminated dialog will no longer appear in Moonlight when the app on the host exits normally
- (Systray/Windows) Quitting Sunshine via the system tray will now stop the Sunshine Service rather than leaving it running and allowing it to restart Sunshine
- (UI) The 100.64.0.0/10 CGN IP address range is now treated as a LAN address range
- (Video) Removed a workaround for some versions of Moonlight prior to mid-2022
- (UI) The PIN field is now cleared after successfully pairing
- (UI) User names are now treated as case-insensitive
- (Linux) Changed udev rule to automatically grant access to virtual input devices
- (UI) Several item descriptions were adjusted to reflect newer configuration recommendations
- (UI) Placeholder text opacity has been reduced to improve contrast with non-placeholder text
- (Video/Windows) Minor capture performance improvements
**Fixed**
- (Video) VRAM usage while streaming is significantly reduced, particularly with higher display resolutions and HDR
- (Network/UPnP) UPnP support was rewritten to fix several major issues handling router restarts, IP address changes, and port forwarding expiration
- (Input) Fixed modifier keys from the software keyboard on Android clients
- (Audio) Fixed handling of default audio device changes while streaming
- (Windows) Fixed streaming after Microsoft Remote Desktop or Fast User Switching has been used
- (Input) Fixed some games not recognizing emulated Guide button presses
- (Video/Windows) Fixed incorrect gamma when using an Advanced Color SDR display on the host
- (Installer/Windows) The installer is no longer blurry on High DPI systems
- (Systray/Windows) Fixed multiple system tray icons appearing if Sunshine exits unexpectedly
- (Systray/Windows) Fixed the system tray icon not appearing in several situations
- (Windows) Fixed hang on shutdown/restart if mDNS registration fails
- (UI) Fixed missing response headers
- (Stability) Fixed several possible crashes in cases where the client did not successfully connect
- (Stability) Fixed several memory leaks
- (Input/Windows) Back/Select input now correctly generates the Share button when emulating DS4 controllers
- (Audio/Windows) Fixed various bugs in audio-info.exe that led to inaccurate output on some systems
- (Video/Windows) Fixed incorrect resolution values from dxgi-info.exe on High DPI systems
- (Video/Linux) Fixed poor quality encoding from H.264 on Intel encoders
- (Config) Fixed a couple of typos in predefined resolutions
**Dependencies**
- Bump sphinx-copybutton from 0.5.1 to 0.5.2
- Bump sphinx from 6.13 to 7.0.1
- Bump third-party/nv-codec-headers from 2055784 to 2cd175b
- Bump furo from 2023.3.27 to 2023.5.20
**Misc**
- (Build/Linux) Add X11 to PLATFORM_LIBARIES when found
- (Build/macOS) Fix compilation with Clang 14
- (Docs) Fix nvlax URL
- (Docs) Add diagrams using graphviz
- (Docs) Improvements to source code documentation
- (Build) Unpin docker dependencies
- (Build/Linux) Honor install prefix for tray icon
- (Build/Windows) Unstripped binaries are now provided as a debuginfo package to support crash dump debugging
- (Config) Config directories are now created recursively
## [0.19.1] - 2023-03-30
**Fixed**
- (Audio) Fixed no audio issue introduced in v0.19.0
## [0.19.0] - 2023-03-29
**Breaking**
- (Linux/Flatpak) Moved Flatpak to org.freedesktop.Platform 22.08 and Cuda 12.0.0
This will drop support for Nvidia GPUs with compute capability 3.5
**Added**
- (Input) Added option to suppress input from gamepads, keyboards, or mice
- (Input/Linux) Added unicode support for remote pasting (may not work on all DEs)
- (Input/Linux) Added XTest input fallback
- (UI) Added version notifications to web UI
- (Linux/Windows) Add system tray icon
- (Windows) Added ability to safely elevate commands that fail due to insufficient permissions when running as a service
- (Config) Added global prep commands, and ability to exclude an app from using global prep commands
- (Installer/Windows) Automatically install ViGEmBus if selected
**Changed**
- (Logging) Changed client verified messages to debug to prevent spamming the log
- (Config) Only save non default config values
- (Service/Linux) Use xdg-desktop-autostart for systemd service
- (Linux) Added config option to force capture method
- (Windows) Execute prep command in context of current user
- (Linux) Allow disconnected X11 outputs
**Fixed**
- (Input/Windows) Fix issue where internation keys were not translated correct, and modifier keys appeared stuck
- (Linux) Fixed startup when /dev/dri didn't exist
- (UI) Changes software encoding settings to select menu instead of text input
- (Initialization) Do not terminate upon failure, allowing access to the web UI
**Dependencies**
- Bump third-party/moonlight-common-c from 07beb0f to c9426a6
- Bump babel from 2.11.0 to 2.12.1
- Bump @fortawesome/fontawesome-free from 6.2.1 to 6.4.0
- Bump third-party/ViGEmClient from 9e842ba to 726404e
- Bump ffmpeg
- Bump third-party/miniupnp from 014c9df to e439318
- Bump furo from 2022.12.7 to 2023.3.27
- Bump third-party/nanors from 395e5ad to e9e242e
**Misc**
- (GitHub) Shared feature request board with Moonlight
- (Docs) Improved application examples
- (Docs) Added WIP documentation for source code using Doxygen and Breathe
- (Build) Fix linux clang build errors
- (Build/Archlinux) Skip irrelevant submodules
- (Build/Archlinux) Disable download timeout
- (Build/macOS) Support compiling for earlier releases of macOS
- (Docs) Add favicon
- (Docs) Add missing config default values
- (Build) Fix compiler warnings due to depreciated elements in C++17
- (Build) Fix libcurl link errors
- (Clang) Adjusted formatting rules
## [0.18.4] - 2023-02-20
**Fixed**
- (Linux/AUR) Drop support of AUR package
- (Docker) General enhancements to docker images
## [0.18.3] - 2023-02-13
**Added**
- (Linux) Added PKGBUILD for Archlinux based distros to releases
- (Linux) Added precompiled package for Archlinux based distros to releases
- (Docker) Added archlinux docker image (x86_64 only)
## [0.18.2] - 2023-02-13
**Fixed**
- (Video/KMV/Linux) Fixed wayland capture on Nvidia for KMS
- (Video/Linux) Implement vaSyncBuffer stuf for libva <2.9.0
- (UI) Fix issue where mime type was not being set for node_modules when using a reverse proxy
- (UI/macOS) Added missing audio sink config options
- (Linux) Specify correct Boost dependency versions
- (Video/AMF) Add missing encoder tunables
## [0.18.1] - 2023-01-31
**Fixed**
- (Linux) Fixed missing dependencies for deb and rpm packages
- (Linux) Use dynamic boost
## [0.18.0] - 2023-01-29
Attention, this release contains critical security fixes. Please update as soon as possible. Additionally, we are
encouraging users to change your Sunshine password, especially if you expose the web UI (i.e. port 47790 by default)
to the internet, or have ever uploaded your logs with verbose output to a public resource.
**Added**
- (Windows) Add support for Intel QuickSync
- (Linux) Added aarch64 deb and rpm packages
- (Windows) Add support for hybrid graphics systems, such as laptops with both integrated and discrete GPUs
- (Linux) Add support for streaming from Steam Deck Gaming Mode
- (Windows) Add HDR support, see https://docs.lizardbyte.dev/projects/sunshine/en/latest/about/usage.html#hdr-support
**Fixed**
- (Network) Refactor code for UPnP port forwarding
- (Video) Enforce 10 FPS encoding frame rate minimum to improve static image quality
- (Linux) deb and rpm packages are now specific to destination distro and version
- (Docs) Add nvidia/nvenc preset migration guide
- (Network) Performance optimizations
- (Video/Windows) Fix streaming to multiple clients from hardware encoder
- (Linux) Fix child process spawning
- (Security) Fix security vulnerability in implementation of SimpleWebServer
- (Misc) Rename "Steam BigPicture" to "Steam Big Picture" in default apps.json
- (Security) Scrub basic authorization header from logs
- (Linux) The systemd service will now restart in the event of a crash
- (Video/KMS/Linux) Fixed error: `couldn't import RGB Image: 00003002 and 00003004`
- (Video/Windows) Fix stream freezing triggered by the resolution changed
- (Installer/Windows) Fixes silent installation and other miscellaneous improvements
- (CPU) Significantly improved CPU usage
## [0.17.0] - 2023-01-08
If you are running Sunshine as a service on Windows, we are strongly urging you to update to v0.17.0 as soon as
possible. Older Windows versions of Sunshine had a security flaw in which the binary was located in a user-writable
location which is problematic when running as a service or on a multi-user system. Additionally, when running Sunshine
as a service, games and applications were launched as SYSTEM. This could lead to issues with save files and other game
settings. In v0.17.0, games now run under your user account without elevated privileges.
**Breaking**
- (Apps) Removed automatic desktop entry (Re-add by adding an empty application named "Desktop" with no commands, "desktop.png" can be added as the image.)
- (Windows) Improved user upgrade experience (Suggest to manually uninstall existing Sunshine version before this upgrade. Do NOT select to remove everything, if prompted. Make a backup of config files before uninstall.)
- (Windows) Move config files to specific directory (files will be migrated automatically if using Windows installer)
- (Dependencies) Fix npm path (breaking change for package maintainers)
**Added**
- (macOS) Added initial support for arm64 on macOS through Macports portfile
- (Input) Added support for foreign keyboard input
- (Misc) Logs inside the WebUI and log to file
- (UI/Windows) Added an Apply button to configuration page when running as a service
- (Input/Windows) Enable Mouse Keys while streaming for systems with no physical mouse
**Fixed**
- (Video) Improved capture performance
- (Audio) Improved audio bitrate and quality handling
- (Apps/Windows) Fixed PATH environment variable handling
- (Apps/Windows) Use the proper environment variable for the Program Files (x86) folder
- (Service/Windows) Fix SunshineSvc hanging if an error occurs during startup
- (Service/Windows) Spawn Sunshine.exe in a job object, so it is terminated if SunshineSvc.exe dies
- (Video) windows/vram: fix fringing in NV12 colour conversion
- (Apps/Windows) Launch games under the correct user account
- (Video) nvenc, amdvce: rework all user presets/options
- (Network) Generate certificates with unique serial numbers
- (Service/Windows) Graceful termination on shutdown, logoff, and service stop
- (Apps/Windows) Fix launching apps when Sunshine is running as admin
- (Misc) Remove/fix calls to std::abort()
- (Misc) Remove prompt to press enter after Sunshine exits
- (Misc) Make log priority consistent for execution messages
- (Apps) Applications in Moonlight clients are now updated automatically after editing
- (Video/Linux) Fix wayland capture on nvidia
- (Audio) Fix 7.1 surround channel mapping
- (Video) Fix NVENC profile values not applying
- (Network) Fix origin_web_ui_allowed binding
- (Service/Windows) Self terminate/restart service if process hangs for 10 seconds
- (Input/Windows) Fix Windows masked cursor blending with GPU encoders
- (Video) Color conversion fixes and BT.2020 support
**Dependencies**
- Bump ffmpeg from 4.4 to 5.1
- ffmpeg_patches: add amfenc delay/buffering fix
- CBS moved to ffmpeg submodules
- Migrate to upstream Simple-Web-Server submodule
- Bump third-party/TPCircularBuffer from `bce9170` to `8833b3a`
- Bump third-party/moonlight-common-c from `8169a31` to `ef9ad52`
- Bump third-party/miniupnp from `6f848ae` to `207cf44`
- Bump third-party/ViGEmClient from `f719a1d` to `9e842ba`
- Bump bootstrap from 5.0.0 to 5.2.3
- Bump @fortawesome/fontawesome-free from 6.2.0 to 6.2.1
## [0.16.0] - 2022-12-13
**Added**
- Add cover finder
- (Docker) Add arm64 docker image
- (Flatpak) Add installation helper scripts
- (Windows) Add support for Unicode input messages
**Fixed**
- (Linux) Reintroduce Ubuntu 20.04 and 22.04 specific deb packages
- (Linux) Fixed udev and systemd file locations
**Dependencies**
- Bump babel from 2.10.3 to 2.11.0
- Bump sphinx-copybutton from 0.5.0 to 0.5.1
- Bump KSXGitHub/github-actions-deploy-aur from 2.5.0 to 2.6.0
- Use npm for web dependencies (breaking change for third-party package maintainers)
- Update moonlight-common-c
- Use pre-built ffmpeg from LizardByte/build-deps for all sunshine builds (breaking change for third-party package maintainers)
- Bump furo from 2022.9.29 to 2022.12.7
**Misc**
- Misc org level workflow updates
- Fix misc typos in docs
- Fix winget release
## [0.15.0] - 2022-10-30
### Added
**Added**
- (Windows) Add firewall rules scripts
- (Windows) Automatically add and remove firewall rules at install/uninstall
- (Windows) Automatically add and remove service at install/uninstall
- (Docker) Official image added
- (Linux) Add aarch64 flatpak package
### Changed
**Changed**
- (Windows/Linux/MacOS) - Move default config and apps file to assets directory
- (MacOS) Bump boost to 1.80 for macport builds
- (Linux) Remove backup and restore of config files
### Fixed
**Fixed**
- (Linux) - Create sunshine config directory if it doesn't exist
- (Linux) Remove portable home and config directories for AppImage
- (Windows) Include service install and uninstall scripts again
@@ -22,72 +623,79 @@
- (Linux) Fix CUDA RGBA to NV12 conversion
## [0.14.1] - 2022-08-09
### Added
**Added**
- (Linux) Flatpak package added
- (Linux) AUR package automated updates
- (Windows) Winget package automated updates
### Changed
**Changed**
- (General) Moved repo to @LizardByte GitHub org
- (WebUI) Fixed button spacing on home page
- (WebUI) Added Discord WidgetBot Crate
### Fixed
**Fixed**
- (Linux/Mac) Default config and app files now copied to user home directory
- (Windows) Default config and app files now copied to working directory
## [0.14.0] - 2022-06-15
### Added
**Added**
- (Documentation) Added Sphinx documentation available at https://sunshinestream.readthedocs.io/en/latest/
- (Development) Initial support for Localization
- (Linux) Add rpm package as release asset
- (MacOS) Add Portfile as release asset
- (macOS) Add Portfile as release asset
- (Windows) Add DwmFlush() call to improve capture
- (Windows) Add Windows installer
### Fixed
**Fixed**
- (AMD) Fixed hwdevice being destroyed before context
- (Linux) Added missing dependencies to AppImage
- (Linux) Fixed rumble events causing game to freeze
- (Linux) Improved Pulse/Pipewire compatibility
- (Linux) Moved to single deb package
- (MacOS) Fixed missing TPCircularBuffer submodule
- (macOS) Fixed missing TPCircularBuffer submodule
- (Stream) Properly catch exceptions in stream broadcast handlers
- (Stream/Video) AVPacket fix
## [0.13.0] - 2022-02-27
### Added
- (MacOS) Initial support for MacOS (#40)
**Added**
- (macOS) Initial support for macOS (#40)
## [0.12.0] - 2022-02-13
### Added
**Added**
- New command line argument `--version`
- Custom png poster support
### Changed
**Changed**
- Correct software bitrate calculation
- Increase vbv-bufsize to 1/10 of requested bitrate
- Improvements to Web UI
## [0.11.1] - 2021-10-04
### Changed
**Changed**
- (Linux) Fix search path for config file and assets
## [0.11.0] - 2021-10-04
### Added
**Added**
- (Linux) Added support for wlroots based compositors on Wayland.
- (Windows) Added an icon for the executable
### Changed
**Changed**
- Fixed a bug causing segfault when connecting multiple controllers.
- (Linux) Improved NVENC, it now offloads converting images from RGB to NV12
- (Linux) Fixed a bug causes stuttering
## [0.10.1] - 2021-08-21
### Changed
**Changed**
- (Linux) Re-enabled KMS
## [0.10.0] - 2021-08-20
### Added
**Added**
- Added support for Rumble with gamepads.
- Added support for keyboard shortcuts <--- See the README for details.
- (Windows) A very basic script has been added in Sunshine-Windows\tools <-- This will start Sunshine at boot with the highest privileges which is needed to display the login prompt.
### Changed
**Changed**
- Some cosmetic changes to the WebUI.
- The first time the WebUI is opened, it will request the creation of a username/password pair from the user.
- Fixed audio crackling introduced in version 0.8.0
@@ -95,54 +703,58 @@
- (Windows) Installing from debian package shouldn't overwrite your configuration files anymore. <-- It's recommended that you back up `/etc/sunshine/` before testing this.
## [0.9.0] - 2021-07-11
### Added
**Added**
- Added audio encryption
- (Linux) Added basic NVENC support on Linux
- (Windows) The Windows version can now capture the lock screen and the UAC prompt as long as it's run through `PsExec.exe` https://docs.microsoft.com/en-us/sysinternals/downloads/psexec
### Changed
**Changed**
- Sunshine will now accept expired or not-yet-valid certificates, as long as they are signed properly.
- Fixed compatibility with iOS version of Moonlight
- Drastically reduced chance of being forced to skip error correction due to video frame size
- (Linux) sunshine.service will be installed automatically.
## [0.8.0] - 2021-06-30
### Added
**Added**
- Added mDNS support: Moonlight will automatically find Sunshine.
- Added UPnP support. It's off by default.
## [0.7.7] - 2021-06-24
### Added
**Added**
- (Linux) Added installation package for Debian
### Changed
**Changed**
- Fixed incorrect scaling for absolute mouse coordinates when using multiple monitors.
- Fixed incorrect colors when scaling for software encoder
## [0.7.1] - 2021-06-18
### Changed
**Changed**
- (Linux) Fixed an issue where it was impossible to start sunshine on ubuntu 20.04
## [0.7.0] - 2021-06-16
### Added
**Added**
- Added a Web Manager. Accessible through: https://localhost:47990 or https://<ip of your pc>:47990
- (Linux) Added hardware encoding support for AMD on Linux
### Changed
**Changed**
- (Linux) Moved certificates and saved pairings generated during runtime to .config/sunshine on Linux
## [0.6.0] - 2021-05-26
### Added
**Added**
- Added support for surround audio
### Changed
**Changed**
- Maintain aspect ratio when scaling video
- Fix issue where Sunshine is forced to drop frames when they are too large
## [0.5.0] - 2021-05-13
### Added
**Added**
- Added support for absolute mouse coordinates
- (Linux) Added support for streaming specific monitor on Linux
- (Windows) Added support for AMF on Windows
## [0.4.0] - 2020-05-03
### Changed
**Changed**
- prep-cmd is now optional in apps.json
- Fixed bug causing video artifacts
- Fixed bug preventing Moonlight from closing app on exit
@@ -151,23 +763,62 @@
- Fixed bug causing crash when monitor has resolution 1366x768
## [0.3.1] - 2020-04-24
### Changed
**Changed**
- Fix a memory leak.
## [0.3.0] - 2020-04-23
### Changed
**Changed**
- Hardware acceleration on NVidia GPU's for Video encoding on Windows
## [0.2.0] - 2020-03-21
### Changed
**Changed**
- Multicasting is now supported: You can set the maximum simultaneous connections with the configurable option: channels
- Configuration variables can be overwritten on the command line: "name=value" --> it can be useful to set min_log_level=debug without modifying the configuration file
- Switches to make testing the pairing mechanism more convenient has been added, see "sunshine --help" for details
## [0.1.1] - 2020-01-30
### Added
**Added**
- (Linux) Added deb package and service for Linux
## [0.1.0] - 2020-01-27
### Added
**Added**
- The first official release for Sunshine!
[0.1.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.1.0
[0.1.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.1.1
[0.2.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.2.0
[0.3.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.3.0
[0.3.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.3.1
[0.4.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.4.0
[0.5.0]: https://github.com/LizardByte/Sunshine/releases/tag/0.5.0
[0.6.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.6.0
[0.7.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.7.0
[0.7.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.7.1
[0.7.7]: https://github.com/LizardByte/Sunshine/releases/tag/v0.7.7
[0.8.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.8.0
[0.9.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.9.0
[0.10.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.10.0
[0.10.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.10.1
[0.11.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.11.0
[0.11.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.11.1
[0.12.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.12.0
[0.13.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.13.0
[0.14.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.14.0
[0.14.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.14.1
[0.15.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.15.0
[0.16.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.16.0
[0.17.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.17.0
[0.18.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.18.0
[0.18.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.18.1
[0.18.2]: https://github.com/LizardByte/Sunshine/releases/tag/v0.18.2
[0.18.3]: https://github.com/LizardByte/Sunshine/releases/tag/v0.18.3
[0.18.4]: https://github.com/LizardByte/Sunshine/releases/tag/v0.18.4
[0.19.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.19.0
[0.19.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.19.1
[0.20.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.20.0
[0.21.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.21.0
[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,656 +1,59 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.18)
# `CMAKE_CUDA_ARCHITECTURES` requires 3.18
# set_source_files_properties requires 3.18
# todo - set this conditionally
project(Sunshine VERSION 0.15.0
DESCRIPTION "Sunshine is a Gamestream host for Moonlight."
HOMEPAGE_URL "https://app.lizardbyte.dev"
)
# todo - set version to 0.0.0 once confident in automated versioning
project(Sunshine VERSION 0.23.1
DESCRIPTION "Self-hosted game stream host for Moonlight"
HOMEPAGE_URL "https://app.lizardbyte.dev/Sunshine")
set(PROJECT_LONG_DESCRIPTION "Sunshine is a self hosted, low latency, cloud gaming solution with support for AMD, \
Intel, and Nvidia GPUs. It is an open source implementation of NVIDIA's GameStream, as used by the NVIDIA Shield. \
Connect to Sunshine from any Moonlight client, available for nearly any device imaginable.")
set(PROJECT_LICENSE "GPL-3.0")
option(SUNSHINE_CONFIGURE_APPIMAGE "Configuration specific for AppImage." OFF)
option(SUNSHINE_CONFIGURE_AUR "Configure files required for AUR." OFF)
option(SUNSHINE_CONFIGURE_FLATPAK_MAN "Configure manifest file required for Flatpak build." OFF)
option(SUNSHINE_CONFIGURE_FLATPAK "Configuration specific for Flatpak." OFF)
option(SUNSHINE_CONFIGURE_PORTFILE "Configure macOS Portfile." OFF)
option(SUNSHINE_CONFIGURE_ONLY "Configure special files only, then exit." OFF)
set(PROJECT_LONG_DESCRIPTION "Offering low latency, cloud gaming server capabilities with support for AMD, Intel, \
and Nvidia GPUs for hardware encoding. Software encoding is also available. You can connect to Sunshine from any \
Moonlight client on a variety of devices. A web UI is provided to allow configuration, and client pairing, from \
your favorite web browser. Pair from the local server or any mobile device.")
if(${SUNSHINE_CONFIGURE_APPIMAGE})
configure_file(packaging/linux/sunshine.desktop sunshine.desktop @ONLY)
elseif(${SUNSHINE_CONFIGURE_AUR})
configure_file(packaging/linux/aur/PKGBUILD PKGBUILD @ONLY)
elseif(${SUNSHINE_CONFIGURE_FLATPAK_MAN})
configure_file(packaging/linux/flatpak/dev.lizardbyte.sunshine.yml dev.lizardbyte.sunshine.yml @ONLY)
elseif(${SUNSHINE_CONFIGURE_PORTFILE})
configure_file(packaging/macos/Portfile Portfile @ONLY)
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'Release' as none was specified.")
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build." FORCE)
endif()
# return if configure only is set
if(${SUNSHINE_CONFIGURE_ONLY})
return()
# set the module path, used for includes
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
# set version info for this build
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)
# Exit early if END_BUILD is ON, i.e. when only generating package manifests
if(${END_BUILD})
return()
endif()
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
set(SUNSHINE_SOURCE_ASSETS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src_assets")
# project constants
include(${CMAKE_MODULE_PATH}/prep/constants.cmake)
if(WIN32)
# Ugly hack to compile with #include <qos2.h>
add_compile_definitions(
QOS_FLOWID=UINT32
PQOS_FLOWID=UINT32*
QOS_NON_ADAPTIVE_FLOW=2)
endif()
if(APPLE)
macro(ADD_FRAMEWORK fwname appname)
find_library(FRAMEWORK_${fwname}
NAMES ${fwname}
PATHS ${CMAKE_OSX_SYSROOT}/System/Library
PATH_SUFFIXES Frameworks
NO_DEFAULT_PATH)
if( ${FRAMEWORK_${fwname}} STREQUAL FRAMEWORK_${fwname}-NOTFOUND)
MESSAGE(ERROR ": Framework ${fwname} not found")
else()
TARGET_LINK_LIBRARIES(${appname} "${FRAMEWORK_${fwname}}/${fwname}")
MESSAGE(STATUS "Framework ${fwname} found at ${FRAMEWORK_${fwname}}")
endif()
endmacro(ADD_FRAMEWORK)
endif()
# load macros
include(${CMAKE_MODULE_PATH}/macros/common.cmake)
add_subdirectory(third-party/moonlight-common-c/enet)
add_subdirectory(third-party/Simple-Web-Server)
# load dependencies
include(${CMAKE_MODULE_PATH}/dependencies/common.cmake)
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(third-party/miniupnp)
# setup compile definitions
include(${CMAKE_MODULE_PATH}/compile_definitions/common.cmake)
find_package(Threads REQUIRED)
find_package(OpenSSL REQUIRED)
if(NOT APPLE)
set(Boost_USE_STATIC_LIBS ON)
endif()
find_package(Boost COMPONENTS log filesystem REQUIRED)
# target definitions
include(${CMAKE_MODULE_PATH}/targets/common.cmake)
list(APPEND SUNSHINE_COMPILE_OPTIONS -Wall -Wno-missing-braces -Wno-maybe-uninitialized -Wno-sign-compare)
if(WIN32)
enable_language(RC)
set(CMAKE_RC_COMPILER windres)
file(
DOWNLOAD "https://github.com/TheElixZammuto/sunshine-prebuilt/releases/download/1.0.0/pre-compiled.zip" "${CMAKE_CURRENT_BINARY_DIR}/pre-compiled.zip"
TIMEOUT 60
EXPECTED_HASH SHA256=5d59986bd7f619eaaf82b2dd56b5127b747c9cbe8db61e3b898ff6b485298ed6)
file(ARCHIVE_EXTRACT
INPUT "${CMAKE_CURRENT_BINARY_DIR}/pre-compiled.zip"
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/pre-compiled)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
if(NOT DEFINED SUNSHINE_PREPARED_BINARIES)
set(SUNSHINE_PREPARED_BINARIES "${CMAKE_CURRENT_BINARY_DIR}/pre-compiled/windows")
endif()
add_compile_definitions(SUNSHINE_PLATFORM="windows")
add_subdirectory(tools) # This is temporary, only tools for Windows are needed, for now
include_directories(third-party/ViGEmClient/include)
if(NOT DEFINED SUNSHINE_ICON_PATH)
set(SUNSHINE_ICON_PATH "${CMAKE_CURRENT_SOURCE_DIR}/sunshine.ico")
endif()
configure_file(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)
set(OPENSSL_LIBRARIES
libssl.a
libcrypto.a)
set(FFMPEG_INCLUDE_DIRS
${SUNSHINE_PREPARED_BINARIES}/include)
set(FFMPEG_LIBRARIES
${SUNSHINE_PREPARED_BINARIES}/lib/libavcodec.a
${SUNSHINE_PREPARED_BINARIES}/lib/libavdevice.a
${SUNSHINE_PREPARED_BINARIES}/lib/libavfilter.a
${SUNSHINE_PREPARED_BINARIES}/lib/libavformat.a
${SUNSHINE_PREPARED_BINARIES}/lib/libavutil.a
${SUNSHINE_PREPARED_BINARIES}/lib/libpostproc.a
${SUNSHINE_PREPARED_BINARIES}/lib/libswresample.a
${SUNSHINE_PREPARED_BINARIES}/lib/libswscale.a
${SUNSHINE_PREPARED_BINARIES}/lib/libx264.a
${SUNSHINE_PREPARED_BINARIES}/lib/libx265.a
${SUNSHINE_PREPARED_BINARIES}/lib/libhdr10plus.a
z lzma bcrypt libiconv.a)
list(PREPEND PLATFORM_LIBRARIES
libstdc++.a
libwinpthread.a
libssp.a
ksuser
wsock32
ws2_32
d3d11 dxgi D3DCompiler
setupapi
dwmapi
)
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")
elseif(APPLE)
add_compile_definitions(SUNSHINE_PLATFORM="macos")
option(SUNSHINE_MACOS_PACKAGE "Should only be used when creating a MACOS package/dmg." OFF)
link_directories(/opt/local/lib)
link_directories(/usr/local/lib)
ADD_DEFINITIONS(-DBOOST_LOG_DYN_LINK)
find_package(FFmpeg REQUIRED)
FIND_LIBRARY(APP_SERVICES_LIBRARY ApplicationServices )
FIND_LIBRARY(AV_FOUNDATION_LIBRARY AVFoundation )
FIND_LIBRARY(CORE_MEDIA_LIBRARY CoreMedia )
FIND_LIBRARY(CORE_VIDEO_LIBRARY CoreVideo )
FIND_LIBRARY(FOUNDATION_LIBRARY Foundation )
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
${APP_SERVICES_LIBRARY}
${AV_FOUNDATION_LIBRARY}
${CORE_MEDIA_LIBRARY}
${CORE_VIDEO_LIBRARY}
${FOUNDATION_LIBRARY})
set(PLATFORM_INCLUDE_DIRS
${Boost_INCLUDE_DIR})
set(APPLE_PLIST_FILE ${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/Info.plist)
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.cpp
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
${APPLE_PLIST_FILE})
else()
add_compile_definitions(SUNSHINE_PLATFORM="linux")
option(SUNSHINE_ENABLE_DRM "Enable KMS grab if available" ON)
option(SUNSHINE_ENABLE_X11 "Enable X11 grab if available" ON)
option(SUNSHINE_ENABLE_WAYLAND "Enable building wayland specific code" ON)
option(SUNSHINE_ENABLE_CUDA "Enable cuda specific code" ON)
if(${SUNSHINE_ENABLE_X11})
find_package(X11)
else()
set(X11_FOUND OFF)
endif()
set(CUDA_FOUND OFF)
if(${SUNSHINE_ENABLE_CUDA})
include(CheckLanguage)
check_language(CUDA)
if(CMAKE_CUDA_COMPILER)
if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
set(CMAKE_CUDA_ARCHITECTURES 35)
endif()
set(CUDA_FOUND ON)
enable_language(CUDA)
endif()
endif()
if(${SUNSHINE_ENABLE_DRM})
find_package(LIBDRM)
find_package(LIBCAP)
else()
set(LIBDRM_FOUND OFF)
set(LIBCAP_FOUND OFF)
endif()
if(${SUNSHINE_ENABLE_WAYLAND})
find_package(Wayland)
else()
set(WAYLAND_FOUND OFF)
endif()
find_package(FFMPEG REQUIRED)
if(X11_FOUND)
add_compile_definitions(SUNSHINE_BUILD_X11)
include_directories(${X11_INCLUDE_DIR})
list(APPEND PLATFORM_TARGET_FILES src/platform/linux/x11grab.cpp)
endif()
if(CUDA_FOUND)
include_directories(third-party/nvfbc)
list(APPEND PLATFORM_TARGET_FILES
src/platform/linux/cuda.cu
src/platform/linux/cuda.cpp
third-party/nvfbc/NvFBC.h)
add_compile_definitions(SUNSHINE_BUILD_CUDA)
endif()
if(LIBDRM_FOUND AND LIBCAP_FOUND)
add_compile_definitions(SUNSHINE_BUILD_DRM)
include_directories(${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 SUNSHINE_DEFINITIONS EGL_NO_X11=1)
elseif(LIBDRM_FOUND)
message(WARNING "Found libdrm, yet there is no libcap")
elseif(LIBDRM_FOUND)
message(WARNING "Found libcap, yet there is no libdrm")
endif()
if(WAYLAND_FOUND)
add_compile_definitions(SUNSHINE_BUILD_WAYLAND)
macro(genWayland FILENAME)
make_directory(${CMAKE_BINARY_DIR}/generated-src)
message("wayland-scanner private-code ${CMAKE_SOURCE_DIR}/third-party/wayland-protocols/${FILENAME}.xml ${CMAKE_BINARY_DIR}/generated-src/${FILENAME}.c")
message("wayland-scanner client-header ${CMAKE_SOURCE_DIR}/third-party/wayland-protocols/${FILENAME}.xml ${CMAKE_BINARY_DIR}/generated-src/${FILENAME}.h")
execute_process(
COMMAND wayland-scanner private-code ${CMAKE_SOURCE_DIR}/third-party/wayland-protocols/${FILENAME}.xml ${CMAKE_BINARY_DIR}/generated-src/${FILENAME}.c
COMMAND wayland-scanner client-header ${CMAKE_SOURCE_DIR}/third-party/wayland-protocols/${FILENAME}.xml ${CMAKE_BINARY_DIR}/generated-src/${FILENAME}.h
RESULT_VARIABLE EXIT_INT
)
if(NOT ${EXIT_INT} EQUAL 0)
message(FATAL_ERROR "wayland-scanner failed")
endif()
list(APPEND PLATFORM_TARGET_FILES
${CMAKE_BINARY_DIR}/generated-src/${FILENAME}.c
${CMAKE_BINARY_DIR}/generated-src/${FILENAME}.h
)
endmacro()
genWayland(xdg-output-unstable-v1)
genWayland(wlr-export-dmabuf-unstable-v1)
include_directories(
${WAYLAND_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}/generated-src
)
list(APPEND PLATFORM_LIBRARIES ${WAYLAND_LIBRARIES})
list(APPEND PLATFORM_TARGET_FILES
src/platform/linux/wlgrab.cpp
src/platform/linux/wayland.cpp)
endif()
if(NOT ${X11_FOUND} AND NOT (${LIBDRM_FOUND} AND ${LIBCAP_FOUND}) AND NOT ${WAYLAND_FOUND} AND NOT ${})
message(FATAL_ERROR "Couldn't find either x11, wayland, cuda or (libdrm and libcap)")
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)
list(APPEND PLATFORM_LIBRARIES
dl
evdev
pulse
pulse-simple
)
include_directories(
/usr/include/libevdev-1.0
third-party/nv-codec-headers/include
third-party/glad/include)
if(NOT DEFINED SUNSHINE_EXECUTABLE_PATH)
set(SUNSHINE_EXECUTABLE_PATH "sunshine")
endif()
configure_file(sunshine.service.in sunshine.service @ONLY)
endif()
configure_file(version.h.in version.h @ONLY)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
set(SUNSHINE_TARGET_FILES
third-party/moonlight-common-c/reedsolomon/rs.c
third-party/moonlight-common-c/reedsolomon/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
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/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/task_pool.h
src/thread_pool.h
src/thread_safe.h
src/sync.h
src/round_robin.h
${PLATFORM_TARGET_FILES})
set_source_files_properties(src/upnp.cpp PROPERTIES COMPILE_FLAGS -Wno-pedantic)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/third-party
${CMAKE_CURRENT_SOURCE_DIR}/third-party/cbs/include
${CMAKE_CURRENT_SOURCE_DIR}/third-party/moonlight-common-c/enet/include
${CMAKE_CURRENT_SOURCE_DIR}/third-party/moonlight-common-c/reedsolomon
${FFMPEG_INCLUDE_DIRS}
${PLATFORM_INCLUDE_DIRS}
)
add_subdirectory(third-party/cbs)
string(TOUPPER "x${CMAKE_BUILD_TYPE}" BUILD_TYPE)
if("${BUILD_TYPE}" STREQUAL "XDEBUG")
list(APPEND SUNSHINE_COMPILE_OPTIONS -O0 -ggdb3)
if(WIN32)
set_source_files_properties(src/nvhttp.cpp PROPERTIES COMPILE_FLAGS -O2)
endif()
else()
add_definitions(-DNDEBUG)
list(APPEND SUNSHINE_COMPILE_OPTIONS -O3)
endif()
# setup assets directory
if(NOT SUNSHINE_ASSETS_DIR)
set(SUNSHINE_ASSETS_DIR "assets")
endif()
if(UNIX)
set(SUNSHINE_ASSETS_DIR "${CMAKE_INSTALL_PREFIX}/${SUNSHINE_ASSETS_DIR}")
endif()
# use relative assets path for AppImage... maybe for all unix
if(${SUNSHINE_CONFIGURE_APPIMAGE})
string(REPLACE "${CMAKE_INSTALL_PREFIX}" ".${CMAKE_INSTALL_PREFIX}" SUNSHINE_ASSETS_DIR_DEF ${SUNSHINE_ASSETS_DIR})
else()
set(SUNSHINE_ASSETS_DIR_DEF "${SUNSHINE_ASSETS_DIR}")
endif()
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_ASSETS_DIR="${SUNSHINE_ASSETS_DIR_DEF}")
list(APPEND CBS_EXTERNAL_LIBRARIES
cbs)
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
libminiupnpc-static
${CBS_EXTERNAL_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
enet
opus
${FFMPEG_LIBRARIES}
${Boost_LIBRARIES}
${OPENSSL_LIBRARIES}
${PLATFORM_LIBRARIES})
if(NOT WIN32)
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES Boost::log)
endif()
add_executable(sunshine ${SUNSHINE_TARGET_FILES})
target_link_libraries(sunshine ${SUNSHINE_EXTERNAL_LIBRARIES} ${EXTRA_LIBS})
target_compile_definitions(sunshine PUBLIC ${SUNSHINE_DEFINITIONS})
set_target_properties(sunshine PROPERTIES CXX_STANDARD 17
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR}
)
if(NOT DEFINED CMAKE_CUDA_STANDARD)
set(CMAKE_CUDA_STANDARD 17)
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
endif()
if(APPLE)
target_link_options(sunshine PRIVATE LINKER:-sectcreate,__TEXT,__info_plist,${APPLE_PLIST_FILE})
endif()
foreach(flag IN LISTS SUNSHINE_COMPILE_OPTIONS)
list(APPEND SUNSHINE_COMPILE_OPTIONS_CUDA "$<$<COMPILE_LANGUAGE:CUDA>:--compiler-options=${flag}>")
endforeach()
target_compile_options(sunshine PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${SUNSHINE_COMPILE_OPTIONS}>;$<$<COMPILE_LANGUAGE:CUDA>:${SUNSHINE_COMPILE_OPTIONS_CUDA};-std=c++17>)
# CPACK / Packaging
# Common options
set(CPACK_PACKAGE_NAME "Sunshine")
set(CPACK_PACKAGE_VENDOR "LizardByte")
set(CPACK_PACKAGE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cpack_artifacts)
set(CPACK_PACKAGE_CONTACT "https://app.lizardbyte.dev")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "https://github.com/LizardByte")
set(CPACK_PACKAGE_DESCRIPTION ${CMAKE_PROJECT_DESCRIPTION})
set(CPACK_PACKAGE_HOMEPAGE_URL ${CMAKE_PROJECT_HOMEPAGE_URL})
set(CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/LICENSE)
set(CPACK_PACKAGE_ICON ${PROJECT_SOURCE_DIR}/sunshine.png)
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}")
set(CPACK_STRIP_FILES YES)
# Platform specific options
if(WIN32) # see options at: https://cmake.org/cmake/help/latest/cpack_gen/nsis.html
install(TARGETS sunshine RUNTIME DESTINATION "." COMPONENT application)
# Adding tools
install(TARGETS dxgi-info RUNTIME DESTINATION "tools" COMPONENT dxgi)
install(TARGETS audio-info RUNTIME DESTINATION "tools" COMPONENT audio)
install(TARGETS sunshinesvc RUNTIME DESTINATION "tools" COMPONENT sunshinesvc)
# scripts
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/firewall/" DESTINATION "scripts" COMPONENT firewall)
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/service/" DESTINATION "scripts" COMPONENT service)
# 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)
# set(CPACK_NSIS_MUI_HEADERIMAGE "") # TODO: image should be 150x57 bmp
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\sunshine.ico")
set(CPACK_NSIS_INSTALLED_ICON_NAME "${PROJECT__DIR}\\\\${PROJECT_EXE}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}") # The name of the directory that will be created in C:/Program files/
string(APPEND CPACK_NSIS_DEFINES "\n RequestExecutionLevel admin") # TODO: Not sure if this is needed but it took me a while to figure out where to put this option so I'm leaving it here
# Extra install commands
# Sets permissions on the installed folder so that we can write in it
# Install service
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
"${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}
ExecWait 'icacls \\\"$INSTDIR\\\" /grant:r Users:\\\(OI\\\)\\\(CI\\\)\\\(F\\\)'
ExecWait '\\\"$INSTDIR\\\\scripts\\\\add-firewall-rule.bat\\\"'
ExecWait '\\\"$INSTDIR\\\\scripts\\\\install-service.bat\\\"'
")
# Extra uninstall commands
# Uninstall service
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
"${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}
ExecWait '\\\"$INSTDIR\\\\scripts\\\\delete-firewall-rule.bat\\\"'
ExecWait '\\\"$INSTDIR\\\\scripts\\\\uninstall-service.bat\\\"'
MessageBox MB_YESNO|MB_ICONQUESTION 'Do you want to completely remove the directory $INSTDIR and all of its contents?' IDNO NoDelete
RMDir /r \\\"$INSTDIR\\\" ; skipped if no
NoDelete:
")
# Adding an option for the start menu and PATH
set(CPACK_NSIS_MODIFY_PATH "OFF") # TODO: it asks to add it to the PATH but is not working https://gitlab.kitware.com/cmake/cmake/-/issues/15635
set(CPACK_NSIS_EXECUTABLES_DIRECTORY ".")
set(CPACK_NSIS_MUI_FINISHPAGE_RUN "${CMAKE_PROJECT_NAME}.exe")
set(CPACK_NSIS_INSTALLED_ICON_NAME "${CMAKE_PROJECT_NAME}.exe") # This will be shown on the installed apps Windows settings
set(CPACK_NSIS_CREATE_ICONS_EXTRA
"${CPACK_NSIS_CREATE_ICONS_EXTRA}
CreateShortCut '\$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\${CMAKE_PROJECT_NAME}.lnk' '\$INSTDIR\\\\${CMAKE_PROJECT_NAME}.exe'
")
set(CPACK_NSIS_DELETE_ICONS_EXTRA
"${CPACK_NSIS_DELETE_ICONS_EXTRA}
Delete '\$SMPROGRAMS\\\\$MUI_TEMP\\\\${CMAKE_PROJECT_NAME}.lnk'
")
# Checking for previous installed versions
# set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL "ON") # TODO: doesn't work on my machine when Sunshine is already installed
set(CPACK_NSIS_HELP_LINK "https://docs.lizardbyte.dev/projects/sunshine/en/latest/about/installation.html")
set(CPACK_NSIS_URL_INFO_ABOUT "${CMAKE_PROJECT_HOMEPAGE_URL}")
set(CPACK_NSIS_CONTACT "${CMAKE_PROJECT_HOMEPAGE_URL}/support")
# Setting components groups and dependencies
# sunshine binary
set(CPACK_COMPONENT_APPLICATION_DISPLAY_NAME "${CMAKE_PROJECT_NAME}")
set(CPACK_COMPONENT_APPLICATION_DESCRIPTION "${CMAKE_PROJECT_NAME} main application.")
set(CPACK_COMPONENT_APPLICATION_GROUP "core")
set(CPACK_COMPONENT_APPLICATION_REQUIRED true)
set(CPACK_COMPONENT_APPLICATION_DEPENDS assets)
# assets
set(CPACK_COMPONENT_ASSETS_DISPLAY_NAME "assets")
set(CPACK_COMPONENT_ASSETS_DESCRIPTION "Shaders, default box art, and web ui.")
set(CPACK_COMPONENT_ASSETS_GROUP "core")
set(CPACK_COMPONENT_ASSETS_REQUIRED true)
# audio tool
set(CPACK_COMPONENT_AUDIO_DISPLAY_NAME "audio-info")
set(CPACK_COMPONENT_AUDIO_DESCRIPTION "CLI tool providing information about sound devices.")
set(CPACK_COMPONENT_AUDIO_GROUP "tools")
# display tool
set(CPACK_COMPONENT_DXGI_DISPLAY_NAME "dxgi-info")
set(CPACK_COMPONENT_DXGI_DESCRIPTION "CLI tool providing information about graphics cards and displays.")
set(CPACK_COMPONENT_DXGI_GROUP "tools")
# service
set(CPACK_COMPONENT_SUNSHINESVC_DISPLAY_NAME "sunshinesvc")
set(CPACK_COMPONENT_SUNSHINESVC_DESCRIPTION "CLI tool providing ability to enable/disable the Sunshine service.")
set(CPACK_COMPONENT_SUNSHINESVC_GROUP "tools")
# service scripts
set(CPACK_COMPONENT_SERVICE_DISPLAY_NAME "service-scripts")
set(CPACK_COMPONENT_SERVICE_DESCRIPTION "Scripts to enable/disable the service.")
set(CPACK_COMPONENT_SERVICE_GROUP "scripts")
set(CPACK_COMPONENT_SERVICE_DEPENDS sunshinesvc)
# firewall scripts
set(CPACK_COMPONENT_FIREWALL_DISPLAY_NAME "firewall-scripts")
set(CPACK_COMPONENT_FIREWALL_DESCRIPTION "Scripts to enable or disable firewall rules.")
set(CPACK_COMPONENT_FIREWALL_GROUP "scripts")
endif()
if(APPLE)
# TODO: bundle doesn't produce a valid .app use cpack -G DragNDrop
set(CPACK_BUNDLE_NAME "${CMAKE_PROJECT_NAME}")
set(CPACK_BUNDLE_PLIST "${APPLE_PLIST_FILE}")
set(CPACK_BUNDLE_ICON "${PROJECT_SOURCE_DIR}/sunshine.icns")
# set(CPACK_BUNDLE_STARTUP_COMMAND "${INSTALL_RUNTIME_DIR}/sunshine")
endif()
if(APPLE AND SUNSHINE_MACOS_PACKAGE) # TODO
set(prefix "${CMAKE_PROJECT_NAME}.app/Contents")
set(INSTALL_RUNTIME_DIR "${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)
elseif(UNIX)
# Installation destination dir
set(CPACK_SET_DESTDIR true)
if(NOT CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "/usr/share/sunshine")
endif()
install(TARGETS sunshine RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/" DESTINATION "${SUNSHINE_ASSETS_DIR}")
if(APPLE)
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}")
else()
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/assets/" DESTINATION "${SUNSHINE_ASSETS_DIR}")
if(${SUNSHINE_CONFIGURE_APPIMAGE} OR ${SUNSHINE_CONFIGURE_FLATPAK})
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/85-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_LIBDIR}/udev/rules.d")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service" DESTINATION "${CMAKE_INSTALL_LIBDIR}/systemd/user")
endif()
# Post install
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/postinst")
set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/postinst")
# Dependencies
set(CPACK_DEB_COMPONENT_INSTALL ON)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "openssl, libavdevice58, libboost-thread1.67.0 | libboost-thread1.71.0 | libboost-thread1.74.0, libboost-filesystem1.67.0 | libboost-filesystem1.71.0 | libboost-filesystem1.74.0, libboost-log1.67.0 | libboost-log1.71.0 | libboost-log1.74.0, libpulse0, libopus0, libxcb-shm0, libxcb-xfixes0, libxtst6, libevdev2, libdrm2, libcap2")
set(CPACK_RPM_PACKAGE_REQUIRES "openssl >= 1.1, libavdevice >= 4.3, boost-thread >= 1.67.0, boost-filesystem >= 1.67.0, boost-log >= 1.67.0, pulseaudio-libs >= 10.0, libopusenc >= 0.2.1, libxcb >= 1.13, libXtst >= 1.2.3, libevdev >= 1.5.6, libdrm >= 2.4.97, libcap >= 2.22")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) # This should automatically figure out dependencies, doesn't work with the current config
endif()
endif()
include(CPack)
# packaging
include(${CMAKE_MODULE_PATH}/packaging/common.cmake)

View File

@@ -1,17 +1,44 @@
# Docker
## Important note
Starting with v0.18.0, tag names have changed. You may no longer use `latest`, `master`, `vX.X.X`.
## Build your own containers
This image provides a method for you to easily use the latest Sunshine release in your own docker projects. It is not
intended to use as a standalone container at this point, and should be considered experimental.
```dockerfile
FROM lizardbyte/sunshine
ARG SUNSHINE_VERSION=latest
ARG SUNSHINE_OS=ubuntu-22.04
FROM lizardbyte/sunshine:${SUNSHINE_VERSION}-${SUNSHINE_OS}
# install Steam, Wayland, etc.
ENTRYPOINT steam && sunshine
```
### SUNSHINE_VERSION
- `latest`, `master`, `vX.X.X`
- `nightly`
- commit hash
### SUNSHINE_OS
Sunshine images are available with the following tag suffixes, based on their respective base images.
- `archlinux`
- `debian-bullseye`
- `fedora-36`
- `fedora-37`
- `ubuntu-20.04`
- `ubuntu-22.04`
### Tags
You must combine the `SUNSHINE_VERSION` and `SUNSHINE_OS` to determine the tag to pull. The format should be
`<SUNSHINE_VERSION>-<SUNSHINE_OS>`. For example, `latest-ubuntu-22.04`.
See all our available tags on [docker hub](https://hub.docker.com/r/lizardbyte/sunshine/tags) or
[ghcr](https://github.com/LizardByte/Sunshine/pkgs/container/sunshine/versions) for more info.
## Where used
This is a list of docker projects using Sunshine. Something missing? Let us know about it!
@@ -25,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> \
@@ -59,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.
@@ -71,13 +118,13 @@ port `47990` (e.g. `http://<host_ip>:47990`). The internal port must be `47990`,
(e.g. `-p 8080:47990`). All the ports listed in the `docker run` and `docker-compose` examples are required.
| Parameter | Function | Example Value | Required |
|-----------------------------|---------------------------|--------------------|----------|
| `-p <port>:47990` | Web UI Port | `47990` | True |
| `-v <path to data>:/config` | Volume mapping | `/home/sunshine` | True |
| `-e PUID=<uid>` | User ID | `1001` | False |
| `-e PGID=<gid>` | Group ID | `1001` | False |
| `-e TZ=<timezone>` | Lookup TZ value [here][1] | `America/New_York` | False |
| Parameter | Function | Example Value | Required |
|-----------------------------|----------------------|--------------------|----------|
| `-p <port>:47990` | Web UI Port | `47990` | True |
| `-v <path to data>:/config` | Volume mapping | `/home/sunshine` | True |
| `-e PUID=<uid>` | User ID | `1001` | False |
| `-e PGID=<gid>` | Group ID | `1001` | False |
| `-e TZ=<timezone>` | Lookup [TZ value][1] | `America/New_York` | False |
[1]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
@@ -94,3 +141,20 @@ uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)
```
If you want to change the PUID or PGID after the image has been built, it will require rebuilding the image.
## Supported Architectures
Specifying `lizardbyte/sunshine:latest-<SUNSHINE_OS>` or `ghcr.io/lizardbyte/sunshine:latest-<SUNSHINE_OS>` should
retrieve the correct image for your architecture.
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-38 | ✅ | ✅ |
| fedora-39 | ✅ | ✅ |
| ubuntu-20.04 | ✅ | ✅ |
| ubuntu-22.04 | ✅ | ✅ |

View File

@@ -1,92 +0,0 @@
FROM ubuntu:22.04 AS sunshine-base
ARG DEBIAN_FRONTEND=noninteractive
FROM sunshine-base as sunshine-build
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
build-essential=12.9* \
cmake=3.22.1* \
libavdevice-dev=7:4.4.* \
libboost-filesystem-dev=1.74.0* \
libboost-log-dev=1.74.0* \
libboost-thread-dev=1.74.0* \
libcap-dev=1:2.44* \
libdrm-dev=2.4.110* \
libevdev-dev=1.12.1* \
libpulse-dev=1:15.99.1* \
libopus-dev=1.3.1* \
libssl-dev=3.0.2* \
libwayland-dev=1.20.0* \
libx11-dev=2:1.7.5* \
libxcb-shm0-dev=1.14* \
libxcb-xfixes0-dev=1.14* \
libxcb1-dev=1.14* \
libxfixes-dev=1:6.0.0* \
libxrandr-dev=2:1.5.2* \
libxtst-dev=2:1.2.3* \
nvidia-cuda-dev=11.5.1* \
nvidia-cuda-toolkit=11.5.1* \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# copy repository
WORKDIR /root/sunshine-build/
COPY . .
# setup build directory
WORKDIR /root/sunshine-build/build
# cmake and cpack
RUN cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DSUNSHINE_ASSETS_DIR=share/sunshine \
-DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
-DSUNSHINE_ENABLE_WAYLAND=ON \
-DSUNSHINE_ENABLE_X11=ON \
-DSUNSHINE_ENABLE_DRM=ON \
-DSUNSHINE_ENABLE_CUDA=ON \
/root/sunshine-build \
&& make -j "$(nproc)" \
&& cpack -G DEB
FROM sunshine-base as sunshine
# copy deb from builder
COPY --from=sunshine-build /root/sunshine-build/build/cpack_artifacts/Sunshine.deb /sunshine.deb
# install sunshine
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends /sunshine.deb \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# network setup
EXPOSE 47984-47990/tcp
EXPOSE 48010
EXPOSE 47998-48000/udp
# setup user
ARG PGID=1000
ENV PGID=${PGID}
ARG PUID=1000
ENV PUID=${PUID}
ENV TZ="UTC"
ARG UNAME=lizard
ENV UNAME=${UNAME}
ENV HOME=/home/$UNAME
RUN groupadd -f -g "${PGID}" "${UNAME}" && \
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -G input -u "${PUID}" "${UNAME}" && \
mkdir -p ${HOME}/.config/sunshine && \
ln -s ${HOME}/.config/sunshine /config && \
chown -R ${UNAME} ${HOME}
USER ${UNAME}
WORKDIR ${HOME}
# entrypoint
ENTRYPOINT ["/usr/bin/sunshine"]

View File

@@ -1,71 +1,107 @@
Overview
========
LizardByte has the full documentation hosted on `Read the Docs <https://sunshinestream.readthedocs.io/>`_.
LizardByte has the full documentation hosted on `Read the Docs <https://sunshinestream.readthedocs.io/>`__.
About
-----
Sunshine is a Game stream host for Moonlight.
Sunshine is a self hosted, low latency, cloud gaming solution with support for AMD, Intel, and Nvidia gpus.
It is an open source implementation of NVIDIA's GameStream, as used by the NVIDIA Shield.
Connect to Sunshine from any Moonlight client, available for nearly any device imaginable.
Sunshine is a self-hosted game stream host for Moonlight.
Offering low latency, cloud gaming server capabilities with support for AMD, Intel, and Nvidia GPUs for hardware
encoding. Software encoding is also available. You can connect to Sunshine from any Moonlight client on a variety of
devices. A web UI is provided to allow configuration, and client pairing, from your favorite web browser. Pair from
the local server or any mobile device.
These are the advantages of Sunshine over GeForce Experience.
System Requirements
-------------------
- FOSS (Free and Open Source Software)
- Multi-platform
.. warning:: This table is a work in progress. Do not purchase hardware based on this.
- Linux
- macOS
- Windows
**Minimum Requirements**
- Pair over web ui
- Supports AMD, Intel, and Nvidia GPUs for encoding
- Supports software encoding
- Supports streaming to multiple clients
- Web UI for configuration
.. 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**
.. 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**
.. 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
------------
.. image:: https://img.shields.io/github/workflow/status/lizardbyte/sunshine/CI/master?label=CI%20build&logo=github&style=for-the-badge
.. image:: https://img.shields.io/github/actions/workflow/status/lizardbyte/sunshine/CI.yml.svg?branch=master&label=CI%20build&logo=github&style=for-the-badge
:alt: GitHub Workflow Status (CI)
:target: https://github.com/LizardByte/Sunshine/actions/workflows/CI.yml?query=branch%3Amaster
.. image:: https://img.shields.io/github/workflow/status/lizardbyte/sunshine/localize/nightly?label=localize%20build&logo=github&style=for-the-badge
.. image:: https://img.shields.io/github/actions/workflow/status/lizardbyte/sunshine/localize.yml.svg?branch=nightly&label=localize%20build&logo=github&style=for-the-badge
:alt: GitHub Workflow Status (localize)
:target: https://github.com/LizardByte/Sunshine/actions/workflows/localize.yml?query=branch%3Anightly
.. image:: https://img.shields.io/readthedocs/sunshinestream?label=Docs&style=for-the-badge&logo=readthedocs
.. image:: https://img.shields.io/readthedocs/sunshinestream.svg?label=Docs&style=for-the-badge&logo=readthedocs
:alt: Read the Docs
:target: http://sunshinestream.readthedocs.io/
.. image:: https://img.shields.io/badge/dynamic/json?color=blue&label=localized&style=for-the-badge&query=%24.progress..data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-15178612-503956.json&logo=crowdin
:alt: CrowdIn
:target: https://crowdin.com/project/sunshinestream
.. 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
---------
-------
Our support methods are listed in our
`LizardByte Docs <https://lizardbyte.readthedocs.io/en/latest/about/support.html>`_.
`LizardByte Docs <https://lizardbyte.readthedocs.io/en/latest/about/support.html>`__.
Downloads
---------
.. image:: https://img.shields.io/github/downloads/lizardbyte/sunshine/total?style=for-the-badge&logo=github
.. image:: https://img.shields.io/github/downloads/lizardbyte/sunshine/total.svg?style=for-the-badge&logo=github
:alt: GitHub Releases
:target: https://github.com/LizardByte/Sunshine/releases/latest
.. image:: https://img.shields.io/docker/pulls/lizardbyte/sunshine?style=for-the-badge&logo=docker
.. image:: https://img.shields.io/docker/pulls/lizardbyte/sunshine.svg?style=for-the-badge&logo=docker
:alt: Docker
:target: https://hub.docker.com/r/lizardbyte/sunshine
.. image:: https://img.shields.io/badge/dynamic/xml.svg?color=orange&label=Winget&style=for-the-badge&prefix=v&query=%2F%2Ftr%5B%40id%3D%27winget%27%5D%2Ftd%5B3%5D%2Fspan%2Fa&url=https%3A%2F%2Frepology.org%2Fproject%2Fsunshine%2Fversions&logo=microsoft
:alt: Winget Version
:target: https://github.com/microsoft/winget-pkgs/tree/master/manifests/l/LizardByte/Sunshine
Stats
------
.. image:: https://img.shields.io/github/stars/lizardbyte/sunshine?logo=github&style=for-the-badge
.. 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
.. image:: https://img.shields.io/badge/dynamic/json?color=blue&label=AUR&style=for-the-badge&query=$.results.0.NumVotes&url=https%3A%2F%2Fapp.lizardbyte.dev%2Funo%2Faur%2Fsunshine.json&logo=archlinux
:alt: AUR votes
:target: https://aur.archlinux.org/packages/sunshine

View File

@@ -1,144 +0,0 @@
# - Try to find FFMPEG
# Once done this will define
# FFMPEG_FOUND - System has FFMPEG
# FFMPEG_INCLUDE_DIRS - The FFMPEG include directories
# FFMPEG_LIBRARIES - The libraries needed to use FFMPEG
# FFMPEG_LIBRARY_DIRS - The directory to find FFMPEG libraries
#
# written by Roy Shilkrot 2013 http://www.morethantechnical.com/
#
find_package(PkgConfig)
MACRO(FFMPEG_FIND varname shortname headername)
IF(NOT WIN32)
PKG_CHECK_MODULES(PC_${varname} ${shortname})
FIND_PATH(${varname}_INCLUDE_DIR "${shortname}/${headername}"
HINTS ${PC_${varname}_INCLUDEDIR} ${PC_${varname}_INCLUDE_DIRS}
NO_DEFAULT_PATH
)
ELSE()
FIND_PATH(${varname}_INCLUDE_DIR "${shortname}/${headername}")
ENDIF()
IF(${varname}_INCLUDE_DIR STREQUAL "${varname}_INCLUDE_DIR-NOTFOUND")
message(STATUS "look for newer strcture")
IF(NOT WIN32)
PKG_CHECK_MODULES(PC_${varname} "lib${shortname}")
FIND_PATH(${varname}_INCLUDE_DIR "lib${shortname}/${headername}"
HINTS ${PC_${varname}_INCLUDEDIR} ${PC_${varname}_INCLUDE_DIRS}
NO_DEFAULT_PATH
)
ELSE()
FIND_PATH(${varname}_INCLUDE_DIR "lib${shortname}/${headername}")
IF(${${varname}_INCLUDE_DIR} STREQUAL "${varname}_INCLUDE_DIR-NOTFOUND")
#Desperate times call for desperate measures
MESSAGE(STATUS "globbing...")
FILE(GLOB_RECURSE ${varname}_INCLUDE_DIR "/ffmpeg*/${headername}")
MESSAGE(STATUS "found: ${${varname}_INCLUDE_DIR}")
IF(${varname}_INCLUDE_DIR)
GET_FILENAME_COMPONENT(${varname}_INCLUDE_DIR "${${varname}_INCLUDE_DIR}" PATH)
GET_FILENAME_COMPONENT(${varname}_INCLUDE_DIR "${${varname}_INCLUDE_DIR}" PATH)
ELSE()
SET(${varname}_INCLUDE_DIR "${varname}_INCLUDE_DIR-NOTFOUND")
ENDIF()
ENDIF()
ENDIF()
ENDIF()
IF(${${varname}_INCLUDE_DIR} STREQUAL "${varname}_INCLUDE_DIR-NOTFOUND")
MESSAGE(STATUS "Can't find includes for ${shortname}...")
ELSE()
MESSAGE(STATUS "Found ${shortname} include dirs: ${${varname}_INCLUDE_DIR}")
#GET_DIRECTORY_PROPERTY(FFMPEG_PARENT DIRECTORY ${${varname}_INCLUDE_DIR} PARENT_DIRECTORY)
GET_FILENAME_COMPONENT(FFMPEG_PARENT ${${varname}_INCLUDE_DIR} PATH)
MESSAGE(STATUS "Using FFMpeg dir parent as hint: ${FFMPEG_PARENT}")
IF(NOT WIN32)
FIND_LIBRARY(${varname}_LIBRARIES NAMES ${shortname}
HINTS ${PC_${varname}_LIBDIR} ${PC_${varname}_LIBRARY_DIR} ${FFMPEG_PARENT})
ELSE()
FIND_PATH(${varname}_LIBRARIES "${shortname}.dll.a" HINTS ${FFMPEG_PARENT})
# FILE(GLOB_RECURSE ${varname}_LIBRARIES "${FFMPEG_PARENT}/*${shortname}.lib")
# GLOBing is very bad... but windows sux, this is the only thing that works
ENDIF()
IF(${varname}_LIBRARIES STREQUAL "${varname}_LIBRARIES-NOTFOUND")
MESSAGE(STATUS "look for newer structure for library")
FIND_LIBRARY(${varname}_LIBRARIES NAMES lib${shortname}
HINTS ${PC_${varname}_LIBDIR} ${PC_${varname}_LIBRARY_DIR} ${FFMPEG_PARENT})
ENDIF()
IF(${varname}_LIBRARIES STREQUAL "${varname}_LIBRARIES-NOTFOUND")
MESSAGE(STATUS "Can't find lib for ${shortname}...")
ELSE()
MESSAGE(STATUS "Found ${shortname} libs: ${${varname}_LIBRARIES}")
ENDIF()
IF(NOT ${varname}_INCLUDE_DIR STREQUAL "${varname}_INCLUDE_DIR-NOTFOUND"
AND NOT ${varname}_LIBRARIES STREQUAL ${varname}_LIBRARIES-NOTFOUND)
MESSAGE(STATUS "found ${shortname}: include ${${varname}_INCLUDE_DIR} lib ${${varname}_LIBRARIES}")
SET(FFMPEG_${varname}_FOUND 1)
SET(FFMPEG_${varname}_INCLUDE_DIRS ${${varname}_INCLUDE_DIR})
SET(FFMPEG_${varname}_LIBS ${${varname}_LIBRARIES})
ELSE()
MESSAGE(STATUS "Can't find ${shortname}")
ENDIF()
ENDIF()
ENDMACRO(FFMPEG_FIND)
FFMPEG_FIND(LIBAVFORMAT avformat avformat.h)
FFMPEG_FIND(LIBAVDEVICE avdevice avdevice.h)
FFMPEG_FIND(LIBAVCODEC avcodec avcodec.h)
FFMPEG_FIND(LIBAVUTIL avutil avutil.h)
FFMPEG_FIND(LIBSWSCALE swscale swscale.h)
SET(FFMPEG_FOUND "NO")
IF (FFMPEG_LIBAVFORMAT_FOUND AND
FFMPEG_LIBAVDEVICE_FOUND AND
FFMPEG_LIBAVCODEC_FOUND AND
FFMPEG_LIBAVUTIL_FOUND AND
FFMPEG_LIBSWSCALE_FOUND
)
SET(FFMPEG_FOUND "YES")
SET(FFMPEG_INCLUDE_DIRS ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS})
SET(FFMPEG_LIBRARY_DIRS ${FFMPEG_LIBAVFORMAT_LIBRARY_DIRS})
SET(FFMPEG_LIBRARIES
${FFMPEG_LIBAVFORMAT_LIBS}
${FFMPEG_LIBAVDEVICE_LIBS}
${FFMPEG_LIBAVCODEC_LIBS}
${FFMPEG_LIBAVUTIL_LIBS}
${FFMPEG_LIBSWSCALE_LIBS}
)
ELSE ()
MESSAGE(STATUS "Could not find FFMPEG")
ENDIF()
message(STATUS ${FFMPEG_LIBRARIES} ${FFMPEG_LIBAVFORMAT_LIBRARIES})
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set FFMPEG_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(FFMPEG DEFAULT_MSG
FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIRS)
mark_as_advanced(FFMPEG_INCLUDE_DIRS FFMPEG_LIBRARY_DIRS FFMPEG_LIBRARIES)

View File

@@ -18,4 +18,4 @@ find_library(LIBDRM_LIBRARIES NAMES libdrm.so PATHS ${PC_LIBDRM_LIBDIR} ${PC_LIB
mark_as_advanced(LIBDRM_INCLUDE_DIRS LIBDRM_LIBRARIES)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LIBDRM REQUIRED_VARS LIBDRM_LIBRARIES LIBDRM_INCLUDE_DIRS)
find_package_handle_standard_args(LIBDRM REQUIRED_VARS LIBDRM_LIBRARIES LIBDRM_INCLUDE_DIRS)

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

@@ -22,57 +22,59 @@
IF (NOT WIN32)
# Use pkg-config to get the directories and then use these values
# in the find_path() and find_library() calls
find_package(PkgConfig)
PKG_CHECK_MODULES(PKG_WAYLAND QUIET wayland-client wayland-server wayland-egl wayland-cursor)
# Use pkg-config to get the directories and then use these values
# in the find_path() and find_library() calls
find_package(PkgConfig)
PKG_CHECK_MODULES(PKG_WAYLAND QUIET wayland-client wayland-server wayland-egl wayland-cursor)
set(WAYLAND_DEFINITIONS ${PKG_WAYLAND_CFLAGS})
set(WAYLAND_DEFINITIONS ${PKG_WAYLAND_CFLAGS})
find_path(WAYLAND_CLIENT_INCLUDE_DIRS NAMES wayland-client.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS})
find_library(WAYLAND_CLIENT_LIBRARIES NAMES wayland-client HINTS ${PKG_WAYLAND_LIBRARY_DIRS})
if(WAYLAND_CLIENT_INCLUDE_DIRS AND WAYLAND_CLIENT_LIBRARIES)
set(Wayland_Client_FOUND TRUE)
else()
set(Wayland_Client_FOUND FALSE)
endif()
mark_as_advanced(WAYLAND_CLIENT_INCLUDE_DIRS WAYLAND_CLIENT_LIBRARIES)
find_path(WAYLAND_CLIENT_INCLUDE_DIRS NAMES wayland-client.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS})
find_library(WAYLAND_CLIENT_LIBRARIES NAMES wayland-client HINTS ${PKG_WAYLAND_LIBRARY_DIRS})
if(WAYLAND_CLIENT_INCLUDE_DIRS AND WAYLAND_CLIENT_LIBRARIES)
set(Wayland_Client_FOUND TRUE) # cmake-lint: disable=C0103
else()
set(Wayland_Client_FOUND FALSE) # cmake-lint: disable=C0103
endif()
mark_as_advanced(WAYLAND_CLIENT_INCLUDE_DIRS WAYLAND_CLIENT_LIBRARIES)
find_path(WAYLAND_CURSOR_INCLUDE_DIRS NAMES wayland-cursor.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS})
find_library(WAYLAND_CURSOR_LIBRARIES NAMES wayland-cursor HINTS ${PKG_WAYLAND_LIBRARY_DIRS})
if(WAYLAND_CURSOR_INCLUDE_DIRS AND WAYLAND_CURSOR_LIBRARIES)
set(Wayland_Cursor_FOUND TRUE)
else()
set(Wayland_Cursor_FOUND FALSE)
endif()
mark_as_advanced(WAYLAND_CURSOR_INCLUDE_DIRS WAYLAND_CURSOR_LIBRARIES)
find_path(WAYLAND_CURSOR_INCLUDE_DIRS NAMES wayland-cursor.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS})
find_library(WAYLAND_CURSOR_LIBRARIES NAMES wayland-cursor HINTS ${PKG_WAYLAND_LIBRARY_DIRS})
if(WAYLAND_CURSOR_INCLUDE_DIRS AND WAYLAND_CURSOR_LIBRARIES)
set(Wayland_Cursor_FOUND TRUE) # cmake-lint: disable=C0103
else()
set(Wayland_Cursor_FOUND FALSE) # cmake-lint: disable=C0103
endif()
mark_as_advanced(WAYLAND_CURSOR_INCLUDE_DIRS WAYLAND_CURSOR_LIBRARIES)
find_path(WAYLAND_EGL_INCLUDE_DIRS NAMES wayland-egl.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS})
find_library(WAYLAND_EGL_LIBRARIES NAMES wayland-egl HINTS ${PKG_WAYLAND_LIBRARY_DIRS})
if(WAYLAND_EGL_INCLUDE_DIRS AND WAYLAND_EGL_LIBRARIES)
set(Wayland_EGL_FOUND TRUE)
else()
set(Wayland_EGL_FOUND FALSE)
endif()
mark_as_advanced(WAYLAND_EGL_INCLUDE_DIRS WAYLAND_EGL_LIBRARIES)
find_path(WAYLAND_EGL_INCLUDE_DIRS NAMES wayland-egl.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS})
find_library(WAYLAND_EGL_LIBRARIES NAMES wayland-egl HINTS ${PKG_WAYLAND_LIBRARY_DIRS})
if(WAYLAND_EGL_INCLUDE_DIRS AND WAYLAND_EGL_LIBRARIES)
set(Wayland_EGL_FOUND TRUE) # cmake-lint: disable=C0103
else()
set(Wayland_EGL_FOUND FALSE) # cmake-lint: disable=C0103
endif()
mark_as_advanced(WAYLAND_EGL_INCLUDE_DIRS WAYLAND_EGL_LIBRARIES)
find_path(WAYLAND_SERVER_INCLUDE_DIRS NAMES wayland-server.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS})
find_library(WAYLAND_SERVER_LIBRARIES NAMES wayland-server HINTS ${PKG_WAYLAND_LIBRARY_DIRS})
if(WAYLAND_SERVER_INCLUDE_DIRS AND WAYLAND_SERVER_LIBRARIES)
set(Wayland_Server_FOUND TRUE)
else()
set(Wayland_Server_FOUND FALSE)
endif()
mark_as_advanced(WAYLAND_SERVER_INCLUDE_DIRS WAYLAND_SERVER_LIBRARIES)
find_path(WAYLAND_SERVER_INCLUDE_DIRS NAMES wayland-server.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS})
find_library(WAYLAND_SERVER_LIBRARIES NAMES wayland-server HINTS ${PKG_WAYLAND_LIBRARY_DIRS})
if(WAYLAND_SERVER_INCLUDE_DIRS AND WAYLAND_SERVER_LIBRARIES)
set(Wayland_Server_FOUND TRUE) # cmake-lint: disable=C0103
else()
set(Wayland_Server_FOUND FALSE) # cmake-lint: disable=C0103
endif()
mark_as_advanced(WAYLAND_SERVER_INCLUDE_DIRS WAYLAND_SERVER_LIBRARIES)
set(WAYLAND_INCLUDE_DIRS ${WAYLAND_CLIENT_INCLUDE_DIRS} ${WAYLAND_SERVER_INCLUDE_DIRS} ${WAYLAND_EGL_INCLUDE_DIRS} ${WAYLAND_CURSOR_INCLUDE_DIRS})
set(WAYLAND_LIBRARIES ${WAYLAND_CLIENT_LIBRARIES} ${WAYLAND_SERVER_LIBRARIES} ${WAYLAND_EGL_LIBRARIES} ${WAYLAND_CURSOR_LIBRARIES})
mark_as_advanced(WAYLAND_INCLUDE_DIRS WAYLAND_LIBRARIES)
set(WAYLAND_INCLUDE_DIRS ${WAYLAND_CLIENT_INCLUDE_DIRS} ${WAYLAND_SERVER_INCLUDE_DIRS}
${WAYLAND_EGL_INCLUDE_DIRS} ${WAYLAND_CURSOR_INCLUDE_DIRS})
set(WAYLAND_LIBRARIES ${WAYLAND_CLIENT_LIBRARIES} ${WAYLAND_SERVER_LIBRARIES}
${WAYLAND_EGL_LIBRARIES} ${WAYLAND_CURSOR_LIBRARIES})
mark_as_advanced(WAYLAND_INCLUDE_DIRS WAYLAND_LIBRARIES)
list(REMOVE_DUPLICATES WAYLAND_INCLUDE_DIRS)
list(REMOVE_DUPLICATES WAYLAND_INCLUDE_DIRS)
include(FindPackageHandleStandardArgs)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Wayland REQUIRED_VARS WAYLAND_LIBRARIES WAYLAND_INCLUDE_DIRS HANDLE_COMPONENTS)
find_package_handle_standard_args(Wayland REQUIRED_VARS WAYLAND_LIBRARIES WAYLAND_INCLUDE_DIRS HANDLE_COMPONENTS)
ENDIF ()

View File

@@ -0,0 +1,141 @@
# common compile definitions
# this file will also load platform specific definitions
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)
set(SUNSHINE_ASSETS_DIR "assets")
endif()
# platform specific compile definitions
if(WIN32)
include(${CMAKE_MODULE_PATH}/compile_definitions/windows.cmake)
elseif(UNIX)
include(${CMAKE_MODULE_PATH}/compile_definitions/unix.cmake)
if(APPLE)
include(${CMAKE_MODULE_PATH}/compile_definitions/macos.cmake)
else()
include(${CMAKE_MODULE_PATH}/compile_definitions/linux.cmake)
endif()
endif()
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("${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
"${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})
if(NOT SUNSHINE_ASSETS_DIR_DEF)
set(SUNSHINE_ASSETS_DIR_DEF "${SUNSHINE_ASSETS_DIR}")
endif()
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_ASSETS_DIR="${SUNSHINE_ASSETS_DIR_DEF}")
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_TRAY=${SUNSHINE_TRAY})
include_directories("${CMAKE_SOURCE_DIR}")
include_directories(
SYSTEM
"${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"
${FFMPEG_INCLUDE_DIRS}
${PLATFORM_INCLUDE_DIRS}
)
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
${MINIUPNP_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
enet
opus
${FFMPEG_LIBRARIES}
${Boost_LIBRARIES}
${OPENSSL_LIBRARIES}
${CURL_LIBRARIES}
${PLATFORM_LIBRARIES})

View File

@@ -0,0 +1,258 @@
# linux specific compile definitions
add_compile_definitions(SUNSHINE_PLATFORM="linux")
# AppImage
if(${SUNSHINE_BUILD_APPIMAGE})
# use relative assets path for AppImage
string(REPLACE "${CMAKE_INSTALL_PREFIX}" ".${CMAKE_INSTALL_PREFIX}" SUNSHINE_ASSETS_DIR_DEF ${SUNSHINE_ASSETS_DIR})
endif()
# cuda
set(CUDA_FOUND OFF)
if(${SUNSHINE_ENABLE_CUDA})
include(CheckLanguage)
check_language(CUDA)
if(CMAKE_CUDA_COMPILER)
set(CUDA_FOUND ON)
enable_language(CUDA)
message(STATUS "CUDA Compiler Version: ${CMAKE_CUDA_COMPILER_VERSION}")
set(CMAKE_CUDA_ARCHITECTURES "")
# https://tech.amikelive.com/node-930/cuda-compatibility-of-nvidia-display-gpu-drivers/
if(CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 6.5)
list(APPEND CMAKE_CUDA_ARCHITECTURES 10)
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_10,code=sm_10")
elseif(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 6.5)
list(APPEND CMAKE_CUDA_ARCHITECTURES 50 52)
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_50,code=sm_50")
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_52,code=sm_52")
endif()
if(CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 7.0)
list(APPEND CMAKE_CUDA_ARCHITECTURES 11)
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_11,code=sm_11")
elseif(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER 7.6)
list(APPEND CMAKE_CUDA_ARCHITECTURES 60 61 62)
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_60,code=sm_60")
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_61,code=sm_61")
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_62,code=sm_62")
endif()
if(CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 9.0)
list(APPEND CMAKE_CUDA_ARCHITECTURES 20)
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20")
elseif(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 9.0)
list(APPEND CMAKE_CUDA_ARCHITECTURES 70)
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_70,code=sm_70")
endif()
if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)
list(APPEND CMAKE_CUDA_ARCHITECTURES 75)
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_75,code=sm_75")
endif()
if(CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 11.0)
list(APPEND CMAKE_CUDA_ARCHITECTURES 30)
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_30,code=sm_30")
elseif(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 11.0)
list(APPEND CMAKE_CUDA_ARCHITECTURES 80)
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_80,code=sm_80")
endif()
if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 11.1)
list(APPEND CMAKE_CUDA_ARCHITECTURES 86)
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_86,code=sm_86")
endif()
if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 11.8)
list(APPEND CMAKE_CUDA_ARCHITECTURES 90)
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_90,code=sm_90")
endif()
if(CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 12.0)
list(APPEND CMAKE_CUDA_ARCHITECTURES 35)
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_35,code=sm_35")
endif()
# sort the architectures
list(SORT CMAKE_CUDA_ARCHITECTURES COMPARE NATURAL)
# message(STATUS "CUDA NVCC Flags: ${CUDA_NVCC_FLAGS}")
message(STATUS "CUDA Architectures: ${CMAKE_CUDA_ARCHITECTURES}")
endif()
endif()
if(CUDA_FOUND)
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/third-party/nvfbc")
list(APPEND PLATFORM_TARGET_FILES
"${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()
# drm
if(${SUNSHINE_ENABLE_DRM})
find_package(LIBDRM)
find_package(LIBCAP)
else()
set(LIBDRM_FOUND OFF)
set(LIBCAP_FOUND OFF)
endif()
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
"${CMAKE_SOURCE_DIR}/src/platform/linux/kmsgrab.cpp")
list(APPEND SUNSHINE_DEFINITIONS EGL_NO_X11=1)
elseif(NOT LIBDRM_FOUND)
message(WARNING "Missing libdrm")
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)
else()
set(WAYLAND_FOUND OFF)
endif()
if(WAYLAND_FOUND)
add_compile_definitions(SUNSHINE_BUILD_WAYLAND)
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
${WAYLAND_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}/generated-src
)
list(APPEND PLATFORM_LIBRARIES ${WAYLAND_LIBRARIES})
list(APPEND PLATFORM_TARGET_FILES
"${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
if(${SUNSHINE_ENABLE_X11})
find_package(X11)
else()
set(X11_FOUND OFF)
endif()
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
"${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})
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 ayatana-appindicator3-0.1)
if(APPINDICATOR_FOUND)
list(APPEND SUNSHINE_DEFINITIONS TRAY_AYATANA_APPINDICATOR=1)
else()
pkg_check_modules(APPINDICATOR appindicator3-0.1)
if(APPINDICATOR_FOUND)
list(APPEND SUNSHINE_DEFINITIONS TRAY_LEGACY_APPINDICATOR=1)
endif ()
endif()
pkg_check_modules(LIBNOTIFY libnotify)
if(NOT APPINDICATOR_FOUND OR NOT LIBNOTIFY_FOUND)
set(SUNSHINE_TRAY 0)
message(WARNING "Missing appindicator or libnotify, disabling tray icon")
message(STATUS "APPINDICATOR_FOUND: ${APPINDICATOR_FOUND}")
message(STATUS "LIBNOTIFY_FOUND: ${LIBNOTIFY_FOUND}")
else()
include_directories(SYSTEM ${APPINDICATOR_INCLUDE_DIRS} ${LIBNOTIFY_INCLUDE_DIRS})
link_directories(${APPINDICATOR_LIBRARY_DIRS} ${LIBNOTIFY_LIBRARY_DIRS})
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()
set(SUNSHINE_TRAY 0)
message(STATUS "Tray icon disabled")
endif()
if (${SUNSHINE_TRAY} EQUAL 0 AND SUNSHINE_REQUIRE_TRAY)
message(FATAL_ERROR "Tray icon is required")
endif()
list(APPEND PLATFORM_TARGET_FILES
"${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
numa
pulse
pulse-simple)
include_directories(
SYSTEM
"${CMAKE_SOURCE_DIR}/third-party/nv-codec-headers/include"
"${CMAKE_SOURCE_DIR}/third-party/glad/include")

View File

@@ -0,0 +1,49 @@
# macos specific compile definitions
add_compile_definitions(SUNSHINE_PLATFORM="macos")
link_directories(/opt/local/lib)
link_directories(/usr/local/lib)
link_directories(/opt/homebrew/lib)
ADD_DEFINITIONS(-DBOOST_LOG_DYN_LINK)
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
${APP_SERVICES_LIBRARY}
${AV_FOUNDATION_LIBRARY}
${CORE_MEDIA_LIBRARY}
${CORE_VIDEO_LIBRARY}
${VIDEO_TOOLBOX_LIBRARY}
${FOUNDATION_LIBRARY})
set(PLATFORM_INCLUDE_DIRS
${Boost_INCLUDE_DIR})
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
"${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
"${CMAKE_SOURCE_DIR}/third-party/tray/tray_darwin.m")
endif()

View File

@@ -0,0 +1,9 @@
# unix specific compile definitions
# put anything here that applies to both linux and macos
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES Boost::log)
# add install prefix to assets path if not already there
if(NOT SUNSHINE_ASSETS_DIR MATCHES "^${CMAKE_INSTALL_PREFIX}")
set(SUNSHINE_ASSETS_DIR "${CMAKE_INSTALL_PREFIX}/${SUNSHINE_ASSETS_DIR}")
endif()

View File

@@ -0,0 +1,83 @@
# windows specific compile definitions
add_compile_definitions(SUNSHINE_PLATFORM="windows")
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 "${CMAKE_SOURCE_DIR}/third-party/nvapi-open-source-sdk")
file(GLOB NVPREFS_FILES CONFIGURE_DEPENDS
"${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 "${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include")
# sunshine icon
if(NOT DEFINED SUNSHINE_ICON_PATH)
set(SUNSHINE_ICON_PATH "${CMAKE_SOURCE_DIR}/sunshine.ico")
endif()
configure_file("${CMAKE_SOURCE_DIR}/src/platform/windows/windows.rs.in" windows.rc @ONLY)
set(PLATFORM_TARGET_FILES
"${CMAKE_CURRENT_BINARY_DIR}/windows.rc"
"${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
libssl.a
libcrypto.a)
list(PREPEND PLATFORM_LIBRARIES
libstdc++.a
libwinpthread.a
libssp.a
ksuser
wsock32
ws2_32
d3d11 dxgi D3DCompiler
setupapi
dwmapi
userenv
synchronization.lib
avrt
iphlpapi
shlwapi
PkgConfig::NLOHMANN_JSON
${CURL_STATIC_LIBRARIES})
if(SUNSHINE_ENABLE_TRAY)
list(APPEND PLATFORM_TARGET_FILES
"${CMAKE_SOURCE_DIR}/third-party/tray/tray_windows.c")
endif()

View File

@@ -0,0 +1,82 @@
# load common dependencies
# this file will also load platform specific dependencies
# submodules
# moonlight common library
set(ENET_NO_INSTALL ON CACHE BOOL "Don't install any libraries build for enet")
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/enet")
# 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
pkg_check_modules(MINIUPNP miniupnpc REQUIRED)
include_directories(SYSTEM ${MINIUPNP_INCLUDE_DIRS})
# ffmpeg pre-compiled binaries
if(WIN32)
if(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64")
message(FATAL_ERROR "Unsupported system processor:" ${CMAKE_SYSTEM_PROCESSOR})
endif()
set(FFMPEG_PLATFORM_LIBRARIES mfplat ole32 strmiids mfuuid vpl)
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_SOURCE_DIR}/third-party/build-deps/ffmpeg/macos-x86_64")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
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()
message(FATAL_ERROR "Unsupported system processor:" ${CMAKE_SYSTEM_PROCESSOR})
endif()
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_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_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_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")
set(HDR10_PLUS_LIBRARY
"${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"
${HDR10_PLUS_LIBRARY}
${FFMPEG_PLATFORM_LIBRARIES})
# platform specific dependencies
if(WIN32)
include("${CMAKE_MODULE_PATH}/dependencies/windows.cmake")
elseif(UNIX)
include("${CMAKE_MODULE_PATH}/dependencies/unix.cmake")
if(APPLE)
include("${CMAKE_MODULE_PATH}/dependencies/macos.cmake")
else()
include("${CMAKE_MODULE_PATH}/dependencies/linux.cmake")
endif()
endif()

View File

@@ -0,0 +1 @@
# linux specific dependencies

View File

@@ -0,0 +1,12 @@
# macos specific dependencies
FIND_LIBRARY(APP_SERVICES_LIBRARY ApplicationServices)
FIND_LIBRARY(AV_FOUNDATION_LIBRARY AVFoundation)
FIND_LIBRARY(CORE_MEDIA_LIBRARY CoreMedia)
FIND_LIBRARY(CORE_VIDEO_LIBRARY CoreVideo)
FIND_LIBRARY(FOUNDATION_LIBRARY Foundation)
FIND_LIBRARY(VIDEO_TOOLBOX_LIBRARY VideoToolbox)
if(SUNSHINE_ENABLE_TRAY)
FIND_LIBRARY(COCOA Cocoa REQUIRED)
endif()

View File

@@ -0,0 +1,4 @@
# unix specific dependencies
# put anything here that applies to both linux and macos
find_package(Boost COMPONENTS locale log filesystem program_options REQUIRED)

View File

@@ -0,0 +1,7 @@
# windows specific dependencies
set(Boost_USE_STATIC_LIBS ON) # cmake-lint: disable=C0103
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)

15
cmake/macros/common.cmake Normal file
View File

@@ -0,0 +1,15 @@
# common macros
# this file will also load platform specific macros
# platform specific macros
if(WIN32)
include(${CMAKE_MODULE_PATH}/macros/windows.cmake)
elseif(UNIX)
include(${CMAKE_MODULE_PATH}/macros/unix.cmake)
if(APPLE)
include(${CMAKE_MODULE_PATH}/macros/macos.cmake)
else()
include(${CMAKE_MODULE_PATH}/macros/linux.cmake)
endif()
endif()

31
cmake/macros/linux.cmake Normal file
View File

@@ -0,0 +1,31 @@
# linux specific macros
# GEN_WAYLAND: args = `filename`
macro(GEN_WAYLAND wayland_directory subdirectory filename)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/generated-src)
message("wayland-scanner private-code \
${wayland_directory}/${subdirectory}/${filename}.xml \
${CMAKE_BINARY_DIR}/generated-src/${filename}.c")
message("wayland-scanner client-header \
${wayland_directory}/${subdirectory}/${filename}.xml \
${CMAKE_BINARY_DIR}/generated-src/${filename}.h")
execute_process(
COMMAND wayland-scanner private-code
${wayland_directory}/${subdirectory}/${filename}.xml
${CMAKE_BINARY_DIR}/generated-src/${filename}.c
COMMAND wayland-scanner client-header
${wayland_directory}/${subdirectory}/${filename}.xml
${CMAKE_BINARY_DIR}/generated-src/${filename}.h
RESULT_VARIABLE EXIT_INT
)
if(NOT ${EXIT_INT} EQUAL 0)
message(FATAL_ERROR "wayland-scanner failed")
endif()
list(APPEND PLATFORM_TARGET_FILES
${CMAKE_BINARY_DIR}/generated-src/${filename}.c
${CMAKE_BINARY_DIR}/generated-src/${filename}.h)
endmacro()

16
cmake/macros/macos.cmake Normal file
View File

@@ -0,0 +1,16 @@
# macos specific macros
# ADD_FRAMEWORK: args = `fwname`, `appname`
macro(ADD_FRAMEWORK fwname appname)
find_library(FRAMEWORK_${fwname}
NAMES ${fwname}
PATHS ${CMAKE_OSX_SYSROOT}/System/Library
PATH_SUFFIXES Frameworks
NO_DEFAULT_PATH)
if( ${FRAMEWORK_${fwname}} STREQUAL FRAMEWORK_${fwname}-NOTFOUND)
MESSAGE(ERROR ": Framework ${fwname} not found")
else()
TARGET_LINK_LIBRARIES(${appname} "${FRAMEWORK_${fwname}}/${fwname}")
MESSAGE(STATUS "Framework ${fwname} found at ${FRAMEWORK_${fwname}}")
endif()
endmacro(ADD_FRAMEWORK)

2
cmake/macros/unix.cmake Normal file
View File

@@ -0,0 +1,2 @@
# unix specific macros
# put anything here that applies to both linux and macos

View File

@@ -0,0 +1 @@
# windows specific macros

View File

@@ -0,0 +1,45 @@
# common packaging
# common cpack options
set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME})
set(CPACK_PACKAGE_VENDOR "LizardByte")
set(CPACK_PACKAGE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cpack_artifacts)
set(CPACK_PACKAGE_CONTACT "https://app.lizardbyte.dev")
set(CPACK_PACKAGE_DESCRIPTION ${CMAKE_PROJECT_DESCRIPTION})
set(CPACK_PACKAGE_HOMEPAGE_URL ${CMAKE_PROJECT_HOMEPAGE_URL})
set(CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/LICENSE)
set(CPACK_PACKAGE_ICON ${PROJECT_SOURCE_DIR}/sunshine.png)
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}")
set(CPACK_STRIP_FILES YES)
# 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)
include(${CMAKE_MODULE_PATH}/packaging/windows.cmake)
elseif(UNIX)
include(${CMAKE_MODULE_PATH}/packaging/unix.cmake)
if(APPLE)
include(${CMAKE_MODULE_PATH}/packaging/macos.cmake)
else()
include(${CMAKE_MODULE_PATH}/packaging/linux.cmake)
endif()
endif()
include(CPack)

113
cmake/packaging/linux.cmake Normal file
View File

@@ -0,0 +1,113 @@
# linux specific packaging
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/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()
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 "${SYSTEMD_USER_UNIT_INSTALL_DIR}")
endif()
# Post install
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/postinst")
set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/postinst")
# Dependencies
set(CPACK_DEB_COMPONENT_INSTALL ON)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "\
${CPACK_DEB_PLATFORM_PACKAGE_DEPENDS} \
libboost-filesystem${Boost_VERSION}, \
libboost-locale${Boost_VERSION}, \
libboost-log${Boost_VERSION}, \
libboost-program-options${Boost_VERSION}, \
libcap2, \
libcurl4, \
libdrm2, \
libevdev2, \
libnuma1, \
libopus0, \
libpulse0, \
libva2, \
libva-drm2, \
libvdpau1, \
libwayland-client0, \
libx11-6, \
miniupnpc, \
openssl | libssl3")
set(CPACK_RPM_PACKAGE_REQUIRES "\
${CPACK_RPM_PLATFORM_PACKAGE_REQUIRES} \
boost-filesystem >= ${Boost_VERSION}, \
boost-locale >= ${Boost_VERSION}, \
boost-log >= ${Boost_VERSION}, \
boost-program-options >= ${Boost_VERSION}, \
libcap >= 2.22, \
libcurl >= 7.0, \
libdrm >= 2.4.97, \
libevdev >= 1.5.6, \
libopusenc >= 0.2.1, \
libva >= 2.14.0, \
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")
# This should automatically figure out dependencies, doesn't work with the current config
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF)
# application icon
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
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_DATAROOTDIR}/icons/hicolor/scalable/status"
RENAME "sunshine-tray.svg")
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}, \
libayatana-appindicator3-1, \
libnotify4")
set(CPACK_RPM_PACKAGE_REQUIRES "\
${CPACK_RPM_PACKAGE_REQUIRES}, \
libappindicator-gtk3 >= 12.10.0")
endif()
# desktop file
# todo - validate desktop files with `desktop-file-validate`
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.desktop"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
if(NOT ${SUNSHINE_BUILD_APPIMAGE})
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine_terminal.desktop"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
endif()
if(${SUNSHINE_BUILD_FLATPAK})
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine_kms.desktop"
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_DATAROOTDIR}/metainfo")

View File

@@ -0,0 +1,25 @@
# macos specific packaging
# todo - bundle doesn't produce a valid .app use cpack -G DragNDrop
set(CPACK_BUNDLE_NAME "${CMAKE_PROJECT_NAME}")
set(CPACK_BUNDLE_PLIST "${APPLE_PLIST_FILE}")
set(CPACK_BUNDLE_ICON "${PROJECT_SOURCE_DIR}/sunshine.icns")
# set(CPACK_BUNDLE_STARTUP_COMMAND "${INSTALL_RUNTIME_DIR}/sunshine")
if(SUNSHINE_PACKAGE_MACOS) # todo
set(MAC_PREFIX "${CMAKE_PROJECT_NAME}.app/Contents")
set(INSTALL_RUNTIME_DIR "${MAC_PREFIX}/MacOS")
install(TARGETS sunshine
BUNDLE DESTINATION . COMPONENT Runtime
RUNTIME DESTINATION ${INSTALL_RUNTIME_DIR} COMPONENT Runtime)
else()
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

@@ -0,0 +1,15 @@
# unix specific packaging
# put anything here that applies to both linux and macos
# return here if building a macos package
if(SUNSHINE_PACKAGE_MACOS)
return()
endif()
# Installation destination dir
set(CPACK_SET_DESTDIR true)
if(NOT CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "/usr/share/sunshine")
endif()
install(TARGETS sunshine RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")

View File

@@ -0,0 +1,155 @@
# windows specific packaging
# see options at: https://cmake.org/cmake/help/latest/cpack_gen/nsis.html
install(TARGETS sunshine RUNTIME DESTINATION "." COMPONENT application)
# Hardening: include zlib1.dll (loaded via LoadLibrary() in openssl's libcrypto.a)
install(FILES "${ZLIB}" DESTINATION "." COMPONENT application)
# Adding tools
install(TARGETS dxgi-info RUNTIME DESTINATION "tools" COMPONENT dxgi)
install(TARGETS audio-info RUNTIME DESTINATION "tools" COMPONENT audio)
# Mandatory tools
install(TARGETS ddprobe RUNTIME DESTINATION "tools" COMPONENT application)
install(TARGETS sunshinesvc RUNTIME DESTINATION "tools" COMPONENT application)
# Mandatory scripts
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/service/"
DESTINATION "scripts"
COMPONENT assets)
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/migration/"
DESTINATION "scripts"
COMPONENT assets)
# Configurable options for the service
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/autostart/"
DESTINATION "scripts"
COMPONENT autostart)
# scripts
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/firewall/"
DESTINATION "scripts"
COMPONENT firewall)
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/gamepad/"
DESTINATION "scripts"
COMPONENT gamepad)
# Sunshine 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_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}")
# Extra install commands
# Restores permissions on the install directory
# Migrates config files from the root into the new config folder
# Install service
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
"${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}
IfSilent +2 0
ExecShell 'open' 'https://sunshinestream.readthedocs.io/'
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-gamepad.bat\\\"'
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\install-service.bat\\\"'
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\autostart-service.bat\\\"'
NoController:
")
# Extra uninstall commands
# Uninstall service
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
"${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\delete-firewall-rule.bat\\\"'
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\uninstall-service.bat\\\"'
nsExec::ExecToLog '\\\"$INSTDIR\\\\sunshine.exe\\\" --restore-nvprefs-undo'
MessageBox MB_YESNO|MB_ICONQUESTION \
'Do you want to remove Virtual Gamepad)?' \
/SD IDNO IDNO NoGamepad
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\uninstall-gamepad.bat\\\"'; skipped if no
NoGamepad:
MessageBox MB_YESNO|MB_ICONQUESTION \
'Do you want to remove $INSTDIR (this includes the configuration, cover images, and settings)?' \
/SD IDNO IDNO NoDelete
RMDir /r \\\"$INSTDIR\\\"; skipped if no
NoDelete:
")
# Adding an option for the start menu
set(CPACK_NSIS_MODIFY_PATH "OFF")
set(CPACK_NSIS_EXECUTABLES_DIRECTORY ".")
# This will be shown on the installed apps Windows settings
set(CPACK_NSIS_INSTALLED_ICON_NAME "${CMAKE_PROJECT_NAME}.exe")
set(CPACK_NSIS_CREATE_ICONS_EXTRA
"${CPACK_NSIS_CREATE_ICONS_EXTRA}
CreateShortCut '\$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\${CMAKE_PROJECT_NAME}.lnk' \
'\$INSTDIR\\\\${CMAKE_PROJECT_NAME}.exe' '--shortcut'
")
set(CPACK_NSIS_DELETE_ICONS_EXTRA
"${CPACK_NSIS_DELETE_ICONS_EXTRA}
Delete '\$SMPROGRAMS\\\\$MUI_TEMP\\\\${CMAKE_PROJECT_NAME}.lnk'
")
# Checking for previous installed versions
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL "ON")
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")
set(CPACK_NSIS_MENU_LINKS
"https://sunshinestream.readthedocs.io" "Sunshine documentation"
"https://app.lizardbyte.dev" "LizardByte Web Site"
"https://app.lizardbyte.dev/support" "LizardByte Support")
set(CPACK_NSIS_MANIFEST_DPI_AWARE true)
# Setting components groups and dependencies
set(CPACK_COMPONENT_GROUP_CORE_EXPANDED true)
# sunshine binary
set(CPACK_COMPONENT_APPLICATION_DISPLAY_NAME "${CMAKE_PROJECT_NAME}")
set(CPACK_COMPONENT_APPLICATION_DESCRIPTION "${CMAKE_PROJECT_NAME} main application and required components.")
set(CPACK_COMPONENT_APPLICATION_GROUP "Core")
set(CPACK_COMPONENT_APPLICATION_REQUIRED true)
set(CPACK_COMPONENT_APPLICATION_DEPENDS assets)
# service auto-start script
set(CPACK_COMPONENT_AUTOSTART_DISPLAY_NAME "Launch on Startup")
set(CPACK_COMPONENT_AUTOSTART_DESCRIPTION "If enabled, launches Sunshine automatically on system startup.")
set(CPACK_COMPONENT_AUTOSTART_GROUP "Core")
# assets
set(CPACK_COMPONENT_ASSETS_DISPLAY_NAME "Required Assets")
set(CPACK_COMPONENT_ASSETS_DESCRIPTION "Shaders, default box art, and web UI.")
set(CPACK_COMPONENT_ASSETS_GROUP "Core")
set(CPACK_COMPONENT_ASSETS_REQUIRED true)
# audio tool
set(CPACK_COMPONENT_AUDIO_DISPLAY_NAME "audio-info")
set(CPACK_COMPONENT_AUDIO_DESCRIPTION "CLI tool providing information about sound devices.")
set(CPACK_COMPONENT_AUDIO_GROUP "Tools")
# display tool
set(CPACK_COMPONENT_DXGI_DISPLAY_NAME "dxgi-info")
set(CPACK_COMPONENT_DXGI_DESCRIPTION "CLI tool providing information about graphics cards and displays.")
set(CPACK_COMPONENT_DXGI_GROUP "Tools")
# firewall scripts
set(CPACK_COMPONENT_FIREWALL_DISPLAY_NAME "Add Firewall Exclusions")
set(CPACK_COMPONENT_FIREWALL_DESCRIPTION "Scripts to enable or disable firewall rules.")
set(CPACK_COMPONENT_FIREWALL_GROUP "Scripts")
# gamepad scripts
set(CPACK_COMPONENT_GAMEPAD_DISPLAY_NAME "Virtual Gamepad")
set(CPACK_COMPONENT_GAMEPAD_DESCRIPTION "Scripts to install and uninstall Virtual Gamepad.")
set(CPACK_COMPONENT_GAMEPAD_GROUP "Scripts")

View File

@@ -0,0 +1,58 @@
# Check if env vars are defined before attempting to access them, variables will be defined even if blank
if((DEFINED ENV{BRANCH}) AND (DEFINED ENV{BUILD_VERSION}) AND (DEFINED ENV{COMMIT})) # cmake-lint: disable=W0106
if(($ENV{BRANCH} STREQUAL "master") AND (NOT $ENV{BUILD_VERSION} STREQUAL ""))
# If BRANCH is "master" and BUILD_VERSION is not empty, then we are building a master branch
MESSAGE("Got from CI master branch and version $ENV{BUILD_VERSION}")
set(PROJECT_VERSION $ENV{BUILD_VERSION})
elseif((DEFINED ENV{BRANCH}) AND (DEFINED ENV{COMMIT}))
# If BRANCH is set but not BUILD_VERSION we are building nightly, we gather only the commit hash
MESSAGE("Got from CI $ENV{BRANCH} branch and commit $ENV{COMMIT}")
set(PROJECT_VERSION ${PROJECT_VERSION}.$ENV{COMMIT})
endif()
# Generate Sunshine Version based of the git tag
# https://github.com/nocnokneo/cmake-git-versioning-example/blob/master/LICENSE
else()
find_package(Git)
if(GIT_EXECUTABLE)
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_SOURCE_DIR}"
OUTPUT_VARIABLE GIT_DESCRIBE_BRANCH
RESULT_VARIABLE GIT_DESCRIBE_ERROR_CODE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Gather current commit
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
#WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE GIT_DESCRIBE_VERSION
RESULT_VARIABLE GIT_DESCRIBE_ERROR_CODE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Check if Dirty
execute_process(
COMMAND ${GIT_EXECUTABLE} diff --quiet --exit-code
#WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
RESULT_VARIABLE GIT_IS_DIRTY
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT GIT_DESCRIBE_ERROR_CODE)
MESSAGE("Sunshine Branch: ${GIT_DESCRIBE_BRANCH}")
if(NOT GIT_DESCRIBE_BRANCH STREQUAL "master")
set(PROJECT_VERSION ${PROJECT_VERSION}.${GIT_DESCRIBE_VERSION})
MESSAGE("Sunshine Version: ${GIT_DESCRIBE_VERSION}")
endif()
if(GIT_IS_DIRTY)
set(PROJECT_VERSION ${PROJECT_VERSION}.dirty)
MESSAGE("Git tree is dirty!")
endif()
else()
MESSAGE(ERROR ": Got git error while fetching tags: ${GIT_DESCRIBE_ERROR_CODE}")
endif()
else()
MESSAGE(WARNING ": Git not found, cannot find git version")
endif()
endif()

View File

@@ -0,0 +1,5 @@
# source assets will be installed from this directory
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 ()

56
cmake/prep/options.cmake Normal file
View File

@@ -0,0 +1,56 @@
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
"Should only be used when creating a macOS package/dmg." OFF)
elseif(UNIX) # Linux
option(SUNSHINE_BUILD_APPIMAGE
"Enable an AppImage build." OFF)
option(SUNSHINE_BUILD_FLATPAK
"Enable a Flatpak build." OFF)
option(SUNSHINE_CONFIGURE_PKGBUILD
"Configure files required for AUR. Recommended to use with SUNSHINE_CONFIGURE_ONLY" OFF)
option(SUNSHINE_CONFIGURE_FLATPAK_MAN
"Configure manifest file required for Flatpak build. Recommended to use with SUNSHINE_CONFIGURE_ONLY" OFF)
# Linux capture methods
option(SUNSHINE_ENABLE_CUDA
"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
"Enable X11 grab if available." ON)
endif()

View File

@@ -0,0 +1,47 @@
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})
configure_file(packaging/linux/AppImage/sunshine.desktop sunshine.desktop @ONLY)
elseif(${SUNSHINE_BUILD_FLATPAK})
configure_file(packaging/linux/flatpak/sunshine.desktop sunshine.desktop @ONLY)
configure_file(packaging/linux/flatpak/sunshine_kms.desktop sunshine_kms.desktop @ONLY)
configure_file(packaging/linux/sunshine_terminal.desktop sunshine_terminal.desktop @ONLY)
else()
configure_file(packaging/linux/sunshine.desktop sunshine.desktop @ONLY)
configure_file(packaging/linux/sunshine_terminal.desktop sunshine_terminal.desktop @ONLY)
endif()
# configure metadata file
configure_file(packaging/linux/sunshine.appdata.xml sunshine.appdata.xml @ONLY)
# configure service
configure_file(packaging/linux/sunshine.service.in sunshine.service @ONLY)
# 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()
# return if configure only is set
if(${SUNSHINE_CONFIGURE_ONLY})
# message
message(STATUS "SUNSHINE_CONFIGURE_ONLY: ON, exiting...")
set(END_BUILD ON)
else()
set(END_BUILD OFF)
endif()

View File

@@ -0,0 +1,98 @@
# common target definitions
# this file will also load platform specific macros
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)
elseif(UNIX)
include(${CMAKE_MODULE_PATH}/targets/unix.cmake)
if(APPLE)
include(${CMAKE_MODULE_PATH}/targets/macos.cmake)
else()
include(${CMAKE_MODULE_PATH}/targets/linux.cmake)
endif()
endif()
# todo - is this necessary? ... for anything except linux?
if(NOT DEFINED CMAKE_CUDA_STANDARD)
set(CMAKE_CUDA_STANDARD 17)
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
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
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR})
# 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

@@ -0,0 +1 @@
# linux specific target definitions

View File

@@ -0,0 +1,4 @@
# macos specific target definitions
target_link_options(sunshine PRIVATE LINKER:-sectcreate,__TEXT,__info_plist,${APPLE_PLIST_FILE})
# Tell linker to dynamically load these symbols at runtime, in case they're unavailable:
target_link_options(sunshine PRIVATE -Wl,-U,_CGPreflightScreenCaptureAccess -Wl,-U,_CGRequestScreenCaptureAccess)

8
cmake/targets/unix.cmake Normal file
View File

@@ -0,0 +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

@@ -0,0 +1,12 @@
# windows specific target definitions
set_target_properties(sunshine PROPERTIES LINK_SEARCH_START_STATIC 1)
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"
}
]

151
docker/archlinux.dockerfile Normal file
View File

@@ -0,0 +1,151 @@
# syntax=docker/dockerfile:1.4
# artifacts: true
# platforms: linux/amd64
# archlinux does not have an arm64 base image
# no-cache-filters: artifacts,sunshine
ARG BASE=archlinux
ARG TAG=base-devel
FROM ${BASE}:${TAG} AS sunshine-base
# install dependencies
RUN <<_DEPS
#!/bin/bash
set -e
pacman -Syu --disable-download-timeout --needed --noconfirm \
archlinux-keyring
_DEPS
# Setup builder user, arch prevents running makepkg as root
RUN useradd -m builder && \
echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
# makepkg is used in sunshine-build and uploader build stages
FROM sunshine-base as sunshine-build
ARG BRANCH
ARG BUILD_VERSION
ARG COMMIT
ARG CLONE_URL
# note: BUILD_VERSION may be blank
ENV BRANCH=${BRANCH}
ENV BUILD_VERSION=${BUILD_VERSION}
ENV COMMIT=${COMMIT}
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# install dependencies
# cuda is an optional build-time dependency for PKGBUILD
RUN <<_DEPS
#!/bin/bash
set -e
pacman -Syu --disable-download-timeout --needed --noconfirm \
base-devel \
cmake \
cuda \
git \
namcap \
xorg-server-xvfb
_DEPS
# Setup builder user
USER builder
# copy repository
WORKDIR /build/sunshine/
COPY --link .. .
# setup build directory
WORKDIR /build/sunshine/build
# configure PKGBUILD file
RUN <<_MAKE
#!/bin/bash
set -e
if [[ "${BUILD_VERSION}" == '' ]]; then
sub_version=".r${COMMIT}"
else
sub_version=""
fi
cmake \
-DSUNSHINE_CONFIGURE_PKGBUILD=ON \
-DSUNSHINE_SUB_VERSION="${sub_version}" \
-DGITHUB_CLONE_URL="${CLONE_URL}" \
-DGITHUB_BRANCH=${BRANCH} \
-DGITHUB_BUILD_VERSION=${BUILD_VERSION} \
-DGITHUB_COMMIT="${COMMIT}" \
-DSUNSHINE_CONFIGURE_ONLY=ON \
/build/sunshine
_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/sunshine*.pkg.tar.zst /sunshine.pkg.tar.zst
FROM sunshine-base as sunshine
# copy from uploader instead of artifacts or uploader stage will not run
COPY --link --from=artifacts /sunshine.pkg.tar.zst /
# install sunshine
RUN <<_INSTALL_SUNSHINE
#!/bin/bash
set -e
# update keyring to prevent cached keyring errors
pacman -Syu --disable-download-timeout --needed --noconfirm \
archlinux-keyring
pacman -U --disable-download-timeout --needed --noconfirm \
/sunshine.pkg.tar.zst
_INSTALL_SUNSHINE
# network setup
EXPOSE 47984-47990/tcp
EXPOSE 48010
EXPOSE 47998-48000/udp
# setup user
ARG PGID=1000
ENV PGID=${PGID}
ARG PUID=1000
ENV PUID=${PUID}
ENV TZ="UTC"
ARG UNAME=lizard
ENV UNAME=${UNAME}
ENV HOME=/home/$UNAME
# setup user
RUN <<_SETUP_USER
#!/bin/bash
set -e
# first delete the builder user
userdel -r builder
# then create the lizard user
groupadd -f -g "${PGID}" "${UNAME}"
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${UNAME}"
mkdir -p ${HOME}/.config/sunshine
ln -s ${HOME}/.config/sunshine /config
chown -R ${UNAME} ${HOME}
_SETUP_USER
USER ${UNAME}
WORKDIR ${HOME}
# entrypoint
ENTRYPOINT ["/usr/bin/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

@@ -0,0 +1,191 @@
# syntax=docker/dockerfile:1.4
# artifacts: true
# platforms: linux/amd64,linux/arm64/v8
# platforms_pr: linux/amd64
# no-cache-filters: sunshine-base,artifacts,sunshine
ARG BASE=debian
ARG TAG=bookworm
FROM ${BASE}:${TAG} AS sunshine-base
ENV DEBIAN_FRONTEND=noninteractive
FROM sunshine-base as sunshine-build
ARG TARGETPLATFORM
RUN echo "target_platform: ${TARGETPLATFORM}"
ARG BRANCH
ARG BUILD_VERSION
ARG COMMIT
# note: BUILD_VERSION may be blank
ENV BRANCH=${BRANCH}
ENV BUILD_VERSION=${BUILD_VERSION}
ENV COMMIT=${COMMIT}
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.25.* \
doxygen \
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 \
nodejs \
npm \
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
fi
apt-get clean
rm -rf /var/lib/apt/lists/*
_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"
# 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
# copy repository
WORKDIR /build/sunshine/
COPY --link .. .
# setup build directory
WORKDIR /build/sunshine/build
# cmake and cpack
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 \
-DSUNSHINE_ASSETS_DIR=share/sunshine \
-DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
-DSUNSHINE_ENABLE_WAYLAND=ON \
-DSUNSHINE_ENABLE_X11=ON \
-DSUNSHINE_ENABLE_DRM=ON \
-DSUNSHINE_ENABLE_CUDA=ON \
/build/sunshine
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
ARG TARGETARCH
COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /sunshine-${BASE}-${TAG}-${TARGETARCH}.deb
FROM sunshine-base as sunshine
# copy deb from builder
COPY --link --from=artifacts /sunshine*.deb /sunshine.deb
# install sunshine
RUN <<_INSTALL_SUNSHINE
#!/bin/bash
set -e
apt-get update -y
apt-get install -y --no-install-recommends /sunshine.deb
apt-get clean
rm -rf /var/lib/apt/lists/*
_INSTALL_SUNSHINE
# network setup
EXPOSE 47984-47990/tcp
EXPOSE 48010
EXPOSE 47998-48000/udp
# setup user
ARG PGID=1000
ENV PGID=${PGID}
ARG PUID=1000
ENV PUID=${PUID}
ENV TZ="UTC"
ARG UNAME=lizard
ENV UNAME=${UNAME}
ENV HOME=/home/$UNAME
# setup user
RUN <<_SETUP_USER
#!/bin/bash
set -e
groupadd -f -g "${PGID}" "${UNAME}"
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${UNAME}"
mkdir -p ${HOME}/.config/sunshine
ln -s ${HOME}/.config/sunshine /config
chown -R ${UNAME} ${HOME}
_SETUP_USER
USER ${UNAME}
WORKDIR ${HOME}
# entrypoint
ENTRYPOINT ["/usr/bin/sunshine"]

View File

@@ -0,0 +1,205 @@
# syntax=docker/dockerfile:1.4
# artifacts: true
# platforms: linux/amd64,linux/arm64/v8
# platforms_pr: linux/amd64
# no-cache-filters: sunshine-base,artifacts,sunshine
ARG BASE=debian
ARG TAG=bullseye
FROM ${BASE}:${TAG} AS sunshine-base
ENV DEBIAN_FRONTEND=noninteractive
FROM sunshine-base as sunshine-build
ARG TARGETPLATFORM
RUN echo "target_platform: ${TARGETPLATFORM}"
ARG BRANCH
ARG BUILD_VERSION
ARG COMMIT
# note: BUILD_VERSION may be blank
ENV BRANCH=${BRANCH}
ENV BUILD_VERSION=${BUILD_VERSION}
ENV COMMIT=${COMMIT}
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 \
ca-certificates \
cmake=3.18.* \
doxygen \
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.9 \
python3.9-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
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
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=/build/cuda --no-opengl-libs --no-man-page --no-drm
rm ./cuda.run
_INSTALL_CUDA
# copy repository
WORKDIR /build/sunshine/
COPY --link .. .
# 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 \
-DSUNSHINE_ASSETS_DIR=share/sunshine \
-DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
-DSUNSHINE_ENABLE_WAYLAND=ON \
-DSUNSHINE_ENABLE_X11=ON \
-DSUNSHINE_ENABLE_DRM=ON \
-DSUNSHINE_ENABLE_CUDA=ON \
/build/sunshine
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
ARG TARGETARCH
COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /sunshine-${BASE}-${TAG}-${TARGETARCH}.deb
FROM sunshine-base as sunshine
# copy deb from builder
COPY --link --from=artifacts /sunshine*.deb /sunshine.deb
# install sunshine
RUN <<_INSTALL_SUNSHINE
#!/bin/bash
set -e
apt-get update -y
apt-get install -y --no-install-recommends /sunshine.deb
apt-get clean
rm -rf /var/lib/apt/lists/*
_INSTALL_SUNSHINE
# network setup
EXPOSE 47984-47990/tcp
EXPOSE 48010
EXPOSE 47998-48000/udp
# setup user
ARG PGID=1000
ENV PGID=${PGID}
ARG PUID=1000
ENV PUID=${PUID}
ENV TZ="UTC"
ARG UNAME=lizard
ENV UNAME=${UNAME}
ENV HOME=/home/$UNAME
# setup user
RUN <<_SETUP_USER
#!/bin/bash
set -e
groupadd -f -g "${PGID}" "${UNAME}"
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${UNAME}"
mkdir -p ${HOME}/.config/sunshine
ln -s ${HOME}/.config/sunshine /config
chown -R ${UNAME} ${HOME}
_SETUP_USER
USER ${UNAME}
WORKDIR ${HOME}
# entrypoint
ENTRYPOINT ["/usr/bin/sunshine"]

187
docker/fedora-38.dockerfile Normal file
View File

@@ -0,0 +1,187 @@
# syntax=docker/dockerfile:1.4
# artifacts: true
# platforms: linux/amd64
# platforms_pr: linux/amd64
# no-cache-filters: sunshine-base,artifacts,sunshine
ARG BASE=fedora
ARG TAG=38
FROM ${BASE}:${TAG} AS sunshine-base
FROM sunshine-base as sunshine-build
ARG TARGETPLATFORM
RUN echo "target_platform: ${TARGETPLATFORM}"
ARG BRANCH
ARG BUILD_VERSION
ARG COMMIT
# note: BUILD_VERSION may be blank
ENV BRANCH=${BRANCH}
ENV BUILD_VERSION=${BUILD_VERSION}
ENV COMMIT=${COMMIT}
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# install dependencies
# hadolint ignore=DL3041
RUN <<_DEPS
#!/bin/bash
set -e
dnf -y update
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 \
libdrm-devel \
libevdev-devel \
libnotify-devel \
libva-devel \
libvdpau-devel \
libX11-devel \
libxcb-devel \
libXcursor-devel \
libXfixes-devel \
libXi-devel \
libXinerama-devel \
libXrandr-devel \
libXtst-devel \
mesa-libGL-devel \
miniupnpc-devel \
nodejs \
numactl-devel \
openssl-devel \
opus-devel \
pulseaudio-libs-devel \
python3.10 \
rpm-build \
wget \
which \
xorg-x11-server-Xvfb
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
dnf -y install intel-mediasdk-devel
fi
dnf clean all
rm -rf /var/cache/yum
_DEPS
## install cuda
WORKDIR /build/cuda
## versions: https://developer.nvidia.com/cuda-toolkit-archive
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
# copy repository
WORKDIR /build/sunshine/
COPY --link .. .
# setup build directory
WORKDIR /build/sunshine/build
# cmake and cpack
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 \
-DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
-DSUNSHINE_ENABLE_WAYLAND=ON \
-DSUNSHINE_ENABLE_X11=ON \
-DSUNSHINE_ENABLE_DRM=ON \
-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
ARG TARGETARCH
COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.rpm /sunshine-${BASE}-${TAG}-${TARGETARCH}.rpm
FROM sunshine-base as sunshine
# copy deb from builder
COPY --link --from=artifacts /sunshine*.rpm /sunshine.rpm
# install sunshine
RUN <<_INSTALL_SUNSHINE
#!/bin/bash
set -e
dnf -y update
dnf -y install /sunshine.rpm
dnf clean all
rm -rf /var/cache/yum
_INSTALL_SUNSHINE
# network setup
EXPOSE 47984-47990/tcp
EXPOSE 48010
EXPOSE 47998-48000/udp
# setup user
ARG PGID=1000
ENV PGID=${PGID}
ARG PUID=1000
ENV PUID=${PUID}
ENV TZ="UTC"
ARG UNAME=lizard
ENV UNAME=${UNAME}
ENV HOME=/home/$UNAME
# setup user
RUN <<_SETUP_USER
#!/bin/bash
set -e
groupadd -f -g "${PGID}" "${UNAME}"
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${UNAME}"
mkdir -p ${HOME}/.config/sunshine
ln -s ${HOME}/.config/sunshine /config
chown -R ${UNAME} ${HOME}
_SETUP_USER
USER ${UNAME}
WORKDIR ${HOME}
# entrypoint
ENTRYPOINT ["/usr/bin/sunshine"]

194
docker/fedora-39.dockerfile Normal file
View File

@@ -0,0 +1,194 @@
# syntax=docker/dockerfile:1.4
# artifacts: true
# platforms: linux/amd64
# platforms_pr: linux/amd64
# no-cache-filters: sunshine-base,artifacts,sunshine
ARG BASE=fedora
ARG TAG=39
FROM ${BASE}:${TAG} AS sunshine-base
FROM sunshine-base as sunshine-build
ARG TARGETPLATFORM
RUN echo "target_platform: ${TARGETPLATFORM}"
ARG BRANCH
ARG BUILD_VERSION
ARG COMMIT
# note: BUILD_VERSION may be blank
ENV BRANCH=${BRANCH}
ENV BUILD_VERSION=${BUILD_VERSION}
ENV COMMIT=${COMMIT}
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# install dependencies
# hadolint ignore=DL3041
RUN <<_DEPS
#!/bin/bash
set -e
dnf -y update
dnf -y group install "Development Tools"
dnf -y install \
boost-devel-1.81.0* \
cmake-3.27.* \
doxygen \
gcc-13.2.* \
gcc-c++-13.2.* \
git \
graphviz \
libappindicator-gtk3-devel \
libcap-devel \
libcurl-devel \
libdrm-devel \
libevdev-devel \
libnotify-devel \
libva-devel \
libvdpau-devel \
libX11-devel \
libxcb-devel \
libXcursor-devel \
libXfixes-devel \
libXi-devel \
libXinerama-devel \
libXrandr-devel \
libXtst-devel \
mesa-libGL-devel \
miniupnpc-devel \
nodejs \
numactl-devel \
openssl-devel \
opus-devel \
pulseaudio-libs-devel \
python3.11 \
rpm-build \
wget \
which \
xorg-x11-server-Xvfb
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
dnf -y install intel-mediasdk-devel
fi
dnf clean all
rm -rf /var/cache/yum
_DEPS
# install cuda
WORKDIR /build/cuda
# versions: https://developer.nvidia.com/cuda-toolkit-archive
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"
# 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}"
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 build directory
WORKDIR /build/sunshine/build
# cmake and cpack
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 \
-DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
-DSUNSHINE_ENABLE_WAYLAND=ON \
-DSUNSHINE_ENABLE_X11=ON \
-DSUNSHINE_ENABLE_DRM=ON \
-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
ARG TARGETARCH
COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.rpm /sunshine-${BASE}-${TAG}-${TARGETARCH}.rpm
FROM sunshine-base as sunshine
# copy deb from builder
COPY --link --from=artifacts /sunshine*.rpm /sunshine.rpm
# install sunshine
RUN <<_INSTALL_SUNSHINE
#!/bin/bash
set -e
dnf -y update
dnf -y install /sunshine.rpm
dnf clean all
rm -rf /var/cache/yum
_INSTALL_SUNSHINE
# network setup
EXPOSE 47984-47990/tcp
EXPOSE 48010
EXPOSE 47998-48000/udp
# setup user
ARG PGID=1000
ENV PGID=${PGID}
ARG PUID=1000
ENV PUID=${PUID}
ENV TZ="UTC"
ARG UNAME=lizard
ENV UNAME=${UNAME}
ENV HOME=/home/$UNAME
# setup user
RUN <<_SETUP_USER
#!/bin/bash
set -e
groupadd -f -g "${PGID}" "${UNAME}"
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${UNAME}"
mkdir -p ${HOME}/.config/sunshine
ln -s ${HOME}/.config/sunshine /config
chown -R ${UNAME} ${HOME}
_SETUP_USER
USER ${UNAME}
WORKDIR ${HOME}
# entrypoint
ENTRYPOINT ["/usr/bin/sunshine"]

View File

@@ -0,0 +1,206 @@
# syntax=docker/dockerfile:1.4
# artifacts: true
# platforms: linux/amd64,linux/arm64/v8
# platforms_pr: linux/amd64
# no-cache-filters: sunshine-base,artifacts,sunshine
ARG BASE=ubuntu
ARG TAG=22.04
FROM ${BASE}:${TAG} AS sunshine-base
ENV DEBIAN_FRONTEND=noninteractive
FROM sunshine-base as sunshine-build
ARG TARGETPLATFORM
RUN echo "target_platform: ${TARGETPLATFORM}"
ARG BRANCH
ARG BUILD_VERSION
ARG COMMIT
# note: BUILD_VERSION may be blank
ENV BRANCH=${BRANCH}
ENV BUILD_VERSION=${BUILD_VERSION}
ENV COMMIT=${COMMIT}
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 \
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
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
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=/build/cuda --no-opengl-libs --no-man-page --no-drm
rm ./cuda.run
_INSTALL_CUDA
# copy repository
WORKDIR /build/sunshine/
COPY --link .. .
# 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 \
-DSUNSHINE_ASSETS_DIR=share/sunshine \
-DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
-DSUNSHINE_ENABLE_WAYLAND=ON \
-DSUNSHINE_ENABLE_X11=ON \
-DSUNSHINE_ENABLE_DRM=ON \
-DSUNSHINE_ENABLE_CUDA=ON \
/build/sunshine
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
ARG TARGETARCH
COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /sunshine-${BASE}-${TAG}-${TARGETARCH}.deb
FROM sunshine-base as sunshine
# copy deb from builder
COPY --link --from=artifacts /sunshine*.deb /sunshine.deb
# install sunshine
RUN <<_INSTALL_SUNSHINE
#!/bin/bash
set -e
apt-get update -y
apt-get install -y --no-install-recommends /sunshine.deb
apt-get clean
rm -rf /var/lib/apt/lists/*
_INSTALL_SUNSHINE
# network setup
EXPOSE 47984-47990/tcp
EXPOSE 48010
EXPOSE 47998-48000/udp
# setup user
ARG PGID=1000
ENV PGID=${PGID}
ARG PUID=1000
ENV PUID=${PUID}
ENV TZ="UTC"
ARG UNAME=lizard
ENV UNAME=${UNAME}
ENV HOME=/home/$UNAME
# setup user
RUN <<_SETUP_USER
#!/bin/bash
set -e
groupadd -f -g "${PGID}" "${UNAME}"
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${UNAME}"
mkdir -p ${HOME}/.config/sunshine
ln -s ${HOME}/.config/sunshine /config
chown -R ${UNAME} ${HOME}
_SETUP_USER
USER ${UNAME}
WORKDIR ${HOME}
# entrypoint
ENTRYPOINT ["/usr/bin/sunshine"]

View File

@@ -0,0 +1,222 @@
# syntax=docker/dockerfile:1.4
# artifacts: true
# platforms: linux/amd64
# platforms_pr: linux/amd64
# no-cache-filters: sunshine-base,artifacts,sunshine
ARG BASE=ubuntu
ARG TAG=24.04
FROM ${BASE}:${TAG} AS sunshine-base
ENV DEBIAN_FRONTEND=noninteractive
FROM sunshine-base as sunshine-build
ARG TARGETPLATFORM
RUN echo "target_platform: ${TARGETPLATFORM}"
ARG BRANCH
ARG BUILD_VERSION
ARG COMMIT
# note: BUILD_VERSION may be blank
ENV BRANCH=${BRANCH}
ENV BUILD_VERSION=${BUILD_VERSION}
ENV COMMIT=${COMMIT}
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.28.* \
ca-certificates \
doxygen \
gcc-11 \
g++-11 \
git \
graphviz \
libayatana-appindicator3-dev \
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 \
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.12 \
python3.12-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
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-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 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=/build/cuda --no-opengl-libs --no-man-page --no-drm
rm ./cuda.run
_INSTALL_CUDA
# copy repository
WORKDIR /build/sunshine/
COPY --link .. .
# 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 \
-DSUNSHINE_ASSETS_DIR=share/sunshine \
-DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
-DSUNSHINE_ENABLE_WAYLAND=ON \
-DSUNSHINE_ENABLE_X11=ON \
-DSUNSHINE_ENABLE_DRM=ON \
-DSUNSHINE_ENABLE_CUDA=ON \
/build/sunshine
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
ARG TARGETARCH
COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /sunshine-${BASE}-${TAG}-${TARGETARCH}.deb
FROM sunshine-base as sunshine
# copy deb from builder
COPY --link --from=artifacts /sunshine*.deb /sunshine.deb
# install sunshine
RUN <<_INSTALL_SUNSHINE
#!/bin/bash
set -e
apt-get update -y
apt-get install -y --no-install-recommends /sunshine.deb
apt-get clean
rm -rf /var/lib/apt/lists/*
_INSTALL_SUNSHINE
# network setup
EXPOSE 47984-47990/tcp
EXPOSE 48010
EXPOSE 47998-48000/udp
# setup user
ARG PGID=1001
ENV PGID=${PGID}
ARG PUID=1001
ENV PUID=${PUID}
ENV TZ="UTC"
ARG UNAME=lizard
ENV UNAME=${UNAME}
ENV HOME=/home/$UNAME
# setup user
RUN <<_SETUP_USER
#!/bin/bash
set -e
groupadd -f -g "${PGID}" "${UNAME}"
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${UNAME}"
mkdir -p ${HOME}/.config/sunshine
ln -s ${HOME}/.config/sunshine /config
chown -R ${UNAME} ${HOME}
_SETUP_USER
USER ${UNAME}
WORKDIR ${HOME}
# entrypoint
ENTRYPOINT ["/usr/bin/sunshine"]

2892
docs/Doxyfile Normal file

File diff suppressed because it is too large Load Diff

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,4 +1,9 @@
furo==2022.9.29
m2r2==0.3.3
Sphinx==5.3.0
sphinx-copybutton==0.5.0
breathe==4.35.0
furo==2024.1.29
m2r2==0.3.3.post2
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

@@ -1,3 +1 @@
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/DOCKER_README.md
.. mdinclude:: ../../../DOCKER_README.md

View File

@@ -0,0 +1,352 @@
App Examples
============
Since not all applications behave the same, we decided to create some examples to help you get started adding games
and applications to Sunshine.
.. attention:: Throughout these examples, any fields not shown are left blank. You can enhance your experience by
adding an image or a log file (via the ``Output`` field).
.. note:: When a working directory is not specified, it defaults to the folder where the target application resides.
Common Examples
---------------
Desktop
^^^^^^^
+----------------------+-----------------+
| **Field** | **Value** |
+----------------------+-----------------+
| Application Name | ``Desktop`` |
+----------------------+-----------------+
| Image | ``desktop.png`` |
+----------------------+-----------------+
Steam Big Picture
^^^^^^^^^^^^^^^^^
.. note:: Steam is launched as a detached command because Steam starts with a process that self updates itself and the original
process is killed.
.. 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.
URI (Epic)
""""""""""
.. tab:: Windows
+----------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| Application Name | ``Surviving Mars`` |
+----------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| Command | ``com.epicgames.launcher://apps/d759128018124dcabb1fbee9bb28e178%3A20729b9176c241f0b617c5723e70ec2d%3AOvenbird?action=launch&silent=true`` |
+----------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
Binary (Epic w/ working directory)
""""""""""""""""""""""""""""""""""
.. tab:: Windows
+----------------------+-----------------------------------------------+
| Application Name | ``Surviving Mars`` |
+----------------------+-----------------------------------------------+
| Command | ``MarsEpic.exe`` |
+----------------------+-----------------------------------------------+
| Working Directory | ``C:\Program Files\Epic Games\SurvivingMars`` |
+----------------------+-----------------------------------------------+
Binary (Epic w/o working directory)
"""""""""""""""""""""""""""""""""""
.. 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.
URI (Steam)
"""""""""""
.. 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)
"""""""""""""""""""""""""""""""""""
.. 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)
""""""""""""""""""""""""""""""""""""
.. tab:: Linux
+----------------------+-------------------------------------------------------------+
| Application Name | ``Surviving Mars`` |
+----------------------+-------------------------------------------------------------+
| Command | ``~/.steam/steam/SteamApps/common/Survivng Mars/MarsSteam`` |
+----------------------+-------------------------------------------------------------+
.. tab:: macOS
+----------------------+-------------------------------------------------------------+
| Application Name | ``Surviving Mars`` |
+----------------------+-------------------------------------------------------------+
| Command | ``~/.steam/steam/SteamApps/common/Survivng Mars/MarsSteam`` |
+----------------------+-------------------------------------------------------------+
.. tab:: Windows
+----------------------+----------------------------------------------------------------------------------+
| Application Name | ``Surviving Mars`` |
+----------------------+----------------------------------------------------------------------------------+
| Command | ``"C:\Program Files (x86)\Steam\steamapps\common\Surviving Mars\MarsSteam.exe"`` |
+----------------------+----------------------------------------------------------------------------------+
Prep Commands
-------------
Changing Resolution and Refresh Rate
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. tab:: Linux
.. tab:: X11
+----------------------+------------------------------------------------------------------------------------------------------------------------------------+
| Command Preparations | Do: ``sh -c "xrandr --output HDMI-1 --mode \"${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}\" --rate ${SUNSHINE_CLIENT_FPS}"`` |
| +------------------------------------------------------------------------------------------------------------------------------------+
| | Undo: ``xrandr --output HDMI-1 --mode 3840x2160 --rate 120`` |
+----------------------+------------------------------------------------------------------------------------------------------------------------------------+
.. hint::
The above only works if the xrandr mode already exists. You will need to create new modes to stream to macOS and iOS devices, since they use non standard resolutions.
You can update the ``Do`` command to this:
.. code-block:: bash
bash -c "${HOME}/scripts/set-custom-res.sh \"${SUNSHINE_CLIENT_WIDTH}\" \"${SUNSHINE_CLIENT_HEIGHT}\" \"${SUNSHINE_CLIENT_FPS}\""
The ``set-custom-res.sh`` will have this content:
.. code-block:: bash
#!/bin/bash
# Get params and set any defaults
width=${1:-1920}
height=${2:-1080}
refresh_rate=${3:-60}
# You may need to adjust the scaling differently so the UI/text isn't too small / big
scale=${4:-0.55}
# Get the name of the active display
display_output=$(xrandr | grep " connected" | awk '{ print $1 }')
# Get the modeline info from the 2nd row in the cvt output
modeline=$(cvt ${width} ${height} ${refresh_rate} | awk 'FNR == 2')
xrandr_mode_str=${modeline//Modeline \"*\" /}
mode_alias="${width}x${height}"
echo "xrandr setting new mode ${mode_alias} ${xrandr_mode_str}"
xrandr --newmode ${mode_alias} ${xrandr_mode_str}
xrandr --addmode ${display_output} ${mode_alias}
# Reset scaling
xrandr --output ${display_output} --scale 1
# Apply new xrandr mode
xrandr --output ${display_output} --primary --mode ${mode_alias} --pos 0x0 --rotate normal --scale ${scale}
# Optional reset your wallpaper to fit to new resolution
# xwallpaper --zoom /path/to/wallpaper.png
.. tab:: Wayland
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------+
| 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`` |
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------+
.. 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

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

View File

@@ -0,0 +1,10 @@
Linux
======
Collection of Sunshine Linux host guides.
.. toctree::
:maxdepth: 1
:glob:
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

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

View File

@@ -1,231 +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
-----
First, follow the instructions for your preferred package type below.
Then start sunshine with the following command, unless a start command is listed in the specified package.
.. code-block:: bash
sunshine
AppImage
^^^^^^^^
.. image:: https://img.shields.io/github/issues/lizardbyte/sunshine/pkg:appimage?logo=github&style=for-the-badge
:alt: GitHub issues by-label
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 jammy
- [✔] Ubuntu impish
- [✔] Ubuntu focal
- [✖] Ubuntu bionic
- [✖] Ubuntu xenial
- [✖] Ubuntu trusty
- [✖] CentOS 7
#. Download ``sunshine-appimage.zip`` and extract the contents 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
AUR Package
^^^^^^^^^^^
#. Open terminal and run the following code.
.. code-block:: bash
git clone https://aur.archlinux.org/sunshine.git
cd sunshine
makepkg -fi
Uninstall:
.. code-block:: bash
pacman -R sunshine
Debian Package
^^^^^^^^^^^^^^
.. image:: https://img.shields.io/github/issues/lizardbyte/sunshine/pkg:deb?logo=github&style=for-the-badge
:alt: GitHub issues by-label
#. Download ``sunshine.deb`` and run the following code.
.. code-block:: bash
sudo apt install -f ./sunshine.deb
.. 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
^^^^^^^^^^^^^^^
.. image:: https://img.shields.io/github/issues/lizardbyte/sunshine/pkg:flatpak?logo=github&style=for-the-badge
:alt: GitHub issues by-label
#. Install `Flatpak <https://flatpak.org/setup/>`_ as required.
#. Download ``sunshine.flatpak`` and run the following code.
System level (recommended)
.. code-block:: bash
flatpak install --system sunshine.flatpak
User level
.. code-block:: bash
flatpak install --user sunshine.flatpak
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 uninstall --delete-data sunshine.flatpak
RPM Package
^^^^^^^^^^^
.. image:: https://img.shields.io/github/issues/lizardbyte/sunshine/pkg:rpm?logo=github&style=for-the-badge
:alt: GitHub issues by-label
#. 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
-----
.. image:: https://img.shields.io/github/issues/lizardbyte/sunshine/os:macos?logo=github&style=for-the-badge
:alt: GitHub issues by-label
pkg
^^^
.. Warning:: The `pkg` does not include runtime dependencies and should be considered experimental.
#. Download the ``sunshine.pkg`` file and install it as normal.
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
-------
.. image:: https://img.shields.io/github/issues/lizardbyte/sunshine/os:windows:10?logo=github&style=for-the-badge
:alt: GitHub issues by-label
.. image:: https://img.shields.io/github/issues/lizardbyte/sunshine/os:windows:11?logo=github&style=for-the-badge
:alt: GitHub issues by-label
Installer
^^^^^^^^^
#. Download and install ``sunshine-windows.exe``
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.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.

View File

@@ -1,57 +1,37 @@
Third Party Packages
====================
.. Danger:: These packages are not maintained by LizardByte. Use at your own risk.
.. danger:: These packages are not maintained by LizardByte. Use at your own risk.
AUR
---
.. image:: https://img.shields.io/badge/dynamic/json.svg?color=blue&label=AUR&style=for-the-badge&query=$.results.0.NumVotes&url=https%3A%2F%2Fapp.lizardbyte.dev%2Funo%2Faur%2Fsunshine.json&logo=archlinux
:alt: AUR votes
:target: https://aur.archlinux.org/packages/sunshine
Chocolatey
----------
.. image:: https://img.shields.io/chocolatey/v/Sunshine?style=for-the-badge&logo=chocolatey
.. image:: https://img.shields.io/badge/dynamic/xml.svg?color=orange&label=chocolatey&style=for-the-badge&prefix=v&query=%2F%2Ftr%5B%40id%3D%27chocolatey%27%5D%2Ftd%5B3%5D%2Fspan%2Fa&url=https%3A%2F%2Frepology.org%2Fproject%2Fsunshine%2Fversions&logo=chocolatey
:alt: Chocolatey Version
:target: https://community.chocolatey.org/packages/sunshine
.. image:: https://img.shields.io/chocolatey/dt/sunshine?style=for-the-badge&logo=chocolatey
:alt: Chocolatey
nixpkgs
-------
.. image:: https://img.shields.io/badge/dynamic/xml?color=orange&label=nixpkgs&style=for-the-badge&prefix=v&query=%2F%2Ftr%5B%40id%3D%27nix_unstable%27%5D%2Ftd%5B3%5D%2Fspan%2Fa&url=https%3A%2F%2Frepology.org%2Fproject%2Fsunshine%2Fversions&logo=nixos
.. image:: https://img.shields.io/badge/dynamic/xml.svg?color=orange&label=nixpkgs&style=for-the-badge&prefix=v&query=%2F%2Ftr%5B%40id%3D%27nix_unstable%27%5D%2Ftd%5B3%5D%2Fspan%2Fa&url=https%3A%2F%2Frepology.org%2Fproject%2Fsunshine%2Fversions&logo=nixos
:alt: nixpgs Version
:target: https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/sunshine/default.nix
:target: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/servers/sunshine/default.nix
Scoop
-----
.. image:: https://img.shields.io/scoop/v/sunshine?bucket=extras&style=for-the-badge
.. image:: https://img.shields.io/scoop/v/sunshine.svg?bucket=extras&style=for-the-badge&logo=data:image/vnd.microsoft.icon;base64,AAABAAEAEBAAAAEAGAAhAwAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAQAAAAEAgGAAAAH/P/YQAAAuhJREFUOE9tk1tIFFEYx7+ZXdfbrhdMElJLFCykCxL20MUW9UkkqeiOFGSWYW75EvjgVlJmlpkaJV5SMtQlMYjEROqpQoiMMEpRW2/p6q67bTuXM2dmOjPu2moNDHPm4/v/Zs7//D9KlmUNAMjkBoqiJOVJapTyqqzXXn49tCohzbRSVERPSi7tokFOSkne2rmzoED4H6C0pHwjT2G2qspsU7U+wBuzWTs8M9mlpen0YEOoMS/73DjrnMuhXFyiLEmjwZH6vmufR5DDNtHBI7b9cWNNpw9AgcVCtw6+P8R43KdkjHMM+vDqI/tywyiN5oy46KQpLEogiG0149+7rG5HGRK5o01N9VYVoPxm/ZXCOMrD95NloihiOj4qhs1K3R8IbqQFogVJAuRifrXNT3wactkGmpvrbni9UregQu7nn87X0XB3w+ZYfcruHRAVJgNtE0EclmCGM8CYC2DE5UK8TJXtzT1ZZTRSeJUHiqOvW29Vb89KKw4kYgEvgIQFGHurg3l7AlitS8CzAohYZgQB5ZU9Ovx8FcBkMkdcKEx5GL1ee1yWGcKjgWMQfHgVDVOjNPD88qHwHAYOe57GbHOcLSoqQiunYC4tT4tL0NYmbwkOx1hO1ukABITg40AkOO0BJCgiYFEAl9sBjGj/pl+nyairq5xdAdy50xbKuH+eFyUMkijdJtHQCAIGxiOQYC0nguMYmJqeVJJW29vfU7wqSErDzeuV6aQ5lUPoIjn7RI5FRIRUMQkbLC05YN42txgaEpTd89IyuNZEaGlpCZqdXsjHAj5Avp7h+c2CIIiqGGMMMzNTgDD/oLev57I3vX+T6IttRUVNvNvpusey3EGeE5QtAkI82B12YFjmXagh5ER39zOrfw7UWfDPvcl0ddP0j+lGjucylDoiZhIbvkboDccsL9q/+Hr/2YI/JDMzZ4/IIyMhRyh1XYBmKCEptqOhoWFlyHwAZZxX/YHXNK/3/tiVUfcV6T8hxMYSf1PeGAAAAABJRU5ErkJggg==
:alt: Scoop Version (extras bucket)
:target: https://scoop.sh/#/apps?s=0&d=1&o=true&q=sunshine
Solus
-----
.. image:: https://img.shields.io/badge/dynamic/xml?color=orange&label=Solus&style=for-the-badge&prefix=v&query=%2F%2Ftr%5B%40id%3D%27solus%27%5D%2Ftd%5B3%5D%2Fspan%2Fa&url=https%3A%2F%2Frepology.org%2Fproject%2Fsunshine%2Fversions&logo=solus
.. image:: https://img.shields.io/badge/dynamic/xml.svg?color=orange&label=Solus&style=for-the-badge&prefix=v&query=%2F%2Ftr%5B%40id%3D%27solus%27%5D%2Ftd%5B3%5D%2Fspan%2Fa&url=https%3A%2F%2Frepology.org%2Fproject%2Fsunshine%2Fversions&logo=solus
:alt: Solus Version
:target: https://dev.getsol.us/source/sunshine
Winget
------
.. image:: https://img.shields.io/badge/dynamic/xml?color=orange&label=Winget&style=for-the-badge&prefix=v&query=%2F%2Ftr%5B%40id%3D%27winget%27%5D%2Ftd%5B3%5D%2Fspan%2Fa&url=https%3A%2F%2Frepology.org%2Fproject%2Fsunshine%2Fversions&logo=microsoft
:alt: Winget Version
:target: https://github.com/microsoft/winget-pkgs/tree/master/manifests/l/LizardByte/Sunshine
Legacy GitHub Repo
------------------
.. Attention:: This repo is not maintained. Thank you to Loki for bringing this amazing project to life!
.. image:: https://img.shields.io/static/v1?label=repo&message=loki-47-6F-64/sunshine&color=blue&style=for-the-badge&logo=github
:alt: GitHub Maintainer
:target: https://github.com/loki-47-6F-64/sunshine/releases
.. image:: https://img.shields.io/github/last-commit/loki-47-6F-64/sunshine?style=for-the-badge&logo=github
:alt: GitHub last commit
.. image:: https://img.shields.io/github/release-date/loki-47-6F-64/sunshine?style=for-the-badge&logo=github
:alt: GitHub Release Date
.. image:: https://img.shields.io/github/downloads/loki-47-6F-64/sunshine/total?style=for-the-badge&logo=github
:alt: GitHub Releases

View File

@@ -1,215 +0,0 @@
Usage
=====
#. See the `setup`_ section for your specific OS.
#. Run ``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.
.. Tip:: If using the Linux AppImage, replace ``sunshine`` with ``./sunshine.AppImage``
#. 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".
.. Caution:: If running for the first time, make sure to note the username and password Sunshine showed to you,
since you cannot get back later!
**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.
.. Attention:: Application list is not fully supported on macOS
#. 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`, and `AppImage` packages handle these steps automatically. The flatpak does not, third party packages
also may not.
Sunshine needs access to `uinput` to create mouse and gamepad events.
#. Add user to group `input`, if this is the first time installing.
.. code-block:: bash
sudo usermod -a -G input $USER
#. Create `udev` rules.
.. code-block::
echo 'KERNEL=="uinput", GROUP="input", MODE="0660", OPTIONS+="static_node=uinput"' | \
sudo tee /etc/udev/rules.d/85-sunshine-input.rules
#. Optionally, configure autostart service
- filename: ``~/.config/systemd/user/sunshine.service``
- contents:
.. code-block::
[Unit]
Description=Sunshine Gamestream Server for Moonlight
[Service]
ExecStart=<see table>
[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**
.. 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>`_ and
select their sink as audio device in `sunshine.conf`.
.. 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 `ViGEmBus <https://github.com/ViGEm/ViGEmBus/releases/latest>`_
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/F13`` - 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 recommended.
- 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
- Example application:
.. code-block:: json
{
"name":"An App",
"cmd":"command to open app",
"prep-cmd":[
{
"do":"some-command",
"undo":"undo-that-command"
}
],
"detached":[
"some-command",
"another-command"
]
}
- ``name`` - The name of the application/game
- ``output`` - The file where the output of the command is stored
- ``detached`` - A list of commands to be run and forgotten about
- ``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
- This should not fail considering it is supposed to undo the ``do`` commands
- If it fails, Sunshine is terminated
- ``cmd`` - The main application
- If not specified, a process is started that sleeps indefinitely
Considerations
--------------
- 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.
- In addition to the apps listed, one app "Desktop" is hardcoded into Sunshine. It does not start an application,
instead it simply starts a stream.
- For the Linux flatpak you must prepend commands with ``flatpak-spawn --host``.

View File

@@ -1,6 +1,6 @@
Build
=====
Sunshine binaries are built using `CMake <https://cmake.org/>`_. Cross compilation is not
Sunshine binaries are built using `CMake <https://cmake.org/>`__. Cross compilation is not
supported. That means the binaries must be built on the target operating system and architecture.
Building Locally
@@ -8,7 +8,7 @@ Building Locally
Clone
^^^^^
Ensure `git <https://git-scm.com/>`_ is installed and run the following:
Ensure `git <https://git-scm.com/>`__ is installed and run the following:
.. code-block:: bash
git clone https://github.com/lizardbyte/sunshine.git --recurse-submodules

View File

@@ -4,9 +4,10 @@ Linux
Requirements
------------
Debian Bullseye
^^^^^^^^^^^^^^^
End of Life: TBD
Debian Bullseye/Bookworm
^^^^^^^^^^^^^^^^^^^^^^^^
End of Life (Bullseye): July, 2024
End of Life (Bookworm): TBD
Install Requirements
.. code-block:: bash
@@ -14,16 +15,24 @@ Install Requirements
sudo apt update && sudo apt install \
build-essential \
cmake \
libavdevice-dev \
libayatana-appindicator3-dev \
libboost-filesystem-dev \
libboost-locale-dev \
libboost-log-dev \
libboost-thread-dev \
libboost-program-options-dev \
libcap-dev \ # KMS
libcurl4-openssl-dev \
libdrm-dev \ # KMS
libevdev-dev \
libpulse-dev \
libminiupnpc-dev \
libmfx-dev \ # x86_64 only
libnotify-dev \
libnuma-dev \
libopus-dev \
libpulse-dev \
libssl-dev \
libva-dev \ # VA-API
libvdpau-dev \
libwayland-dev \ # Wayland
libx11-dev \ # X11
libxcb-shm0-dev \ # X11
@@ -32,153 +41,54 @@ Install Requirements
libxfixes-dev \ # X11
libxrandr-dev \ # X11
libxtst-dev \ # X11
nodejs \
npm \
nvidia-cuda-dev \ # Cuda, NvFBC
nvidia-cuda-toolkit \ # Cuda, NvFBC
nvidia-cuda-toolkit # Cuda, NvFBC
Fedora 35
^^^^^^^^^
End of Life: TBD
Install Repositories
.. code-block:: bash
sudo dnf update && \
sudo dnf group install "Development Tools" && \
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
Fedora 38, 39
^^^^^^^^^^^^^
Install Requirements
.. code-block:: bash
sudo dnf update && \
sudo dnf group install "Development Tools" && \
sudo dnf install \
boost-devel \
boost-static.x86_64 \
cmake \
ffmpeg-devel \
gcc \
gcc-c++ \
intel-mediasdk-devel \ # x86_64 only
libappindicator-gtk3-devel \
libcap-devel \
libcurl-devel \
libdrm-devel \
libevdev-devel \
libnotify-devel \
libva-devel \ # VA-API
libvdpau-devel \
libX11-devel \ # X11
libxcb-devel \ # X11
libXcursor-devel \ # X11
libXfixes-devel \ # X11
libXinerama-devel \ # X11
libXi-devel \ # X11
libXinerama-devel \ # X11
libXrandr-devel \ # X11
libXtst-devel \ # X11
mesa-libGL-devel \
miniupnpc-devel \
npm \
numactl-devel \
openssl-devel \
opus-devel \
pulseaudio-libs-devel \
rpm-build \ # if you want to build an RPM binary package
Ubuntu 18.04
^^^^^^^^^^^^
End of Life: April 2028
Install Repositories
.. code-block:: bash
sudo apt update && sudo apt install \
software-properties-common \
&& add-apt-repository ppa:savoury1/graphics && \
add-apt-repository ppa:savoury1/multimedia && \
add-apt-repository ppa:savoury1/ffmpeg4 && \
add-apt-repository ppa:savoury1/boost-defaults-1.71 && \
add-apt-repository ppa:ubuntu-toolchain-r/test && \
Install Requirements
.. code-block:: bash
sudo apt install \
build-essential \
cmake \
gcc-10 \
g++-10 \
libavdevice-dev \
libboost-filesystem1.71-dev \
libboost-log1.71-dev \
libboost-regex1.71-dev \
libboost-thread1.71-dev \
libcap-dev \ # KMS
libdrm-dev \ # KMS
libevdev-dev \
libpulse-dev \
libopus-dev \
libssl-dev \
libwayland-dev \ # Wayland
libx11-dev \ # X11
libxcb-shm0-dev \ # X11
libxcb-xfixes0-dev \ # X11
libxcb1-dev \ # X11
libxfixes-dev \ # X11
libxrandr-dev \ # X11
libxtst-dev \ # X11
wget \
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
Install CuDA
.. code-block:: bash
wget https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux.run --progress=bar:force:noscroll -q --show-progress -O ./cuda.run && chmod a+x ./cuda.run
./cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm && rm ./cuda.run
Install CMake
.. code-block:: bash
wget https://cmake.org/files/v3.22/cmake-3.22.2-linux-x86_64.sh
mkdir /opt/cmake
sh /cmake-3.22.2-linux-x86_64.sh --prefix=/opt/cmake --skip-license
ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake
cmake --version
Ubuntu 20.04
^^^^^^^^^^^^
End of Life: April 2030
Install Requirements
.. code-block:: bash
sudo apt update && sudo apt install \
build-essential \
cmake \
g++-10 \
libavdevice-dev \
libboost-filesystem-dev \
libboost-log-dev \
libboost-thread-dev \
libcap-dev \ # KMS
libdrm-dev \ # KMS
libevdev-dev \
libpulse-dev \
libopus-dev \
libssl-dev \
libwayland-dev \ # Wayland
libx11-dev \ # X11
libxcb-shm0-dev \ # X11
libxcb-xfixes0-dev \ # X11
libxcb1-dev \ # X11
libxfixes-dev \ # X11
libxrandr-dev \ # X11
libxtst-dev \ # X11
wget \
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
Install CuDA
.. code-block:: bash
wget https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux.run --progress=bar:force:noscroll -q --show-progress -O ./cuda.run && chmod a+x ./cuda.run
./cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm && rm ./cuda.run
wget \ # necessary for cuda install with `run` file
which # necessary for cuda install with `run` file
Ubuntu 22.04
^^^^^^^^^^^^
End of Life: April 2027
Install Requirements
.. code-block:: bash
@@ -186,16 +96,23 @@ Install Requirements
sudo apt update && sudo apt install \
build-essential \
cmake \
libavdevice-dev \
libappindicator3-dev \
libboost-filesystem-dev \
libboost-locale-dev \
libboost-log-dev \
libboost-thread-dev \
libboost-program-options-dev \
libcap-dev \ # KMS
libcurl4-openssl-dev \
libdrm-dev \ # KMS
libevdev-dev \
libpulse-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
@@ -204,26 +121,89 @@ Install Requirements
libxfixes-dev \ # X11
libxrandr-dev \ # X11
libxtst-dev \ # X11
nvidia-cuda-dev \ # Cuda, NvFBC
nvidia-cuda-toolkit \ # Cuda, NvFBC
nodejs \
npm \
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.
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
`CUDA Toolkit Archive <https://developer.nvidia.com/cuda-toolkit-archive>`__.
.. code-block:: bash
wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run \
--progress=bar:force:noscroll -q --show-progress -O ./cuda.run
chmod a+x ./cuda.run
./cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm
rm ./cuda.run
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.
Debian based OSes
.. code-block:: bash
.. code-block:: bash
cmake -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 ..
cmake ..
make -j ${nproc}
Red Hat based OSes
.. code-block:: bash
cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ ..
Finally
.. code-block:: bash
make -j ${nproc}
cpack -G DEB # optionally, create a deb package
cpack -G RPM # optionally, create a rpm package
cpack -G DEB # optionally, create a deb package
cpack -G RPM # optionally, create a rpm package

View File

@@ -5,36 +5,49 @@ Requirements
------------
macOS Big Sur and Xcode 12.5+
Use either `MacPorts <https://www.macports.org>`_ or `Homebrew <https://brew.sh>`_
Use either `MacPorts <https://www.macports.org>`__ or `Homebrew <https://brew.sh>`__
MacPorts
""""""""
Install Requirements
.. code-block:: bash
sudo port install cmake boost ffmpeg libopus
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 ffmpeg opus
# 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
If there are issues with an SSL header that is not found:
.. tab:: Intel
.. 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
If cmake fails complaining to find Boost, try to set the path explicitly.
``cmake -DBOOST_ROOT=[boost path] ..``, e.g., ``cmake -DBOOST_ROOT=/opt/local/libexec/boost/1.76 ..``
``cmake -DBOOST_ROOT=[boost path] ..``, e.g., ``cmake -DBOOST_ROOT=/opt/local/libexec/boost/1.80 ..``

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