Skip to content
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
ca3bab3
fix typo
360sym Oct 31, 2022
447a009
Merge pull request #466 from bananaman2020/patch-1
ReenigneArcher Nov 1, 2022
bea78dd
Fix credentials command typo in docs
CrazyStevenz Nov 1, 2022
b310436
Merge pull request #469 from CrazyStevenz/patch-1
ReenigneArcher Nov 2, 2022
6a2a485
Bump babel from 2.10.3 to 2.11.0
dependabot[bot] Nov 2, 2022
cf2de6e
Merge pull request #470 from LizardByte/dependabot/pip/nightly/babel-…
ReenigneArcher Nov 2, 2022
89a0109
fix winget release
ReenigneArcher Nov 2, 2022
92f5c49
Merge pull request #472 from LizardByte/fix/CI-winget-releaser
ReenigneArcher Nov 2, 2022
0bdb887
add linux/arm64/v8 docker platform
ReenigneArcher Nov 2, 2022
4190667
Merge pull request #473 from LizardByte/add/docker-platform-arm64
ReenigneArcher Nov 2, 2022
e924e2e
Bump sphinx-copybutton from 0.5.0 to 0.5.1
dependabot[bot] Nov 16, 2022
66615a0
Merge pull request #500 from LizardByte/dependabot/pip/nightly/sphinx…
ReenigneArcher Nov 16, 2022
01b8ba3
Cover Finder (#216)
Nov 18, 2022
390c664
Bump KSXGitHub/github-actions-deploy-aur from 2.5.0 to 2.6.0
dependabot[bot] Nov 18, 2022
4a924ac
Merge pull request #498 from LizardByte/dependabot/github_actions/nig…
ReenigneArcher Nov 18, 2022
8132c82
ci: update global workflows (#501)
LizardByte-bot Nov 18, 2022
4cbf8c0
ci: update global docker (#502)
LizardByte-bot Nov 18, 2022
9af770e
ci: update global workflows (#505)
LizardByte-bot Nov 18, 2022
4c1371a
Add install scripts (Flatpak) (#471)
istori1 Nov 18, 2022
981d878
use npm dependencies
ReenigneArcher Nov 18, 2022
67a569c
Merge branch 'nightly' into update/use-npm-dependencies
ReenigneArcher Nov 19, 2022
f0cfc4a
update build instructions
ReenigneArcher Nov 19, 2022
fbd6807
Merge pull request #504 from LizardByte/update/use-npm-dependencies
ReenigneArcher Nov 20, 2022
d912cce
Update moonlight-common-c to pick up new input structures
cgutman Nov 23, 2022
e39d9bc
Add support for Unicode input messages on Windows
cgutman Nov 23, 2022
5ed17fb
Merge pull request #511 from cgutman/utf8_events
ReenigneArcher Dec 8, 2022
7648496
CMake: win32: fix linker errors with mingw boost 1.80.0-2
psyke83 Dec 7, 2022
97716fa
fix aur build
ReenigneArcher Dec 3, 2022
ed5ee24
Merge pull request #530 from psyke83/restrict_boost_ver
ReenigneArcher Dec 10, 2022
dbe56ee
ci: update global cpp (#533)
LizardByte-bot Dec 10, 2022
a6e47ff
ci: update global workflows (#532)
LizardByte-bot Dec 10, 2022
a7b19f4
ci: update release notifier (#534)
LizardByte-bot Dec 10, 2022
e8aa749
Sunshine prebuilts (#510)
brad-richardson Dec 11, 2022
84fdc7e
change linux build matrix (#468)
ReenigneArcher Dec 12, 2022
6f36939
Bump furo from 2022.9.29 to 2022.12.7 (#531)
dependabot[bot] Dec 12, 2022
c60ebb7
ci: update global workflows (#547)
LizardByte-bot Dec 13, 2022
5b239c1
prepare v0.16.0
ReenigneArcher Dec 13, 2022
fe1321f
Merge pull request #548 from LizardByte/prepare/v0.16.0
ReenigneArcher Dec 13, 2022
37c0f79
CMake: Linux: use standard FreeDesktop udev/systemd paths (#550)
psyke83 Dec 14, 2022
8c8a7bb
update ffmpeg submodules (#552)
ReenigneArcher Dec 14, 2022
12f1ec6
update issue template (#554)
ReenigneArcher Dec 14, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .docker_platforms
Original file line number Diff line number Diff line change
@@ -1 +1 @@
linux/amd64
linux/amd64,linux/arm64/v8
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,11 @@ updates:
time: "00:00"
target-branch: "nightly"
open-pull-requests-limit: 10

- package-ecosystem: "gitsubmodule"
directory: "/"
schedule:
interval: "daily"
time: "00:00"
target-branch: "nightly"
open-pull-requests-limit: 10
37 changes: 28 additions & 9 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ jobs:
mv ./build/PKGBUILD ./artifacts/

- name: Validate package
uses: hapakaien/archlinux-package-action@v2.2.0
uses: LizardByte/archlinux-package-action@master
with:
path: artifacts
flags: '--syncdeps --noconfirm'
Expand All @@ -234,7 +234,7 @@ jobs:

- name: Publish AUR package
if: ${{ env.aur_publish == 'true' }}
uses: KSXGitHub/github-actions-deploy-aur@v2.5.0
uses: KSXGitHub/github-actions-deploy-aur@v2.6.0
with:
pkgname: ${{ env.aur_pkg }}
pkgbuild: ./artifacts/PKGBUILD
Expand All @@ -260,17 +260,21 @@ jobs:

- name: Setup Dependencies Linux Flatpak
run: |
PLATFORM_VERSION=21.08

sudo apt-get update -y
sudo apt-get install -y \
cmake \
qemu-user-static \
flatpak
sudo su $(whoami) -c 'flatpak --user remote-add --if-not-exists flathub \
https://flathub.org/repo/flathub.flatpakrepo'
sudo su $(whoami) -c 'flatpak --user install -y flathub \
sudo su $(whoami) -c "flatpak --user remote-add --if-not-exists flathub \
https://flathub.org/repo/flathub.flatpakrepo"
sudo su $(whoami) -c "flatpak --user install -y flathub \
org.flatpak.Builder \
org.freedesktop.Platform/${{ matrix.arch }}/21.08 \
org.freedesktop.Sdk/${{ matrix.arch }}/21.08'
org.freedesktop.Platform/${{ matrix.arch }}/${PLATFORM_VERSION} \
org.freedesktop.Sdk/${{ matrix.arch }}/${PLATFORM_VERSION} \
org.freedesktop.Sdk.Extension.node18/${{ matrix.arch }}/${PLATFORM_VERSION} \
"

- name: Cache Flatpak build
uses: actions/cache@v3
Expand Down Expand Up @@ -383,6 +387,7 @@ jobs:
libboost-log-dev \
libboost-thread-dev \
libcap-dev \
libcurl4-openssl-dev \
libdrm-dev \
libevdev-dev \
libpulse-dev \
Expand Down Expand Up @@ -437,6 +442,10 @@ jobs:
mkdir -p build
mkdir -p artifacts

pushd "./src_assets/common/assets/web"
npm install
popd

cd build
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
Expand Down Expand Up @@ -548,13 +557,17 @@ jobs:
- name: Setup Dependencies MacOS
run: |
# install dependencies using homebrew
brew install boost cmake ffmpeg opus
brew install boost cmake curl ffmpeg node opus

# fix openssl header not found
ln -sf /usr/local/opt/openssl/include/openssl /usr/local/include/openssl

- name: Build MacOS
run: |
pushd "./src_assets/common/assets/web"
npm install
popd

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release \
Expand Down Expand Up @@ -846,6 +859,7 @@ jobs:
mingw-w64-x86_64-binutils
mingw-w64-x86_64-boost
mingw-w64-x86_64-cmake
mingw-w64-x86_64-curl
mingw-w64-x86_64-nsis
mingw-w64-x86_64-openssl
mingw-w64-x86_64-opus
Expand All @@ -854,6 +868,11 @@ jobs:
nasm
yasm

- name: Install npm packages
working-directory: src_assets/common/assets/web
run: |
npm install

- name: Build Windows
shell: msys2 {0}
run: |
Expand Down Expand Up @@ -901,7 +920,7 @@ jobs:

release-winget:
name: Release to WinGet
needs: build_win
needs: [setup_release, build_win]
if: ${{ needs.setup_release.outputs.create_release == 'true' && github.ref == 'refs/heads/master' }}
runs-on: windows-latest # the required action can only be run on Windows
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

- name: Hadolint
id: hadolint
uses: hadolint/hadolint-action@v2.1.0
uses: hadolint/hadolint-action@v3.0.0
with:
dockerfile: ./Dockerfile
ignore: DL3008,DL3013,DL3016,DL3018,DL3028,DL3059
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cpp-clang-format-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
uses: actions/checkout@v3

- name: Clang format lint
uses: DoozyX/clang-format-lint-action@v0.14
uses: DoozyX/clang-format-lint-action@v0.15
with:
source: './src'
extensions: 'cpp,h,m,mm'
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/yaml-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,5 @@ jobs:
file_or_dir: . ${{ steps.find-files.outputs.found }}

- name: Log
if: failure()
run: |
cat "${{ steps.yaml-lint.outputs.logfile }}" >> $GITHUB_STEP_SUMMARY
12 changes: 3 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,9 @@ cmake-build*
.cache
.idea

# 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/
# npm
node_modules/
package-lock.json

# Translations
*.mo
Expand Down
25 changes: 16 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ endif()
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
set(SUNSHINE_SOURCE_ASSETS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src_assets")

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}
Expand Down Expand Up @@ -69,6 +62,9 @@ include_directories(third-party/miniupnp)

find_package(Threads REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules (CURL REQUIRED libcurl)

if(NOT APPLE)
set(Boost_USE_STATIC_LIBS ON)
endif()
Expand All @@ -88,6 +84,10 @@ if(WIN32)
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")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CURL_STATIC_LDFLAGS} ${CURL_STATIC_CFLAGS}")

# Restrict Boost WinAPI version to work around 1.80 linker errors
ADD_DEFINITIONS(-DBOOST_USE_WINAPI_VERSION=BOOST_WINAPI_VERSION_WIN7)

if(NOT DEFINED SUNSHINE_PREPARED_BINARIES)
set(SUNSHINE_PREPARED_BINARIES "${CMAKE_CURRENT_BINARY_DIR}/pre-compiled/windows")
Expand Down Expand Up @@ -149,6 +149,7 @@ if(WIN32)
d3d11 dxgi D3DCompiler
setupapi
dwmapi
${CURL_STATIC_LIBRARIES}
)

set_source_files_properties(third-party/ViGEmClient/src/ViGEmClient.cpp PROPERTIES COMPILE_DEFINITIONS "UNICODE=1;ERROR_INVALID_DEVICE_OBJECT_PARAMETER=650")
Expand Down Expand Up @@ -451,13 +452,19 @@ list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
${FFMPEG_LIBRARIES}
${Boost_LIBRARIES}
${OPENSSL_LIBRARIES}
${CURL_LIBRARIES}
${PLATFORM_LIBRARIES})

if(NOT WIN32)
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES Boost::log)
endif()

add_executable(sunshine ${SUNSHINE_TARGET_FILES})

if(WIN32)
set_target_properties(sunshine PROPERTIES LINK_SEARCH_START_STATIC 1)
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
Expand Down Expand Up @@ -647,8 +654,8 @@ elseif(UNIX)

# 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_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, libcurl4, 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, libcurl >= 7.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()
Expand Down
12 changes: 12 additions & 0 deletions DOCKER_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,15 @@ 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` or `ghcr.io/lizardbyte/sunshine:latest` should retrieve the correct
image for your architecture.

The architectures supported by this image are:

| Architecture | Available |
|:------------:|:---------:|
| x86-64 | ✅ |
| arm64 | ✅ |
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ RUN apt-get update -y \
libboost-log-dev=1.74.0* \
libboost-thread-dev=1.74.0* \
libcap-dev=1:2.44* \
libcurl4-openssl-dev=7.81.0* \
libdrm-dev=2.4.110* \
libevdev-dev=1.12.1* \
libpulse-dev=1:15.99.1* \
Expand All @@ -27,6 +28,8 @@ RUN apt-get update -y \
libxfixes-dev=1:6.0.0* \
libxrandr-dev=2:1.5.2* \
libxtst-dev=2:1.2.3* \
nodejs=12.22.9* \
npm=8.5.1* \
nvidia-cuda-dev=11.5.1* \
nvidia-cuda-toolkit=11.5.1* \
&& apt-get clean \
Expand All @@ -36,6 +39,10 @@ RUN apt-get update -y \
WORKDIR /root/sunshine-build/
COPY . .

# setup npm and dependencies
WORKDIR /root/sunshine-build/src_assets/common/assets/web
RUN npm install

# setup build directory
WORKDIR /root/sunshine-build/build

Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
furo==2022.9.29
m2r2==0.3.3
Sphinx==5.3.0
sphinx-copybutton==0.5.0
sphinx-copybutton==0.5.1
16 changes: 12 additions & 4 deletions docs/source/about/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,24 @@ Flatpak Package
:alt: GitHub issues by-label

#. Install `Flatpak <https://flatpak.org/setup/>`_ as required.
#. Download ``sunshine.flatpak`` and run the following code.
#. 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.flatpak
flatpak install --system ./sunshine_{arch}.flatpak

User level
.. code-block:: bash

flatpak install --user sunshine.flatpak
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)
Expand All @@ -130,7 +137,8 @@ Start:
Uninstall:
.. code-block:: bash

flatpak uninstall --delete-data sunshine.flatpak
flatpak run --command=remove-additional-install.sh dev.lizardbyte.sunshine
flatpak uninstall --delete-data dev.lizardbyte.sunshine

RPM Package
^^^^^^^^^^^
Expand Down
7 changes: 4 additions & 3 deletions docs/source/about/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ Setup

Linux
^^^^^
The `deb`, `rpm`, and `AppImage` packages handle these steps automatically. The flatpak does not, third party packages
also may not.
The `deb`, `rpm`, `Flatpak` and `AppImage` packages handle these steps automatically. Third party packages may not.

Sunshine needs access to `uinput` to create mouse and gamepad events.

Expand All @@ -81,6 +80,8 @@ Sunshine needs access to `uinput` to create mouse and gamepad events.

[Service]
ExecStart=<see table>
#Flatpak Only
#ExecStop=flatpak kill dev.lizardbyte.sunshine

[Install]
WantedBy=graphical-session.target
Expand All @@ -95,7 +96,7 @@ Sunshine needs access to `uinput` to create mouse and gamepad events.
deb /usr/bin/sunshine ✔
rpm /usr/bin/sunshine ✔
AppImage ~/sunshine.AppImage ✔
Flatpak flatpak run dev.lizardbyte.sunshine
Flatpak flatpak run dev.lizardbyte.sunshine
======== ============================================== ===============

**Start once**
Expand Down
Loading