Skip to content

Commit 00fbbc9

Browse files
Merge pull request #2216 from LizardByte/nightly
v0.22.1
2 parents c63637f + c43dd24 commit 00fbbc9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+604
-312
lines changed

.gitattributes

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

.github/workflows/CI.yml

+86-94
Original file line numberDiff line numberDiff line change
@@ -505,124 +505,111 @@ jobs:
505505
discussionCategory: announcements
506506
prerelease: ${{ needs.setup_release.outputs.pre_release }}
507507

508-
build_mac:
509-
name: MacOS
510-
runs-on: macos-11
508+
build_mac_brew:
511509
needs: [check_changelog, setup_release]
512-
env:
513-
BOOST_VERSION: 1.83.0
510+
strategy:
511+
fail-fast: false # false to test all, true to fail entire job if any fail
512+
matrix:
513+
include:
514+
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
515+
# while GitHub has larger macOS runners, they are not available for our repos :(
516+
- os_version: "12"
517+
release: true
518+
- os_version: "13"
519+
- os_version: "14"
520+
name: Homebrew (macOS-${{ matrix.os_version }})
521+
runs-on: macos-${{ matrix.os_version }}
514522

515523
steps:
516524
- name: Checkout
517525
uses: actions/checkout@v4
518-
with:
519-
submodules: recursive
520526

521-
- name: Setup Dependencies MacOS
527+
- name: Setup Dependencies Homebrew
522528
run: |
523529
# install dependencies using homebrew
524-
brew install cmake curl miniupnpc node openssl opus pkg-config
525-
526-
# fix openssl header not found
527-
# ln -sf /usr/local/opt/openssl/include/openssl /usr/local/include/openssl
528-
529-
# by installing boost from source, several headers cannot be found...
530-
# the above commented out link only works if boost is installed from homebrew... does not make sense
531-
ln -sf $(find /usr/local/Cellar -type d -name "openssl" -path "*/openssl@3/*/include" | head -n 1) \
532-
/usr/local/include/openssl
530+
brew install cmake
533531
534-
# fix opus header not found
535-
ln -sf $(find /usr/local/Cellar -type d -name "opus" -path "*/opus/*/include" | head -n 1) \
536-
/usr/local/include/opus
532+
- name: Configure formula
533+
run: |
534+
# variables for formula
535+
branch=${GITHUB_HEAD_REF}
537536
538-
# fix miniupnpc header not found
539-
ln -sf $(find /usr/local/Cellar -type d -name "miniupnpc" -path "*/miniupnpc/*/include" | head -n 1) \
540-
/usr/local/include/miniupnpc
537+
# check the branch variable
538+
if [ -z "$branch" ]
539+
then
540+
echo "This is a PUSH event"
541+
clone_url=${{ github.event.repository.clone_url }}
542+
branch="${{ github.ref_name }}"
543+
else
544+
echo "This is a PR event"
545+
clone_url=${{ github.event.pull_request.head.repo.clone_url }}
546+
branch="${{ github.event.pull_request.head.ref }}"
547+
fi
548+
echo "Branch: ${branch}"
549+
echo "Clone URL: ${clone_url}"
541550
542-
- name: Install Boost
543-
# installing boost from homebrew takes 30 minutes in a GitHub runner
544-
run: |
545-
export BOOST_ROOT=${HOME}/boost-${BOOST_VERSION}
546-
547-
# install boost
548-
wget \
549-
https://github.com/boostorg/boost/releases/download/boost-${BOOST_VERSION}/boost-${BOOST_VERSION}.tar.gz \
550-
--progress=bar:force:noscroll -q --show-progress
551-
tar xf boost-${BOOST_VERSION}.tar.gz
552-
cd boost-${BOOST_VERSION}
553-
554-
# libdir should be set by --prefix but isn't
555-
./bootstrap.sh \
556-
--prefix=${BOOST_ROOT} \
557-
--libdir=${BOOST_ROOT}/lib \
558-
--with-libraries=locale,log,program_options,system,thread
559-
./b2 headers
560-
./b2 install \
561-
--prefix=${BOOST_ROOT} \
562-
--libdir=${BOOST_ROOT}/lib \
563-
-j$(sysctl -n hw.ncpu) \
564-
link=shared,static \
565-
variant=release \
566-
cxxflags=-std=c++14 \
567-
cxxflags=-stdlib=libc++ \
568-
linkflags=-stdlib=libc++
569-
570-
# put boost in cmake prefix path
571-
echo "BOOST_ROOT=${BOOST_ROOT}" >> ${GITHUB_ENV}
572-
573-
- name: Build MacOS
574-
env:
575-
BRANCH: ${{ github.head_ref || github.ref_name }}
576-
BUILD_VERSION: ${{ needs.check_changelog.outputs.next_version_bare }}
577-
COMMIT: ${{ github.event.pull_request.head.sha || github.sha }}
578-
run: |
579551
mkdir build
580552
cd build
581553
cmake \
582-
-DBUILD_WERROR=ON \
583-
-DCMAKE_BUILD_TYPE=Release \
584-
-DCMAKE_INSTALL_PREFIX=/usr \
585-
-DSUNSHINE_ASSETS_DIR=local/sunshine/assets \
586-
-DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
554+
-DGITHUB_BRANCH="${branch}" \
555+
-DGITHUB_CLONE_URL="${clone_url}" \
556+
-DSUNSHINE_CONFIGURE_HOMEBREW=ON \
557+
-DSUNSHINE_CONFIGURE_ONLY=ON \
587558
..
588-
make -j $(sysctl -n hw.ncpu)
589-
590-
- name: Package MacOS
591-
run: |
592-
mkdir -p artifacts
593-
cd build
559+
cd ..
594560
595-
# package
596-
cpack -G DragNDrop
597-
mv ./cpack_artifacts/Sunshine.dmg ../artifacts/sunshine.dmg
561+
# copy formula to artifacts
562+
mkdir -p homebrew
563+
cp -f ./build/sunshine.rb ./homebrew/sunshine.rb
598564
599-
# cpack -G Bundle
600-
# mv ./cpack_artifacts/Sunshine.dmg ../artifacts/sunshine-bundle.dmg
565+
# testing
566+
cat ./homebrew/sunshine.rb
601567
602568
- name: Upload Artifacts
569+
if: ${{ matrix.release }}
603570
uses: actions/upload-artifact@v4
604571
with:
605-
name: sunshine-macos
606-
path: artifacts/
572+
name: sunshine-homebrew
573+
path: homebrew/
607574

608-
- name: Create/Update GitHub Release
609-
if: ${{ needs.setup_release.outputs.create_release == 'true' }}
610-
uses: ncipollo/release-action@v1
575+
- name: Should Publish Homebrew Formula
576+
id: homebrew_publish
577+
run: |
578+
PUBLISH=false
579+
if [[ \
580+
"${{ matrix.release }}" == "true" && \
581+
"${{ github.repository_owner }}" == "LizardByte" && \
582+
"${{ needs.setup_release.outputs.create_release }}" == "true" && \
583+
"${{ github.ref }}" == "refs/heads/master" \
584+
]]; then
585+
PUBLISH=true
586+
fi
587+
588+
echo "publish=${PUBLISH}" >> $GITHUB_OUTPUT
589+
590+
- name: Validate and Publish Homebrew Formula
591+
uses: LizardByte/[email protected]
611592
with:
612-
name: ${{ needs.setup_release.outputs.release_name }}
613-
tag: ${{ needs.setup_release.outputs.release_tag }}
614-
commit: ${{ needs.setup_release.outputs.release_commit }}
615-
artifacts: "*artifacts/*"
593+
formula_file: ${{ github.workspace }}/homebrew/sunshine.rb
594+
git_email: ${{ secrets.GH_BOT_EMAIL }}
595+
git_username: ${{ secrets.GH_BOT_NAME }}
596+
publish: ${{ steps.homebrew_publish.outputs.publish }}
616597
token: ${{ secrets.GH_BOT_TOKEN }}
617-
allowUpdates: true
618-
body: ${{ needs.setup_release.outputs.release_body }}
619-
discussionCategory: announcements
620-
prerelease: ${{ needs.setup_release.outputs.pre_release }}
621598

622599
build_mac_port:
623-
name: Macports
624600
needs: [check_changelog, setup_release]
625-
runs-on: macos-11
601+
strategy:
602+
fail-fast: false # false to test all, true to fail entire job if any fail
603+
matrix:
604+
include:
605+
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
606+
# while GitHub has larger macOS runners, they are not available for our repos :(
607+
- os_version: "12"
608+
release: true
609+
- os_version: "13"
610+
- os_version: "14"
611+
name: Macports (macOS-${{ matrix.os_version }})
612+
runs-on: macos-${{ matrix.os_version }}
626613

627614
steps:
628615
- name: Checkout
@@ -725,13 +712,14 @@ jobs:
725712
echo "::endgroup::"
726713
727714
- name: Upload Artifacts
715+
if: ${{ matrix.release }}
728716
uses: actions/upload-artifact@v4
729717
with:
730718
name: sunshine-macports
731719
path: artifacts/
732720

733721
- name: Create/Update GitHub Release
734-
if: ${{ needs.setup_release.outputs.create_release == 'true' }}
722+
if: ${{ needs.setup_release.outputs.create_release == 'true' && matrix.release }}
735723
uses: ncipollo/release-action@v1
736724
with:
737725
name: ${{ needs.setup_release.outputs.release_name }}
@@ -814,11 +802,15 @@ jobs:
814802
- name: Package Windows Debug Info
815803
working-directory: build
816804
run: |
817-
# save the original binaries with debug info
805+
# use .dbg file extension for binaries to avoid confusion with real packages
806+
Get-ChildItem -File -Recurse | `
807+
% { Rename-Item -Path $_.PSPath -NewName $_.Name.Replace(".exe",".dbg") }
808+
809+
# save the binaries with debug info
818810
7z -r `
819811
"-xr!CMakeFiles" `
820812
"-xr!cpack_artifacts" `
821-
a "../artifacts/sunshine-debuginfo-win32.zip" "*.exe"
813+
a "../artifacts/sunshine-win32-debuginfo.7z" "*.dbg"
822814
823815
- name: Upload Artifacts
824816
uses: actions/upload-artifact@v4

CHANGELOG.md

+39
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,43 @@
11
# Changelog
22

3+
## [0.22.1] - 2024-03-13
4+
**Breaking**
5+
- (ArchLinux) Drop support for standalone PKGBUILD files. Use the binary Arch package or install via AUR instead.
6+
- (macOS) Drop support for experimental dmg package. Use Homebrew or MacPorts instead.
7+
8+
**Added**
9+
- (macOS) Added Homebrew support
10+
11+
**Changed**
12+
- (Process/Windows) The working directory is now searched first when the command contains a relative path
13+
- (ArchLinux) The kmsgrab capture backend is now compiled by default to support Wayland capture on non-wlroots-based compositors
14+
- (Capture/Linux) X11 capture is now preferred over kmsgrab for cards that lack atomic modesetting support to ensure cursor capture works
15+
- (Capture/Linux) Kmsgrab will only choose NVENC by default if the display is connected to the Nvidia GPU to avoid possible EGL import failures
16+
17+
**Fixed**
18+
- (Config) Fix unsupported resolution error with some Moonlight clients
19+
- (Capture/Windows) Fix crash when streaming Ryujinx, Red Alert 2, and other apps that use unusually sized monochrome cursors
20+
- (Capture/Linux) Fix crash in KMS cursor capture when running on Arch-based distros
21+
- (Capture/Linux) Fix crash if CUDA GPU has a PCI ID with hexadecimal digits greater than 9
22+
- (Process/Windows) Fix starting apps when the working directory is enclosed in quotes
23+
- (Process/Windows) Fix process tree tracking when the app is launched via a cmd.exe trampoline
24+
- (Installer/Windows) Fix slow operation during ViGEmBus installation that may cause the installer to appear stuck
25+
- (Build/macOS) Fix issues building on macOS 13 and 14
26+
- (Build/Linux) Fix missing install script in the Arch binary package
27+
- (Build/Linux) Fix missing optional dependencies in the Arch binary package
28+
- (Build/Linux) Ensure correct Arch pkg is published to GitHub releases
29+
- (Capture/Linux) Fix mismatched case and unhandled exception in CUDA device lookup
30+
- (Config) Add missing resolution to default config ui
31+
- (Linux) Fix udev rules for uinput access not working until after reboot
32+
- (Linux) Fix wrong path in desktop files
33+
- (Tray) Cache icons to avoid possible DRM issues
34+
- (Tray) Fix attempt to update tray icon after it was destroyed
35+
- (Linux) Migrate old config files to new location if env SUNSHINE_MIGRATE_CONFIG=1 is set (automatically set for Flatpak)
36+
- (Linux/Fedora) Re-enable CUDA support and bump to 12.4.0
37+
38+
**Misc**
39+
- (Build/Windows) Adjust Windows debuginfo artifact to reduce confusion with real release binaries
40+
341
## [0.22.0] - 2024-03-03
442
**Breaking**
543
- (Network) Clients must now be paired with the host before they can use Wake-on-LAN
@@ -720,3 +758,4 @@ settings. In v0.17.0, games now run under your user account without elevated pri
720758
[0.20.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.20.0
721759
[0.21.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.21.0
722760
[0.22.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.22.0
761+
[0.22.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.22.1

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ cmake_minimum_required(VERSION 3.18)
33
# todo - set this conditionally
44

55
# todo - set version to 0.0.0 once confident in automated versioning
6-
project(Sunshine VERSION 0.22.0
7-
DESCRIPTION "Sunshine is a self-hosted game stream host for Moonlight."
6+
project(Sunshine VERSION 0.22.1
7+
DESCRIPTION "Self-hosted game stream host for Moonlight"
88
HOMEPAGE_URL "https://app.lizardbyte.dev/Sunshine")
99

1010
set(PROJECT_LICENSE "GPL-3.0")

README.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ System Requirements
3232
+------------+------------------------------------------------------------+
3333
| OS | Windows: 10+ (Windows Server not supported) |
3434
| +------------------------------------------------------------+
35-
| | macOS: 11.7+ |
35+
| | macOS: 12+ |
3636
| +------------------------------------------------------------+
3737
| | Linux/Debian: 11 (bullseye) |
3838
| +------------------------------------------------------------+
39-
| | Linux/Fedora: 37+ |
39+
| | Linux/Fedora: 38+ |
4040
| +------------------------------------------------------------+
4141
| | Linux/Ubuntu: 20.04+ (focal) |
4242
+------------+------------------------------------------------------------+

cmake/packaging/linux.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/assets/"
44
DESTINATION "${SUNSHINE_ASSETS_DIR}")
55
if(${SUNSHINE_BUILD_APPIMAGE} OR ${SUNSHINE_BUILD_FLATPAK})
6-
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/85-sunshine.rules"
6+
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/60-sunshine.rules"
77
DESTINATION "${SUNSHINE_ASSETS_DIR}/udev/rules.d")
88
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service"
99
DESTINATION "${SUNSHINE_ASSETS_DIR}/systemd/user")
1010
else()
1111
find_package(Systemd)
1212
find_package(Udev)
1313

14-
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/85-sunshine.rules"
14+
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/60-sunshine.rules"
1515
DESTINATION "${UDEV_RULES_INSTALL_DIR}")
1616
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service"
1717
DESTINATION "${SYSTEMD_USER_UNIT_INSTALL_DIR}")

cmake/packaging/unix.cmake

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# unix specific packaging
22
# put anything here that applies to both linux and macos
33

4-
include(GNUInstallDirs)
5-
64
# return here if building a macos package
75
if(SUNSHINE_PACKAGE_MACOS)
86
return()

cmake/prep/options.cmake

+8
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,15 @@ option(CUDA_INHERIT_COMPILE_OPTIONS
1212
"When building CUDA code, inherit compile options from the the main project. You may want to disable this if
1313
your IDE throws errors about unknown flags after running cmake." ON)
1414

15+
if(UNIX)
16+
# technically, the homebrew build could be on linux as well... no idea if it would actually work
17+
option(SUNSHINE_BUILD_HOMEBREW
18+
"Enable a Homebrew build." OFF)
19+
endif ()
20+
1521
if(APPLE)
22+
option(SUNSHINE_CONFIGURE_HOMEBREW
23+
"Configure macOS Homebrew formula. Recommended to use with SUNSHINE_CONFIGURE_ONLY" OFF)
1624
option(SUNSHINE_CONFIGURE_PORTFILE
1725
"Configure macOS Portfile. Recommended to use with SUNSHINE_CONFIGURE_ONLY" OFF)
1826
option(SUNSHINE_PACKAGE_MACOS

cmake/prep/special_package_configuration.cmake

+6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ if (APPLE)
22
if(${SUNSHINE_CONFIGURE_PORTFILE})
33
configure_file(packaging/macos/Portfile Portfile @ONLY)
44
endif()
5+
if(${SUNSHINE_CONFIGURE_HOMEBREW})
6+
configure_file(packaging/macos/sunshine.rb sunshine.rb @ONLY)
7+
endif()
58
elseif (UNIX)
9+
include(GNUInstallDirs) # this needs to be included prior to configuring the desktop files
10+
611
# configure the .desktop file
712
if(${SUNSHINE_BUILD_APPIMAGE})
813
configure_file(packaging/linux/AppImage/sunshine.desktop sunshine.desktop @ONLY)
@@ -24,6 +29,7 @@ elseif (UNIX)
2429
# configure the arch linux pkgbuild
2530
if(${SUNSHINE_CONFIGURE_PKGBUILD})
2631
configure_file(packaging/linux/Arch/PKGBUILD PKGBUILD @ONLY)
32+
configure_file(packaging/linux/Arch/sunshine.install sunshine.install @ONLY)
2733
endif()
2834

2935
# configure the flatpak manifest

cmake/targets/common.cmake

+12-1
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,19 @@ endif()
3737

3838
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
3939

40+
# Homebrew build fails the vite build if we set these environment variables
41+
if(${SUNSHINE_BUILD_HOMEBREW})
42+
set(NPM_SOURCE_ASSETS_DIR "")
43+
set(NPM_ASSETS_DIR "")
44+
set(NPM_BUILD_HOMEBREW "true")
45+
else()
46+
set(NPM_SOURCE_ASSETS_DIR ${SUNSHINE_SOURCE_ASSETS_DIR})
47+
set(NPM_ASSETS_DIR ${CMAKE_BINARY_DIR})
48+
set(NPM_BUILD_HOMEBREW "")
49+
endif()
50+
4051
#WebUI build
4152
add_custom_target(web-ui ALL
4253
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
4354
COMMENT "Installing NPM Dependencies and Building the Web UI"
44-
COMMAND bash -c \"npm install && SUNSHINE_SOURCE_ASSETS_DIR=${SUNSHINE_SOURCE_ASSETS_DIR} SUNSHINE_ASSETS_DIR=${CMAKE_BINARY_DIR} npm run build\") # cmake-lint: disable=C0301
55+
COMMAND bash -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

0 commit comments

Comments
 (0)