mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-08-10 00:52:16 +00:00
Compare commits
11 Commits
renovate/c
...
v0.18.4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0dfbcfdbc4 | ||
|
|
956341930b | ||
|
|
446825b73d | ||
|
|
09dff34105 | ||
|
|
b2c5da2cfc | ||
|
|
b2fe0423d2 | ||
|
|
08d623ce44 | ||
|
|
e1b112cafd | ||
|
|
8509ee72c3 | ||
|
|
1e6d9da2d6 | ||
|
|
660d8e191c |
@@ -7,7 +7,7 @@
|
||||
BasedOnStyle: LLVM
|
||||
AccessModifierOffset: -2
|
||||
AlignAfterOpenBracket: DontAlign
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveAssignments: Consecutive
|
||||
AlignOperands: Align
|
||||
AllowAllArgumentsOnNextLine: false
|
||||
AllowAllConstructorInitializersOnNextLine: false
|
||||
@@ -18,9 +18,8 @@ AllowShortFunctionsOnASingleLine: All
|
||||
AllowShortIfStatementsOnASingleLine: WithoutElse
|
||||
AllowShortLambdasOnASingleLine: All
|
||||
AllowShortLoopsOnASingleLine: true
|
||||
AlignTrailingComments: false
|
||||
AlwaysBreakAfterReturnType: All
|
||||
AlwaysBreakTemplateDeclarations: MultiLine
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakTemplateDeclarations: Yes
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: false
|
||||
@@ -38,32 +37,32 @@ BraceWrapping:
|
||||
SplitEmptyRecord: true
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeTernaryOperators: false
|
||||
BreakConstructorInitializers: AfterColon
|
||||
BreakInheritanceList: AfterColon
|
||||
BreakConstructorInitializers: BeforeColon
|
||||
BreakInheritanceList: BeforeColon
|
||||
ColumnLimit: 0
|
||||
CompactNamespaces: false
|
||||
ContinuationIndentWidth: 2
|
||||
IndentCaseLabels: true
|
||||
IndentPPDirectives: BeforeHash
|
||||
IndentCaseLabels: false
|
||||
IndentPPDirectives: None
|
||||
IndentWidth: 2
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: All
|
||||
ObjCSpaceAfterProperty: true
|
||||
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||
MaxEmptyLinesToKeep: 2
|
||||
NamespaceIndentation: None
|
||||
ObjCSpaceAfterProperty: false
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PointerAlignment: Right
|
||||
ReflowComments: true
|
||||
SpaceAfterCStyleCast: true
|
||||
ReflowComments: false
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterLogicalNot: false
|
||||
SpaceAfterTemplateKeyword: true
|
||||
SpaceAfterTemplateKeyword: false
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCpp11BracedList: true
|
||||
SpaceBeforeCtorInitializerColon: false
|
||||
SpaceBeforeInheritanceColon: false
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceBeforeInheritanceColon: true
|
||||
SpaceBeforeParens: Never
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 2
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: Never
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInContainerLiterals: false
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
# install dependencies for C++ analysis
|
||||
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y \
|
||||
build-essential \
|
||||
gcc-10 \
|
||||
g++-10 \
|
||||
libayatana-appindicator3-dev \
|
||||
libavdevice-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-locale-dev \
|
||||
libboost-log-dev \
|
||||
libboost-program-options-dev \
|
||||
libcap-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libdrm-dev \
|
||||
libevdev-dev \
|
||||
libmfx-dev \
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
libopus-dev \
|
||||
libpulse-dev \
|
||||
libssl-dev \
|
||||
libva-dev \
|
||||
libvdpau-dev \
|
||||
libwayland-dev \
|
||||
libx11-dev \
|
||||
libxcb-shm0-dev \
|
||||
libxcb-xfixes0-dev \
|
||||
libxcb1-dev \
|
||||
libxfixes-dev \
|
||||
libxrandr-dev \
|
||||
libxtst-dev \
|
||||
wget
|
||||
|
||||
# clean apt cache
|
||||
sudo apt-get clean
|
||||
sudo rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Update gcc alias
|
||||
# https://stackoverflow.com/a/70653945/11214013
|
||||
sudo update-alternatives --install \
|
||||
/usr/bin/gcc gcc /usr/bin/gcc-10 100 \
|
||||
--slave /usr/bin/g++ g++ /usr/bin/g++-10 \
|
||||
--slave /usr/bin/gcov gcov /usr/bin/gcov-10 \
|
||||
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-10 \
|
||||
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-10
|
||||
|
||||
# Install CUDA
|
||||
sudo wget \
|
||||
https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run \
|
||||
--progress=bar:force:noscroll -q --show-progress -O /root/cuda.run
|
||||
sudo chmod a+x /root/cuda.run
|
||||
sudo /root/cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm
|
||||
sudo rm /root/cuda.run
|
||||
@@ -1,12 +1,11 @@
|
||||
# ignore git files
|
||||
.git*
|
||||
|
||||
# ignore hidden files
|
||||
.*
|
||||
|
||||
# do not ignore .git, needed for versioning
|
||||
!/.git
|
||||
|
||||
# ignore repo directories and files
|
||||
docs/
|
||||
gh-pages-template/
|
||||
scripts/
|
||||
tools/
|
||||
crowdin.yml
|
||||
|
||||
3
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
3
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
@@ -102,6 +102,7 @@ body:
|
||||
- Linux - solus (Third Party)
|
||||
- macOS - dmg
|
||||
- macOS - Portfile
|
||||
- macOS - pkg
|
||||
- Windows - Chocolatey (Third Party)
|
||||
- Windows - installer
|
||||
- Windows - portable
|
||||
@@ -110,7 +111,6 @@ body:
|
||||
- other (not listed)
|
||||
- other (self built)
|
||||
- other (fork of this repo)
|
||||
- n/a
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
@@ -123,7 +123,6 @@ body:
|
||||
- Intel
|
||||
- Nvidia
|
||||
- none (software encoding)
|
||||
- n/a
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
|
||||
4
.github/ISSUE_TEMPLATE/config.yml
vendored
4
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -9,5 +9,5 @@ contact_links:
|
||||
url: https://app.lizardbyte.dev/support
|
||||
about: Official LizardByte support
|
||||
- name: Feature request
|
||||
url: https://ideas.moonlight-stream.org
|
||||
about: Share your suggestions or ideas to help Moonlight and Sunshine improve
|
||||
url: https://app.lizardbyte.dev/feedback
|
||||
about: Share your suggestions or ideas to help us improve
|
||||
|
||||
6
.github/dependabot.yml
vendored
6
.github/dependabot.yml
vendored
@@ -10,6 +10,7 @@ updates:
|
||||
schedule:
|
||||
interval: "daily"
|
||||
time: "08:00"
|
||||
target-branch: "nightly"
|
||||
open-pull-requests-limit: 10
|
||||
|
||||
- package-ecosystem: "github-actions"
|
||||
@@ -17,6 +18,7 @@ updates:
|
||||
schedule:
|
||||
interval: "daily"
|
||||
time: "08:30"
|
||||
target-branch: "nightly"
|
||||
open-pull-requests-limit: 10
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
@@ -24,6 +26,7 @@ updates:
|
||||
schedule:
|
||||
interval: "daily"
|
||||
time: "09:00"
|
||||
target-branch: "nightly"
|
||||
open-pull-requests-limit: 10
|
||||
|
||||
- package-ecosystem: "nuget"
|
||||
@@ -31,6 +34,7 @@ updates:
|
||||
schedule:
|
||||
interval: "daily"
|
||||
time: "09:30"
|
||||
target-branch: "nightly"
|
||||
open-pull-requests-limit: 10
|
||||
|
||||
- package-ecosystem: "pip"
|
||||
@@ -38,6 +42,7 @@ updates:
|
||||
schedule:
|
||||
interval: "daily"
|
||||
time: "10:00"
|
||||
target-branch: "nightly"
|
||||
open-pull-requests-limit: 10
|
||||
|
||||
- package-ecosystem: "gitsubmodule"
|
||||
@@ -45,4 +50,5 @@ updates:
|
||||
schedule:
|
||||
interval: "daily"
|
||||
time: "10:30"
|
||||
target-branch: "nightly"
|
||||
open-pull-requests-limit: 10
|
||||
|
||||
291
.github/workflows/CI.yml
vendored
291
.github/workflows/CI.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
if: ${{ github.ref == 'refs/heads/master' || github.base_ref == 'master' }}
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Verify Changelog
|
||||
id: verify_changelog
|
||||
@@ -46,7 +46,6 @@ jobs:
|
||||
last_version: ${{ steps.verify_changelog.outputs.latest_release_tag_name }}
|
||||
release_body: ${{ steps.verify_changelog.outputs.changelog_parser_description }}
|
||||
|
||||
# todo - remove this job once versioning is fully automated by cmake
|
||||
check_versions:
|
||||
name: Check Versions
|
||||
runs-on: ubuntu-latest
|
||||
@@ -55,7 +54,7 @@ jobs:
|
||||
# base_ref for pull request check, ref for push
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Check CMakeLists.txt Version
|
||||
run: |
|
||||
@@ -157,28 +156,12 @@ jobs:
|
||||
matrix: ${{fromJson(needs.setup_flatpak_matrix.outputs.matrix)}}
|
||||
|
||||
steps:
|
||||
- name: Maximize build space
|
||||
uses: easimon/maximize-build-space@v8
|
||||
with:
|
||||
root-reserve-mb: 10240
|
||||
remove-dotnet: 'true'
|
||||
remove-android: 'true'
|
||||
remove-haskell: 'true'
|
||||
remove-codeql: 'true'
|
||||
remove-docker-images: 'false'
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Checkout Flathub Shared Modules
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: flathub/shared-modules
|
||||
path: build/shared-modules
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Dependencies Linux Flatpak
|
||||
run: |
|
||||
PLATFORM_VERSION=22.08
|
||||
PLATFORM_VERSION=21.08
|
||||
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y \
|
||||
@@ -192,7 +175,6 @@ jobs:
|
||||
org.freedesktop.Platform/${{ matrix.arch }}/${PLATFORM_VERSION} \
|
||||
org.freedesktop.Sdk/${{ matrix.arch }}/${PLATFORM_VERSION} \
|
||||
org.freedesktop.Sdk.Extension.node18/${{ matrix.arch }}/${PLATFORM_VERSION} \
|
||||
org.freedesktop.Sdk.Extension.vala/${{ matrix.arch }}/${PLATFORM_VERSION} \
|
||||
"
|
||||
|
||||
- name: Cache Flatpak build
|
||||
@@ -271,30 +253,20 @@ jobs:
|
||||
prerelease: ${{ needs.setup_release.outputs.pre_release }}
|
||||
|
||||
build_linux:
|
||||
name: Linux ${{ matrix.type }}
|
||||
name: Linux
|
||||
runs-on: ubuntu-${{ matrix.dist }}
|
||||
needs: [check_changelog, setup_release]
|
||||
strategy:
|
||||
fail-fast: false # false to test all, true to fail entire job if any fail
|
||||
matrix:
|
||||
include: # package these differently
|
||||
- type: AppImage
|
||||
EXTRA_ARGS: '-DSUNSHINE_BUILD_APPIMAGE=ON'
|
||||
- type: appimage
|
||||
EXTRA_ARGS: '-DSUNSHINE_CONFIGURE_APPIMAGE=ON'
|
||||
dist: 20.04
|
||||
|
||||
steps:
|
||||
- name: Maximize build space
|
||||
uses: easimon/maximize-build-space@v8
|
||||
with:
|
||||
root-reserve-mb: 20480
|
||||
remove-dotnet: 'true'
|
||||
remove-android: 'true'
|
||||
remove-haskell: 'true'
|
||||
remove-codeql: 'true'
|
||||
remove-docker-images: 'false'
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
@@ -309,9 +281,9 @@ jobs:
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y \
|
||||
libboost-filesystem1.71-dev \
|
||||
libboost-locale1.71-dev \
|
||||
libboost-log1.71-dev \
|
||||
libboost-regex1.71-dev \
|
||||
libboost-thread1.71-dev \
|
||||
libboost-program-options1.71-dev
|
||||
|
||||
# Install cmake
|
||||
@@ -335,8 +307,8 @@ jobs:
|
||||
sudo apt-get install -y \
|
||||
cmake \
|
||||
libboost-filesystem-dev \
|
||||
libboost-locale-dev \
|
||||
libboost-log-dev \
|
||||
libboost-thread-dev \
|
||||
libboost-program-options-dev
|
||||
fi
|
||||
|
||||
@@ -344,14 +316,12 @@ jobs:
|
||||
build-essential \
|
||||
gcc-10 \
|
||||
g++-10 \
|
||||
libayatana-appindicator3-dev \
|
||||
libavdevice-dev \
|
||||
libcap-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libdrm-dev \
|
||||
libevdev-dev \
|
||||
libmfx-dev \
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
libopus-dev \
|
||||
libpulse-dev \
|
||||
@@ -390,10 +360,6 @@ jobs:
|
||||
sudo rm /root/cuda.run
|
||||
|
||||
- name: Build Linux
|
||||
env:
|
||||
BRANCH: ${{ github.head_ref || github.ref_name }}
|
||||
BUILD_VERSION: ${{ needs.check_changelog.outputs.next_version_bare }}
|
||||
COMMIT: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||
run: |
|
||||
mkdir -p build
|
||||
mkdir -p artifacts
|
||||
@@ -414,7 +380,6 @@ jobs:
|
||||
make -j ${nproc}
|
||||
|
||||
- name: Package Linux - CPACK
|
||||
# todo - this is no longer used
|
||||
if: ${{ matrix.type == 'cpack' }}
|
||||
working-directory: build
|
||||
run: |
|
||||
@@ -427,13 +392,13 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Set AppImage Version
|
||||
if: ${{ matrix.type == 'AppImage' && ( needs.check_changelog.outputs.next_version_bare != needs.check_changelog.outputs.last_version ) }} # yamllint disable-line rule:line-length
|
||||
if: ${{ matrix.type == 'appimage' && ( needs.check_changelog.outputs.next_version_bare != needs.check_changelog.outputs.last_version ) }} # yamllint disable-line rule:line-length
|
||||
run: |
|
||||
version=${{ needs.check_changelog.outputs.next_version_bare }}
|
||||
echo "VERSION=${version}" >> $GITHUB_ENV
|
||||
|
||||
- name: Package Linux - AppImage
|
||||
if: ${{ matrix.type == 'AppImage' }}
|
||||
if: ${{ matrix.type == 'appimage' }}
|
||||
working-directory: build
|
||||
run: |
|
||||
# install sunshine to the DESTDIR
|
||||
@@ -452,18 +417,14 @@ jobs:
|
||||
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
||||
chmod +x linuxdeploy-x86_64.AppImage
|
||||
|
||||
# https://github.com/linuxdeploy/linuxdeploy-plugin-gtk
|
||||
sudo apt-get install libgtk-3-dev librsvg2-dev -y
|
||||
wget https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh
|
||||
chmod +x linuxdeploy-plugin-gtk.sh
|
||||
export DEPLOY_GTK_VERSION=3
|
||||
|
||||
./linuxdeploy-x86_64.AppImage \
|
||||
--appdir ./AppDir \
|
||||
--plugin gtk \
|
||||
--executable ./sunshine \
|
||||
--icon-file "../$ICON_FILE" \
|
||||
--desktop-file "./$DESKTOP_FILE" \
|
||||
--library /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0 \
|
||||
--library /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 \
|
||||
--library /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 \
|
||||
--output appimage
|
||||
|
||||
# move
|
||||
@@ -473,7 +434,7 @@ jobs:
|
||||
chmod +x ../artifacts/sunshine.AppImage
|
||||
|
||||
- name: Verify AppImage
|
||||
if: ${{ matrix.type == 'AppImage' }}
|
||||
if: ${{ matrix.type == 'appimage' }}
|
||||
run: |
|
||||
wget https://github.com/TheAssassin/appimagelint/releases/download/continuous/appimagelint-x86_64.AppImage
|
||||
chmod +x appimagelint-x86_64.AppImage
|
||||
@@ -505,11 +466,11 @@ jobs:
|
||||
build_mac:
|
||||
name: MacOS
|
||||
runs-on: macos-11
|
||||
needs: [check_changelog, setup_release]
|
||||
needs: setup_release
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
@@ -522,10 +483,6 @@ jobs:
|
||||
ln -sf /usr/local/opt/openssl/include/openssl /usr/local/include/openssl
|
||||
|
||||
- name: Build MacOS
|
||||
env:
|
||||
BRANCH: ${{ github.head_ref || github.ref_name }}
|
||||
BUILD_VERSION: ${{ needs.check_changelog.outputs.next_version_bare }}
|
||||
COMMIT: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||
run: |
|
||||
npm install
|
||||
|
||||
@@ -545,10 +502,13 @@ jobs:
|
||||
|
||||
# package
|
||||
cpack -G DragNDrop
|
||||
mv ./cpack_artifacts/Sunshine.dmg ../artifacts/sunshine.dmg
|
||||
mv ./cpack_artifacts/Sunshine.dmg ../artifacts/sunshine-macos-experimental-dragndrop.dmg
|
||||
|
||||
# cpack -G Bundle
|
||||
# mv ./cpack_artifacts/Sunshine.dmg ../artifacts/sunshine-bundle.dmg
|
||||
cpack -G Bundle
|
||||
mv ./cpack_artifacts/Sunshine.dmg ../artifacts/sunshine-macos-experimental-bundle.dmg
|
||||
|
||||
cpack -G ZIP
|
||||
mv ./cpack_artifacts/Sunshine.zip ../artifacts/sunshine-macos-experimental-archive.zip
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
@@ -556,38 +516,48 @@ jobs:
|
||||
name: sunshine-macos
|
||||
path: artifacts/
|
||||
|
||||
- name: Create/Update GitHub Release
|
||||
if: ${{ needs.setup_release.outputs.create_release == '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 }}
|
||||
# this step can be removed after packages are fixed
|
||||
- name: Delete experimental packages
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
working-directory: artifacts
|
||||
run: |
|
||||
rm -f ./sunshine-macos-experimental-dragndrop.dmg
|
||||
rm -f ./sunshine-macos-experimental-bundle.dmg
|
||||
rm -f ./sunshine-macos-experimental-archive.zip
|
||||
|
||||
# # no artifacts to release currently
|
||||
# - name: Create/Update GitHub Release
|
||||
# if: ${{ needs.setup_release.outputs.create_release == '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 }}
|
||||
|
||||
build_mac_port:
|
||||
name: Macports
|
||||
needs: [check_changelog, setup_release]
|
||||
needs: setup_release
|
||||
runs-on: macos-11
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Checkout ports
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: macports/macports-ports
|
||||
fetch-depth: 64
|
||||
path: ports
|
||||
|
||||
- name: Checkout mpbb
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: macports/mpbb
|
||||
path: mpbb
|
||||
@@ -618,8 +588,7 @@ jobs:
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake \
|
||||
-DGITHUB_COMMIT=${commit} \
|
||||
cmake -DGITHUB_COMMIT=${commit} \
|
||||
-DGITHUB_CLONE_URL=${clone_url} \
|
||||
-DSUNSHINE_CONFIGURE_PORTFILE=ON \
|
||||
-DSUNSHINE_CONFIGURE_ONLY=ON \
|
||||
@@ -647,33 +616,123 @@ jobs:
|
||||
echo "/opt/local/bin" >> $GITHUB_PATH
|
||||
echo "/opt/local/sbin" >> $GITHUB_PATH
|
||||
|
||||
- name: Run port lint
|
||||
- name: Determine list of subports
|
||||
id: subportlist
|
||||
run: |
|
||||
port -q lint "Sunshine"
|
||||
set -eu
|
||||
port=Sunshine
|
||||
subportlist=""
|
||||
|
||||
- name: Build port
|
||||
echo "Listing subports for Sunshine"
|
||||
new_subports=$(mpbb \
|
||||
--work-dir /tmp/mpbb \
|
||||
list-subports \
|
||||
--archive-site= \
|
||||
--archive-site-private= \
|
||||
--include-deps=no \
|
||||
"$port" \
|
||||
| tr '\n' ' ')
|
||||
for subport in $new_subports; do
|
||||
echo "$subport"
|
||||
subportlist="$subportlist $subport"
|
||||
done
|
||||
echo "subportlist=${subportlist}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Run port lint for all subports
|
||||
run: |
|
||||
set -eu
|
||||
fail=0
|
||||
for subport in $subportlist; do
|
||||
echo "::group::${subport}"
|
||||
path=$(port file "$subport")
|
||||
messagetype="warning"
|
||||
if ! messages=$(port -q lint "$subport" 2>&1); then
|
||||
messagetype="error"
|
||||
fail=1
|
||||
fi
|
||||
if [ -n "$messages" ]; then
|
||||
echo "$messages"
|
||||
# See https://github.com/actions/toolkit/issues/193#issuecomment-605394935
|
||||
encoded_messages="port lint ${subport}:%0A"
|
||||
encoded_messages+="$(echo "${messages}" | sed -E 's/$/%0A/g' | tr -d '\n')"
|
||||
echo "::${messagetype} file=${path#${PWD}/ports/},line=1,col=1::${encoded_messages}"
|
||||
fi
|
||||
echo "::endgroup::"
|
||||
done
|
||||
exit "$fail"
|
||||
env:
|
||||
subportlist: ${{ steps.subportlist.outputs.subportlist }}
|
||||
|
||||
- name: Build subports
|
||||
run: |
|
||||
subport="Sunshine"
|
||||
set -eu
|
||||
fail=0
|
||||
for subport in $subportlist; do
|
||||
workdir="/tmp/mpbb/$subport"
|
||||
mkdir -p "$workdir/logs"
|
||||
touch "$workdir/logs/dependencies-progress.txt"
|
||||
echo "::group::Cleaning up between ports"
|
||||
sudo mpbb --work-dir "$workdir" cleanup
|
||||
echo "::endgroup::"
|
||||
echo "::group::Installing dependencies for ${subport}"
|
||||
sudo mpbb \
|
||||
--work-dir "$workdir" \
|
||||
install-dependencies \
|
||||
"$subport" >"$workdir/logs/install-dependencies.log" 2>&1 &
|
||||
deps_pid=$!
|
||||
tail -f "$workdir/logs/dependencies-progress.txt" 2>/dev/null &
|
||||
tail_pid=$!
|
||||
set +e
|
||||
wait "$deps_pid"
|
||||
deps_exit=$?
|
||||
set -e
|
||||
kill "$tail_pid" || true
|
||||
if [ "$deps_exit" -ne 0 ]; then
|
||||
echo "::endgroup::"
|
||||
echo "::error::Failed to install dependencies for ${subport}"
|
||||
fail=1
|
||||
continue
|
||||
fi
|
||||
echo "::endgroup::"
|
||||
echo "::group::Installing ${subport}"
|
||||
set +e
|
||||
sudo mpbb \
|
||||
--work-dir "$workdir" \
|
||||
install-port \
|
||||
--source \
|
||||
"$subport"
|
||||
install_exit=$?
|
||||
set -e
|
||||
if [ "$install_exit" -ne 0 ]; then
|
||||
echo "::endgroup::"
|
||||
echo "::error::Failed to install ${subport}"
|
||||
fail=1
|
||||
continue
|
||||
fi
|
||||
echo "::endgroup::"
|
||||
done
|
||||
exit "$fail"
|
||||
env:
|
||||
subportlist: ${{ steps.subportlist.outputs.subportlist }}
|
||||
|
||||
workdir="/tmp/mpbb/$subport"
|
||||
mkdir -p "$workdir/logs"
|
||||
- name: Package
|
||||
run: |
|
||||
# create packages
|
||||
sudo port pkg sunshine
|
||||
sudo port dmg sunshine
|
||||
|
||||
echo "::group::Installing dependencies"
|
||||
sudo mpbb \
|
||||
--work-dir "$workdir" \
|
||||
install-dependencies \
|
||||
"$subport"
|
||||
echo "::endgroup::"
|
||||
work=$(port work sunshine)
|
||||
echo "Sunshine port work directory: ${work}"
|
||||
|
||||
echo "::group::Installing ${subport}"
|
||||
sudo mpbb \
|
||||
--work-dir "$workdir" \
|
||||
install-port \
|
||||
--source \
|
||||
"$subport"
|
||||
echo "::endgroup::"
|
||||
# move components out of port work directory
|
||||
sudo mv ${work}/Sunshine*component.pkg /tmp/
|
||||
|
||||
# copy artifacts
|
||||
sudo mv ${work}/Sunshine*.pkg ./artifacts/sunshine.pkg
|
||||
sudo mv ${work}/Sunshine*.dmg ./artifacts/sunshine.dmg
|
||||
|
||||
# move components back
|
||||
# sudo mv /tmp/Sunshine*component.pkg ${work}/
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
@@ -698,11 +757,11 @@ jobs:
|
||||
build_win:
|
||||
name: Windows
|
||||
runs-on: windows-2019
|
||||
needs: [check_changelog, setup_release]
|
||||
needs: setup_release
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
@@ -719,7 +778,7 @@ jobs:
|
||||
mingw-w64-x86_64-boost
|
||||
mingw-w64-x86_64-cmake
|
||||
mingw-w64-x86_64-curl
|
||||
mingw-w64-x86_64-onevpl
|
||||
mingw-w64-x86_64-libmfx
|
||||
mingw-w64-x86_64-nsis
|
||||
mingw-w64-x86_64-openssl
|
||||
mingw-w64-x86_64-opus
|
||||
@@ -734,14 +793,10 @@ jobs:
|
||||
|
||||
- name: Build Windows
|
||||
shell: msys2 {0}
|
||||
env:
|
||||
BRANCH: ${{ github.head_ref || github.ref_name }}
|
||||
BUILD_VERSION: ${{ needs.check_changelog.outputs.next_version_bare }}
|
||||
COMMIT: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DSUNSHINE_ASSETS_DIR=assets \
|
||||
-G "MinGW Makefiles" \
|
||||
..
|
||||
@@ -761,15 +816,6 @@ jobs:
|
||||
mv ./cpack_artifacts/Sunshine.exe ../artifacts/sunshine-windows-installer.exe
|
||||
mv ./cpack_artifacts/Sunshine.zip ../artifacts/sunshine-windows-portable.zip
|
||||
|
||||
- name: Package Windows Debug Info
|
||||
working-directory: build
|
||||
run: |
|
||||
# save the original binaries with debug info
|
||||
7z -r `
|
||||
"-xr!CMakeFiles" `
|
||||
"-xr!cpack_artifacts" `
|
||||
a "../artifacts/sunshine-debuginfo-win32.zip" "*.exe"
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
@@ -793,11 +839,8 @@ jobs:
|
||||
release-winget:
|
||||
name: Release to WinGet
|
||||
needs: [setup_release, build_win]
|
||||
if: |
|
||||
(github.repository_owner == 'LizardByte' &&
|
||||
needs.setup_release.outputs.create_release == 'true' &&
|
||||
github.ref == 'refs/heads/master')
|
||||
runs-on: ubuntu-latest
|
||||
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:
|
||||
- name: Release to WinGet
|
||||
uses: vedantmgoyal2009/winget-releaser@v2
|
||||
|
||||
2
.github/workflows/auto-create-pr.yml
vendored
2
.github/workflows/auto-create-pr.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: repo-sync/pull-request@v2
|
||||
|
||||
2
.github/workflows/automerge.yml
vendored
2
.github/workflows/automerge.yml
vendored
@@ -49,7 +49,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Automerging
|
||||
uses: pascalgn/automerge-action@v0.15.6
|
||||
uses: pascalgn/automerge-action@v0.15.5
|
||||
env:
|
||||
BASE_BRANCHES: nightly
|
||||
GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
|
||||
|
||||
72
.github/workflows/autoupdate-labeler.yml
vendored
Normal file
72
.github/workflows/autoupdate-labeler.yml
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
---
|
||||
# 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.
|
||||
|
||||
# Label PRs with `autoupdate` if various conditions are met, otherwise, remove the label.
|
||||
|
||||
name: Label PR autoupdate
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types:
|
||||
- edited
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
|
||||
jobs:
|
||||
label_pr:
|
||||
if: >-
|
||||
startsWith(github.repository, 'LizardByte/') &&
|
||||
contains(github.event.pull_request.body, fromJSON('"] I want maintainers to keep my branch updated"'))
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
steps:
|
||||
- name: Check if member
|
||||
id: org_member
|
||||
run: |
|
||||
status="true"
|
||||
gh api \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
/orgs/${{ github.repository_owner }}/members/${{ github.actor }} || status="false"
|
||||
|
||||
echo "result=${status}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Label autoupdate
|
||||
if: >-
|
||||
steps.org_member.outputs.result == 'true' &&
|
||||
contains(github.event.pull_request.labels.*.name, 'autoupdate') == false &&
|
||||
contains(github.event.pull_request.body,
|
||||
fromJSON('"\n- [x] I want maintainers to keep my branch updated"')) == true
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{ secrets.GH_BOT_TOKEN }}
|
||||
script: |
|
||||
github.rest.issues.addLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels: ['autoupdate']
|
||||
})
|
||||
|
||||
- name: Unlabel autoupdate
|
||||
if: >-
|
||||
contains(github.event.pull_request.labels.*.name, 'autoupdate') &&
|
||||
(
|
||||
(github.event.action == 'synchronize' && steps.org_member.outputs.result == 'false') ||
|
||||
(contains(github.event.pull_request.body,
|
||||
fromJSON('"\n- [x] I want maintainers to keep my branch updated"')) == false
|
||||
)
|
||||
)
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{ secrets.GH_BOT_TOKEN }}
|
||||
script: |
|
||||
github.rest.issues.removeLabel({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
name: ['autoupdate']
|
||||
})
|
||||
51
.github/workflows/autoupdate.yml
vendored
Normal file
51
.github/workflows/autoupdate.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
---
|
||||
# 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 the following workflows:
|
||||
# - automerge
|
||||
# - autoupdate-labeler
|
||||
|
||||
# It uses an 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.
|
||||
# Dependabot PRs are updated by an action that comments `@depdenabot rebase` on dependabot PRs. (disabled)
|
||||
|
||||
name: autoupdate
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'nightly'
|
||||
|
||||
jobs:
|
||||
autoupdate:
|
||||
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:
|
||||
EXCLUDED_LABELS: "central_dependency,dependencies"
|
||||
GITHUB_TOKEN: '${{ secrets.GH_BOT_TOKEN }}'
|
||||
PR_FILTER: "labelled"
|
||||
PR_LABELS: "autoupdate"
|
||||
PR_READY_STATE: "all"
|
||||
MERGE_CONFLICT_ACTION: "fail"
|
||||
|
||||
# Disabled due to:
|
||||
# - no major version tag, resulting in constant nagging to update this action
|
||||
# - additionally, the code is sketchy, 16k+ lines of code?
|
||||
# https://github.com/bbeesley/gha-auto-dependabot-rebase/blob/main/dist/main.cjs
|
||||
#
|
||||
# dependabot-rebase:
|
||||
# name: Dependabot Rebase
|
||||
# if: >-
|
||||
# startsWith(github.repository, 'LizardByte/')
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: rebase
|
||||
# uses: "bbeesley/gha-auto-dependabot-rebase@v1.3.18"
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
|
||||
30
.github/workflows/ci-docker.yml
vendored
30
.github/workflows/ci-docker.yml
vendored
@@ -38,7 +38,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Find dockerfiles
|
||||
id: find
|
||||
@@ -86,7 +86,7 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
if: ${{ github.ref == 'refs/heads/master' || github.base_ref == 'master' }}
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Verify Changelog
|
||||
id: verify_changelog
|
||||
@@ -162,7 +162,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Hadolint
|
||||
id: hadolint
|
||||
@@ -192,18 +192,8 @@ jobs:
|
||||
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@v4
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
@@ -309,10 +299,10 @@ jobs:
|
||||
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Set Up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@v2
|
||||
id: buildx
|
||||
|
||||
- name: Cache Docker Layers
|
||||
@@ -325,14 +315,14 @@ jobs:
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
if: ${{ steps.prepare.outputs.push == 'true' }} # PRs do not have access to secrets
|
||||
uses: docker/login-action@v3
|
||||
uses: docker/login-action@v2
|
||||
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@v3
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ secrets.GH_BOT_NAME }}
|
||||
@@ -341,7 +331,7 @@ jobs:
|
||||
- name: Build artifacts
|
||||
if: ${{ steps.prepare.outputs.artifacts == 'true' }}
|
||||
id: build_artifacts
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: ./
|
||||
file: ${{ matrix.dockerfile }}
|
||||
@@ -363,7 +353,7 @@ jobs:
|
||||
|
||||
- name: Build and push
|
||||
id: build
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: ./
|
||||
file: ${{ matrix.dockerfile }}
|
||||
|
||||
292
.github/workflows/ci-qodana.yml
vendored
292
.github/workflows/ci-qodana.yml
vendored
@@ -1,292 +0,0 @@
|
||||
---
|
||||
# This action is centrally managed in https://github.com/<organization>/.github/
|
||||
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
|
||||
# the above-mentioned repo.
|
||||
|
||||
name: Qodana
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master, nightly]
|
||||
types: [opened, synchronize, reopened]
|
||||
push:
|
||||
branches: [master, nightly]
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
qodana_initial_check:
|
||||
name: Qodana Initial Check
|
||||
permissions:
|
||||
actions: write # required to use workflow dispatch on fork PRs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Prepare
|
||||
id: prepare
|
||||
run: |
|
||||
# check the branch variable
|
||||
if [ "${{ github.event_name }}" == "push" ]
|
||||
then
|
||||
echo "This is a PUSH event"
|
||||
# use the branch name
|
||||
destination=${{ github.ref_name }}
|
||||
target=${{ github.ref_name }}
|
||||
else
|
||||
echo "This is a PR event"
|
||||
# use the PR number
|
||||
destination=${{ github.event.pull_request.number }}
|
||||
target=${{ github.event.pull_request.base.ref }}
|
||||
fi
|
||||
|
||||
echo "checkout_repo=$checkout_repo" >> $GITHUB_OUTPUT
|
||||
echo "checkout_ref=$checkout_ref" >> $GITHUB_OUTPUT
|
||||
echo "destination=$destination" >> $GITHUB_OUTPUT
|
||||
echo "target=$target" >> $GITHUB_OUTPUT
|
||||
|
||||
# prepare urls
|
||||
base=https://${{ github.repository_owner }}.github.io
|
||||
report_url=${base}/qodana-reports/${{ github.event.repository.name }}/${destination}
|
||||
echo "report_url=$report_url" >> $GITHUB_OUTPUT
|
||||
|
||||
# build matrix
|
||||
files=$(find . -type f -iname "qodana*.yaml")
|
||||
|
||||
echo "files: ${files}"
|
||||
|
||||
# do not quote to keep this as a single line
|
||||
echo files=${files} >> $GITHUB_OUTPUT
|
||||
|
||||
MATRIX_COMBINATIONS=""
|
||||
REPORTS_MARKDOWN=""
|
||||
for FILE in ${files}; do
|
||||
# extract the language from file name after `qodana-` and before `.yaml`
|
||||
language=$(echo $FILE | sed -r -z -e 's/(\.\/)*.*\/(qodana.yaml)/default/gm')
|
||||
if [[ $language != "default" ]]; then
|
||||
language=$(echo $FILE | sed -r -z -e 's/(\.\/)*.*qodana-(.*).yaml/\2/gm')
|
||||
fi
|
||||
MATRIX_COMBINATIONS="$MATRIX_COMBINATIONS {\"file\": \"$FILE\", \"language\": \"$language\"},"
|
||||
REPORTS_MARKDOWN="$REPORTS_MARKDOWN <br> - [${language}](${report_url}/${language})"
|
||||
done
|
||||
|
||||
# removes the last character (i.e. comma)
|
||||
MATRIX_COMBINATIONS=${MATRIX_COMBINATIONS::-1}
|
||||
|
||||
# setup matrix for later jobs
|
||||
matrix=$((
|
||||
echo "{ \"include\": [$MATRIX_COMBINATIONS] }"
|
||||
) | jq -c .)
|
||||
|
||||
echo $matrix
|
||||
echo $matrix | jq .
|
||||
echo "matrix=$matrix" >> $GITHUB_OUTPUT
|
||||
|
||||
echo "reports_markdown=$REPORTS_MARKDOWN" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Setup initial notification inputs
|
||||
id: inputs
|
||||
if: >-
|
||||
startsWith(github.event_name, 'pull_request') &&
|
||||
steps.prepare.outputs.files != ''
|
||||
run: |
|
||||
# workflow logs
|
||||
workflow_url_a=https://github.com/${{ github.repository_owner }}/${{ github.event.repository.name }}
|
||||
workflow_url=${workflow_url_a}/actions/runs/${{ github.run_id }}
|
||||
|
||||
# multiline message
|
||||
message=$(cat <<- EOF
|
||||
:warning: **Qodana is checking this PR** :warning:
|
||||
Live results available [here](${workflow_url})
|
||||
EOF
|
||||
)
|
||||
|
||||
# escape json control characters
|
||||
message=$(jq -n --arg message "$message" '$message' | sed -e 's/\\/\\\\/g' -e 's/"/\\"/g')
|
||||
|
||||
secondary_inputs=$(echo '{
|
||||
"issue_message": "'"${message}"'",
|
||||
"issue_message_id": "'"qodana"'",
|
||||
"issue_number": "'"${{ github.event.number }}"'",
|
||||
"issue_repo_owner": "'"${{ github.repository_owner }}"'",
|
||||
"issue_repo_name": "'"${{ github.event.repository.name }}"'"
|
||||
}' | jq -r .)
|
||||
|
||||
#escape json control characters
|
||||
secondary_inputs=$(jq -n --arg secondary_inputs "$secondary_inputs" '$secondary_inputs' \
|
||||
| sed -e 's/\\/\\\\/g' -e 's/"/\\"/g')
|
||||
|
||||
echo $secondary_inputs
|
||||
|
||||
# secondary input as string, not JSON
|
||||
# todo - change dispatch_ref to master instead of nightly
|
||||
primary_inputs=$(echo '{
|
||||
"dispatch_repository": "'"${{ github.repository_owner }}/.github"'",
|
||||
"dispatch_workflow": "'"dispatch-issue-comment.yml"'",
|
||||
"dispatch_ref": "'"nightly"'",
|
||||
"dispatch_inputs": "'"${secondary_inputs}"'"
|
||||
}' | jq -c .)
|
||||
|
||||
echo $primary_inputs
|
||||
echo $primary_inputs | jq .
|
||||
echo "primary_inputs=$primary_inputs" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Workflow Dispatch
|
||||
if: >-
|
||||
startsWith(github.event_name, 'pull_request') &&
|
||||
steps.prepare.outputs.files != ''
|
||||
uses: benc-uk/workflow-dispatch@v1.2.2
|
||||
continue-on-error: true # this might error if the workflow is not found, but we still want to run the next job
|
||||
with:
|
||||
ref: ${{ github.base_ref || github.ref_name }} # base ref for PR and branch name for push
|
||||
workflow: dispatcher.yml
|
||||
inputs: ${{ steps.inputs.outputs.primary_inputs }}
|
||||
token: ${{ github.token }}
|
||||
|
||||
outputs:
|
||||
destination: ${{ steps.prepare.outputs.destination }}
|
||||
target: ${{ steps.prepare.outputs.target }}
|
||||
files: ${{ steps.prepare.outputs.files }}
|
||||
reports_markdown: ${{ steps.prepare.outputs.reports_markdown }}
|
||||
matrix: ${{ steps.prepare.outputs.matrix }}
|
||||
|
||||
qodana:
|
||||
if: ${{ needs.qodana_initial_check.outputs.files != '' }}
|
||||
needs: [qodana_initial_check]
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix: ${{ fromJson(needs.qodana_initial_check.outputs.matrix) }}
|
||||
name: Qodana-Scan-${{ matrix.language }}
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Get baseline
|
||||
id: baseline
|
||||
run: |
|
||||
# check if destination is not an integer
|
||||
if ! [[ "${{ needs.qodana_initial_check.outputs.destination }}" =~ ^[0-9]+$ ]]
|
||||
then
|
||||
echo "Running for a branch update"
|
||||
echo "baseline_args=" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "Running for a PR"
|
||||
|
||||
sarif_file=qodana.sarif.json
|
||||
repo=${{ github.event.repository.name }}
|
||||
target=${{ needs.qodana_initial_check.outputs.target }}
|
||||
language=${{ matrix.language }}
|
||||
|
||||
baseline_file="${repo}/${target}/${language}/results/${sarif_file}"
|
||||
baseline_file_url="https://lizardbyte.github.io/qodana-reports/${baseline_file}"
|
||||
|
||||
# don't fail if file does not exist
|
||||
wget ${baseline_file_url} || true
|
||||
|
||||
# check if file exists
|
||||
if [ -f ${sarif_file} ]
|
||||
then
|
||||
echo "baseline exists"
|
||||
echo "baseline_args=--baseline,${sarif_file}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "baseline does not exist"
|
||||
echo "baseline_args=" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
fi
|
||||
|
||||
- name: Rename Qodana config file
|
||||
id: rename
|
||||
run: |
|
||||
# rename the file
|
||||
if [ "${{ matrix.file }}" != "./qodana.yaml" ]
|
||||
then
|
||||
mv -f ${{ matrix.file }} ./qodana.yaml
|
||||
fi
|
||||
|
||||
- name: Qodana
|
||||
id: qodana
|
||||
continue-on-error: true # ensure dispatch-qodana job is run
|
||||
uses: JetBrains/qodana-action@v2023.2.6
|
||||
with:
|
||||
additional-cache-hash: ${{ github.ref }}-${{ matrix.language }}
|
||||
artifact-name: qodana-${{ matrix.language }} # yamllint disable-line rule:line-length
|
||||
args: '--print-problems,${{ steps.baseline.outputs.baseline_args }}'
|
||||
pr-mode: false
|
||||
upload-result: true
|
||||
use-caches: true
|
||||
|
||||
- name: Set output status
|
||||
id: status
|
||||
run: |
|
||||
# check if qodana failed
|
||||
echo "qodana_status=${{ steps.qodana.outcome }}" >> $GITHUB_OUTPUT
|
||||
|
||||
outputs:
|
||||
qodana_status: ${{ steps.status.outputs.qodana_status }}
|
||||
|
||||
dispatch-qodana:
|
||||
# trigger qodana-reports to download artifacts from the matrix runs
|
||||
needs: [qodana_initial_check, qodana]
|
||||
runs-on: ubuntu-latest
|
||||
name: Dispatch Qodana
|
||||
permissions:
|
||||
actions: write # required to use workflow dispatch on fork PRs
|
||||
if: ${{ needs.qodana_initial_check.outputs.files != '' }}
|
||||
steps:
|
||||
- name: Setup qodana publish inputs
|
||||
id: inputs
|
||||
run: |
|
||||
# get the artifacts
|
||||
artifacts=${{ toJson(steps.artifacts.outputs.result) }}
|
||||
artifacts=$(echo $artifacts | jq -c .)
|
||||
|
||||
# get the target branch
|
||||
target=${{ needs.qodana_initial_check.outputs.target }}
|
||||
|
||||
# get the destination branch
|
||||
destination=${{ needs.qodana_initial_check.outputs.destination }}
|
||||
|
||||
# client payload
|
||||
secondary_inputs=$(echo '{
|
||||
"destination": "'"${destination}"'",
|
||||
"ref": "'"${{ github.ref }}"'",
|
||||
"repo": "'"${{ github.repository }}"'",
|
||||
"repo_name": "'"${{ github.event.repository.name }}"'",
|
||||
"run_id": "'"${{ github.run_id }}"'",
|
||||
"reports_markdown": "'"${{ needs.qodana_initial_check.outputs.reports_markdown }}"'",
|
||||
"status": "'"${{ needs.qodana.outputs.qodana_status }}"'"
|
||||
}' | jq -r .)
|
||||
|
||||
#escape json control characters
|
||||
secondary_inputs=$(jq -n --arg secondary_inputs "$secondary_inputs" '$secondary_inputs' \
|
||||
| sed -e 's/\\/\\\\/g' -e 's/"/\\"/g')
|
||||
|
||||
echo $secondary_inputs
|
||||
|
||||
primary_inputs=$(echo '{
|
||||
"dispatch_repository": "'"${{ github.repository_owner }}/qodana-reports"'",
|
||||
"dispatch_workflow": "'"dispatch-qodana.yml"'",
|
||||
"dispatch_ref": "'"master"'",
|
||||
"dispatch_inputs": "'"$secondary_inputs"'"
|
||||
}' | jq -c .)
|
||||
|
||||
echo $primary_inputs
|
||||
echo $primary_inputs | jq .
|
||||
echo "primary_inputs=$primary_inputs" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Workflow Dispatch
|
||||
uses: benc-uk/workflow-dispatch@v1.2.2
|
||||
continue-on-error: true # this might error if the workflow is not found, but we don't want to fail the workflow
|
||||
with:
|
||||
ref: ${{ github.base_ref || github.ref_name }} # base ref for PR and branch name for push
|
||||
workflow: dispatcher.yml
|
||||
inputs: ${{ steps.inputs.outputs.primary_inputs }}
|
||||
token: ${{ github.token }}
|
||||
147
.github/workflows/codeql.yml
vendored
147
.github/workflows/codeql.yml
vendored
@@ -1,147 +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 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@v6
|
||||
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()) &&
|
||||
!matrix['include'].includes({"language": key.toLowerCase()})) {
|
||||
console.log(`Found supported language: ${key}`)
|
||||
matrix['include'].push({"language": key.toLowerCase()})
|
||||
}
|
||||
}
|
||||
|
||||
// print languages
|
||||
console.log(`matrix: ${JSON.stringify(matrix)}`)
|
||||
|
||||
return matrix
|
||||
|
||||
- name: Continue
|
||||
uses: actions/github-script@v6
|
||||
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
|
||||
if: ${{ needs.languages.outputs.continue == 'true' }}
|
||||
needs: [languages]
|
||||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || '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
|
||||
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
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
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
|
||||
- name: Prebuild
|
||||
run: |
|
||||
# check if .qodeql-prebuild-${{ matrix.language }}.sh exists
|
||||
if [ -f "./.codeql-prebuild-${{ matrix.language }}.sh" ]; then
|
||||
echo "Running .codeql-prebuild-${{ matrix.language }}.sh"
|
||||
./.codeql-prebuild-${{ matrix.language }}.sh
|
||||
fi
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
68
.github/workflows/cpp-lint.yml
vendored
68
.github/workflows/cpp-lint.yml
vendored
@@ -23,43 +23,25 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Find cpp files
|
||||
id: find_files
|
||||
id: cpp_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")
|
||||
cpp_files=$(find . -type f -iname "*.cpp" -o -iname "*.h" -o -iname "*.m" -o -iname "*.mm")
|
||||
|
||||
# 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}"
|
||||
echo "found cpp files: ${cpp_files}"
|
||||
|
||||
# do not quote to keep this as a single line
|
||||
echo found_files=${found_files} >> $GITHUB_OUTPUT
|
||||
echo cpp_files=${cpp_files} >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Clang format lint
|
||||
if: ${{ steps.find_files.outputs.found_files }}
|
||||
uses: DoozyX/clang-format-lint-action@v0.16.2
|
||||
if: ${{ steps.cpp_files.outputs.cpp_files }}
|
||||
uses: DoozyX/clang-format-lint-action@v0.15
|
||||
with:
|
||||
source: ${{ steps.find_files.outputs.found_files }}
|
||||
source: ${{ steps.cpp_files.outputs.cpp_files }}
|
||||
extensions: 'cpp,h,m,mm'
|
||||
clangFormatVersion: 16
|
||||
clangFormatVersion: 15
|
||||
style: file
|
||||
inplace: false
|
||||
|
||||
@@ -68,7 +50,7 @@ jobs:
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: clang-format-fixes
|
||||
path: ${{ steps.find_files.outputs.found_files }}
|
||||
path: ${{ steps.cpp_files.outputs.cpp_files }}
|
||||
|
||||
cmake-lint:
|
||||
name: CMake Lint
|
||||
@@ -76,7 +58,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
@@ -88,33 +70,15 @@ jobs:
|
||||
python -m pip install --upgrade pip setuptools cmakelang
|
||||
|
||||
- name: Find cmake files
|
||||
id: find_files
|
||||
id: cmake_files
|
||||
run: |
|
||||
# find files
|
||||
found_files=$(find . -type f -iname "CMakeLists.txt" -o -iname "*.cmake")
|
||||
ignore_files=$(find . -type f -iname ".cmake-lint-ignore")
|
||||
cmake_files=$(find . -type f -iname "CMakeLists.txt" -o -iname "*.cmake")
|
||||
|
||||
# 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}"
|
||||
echo "found cmake files: ${cmake_files}"
|
||||
|
||||
# do not quote to keep this as a single line
|
||||
echo found_files=${found_files} >> $GITHUB_OUTPUT
|
||||
echo cmake_files=${cmake_files} >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Test with cmake-lint
|
||||
run: |
|
||||
cmake-lint --line-width 120 --tab-size 4 ${{ steps.find_files.outputs.found_files }}
|
||||
cmake-lint --line-width 120 --tab-size 4 ${{ steps.cmake_files.outputs.cmake_files }}
|
||||
|
||||
69
.github/workflows/dispatcher.yml
vendored
69
.github/workflows/dispatcher.yml
vendored
@@ -1,69 +0,0 @@
|
||||
---
|
||||
# This action is centrally managed in https://github.com/<organization>/.github/
|
||||
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
|
||||
# the above-mentioned repo.
|
||||
|
||||
# This action receives a dispatch event and passes it through to another repo. This is a workaround to avoid issues
|
||||
# where fork PRs do not have access to secrets.
|
||||
|
||||
name: Dispatcher
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
dispatch_repository:
|
||||
description: 'Repository to dispatch to'
|
||||
required: true
|
||||
dispatch_workflow:
|
||||
description: 'Workflow to dispatch to'
|
||||
required: true
|
||||
dispatch_ref:
|
||||
description: 'Ref/branch to dispatch to'
|
||||
required: true
|
||||
dispatch_inputs:
|
||||
description: 'Inputs to send'
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
dispatcher:
|
||||
name: Repository Dispatch
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Unescape JSON control characters
|
||||
id: inputs
|
||||
run: |
|
||||
# get the inputs
|
||||
dispatch_inputs=${{ github.event.inputs.dispatch_inputs }}
|
||||
echo "$dispatch_inputs"
|
||||
|
||||
# temporarily replace newlines with a placeholder
|
||||
dispatch_inputs=$(echo ${dispatch_inputs} | sed 's/\\\\n/_!new_line!_/g')
|
||||
|
||||
# remove newline characters
|
||||
dispatch_inputs=$(echo ${dispatch_inputs} | sed 's/\\n//g')
|
||||
|
||||
# replace placeholder with newline
|
||||
dispatch_inputs=$(echo ${dispatch_inputs} | sed 's/_!new_line!_/\\n/g')
|
||||
|
||||
# replace escaped quotes with unescaped quotes
|
||||
dispatch_inputs=$(echo ${dispatch_inputs} | sed 's/\\"//g')
|
||||
|
||||
# debug echo
|
||||
echo "$dispatch_inputs"
|
||||
|
||||
# parse as JSON
|
||||
dispatch_inputs=$(echo "$dispatch_inputs" | jq -c .)
|
||||
|
||||
# debug echo
|
||||
echo "$dispatch_inputs"
|
||||
|
||||
echo "dispatch_inputs=$dispatch_inputs" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Workflow Dispatch
|
||||
uses: benc-uk/workflow-dispatch@v1.2.2
|
||||
with:
|
||||
repo: ${{ github.event.inputs.dispatch_repository }}
|
||||
ref: ${{ github.event.inputs.dispatch_ref || 'master' }} # default to master if not specified
|
||||
workflow: ${{ github.event.inputs.dispatch_workflow }}
|
||||
inputs: ${{ steps.inputs.outputs.dispatch_inputs }}
|
||||
token: ${{ secrets.GH_BOT_TOKEN || github.token }} # fallback to default token if not specified
|
||||
16
.github/workflows/issues-stale.yml
vendored
16
.github/workflows/issues-stale.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Stale
|
||||
uses: actions/stale@v8
|
||||
uses: actions/stale@v7
|
||||
with:
|
||||
close-issue-message: >
|
||||
This issue was closed because it has been stalled for 10 days with no activity.
|
||||
@@ -31,19 +31,16 @@ jobs:
|
||||
exempt-pr-labels: 'dependencies,l10n'
|
||||
stale-issue-label: 'stale'
|
||||
stale-issue-message: >
|
||||
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!
|
||||
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.
|
||||
stale-pr-label: 'stale'
|
||||
stale-pr-message: >
|
||||
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!
|
||||
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.
|
||||
repo-token: ${{ secrets.GH_BOT_TOKEN }}
|
||||
|
||||
- name: Invalid Template
|
||||
uses: actions/stale@v8
|
||||
uses: actions/stale@v7
|
||||
with:
|
||||
close-issue-message: >
|
||||
This issue was closed because the the template was not completed after 5 days.
|
||||
@@ -51,6 +48,7 @@ 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: >
|
||||
|
||||
4
.github/workflows/localize.yml
vendored
4
.github/workflows/localize.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Python 3.9
|
||||
uses: actions/setup-python@v4 # https://github.com/actions/setup-python
|
||||
@@ -77,7 +77,7 @@ jobs:
|
||||
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create/Update Pull Request
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
with:
|
||||
add-paths: |
|
||||
locale/*.po
|
||||
|
||||
32
.github/workflows/pull-requests.yml
vendored
Normal file
32
.github/workflows/pull-requests.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
# 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.
|
||||
|
||||
# Ensure PRs are made against `nightly` branch.
|
||||
|
||||
name: Pull Requests
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, synchronize, edited, reopened]
|
||||
|
||||
# no concurrency for pull_request_target events
|
||||
|
||||
jobs:
|
||||
check-pull-request:
|
||||
name: Check Pull Request
|
||||
if: startsWith(github.repository, 'LizardByte/')
|
||||
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
|
||||
2
.github/workflows/python-flake8.yml
vendored
2
.github/workflows/python-flake8.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4 # https://github.com/actions/setup-python
|
||||
|
||||
45
.github/workflows/release-notifier.yml
vendored
45
.github/workflows/release-notifier.yml
vendored
@@ -14,14 +14,11 @@ on:
|
||||
|
||||
jobs:
|
||||
discord:
|
||||
if: >-
|
||||
startsWith(github.repository, 'LizardByte/') and
|
||||
not(github.event.release.prerelease) and
|
||||
not(github.event.release.draft)
|
||||
if: startsWith(github.repository, 'LizardByte/')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: discord
|
||||
uses: sarisia/actions-status-discord@v1
|
||||
uses: sarisia/actions-status-discord@v1 # https://github.com/sarisia/actions-status-discord
|
||||
with:
|
||||
webhook: ${{ secrets.DISCORD_RELEASE_WEBHOOK }}
|
||||
nodetail: true
|
||||
@@ -33,14 +30,11 @@ jobs:
|
||||
color: 0xFF4500
|
||||
|
||||
facebook_group:
|
||||
if: >-
|
||||
startsWith(github.repository, 'LizardByte/') and
|
||||
not(github.event.release.prerelease) and
|
||||
not(github.event.release.draft)
|
||||
if: startsWith(github.repository, 'LizardByte/')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: facebook-post-action
|
||||
uses: ReenigneArcher/facebook-post-action@v1
|
||||
uses: ReenigneArcher/facebook-post-action@v1 # https://github.com/ReenigneArcher/facebook-post-action
|
||||
with:
|
||||
page_id: ${{ secrets.FACEBOOK_GROUP_ID }}
|
||||
access_token: ${{ secrets.FACEBOOK_ACCESS_TOKEN }}
|
||||
@@ -50,14 +44,11 @@ jobs:
|
||||
url: ${{ github.event.release.html_url }}
|
||||
|
||||
facebook_page:
|
||||
if: >-
|
||||
startsWith(github.repository, 'LizardByte/') and
|
||||
not(github.event.release.prerelease) and
|
||||
not(github.event.release.draft)
|
||||
if: startsWith(github.repository, 'LizardByte/')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: facebook-post-action
|
||||
uses: ReenigneArcher/facebook-post-action@v1
|
||||
uses: ReenigneArcher/facebook-post-action@v1 # https://github.com/ReenigneArcher/facebook-post-action
|
||||
with:
|
||||
page_id: ${{ secrets.FACEBOOK_PAGE_ID }}
|
||||
access_token: ${{ secrets.FACEBOOK_ACCESS_TOKEN }}
|
||||
@@ -67,14 +58,11 @@ jobs:
|
||||
url: ${{ github.event.release.html_url }}
|
||||
|
||||
reddit:
|
||||
if: >-
|
||||
startsWith(github.repository, 'LizardByte/') and
|
||||
not(github.event.release.prerelease) and
|
||||
not(github.event.release.draft)
|
||||
if: startsWith(github.repository, 'LizardByte/')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: reddit
|
||||
uses: bluwy/release-for-reddit-action@v2
|
||||
uses: bluwy/release-for-reddit-action@v2 # https://github.com/bluwy/release-for-reddit-action
|
||||
with:
|
||||
username: ${{ secrets.REDDIT_USERNAME }}
|
||||
password: ${{ secrets.REDDIT_PASSWORD }}
|
||||
@@ -87,17 +75,14 @@ jobs:
|
||||
comment: ${{ github.event.release.body }}
|
||||
|
||||
twitter:
|
||||
if: >-
|
||||
startsWith(github.repository, 'LizardByte/') and
|
||||
not(github.event.release.prerelease) and
|
||||
not(github.event.release.draft)
|
||||
if: startsWith(github.repository, 'LizardByte/')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: twitter
|
||||
uses: nearform-actions/github-action-notify-twitter@v1
|
||||
uses: ethomson/send-tweet-action@v1 # https://github.com/ethomson/send-tweet-action
|
||||
with:
|
||||
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 }}
|
||||
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 }}
|
||||
|
||||
62
.github/workflows/update-pages.yml
vendored
62
.github/workflows/update-pages.yml
vendored
@@ -1,62 +0,0 @@
|
||||
---
|
||||
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@v3
|
||||
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.4
|
||||
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 }}
|
||||
2
.github/workflows/yaml-lint.yml
vendored
2
.github/workflows/yaml-lint.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Find additional files
|
||||
id: find-files
|
||||
|
||||
24
.gitmodules
vendored
24
.gitmodules
vendored
@@ -8,7 +8,7 @@
|
||||
branch = master
|
||||
[submodule "third-party/ViGEmClient"]
|
||||
path = third-party/ViGEmClient
|
||||
url = https://github.com/nefarius/ViGEmClient
|
||||
url = https://github.com/ViGEm/ViGEmClient
|
||||
branch = master
|
||||
[submodule "third-party/miniupnp"]
|
||||
path = third-party/miniupnp
|
||||
@@ -17,7 +17,7 @@
|
||||
[submodule "third-party/nv-codec-headers"]
|
||||
path = third-party/nv-codec-headers
|
||||
url = https://github.com/FFmpeg/nv-codec-headers
|
||||
branch = sdk/12.0
|
||||
branch = sdk/11.1
|
||||
[submodule "third-party/TPCircularBuffer"]
|
||||
path = third-party/TPCircularBuffer
|
||||
url = https://github.com/michaeltyson/TPCircularBuffer
|
||||
@@ -46,23 +46,3 @@
|
||||
path = third-party/nanors
|
||||
url = https://github.com/sleepybishop/nanors.git
|
||||
branch = master
|
||||
[submodule "third-party/tray"]
|
||||
path = third-party/tray
|
||||
url = https://github.com/LizardByte/tray
|
||||
branch = master
|
||||
[submodule "third-party/nvapi-open-source-sdk"]
|
||||
path = third-party/nvapi-open-source-sdk
|
||||
url = https://github.com/LizardByte/nvapi-open-source-sdk
|
||||
branch = sdk
|
||||
[submodule "third-party/ffmpeg-linux-powerpc64le"]
|
||||
path = third-party/ffmpeg-linux-powerpc64le
|
||||
url = https://github.com/LizardByte/build-deps
|
||||
branch = ffmpeg-linux-powerpc64le
|
||||
[submodule "third-party/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
|
||||
|
||||
@@ -8,22 +8,26 @@ version: 2
|
||||
|
||||
# Set the version of Python
|
||||
build:
|
||||
os: ubuntu-22.04
|
||||
os: ubuntu-20.04
|
||||
tools:
|
||||
python: "3.11"
|
||||
apt_packages:
|
||||
- graphviz # required to build diagrams
|
||||
- libboost-locale-dev # required for rstcheck in cpp code block
|
||||
jobs:
|
||||
post_build:
|
||||
- find ./third-party -iname "*.rst" -type f -delete # find and delete rst files in third-party
|
||||
- rstcheck -r . # lint rst files
|
||||
# - rstfmt --check --diff -w 120 . # check rst formatting
|
||||
python: "3.10"
|
||||
|
||||
# submodules required for include statements
|
||||
submodules:
|
||||
include: all
|
||||
recursive: true
|
||||
## apt packages required packages to run cmake on sunshine, note that additional packages are required
|
||||
# apt_packages:
|
||||
# - cmake
|
||||
# - 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
|
||||
|
||||
# Build documentation in the docs/ directory with Sphinx
|
||||
sphinx:
|
||||
@@ -37,3 +41,4 @@ formats: all
|
||||
python:
|
||||
install:
|
||||
- requirements: ./docs/requirements.txt
|
||||
system_packages: true
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
# configuration file for rstcheck, an rst linting tool
|
||||
# https://rstcheck.readthedocs.io/en/latest/usage/config
|
||||
|
||||
[rstcheck]
|
||||
ignore_directives =
|
||||
doxygenfile,
|
||||
include,
|
||||
mdinclude,
|
||||
tab,
|
||||
todo,
|
||||
359
CHANGELOG.md
359
CHANGELOG.md
@@ -1,256 +1,18 @@
|
||||
# Changelog
|
||||
|
||||
## [0.21.0] - 2023-10-15
|
||||
**Added**
|
||||
- (Input) Add support for automatically selecting the emulated controller type based on the physical controller connected to the client
|
||||
- (Input/Windows) Add support for Applications (context menu) key
|
||||
- (Input/Windows) Implement touchpad, motion sensors, battery state, and LED control for the emulated DualShock 4 controller
|
||||
- (Input) Advertise support for new input features to clients
|
||||
- (Linux/Debian) Added Debian Bookworm package
|
||||
- (Prep-Commands) Expose connection environment variables
|
||||
- (Input/Windows) Implement pen and touch support
|
||||
- (Capture/Windows) Add standalone NVENC encoder
|
||||
- (Capture) Implement AV1 encoding
|
||||
- (Network) Implement IPv6 support
|
||||
- (Capture/Windows) Add option to disable realtime hags
|
||||
- (Graphics/NVIDIA) Add an option to decrease GPU scheduling priority to workaround HAGS video hang
|
||||
- (Capture/Linux) Add FFmpeg powerpc64le architecture for self compiling Sunshine
|
||||
- (Capture/Windows) Add support for capturing rotated displays
|
||||
- (System Tray) Implement streaming event notifications
|
||||
- (UI) Add port configuration table
|
||||
- (Applications) Added option to automatically treat launcher type apps as detached commands
|
||||
- (Input/Gamepad) Allow the Misc button to work as Guide on emulated Xbox 360 controllers
|
||||
|
||||
**Changed**
|
||||
- (Input) Reduce latency by implementing input batching
|
||||
- (Logging) Move input packet debug prints off the control stream thread
|
||||
- (Input) Refactor gamepad emulation code to use DS4 extended report format
|
||||
- (Graphics/NVIDIA) Modify and restore NVIDIA control panel settings before and after stream, respectively
|
||||
- (Graphics/NVIDIA) New config page for NVENC
|
||||
- (Graphics/Windows) Refactor DX shaders
|
||||
- (Input/Windows) Use our own keycode mapping to avoid installing the US English keyboard layout
|
||||
|
||||
**Fixed**
|
||||
- (UI) Fix update notifications
|
||||
- (Dependencies/Linux) Replace libboost chrono and thread with standard chrono and thread
|
||||
- (Input) Increase maximum gamepad limit to 16
|
||||
- (Network) Allow use of multiple ENet channels
|
||||
- (Network) Consider link-local addresses on LAN
|
||||
- (Input) Fixed issue where button may sometimes stick on Windows
|
||||
- (Input) Fix "ControllerNumber not allocated" warning when a gamepad is removed
|
||||
- (Input) Fix handling of gamepad feedback with multiple clients connected
|
||||
- (Input) Fix clamping mouse position to aspect ratio adjusted viewport
|
||||
- (Graphics/AMD) Fix crash during startup on some older AMD GPUs
|
||||
- (Logging) Fix crash when non-ASCII characters are logged
|
||||
- (Prep-Commands) Fix resource exhaustion bug which could occur when many prep commands were used
|
||||
- (Subprocesses) Fix race condition when inserting new processes
|
||||
- (Logging) Log error if encoder doesn't produce IDR frame on demand
|
||||
- (Audio) Improve audio capture logic and logging
|
||||
- (Logging) Fix AMF logging to match configured log level
|
||||
- (Logging) Log FFmpeg to log file instead of stdout
|
||||
- (Capture) Reject codecs that are not supported by display device
|
||||
- (Capture) Add fallbacks for unsupported codec settings
|
||||
- (Capture) Avoid probing HEVC or AV1 codecs in some cases
|
||||
- (Caputre) Remove DwmFlush()
|
||||
- (Capture/Windows) Improvements to capture sleeps for better frame stability
|
||||
- (Capture/Windows) Adjust capture rate to better match with display
|
||||
- (Linux/ArchLinux) Fix package version in PKGBUILD and precompiled package
|
||||
- (UI) Highlight fatal log messages in web ui
|
||||
- (Commands) Allow stream if prep command fails
|
||||
- (Capture/Linux) Fix KMS grab VRAM capture with libva 2.20
|
||||
- (Capture/macOS) Fix video capture backend
|
||||
- (Misc/Windows) Don't start the session monitor window when launched in command mode
|
||||
- (Linux/AppImage) Use the linuxdeploy GTK plugin to correctly deploy GTK3 dependencies
|
||||
- (Input/Windows) Fix reWASD not recognizing emulated DualShock 4 input
|
||||
|
||||
**Dependencies**
|
||||
- Bump bootstrap from 5.2.3 to 5.3.2
|
||||
- Bump third-party/moonlight-common-c from c9426a6 to 7a6d12f
|
||||
- Bump gcc-10 in Ubuntu 20.04 docker image
|
||||
- Bump furo from 2023.5.20 to 2023.9.10
|
||||
- Bump sphinx from 7.0.1 to 7.2.6
|
||||
- Bump cmake from 3.26 to 3.27 in Fedora docker images
|
||||
- Move third-party/nv-codec-headers from sdk/11.1 branch to sdk/12.0 branch
|
||||
- Automatic bump ffmpeg
|
||||
- Bump actions/checkout from 3 to 4
|
||||
- Bump boost from 1.80 to 1.81 in Macport manifest
|
||||
- Bump @fortawesome/fontawesome-free from 6.4.0 to 6.4.2
|
||||
|
||||
**Misc**
|
||||
- (Docs) Force badges to use svg
|
||||
- (Docs) Add Linux SSH example
|
||||
- (Docs) Add information about mesa for Linux
|
||||
- (CI) Free additional space on Docker, Flatpak, and AppImage builds due to internal changes on GitHub runners
|
||||
- (Docs/Logging/UI) Corrected various typos
|
||||
- (Docs) Add blurb about Gamescope compatibility
|
||||
- (Installer/Windows) Use system proxy to download ViGEmBus
|
||||
- (CI) Ignore third-party directory for clang-format
|
||||
- (Docs/Linux) Add Plasma-Compatible resolution example
|
||||
- (Docs) Add Sunshine website available at https://app.lizardbyte.dev/Sunshine
|
||||
- (Build/Windows) Fix audio code build with new MinGW headers
|
||||
- (Build/Windows) Fix QoS code build with new MinGW headers
|
||||
- (CI/Windows) Prevent winget action from creating an update when running in a fork
|
||||
- (CI/Windows) Change winget job to ubuntu-latest runner
|
||||
- (CI) Add CodeQL analysis
|
||||
- (CI/Docker) Fix ArchLinux image caching issue
|
||||
- (Windows) Manifest improvements
|
||||
- (CI/macOS) Simplify macport build
|
||||
- (Docs) Remove deprecated options from readthedocs config
|
||||
- (CI/Docs) Lint rst files
|
||||
- (Docs) Update localization information (after consolidating Crowdin projects)
|
||||
- (Cmake) Split CMakelists into modules
|
||||
- (Docs) Add Linux Headless/SSH Guide
|
||||
|
||||
## [0.20.0] - 2023-05-28
|
||||
**Breaking**
|
||||
- (Windows) The Windows installer version of Sunshine is now always launched by the Sunshine Service. Manually launching Sunshine.exe from Program Files is no longer supported. This was necessary to address security issues caused by non-admin users having access to Sunshine's config data. If you have set up Task Scheduler or other mechanisms to launch Sunshine automatically, remove those from your system before updating.
|
||||
- (Windows) The Start Menu shortcut has been redesigned for use with the Sunshine Service. It now launches Sunshine in the background (if not already running) and opens the Web UI, avoiding the persistent Command Prompt window present in prior versions. The Start Menu shortcut is now the recommended method for opening the Web UI and launching Sunshine.
|
||||
- (Network/UPnP) If the Moonlight Internet Hosting Tool is installed alongside Sunshine, you must remove it or upgrade to v5.6 or later to prevent conflicts with Sunshine's UPnP support. As a reminder, the Moonlight Internet Hosting Tool is not required to stream over the Internet with Sunshine. Instead, simply enable UPnP in the Sunshine Web UI.
|
||||
- (Windows) If Steam is installed, the Steam Streaming Speakers driver will be automatically installed when starting a stream for the first time. This behavior can be disabled in the Audio/Video tab of the Web UI. This Steam driver enables support for surround sound and muting host audio without requiring any manual configuration.
|
||||
- (Input) The Back Button Timeout option has been renamed to Guide Button Emulation Timeout and has been disabled by default to ensure long presses on the Back button work by default. The previous behavior can be restored by setting the Guide Button Emulation Timeout to 2000.
|
||||
- (Windows) The service name of SunshineSvc has been changed to SunshineService to address a false positive in MalwareBytes. If you have any scripts or other logic on your system that is using the service name, you will need to update that for the new name.
|
||||
- (Windows) To support new installer features, install-service.bat no longer sets the service to auto-start by default. Users executing install-service.bat manually on the Sunshine portable build must also execute autostart-service.bat to start Sunshine on boot. However, installing the service manually like this is not recommended. Instead, use the Sunshine installer which handles service installation and configuration automatically.
|
||||
- (Linux/Fedora) Fedora 36 builds are removed due to upstream end of support
|
||||
|
||||
**Added**
|
||||
- (Windows) Added an option to launch apps and prep/undo commands as administrator
|
||||
- (Installer/Windows) Added an option to choose whether Sunshine launches on boot. If not configured to launch on boot, use the Start Menu shortcut to start Sunshine when desired.
|
||||
- (Input/Windows) Added option to send VK codes instead of scancodes for compatibility with iOS/Android devices using non-English keyboard layouts
|
||||
- (UI) The Apply/Restart option is now available in the Web UI for all platforms
|
||||
- (Systray) Added a Restart option to the system tray context menu
|
||||
- (Video/Windows) Added host latency data to video frames. This requires future updates to Moonlight to display in the on-screen overlay.
|
||||
- (Audio) Added support for matching Audio Sink and Virtual Sink values on device names
|
||||
- (Client) Added friendly error messages for clients when streaming fails to start
|
||||
- (Video/Windows) Added warning log messages when Windows is hiding DRM-protected content from display capture
|
||||
- (Interop/Windows) Added warning log messages when GeForce Experience is currently using the same ports as Sunshine
|
||||
- (Linux/Fedora) Fedora 38 builds are now available
|
||||
|
||||
**Changed**
|
||||
- (Video) Encoder selection now happens at each stream start for more reliable GPU detection
|
||||
- (Video/Windows) The host display now stays on while clients are actively streaming
|
||||
- (Audio) Streaming will no longer fail if audio capture is unavailable
|
||||
- (Audio/Windows) Sunshine will automatically switch back to the Virtual Sink if the default audio device is changed while streaming
|
||||
- (Audio) Changes to the host audio playback option will now take effect when resuming a session from Moonlight
|
||||
- (Audio/Windows) Sunshine will switch to a different default audio device if Steam Streaming Speakers are the default when Sunshine starts. This handles cases where Sunshine terminates unexpectedly without restoring the default audio device.
|
||||
- (Apps) The Connection Terminated dialog will no longer appear in Moonlight when the app on the host exits normally
|
||||
- (Systray/Windows) Quitting Sunshine via the system tray will now stop the Sunshine Service rather than leaving it running and allowing it to restart Sunshine
|
||||
- (UI) The 100.64.0.0/10 CGN IP address range is now treated as a LAN address range
|
||||
- (Video) Removed a workaround for some versions of Moonlight prior to mid-2022
|
||||
- (UI) The PIN field is now cleared after successfully pairing
|
||||
- (UI) User names are now treated as case-insensitive
|
||||
- (Linux) Changed udev rule to automatically grant access to virtual input devices
|
||||
- (UI) Several item descriptions were adjusted to reflect newer configuration recommendations
|
||||
- (UI) Placeholder text opacity has been reduced to improve contrast with non-placeholder text
|
||||
- (Video/Windows) Minor capture performance improvements
|
||||
|
||||
**Fixed**
|
||||
- (Video) VRAM usage while streaming is significantly reduced, particularly with higher display resolutions and HDR
|
||||
- (Network/UPnP) UPnP support was rewritten to fix several major issues handling router restarts, IP address changes, and port forwarding expiration
|
||||
- (Input) Fixed modifier keys from the software keyboard on Android clients
|
||||
- (Audio) Fixed handling of default audio device changes while streaming
|
||||
- (Windows) Fixed streaming after Microsoft Remote Desktop or Fast User Switching has been used
|
||||
- (Input) Fixed some games not recognizing emulated Guide button presses
|
||||
- (Video/Windows) Fixed incorrect gamma when using an Advanced Color SDR display on the host
|
||||
- (Installer/Windows) The installer is no longer blurry on High DPI systems
|
||||
- (Systray/Windows) Fixed multiple system tray icons appearing if Sunshine exits unexpectedly
|
||||
- (Systray/Windows) Fixed the system tray icon not appearing in several situations
|
||||
- (Windows) Fixed hang on shutdown/restart if mDNS registration fails
|
||||
- (UI) Fixed missing response headers
|
||||
- (Stability) Fixed several possible crashes in cases where the client did not successfully connect
|
||||
- (Stability) Fixed several memory leaks
|
||||
- (Input/Windows) Back/Select input now correctly generates the Share button when emulating DS4 controllers
|
||||
- (Audio/Windows) Fixed various bugs in audio-info.exe that led to inaccurate output on some systems
|
||||
- (Video/Windows) Fixed incorrect resolution values from dxgi-info.exe on High DPI systems
|
||||
- (Video/Linux) Fixed poor quality encoding from H.264 on Intel encoders
|
||||
- (Config) Fixed a couple of typos in predefined resolutions
|
||||
|
||||
**Dependencies**
|
||||
- Bump sphinx-copybutton from 0.5.1 to 0.5.2
|
||||
- Bump sphinx from 6.13 to 7.0.1
|
||||
- Bump third-party/nv-codec-headers from 2055784 to 2cd175b
|
||||
- Bump furo from 2023.3.27 to 2023.5.20
|
||||
|
||||
**Misc**
|
||||
- (Build/Linux) Add X11 to PLATFORM_LIBARIES when found
|
||||
- (Build/macOS) Fix compilation with Clang 14
|
||||
- (Docs) Fix nvlax URL
|
||||
- (Docs) Add diagrams using graphviz
|
||||
- (Docs) Improvements to source code documentation
|
||||
- (Build) Unpin docker dependencies
|
||||
- (Build/Linux) Honor install prefix for tray icon
|
||||
- (Build/Windows) Unstripped binaries are now provided as a debuginfo package to support crash dump debugging
|
||||
- (Config) Config directories are now created recursively
|
||||
|
||||
## [0.19.1] - 2023-03-30
|
||||
**Fixed**
|
||||
- (Audio) Fixed no audio issue introduced in v0.19.0
|
||||
|
||||
## [0.19.0] - 2023-03-29
|
||||
**Breaking**
|
||||
- (Linux/Flatpak) Moved Flatpak to org.freedesktop.Platform 22.08 and Cuda 12.0.0
|
||||
This will drop support for Nvidia GPUs with compute capability 3.5
|
||||
|
||||
**Added**
|
||||
- (Input) Added option to suppress input from gamepads, keyboards, or mice
|
||||
- (Input/Linux) Added unicode support for remote pasting (may not work on all DEs)
|
||||
- (Input/Linux) Added XTest input fallback
|
||||
- (UI) Added version notifications to web UI
|
||||
- (Linux/Windows) Add system tray icon
|
||||
- (Windows) Added ability to safely elevate commands that fail due to insufficient permissions when running as a service
|
||||
- (Config) Added global prep commands, and ability to exclude an app from using global prep commands
|
||||
- (Installer/Windows) Automatically install ViGEmBus if selected
|
||||
|
||||
**Changed**
|
||||
- (Logging) Changed client verified messages to debug to prevent spamming the log
|
||||
- (Config) Only save non default config values
|
||||
- (Service/Linux) Use xdg-desktop-autostart for systemd service
|
||||
- (Linux) Added config option to force capture method
|
||||
- (Windows) Execute prep command in context of current user
|
||||
- (Linux) Allow disconnected X11 outputs
|
||||
|
||||
**Fixed**
|
||||
- (Input/Windows) Fix issue where internation keys were not translated correct, and modifier keys appeared stuck
|
||||
- (Linux) Fixed startup when /dev/dri didn't exist
|
||||
- (UI) Changes software encoding settings to select menu instead of text input
|
||||
- (Initialization) Do not terminate upon failure, allowing access to the web UI
|
||||
|
||||
**Dependencies**
|
||||
- Bump third-party/moonlight-common-c from 07beb0f to c9426a6
|
||||
- Bump babel from 2.11.0 to 2.12.1
|
||||
- Bump @fortawesome/fontawesome-free from 6.2.1 to 6.4.0
|
||||
- Bump third-party/ViGEmClient from 9e842ba to 726404e
|
||||
- Bump ffmpeg
|
||||
- Bump third-party/miniupnp from 014c9df to e439318
|
||||
- Bump furo from 2022.12.7 to 2023.3.27
|
||||
- Bump third-party/nanors from 395e5ad to e9e242e
|
||||
|
||||
**Misc**
|
||||
- (GitHub) Shared feature request board with Moonlight
|
||||
- (Docs) Improved application examples
|
||||
- (Docs) Added WIP documentation for source code using Doxygen and Breathe
|
||||
- (Build) Fix linux clang build errors
|
||||
- (Build/Archlinux) Skip irrelevant submodules
|
||||
- (Build/Archlinux) Disable download timeout
|
||||
- (Build/macOS) Support compiling for earlier releases of macOS
|
||||
- (Docs) Add favicon
|
||||
- (Docs) Add missing config default values
|
||||
- (Build) Fix compiler warnings due to depreciated elements in C++17
|
||||
- (Build) Fix libcurl link errors
|
||||
- (Clang) Adjusted formatting rules
|
||||
|
||||
## [0.18.4] - 2023-02-20
|
||||
**Fixed**
|
||||
### Fixed
|
||||
- (Linux/AUR) Drop support of AUR package
|
||||
- (Docker) General enhancements to docker images
|
||||
|
||||
## [0.18.3] - 2023-02-13
|
||||
**Added**
|
||||
### 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**
|
||||
### 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
|
||||
@@ -259,7 +21,7 @@
|
||||
- (Video/AMF) Add missing encoder tunables
|
||||
|
||||
## [0.18.1] - 2023-01-31
|
||||
**Fixed**
|
||||
### Fixed
|
||||
- (Linux) Fixed missing dependencies for deb and rpm packages
|
||||
- (Linux) Use dynamic boost
|
||||
|
||||
@@ -268,14 +30,13 @@ Attention, this release contains critical security fixes. Please update as soon
|
||||
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**
|
||||
### 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**
|
||||
### 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
|
||||
@@ -299,20 +60,18 @@ location which is problematic when running as a service or on a multi-user syste
|
||||
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**
|
||||
### 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**
|
||||
### 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**
|
||||
### Fixed
|
||||
- (Video) Improved capture performance
|
||||
- (Audio) Improved audio bitrate and quality handling
|
||||
- (Apps/Windows) Fixed PATH environment variable handling
|
||||
@@ -336,8 +95,7 @@ settings. In v0.17.0, games now run under your user account without elevated pri
|
||||
- (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**
|
||||
### Dependencies
|
||||
- Bump ffmpeg from 4.4 to 5.1
|
||||
- ffmpeg_patches: add amfenc delay/buffering fix
|
||||
- CBS moved to ffmpeg submodules
|
||||
@@ -350,17 +108,15 @@ settings. In v0.17.0, games now run under your user account without elevated pri
|
||||
- Bump @fortawesome/fontawesome-free from 6.2.0 to 6.2.1
|
||||
|
||||
## [0.16.0] - 2022-12-13
|
||||
**Added**
|
||||
### Added
|
||||
- Add cover finder
|
||||
- (Docker) Add arm64 docker image
|
||||
- (Flatpak) Add installation helper scripts
|
||||
- (Windows) Add support for Unicode input messages
|
||||
|
||||
**Fixed**
|
||||
### Fixed
|
||||
- (Linux) Reintroduce Ubuntu 20.04 and 22.04 specific deb packages
|
||||
- (Linux) Fixed udev and systemd file locations
|
||||
|
||||
**Dependencies**
|
||||
### 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
|
||||
@@ -368,26 +124,23 @@ settings. In v0.17.0, games now run under your user account without elevated pri
|
||||
- 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
|
||||
- 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
|
||||
@@ -398,31 +151,27 @@ settings. In v0.17.0, games now run under your user account without elevated pri
|
||||
- (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
|
||||
- (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
|
||||
@@ -433,44 +182,41 @@ settings. In v0.17.0, games now run under your user account without elevated pri
|
||||
- (Stream/Video) AVPacket fix
|
||||
|
||||
## [0.13.0] - 2022-02-27
|
||||
**Added**
|
||||
### 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
|
||||
@@ -478,58 +224,54 @@ settings. In v0.17.0, games now run under your user account without elevated pri
|
||||
- (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
|
||||
@@ -538,25 +280,25 @@ settings. In v0.17.0, games now run under your user account without elevated pri
|
||||
- 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
|
||||
@@ -587,8 +329,3 @@ settings. In v0.17.0, games now run under your user account without elevated pri
|
||||
[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
|
||||
|
||||
839
CMakeLists.txt
839
CMakeLists.txt
@@ -1,55 +1,832 @@
|
||||
cmake_minimum_required(VERSION 3.18)
|
||||
# `CMAKE_CUDA_ARCHITECTURES` requires 3.18
|
||||
# todo - set this conditionally
|
||||
|
||||
# todo - set version to 0.0.0 once confident in automated versioning
|
||||
project(Sunshine VERSION 0.21.0
|
||||
project(Sunshine VERSION 0.18.4
|
||||
DESCRIPTION "Sunshine is a self-hosted game stream host for Moonlight."
|
||||
HOMEPAGE_URL "https://app.lizardbyte.dev/Sunshine")
|
||||
|
||||
set(PROJECT_LICENSE "GPL-3.0")
|
||||
HOMEPAGE_URL "https://app.lizardbyte.dev")
|
||||
|
||||
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.")
|
||||
|
||||
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)
|
||||
|
||||
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()
|
||||
|
||||
# set the module path, used for includes
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
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)
|
||||
endif()
|
||||
|
||||
# set version info for this build
|
||||
include(${CMAKE_MODULE_PATH}/prep/build_version.cmake)
|
||||
|
||||
# cmake build flags
|
||||
include(${CMAKE_MODULE_PATH}/prep/options.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 if configure only is set
|
||||
if(${SUNSHINE_CONFIGURE_ONLY})
|
||||
return()
|
||||
endif()
|
||||
|
||||
# project constants
|
||||
include(${CMAKE_MODULE_PATH}/prep/constants.cmake)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
set(SUNSHINE_SOURCE_ASSETS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src_assets")
|
||||
|
||||
# load macros
|
||||
include(${CMAKE_MODULE_PATH}/macros/common.cmake)
|
||||
if(APPLE)
|
||||
# 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)
|
||||
endif()
|
||||
|
||||
# load dependencies
|
||||
include(${CMAKE_MODULE_PATH}/dependencies/common.cmake)
|
||||
add_subdirectory(third-party/moonlight-common-c/enet)
|
||||
add_subdirectory(third-party/Simple-Web-Server)
|
||||
|
||||
# setup compile definitions
|
||||
include(${CMAKE_MODULE_PATH}/compile_definitions/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/miniupnpc/include)
|
||||
|
||||
# target definitions
|
||||
include(${CMAKE_MODULE_PATH}/targets/common.cmake)
|
||||
find_package(Threads REQUIRED)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(CURL REQUIRED libcurl)
|
||||
|
||||
# packaging
|
||||
include(${CMAKE_MODULE_PATH}/packaging/common.cmake)
|
||||
if(WIN32)
|
||||
set(Boost_USE_STATIC_LIBS ON) # cmake-lint: disable=C0103
|
||||
# workaround to prevent link errors against icudata, icui18n
|
||||
set(Boost_NO_BOOST_CMAKE ON) # cmake-lint: disable=C0103
|
||||
endif()
|
||||
|
||||
find_package(Boost COMPONENTS log filesystem program_options REQUIRED)
|
||||
|
||||
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)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CURL_STATIC_LDFLAGS} ${CURL_STATIC_CFLAGS}")
|
||||
|
||||
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)
|
||||
|
||||
list(PREPEND PLATFORM_LIBRARIES
|
||||
libstdc++.a
|
||||
libwinpthread.a
|
||||
libssp.a
|
||||
ksuser
|
||||
wsock32
|
||||
ws2_32
|
||||
d3d11 dxgi D3DCompiler
|
||||
setupapi
|
||||
dwmapi
|
||||
userenv
|
||||
synchronization.lib
|
||||
${CURL_STATIC_LIBRARIES})
|
||||
|
||||
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_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(VIDEO_TOOLBOX_LIBRARY VideoToolbox )
|
||||
FIND_LIBRARY(FOUNDATION_LIBRARY Foundation )
|
||||
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)
|
||||
|
||||
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)
|
||||
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()
|
||||
|
||||
# message(STATUS "CUDA NVCC Flags: ${CUDA_NVCC_FLAGS}")
|
||||
message(STATUS "CUDA Architectures: ${CMAKE_CUDA_ARCHITECTURES}")
|
||||
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()
|
||||
|
||||
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)
|
||||
# GEN_WAYLAND: args = `filename`
|
||||
macro(GEN_WAYLAND filename)
|
||||
file(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()
|
||||
|
||||
GEN_WAYLAND(xdg-output-unstable-v1)
|
||||
GEN_WAYLAND(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
|
||||
Boost::dynamic_linking
|
||||
dl
|
||||
evdev
|
||||
numa
|
||||
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/nanors/rs.c
|
||||
third-party/nanors/rs.h
|
||||
third-party/moonlight-common-c/src/Input.h
|
||||
third-party/moonlight-common-c/src/Rtsp.h
|
||||
third-party/moonlight-common-c/src/RtspParser.c
|
||||
third-party/moonlight-common-c/src/Video.h
|
||||
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)
|
||||
|
||||
set_source_files_properties(third-party/nanors/rs.c
|
||||
PROPERTIES COMPILE_FLAGS "-include deps/obl/autoshim.h -ftree-vectorize")
|
||||
|
||||
# Pre-compiled binaries
|
||||
if(WIN32)
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-windows-x86_64")
|
||||
set(FFMPEG_PLATFORM_LIBRARIES mfplat ole32 strmiids mfuuid mfx)
|
||||
elseif(APPLE)
|
||||
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-macos-aarch64")
|
||||
else()
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-macos-x86_64")
|
||||
endif()
|
||||
else()
|
||||
set(FFMPEG_PLATFORM_LIBRARIES va va-drm va-x11 vdpau X11)
|
||||
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-linux-aarch64")
|
||||
else()
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-linux-x86_64")
|
||||
list(APPEND FFMPEG_PLATFORM_LIBRARIES mfx)
|
||||
set(CPACK_DEB_PLATFORM_PACKAGE_DEPENDS "libmfx1,")
|
||||
set(CPACK_RPM_PLATFORM_PACKAGE_REQUIRES "intel-mediasdk >= 22.3.0,")
|
||||
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})
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/third-party
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/third-party/moonlight-common-c/enet/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/third-party/nanors
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/third-party/nanors/deps/obl
|
||||
${FFMPEG_INCLUDE_DIRS}
|
||||
${PLATFORM_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
string(TOUPPER "x${CMAKE_BUILD_TYPE}" BUILD_TYPE)
|
||||
if("${BUILD_TYPE}" STREQUAL "XDEBUG")
|
||||
if(WIN32)
|
||||
set_source_files_properties(src/nvhttp.cpp PROPERTIES COMPILE_FLAGS -O2)
|
||||
endif()
|
||||
else()
|
||||
add_definitions(-DNDEBUG)
|
||||
endif()
|
||||
|
||||
# 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 SUNSHINE_EXTERNAL_LIBRARIES
|
||||
libminiupnpc-static
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
enet
|
||||
opus
|
||||
${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)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll")
|
||||
find_library(ZLIB ZLIB1)
|
||||
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})
|
||||
|
||||
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>) # cmake-lint: disable=C0301
|
||||
|
||||
# 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)
|
||||
|
||||
# install npm modules
|
||||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/node_modules"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}/web")
|
||||
|
||||
# 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)
|
||||
|
||||
# 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)
|
||||
install(TARGETS sunshinesvc RUNTIME DESTINATION "tools" COMPONENT sunshinesvc)
|
||||
|
||||
# Mandatory tools
|
||||
install(TARGETS ddprobe RUNTIME DESTINATION "tools" COMPONENT application)
|
||||
|
||||
# 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)
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/migration/"
|
||||
DESTINATION "scripts"
|
||||
COMPONENT assets)
|
||||
|
||||
# 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}")
|
||||
# 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
|
||||
# Sets permissions on the config folder so that we can write in it
|
||||
# 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 'icacls \\\"$INSTDIR\\\\config\\\" /grant:r Users:\\\(OI\\\)\\\(CI\\\)\\\(F\\\)'
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\add-firewall-rule.bat\\\"'
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\install-service.bat\\\"'
|
||||
MessageBox MB_YESNO|MB_ICONQUESTION \
|
||||
'Do you want to install ViGEmBus? This is REQUIRED for gamepad support while streaming.' \
|
||||
/SD IDNO IDNO NoController
|
||||
ExecShell 'open' 'https://github.com/ViGEm/ViGEmBus/releases/latest'; \
|
||||
skipped if no
|
||||
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\\\"'
|
||||
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 and PATH
|
||||
# TODO: it asks to add it to the PATH but is not working https://gitlab.kitware.com/cmake/cmake/-/issues/15635
|
||||
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} (Foreground Mode).lnk' \
|
||||
'\$INSTDIR\\\\${CMAKE_PROJECT_NAME}.exe'
|
||||
")
|
||||
set(CPACK_NSIS_DELETE_ICONS_EXTRA
|
||||
"${CPACK_NSIS_DELETE_ICONS_EXTRA}
|
||||
Delete '\$SMPROGRAMS\\\\$MUI_TEMP\\\\${CMAKE_PROJECT_NAME} (Foreground Mode).lnk'
|
||||
")
|
||||
|
||||
# Checking for previous installed versions
|
||||
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL "ON")
|
||||
|
||||
set(CPACK_NSIS_HELP_LINK "https://sunshinestream.readthedocs.io/about/installation.html")
|
||||
set(CPACK_NSIS_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")
|
||||
|
||||
# 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(MAC_PREFIX "${CMAKE_PROJECT_NAME}.app/Contents")
|
||||
set(INSTALL_RUNTIME_DIR "${MAC_PREFIX}/MacOS")
|
||||
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}")
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}")
|
||||
|
||||
install(TARGETS sunshine
|
||||
BUNDLE DESTINATION . COMPONENT Runtime
|
||||
RUNTIME DESTINATION ${INSTALL_RUNTIME_DIR} COMPONENT Runtime)
|
||||
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_PREFIX}/lib/udev/rules.d")
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/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 "\
|
||||
${CPACK_DEB_PLATFORM_PACKAGE_DEPENDS} \
|
||||
libboost-filesystem${Boost_VERSION}, \
|
||||
libboost-log${Boost_VERSION}, \
|
||||
libboost-program-options${Boost_VERSION}, \
|
||||
libboost-thread${Boost_VERSION}, \
|
||||
libcap2, \
|
||||
libcurl4, \
|
||||
libdrm2, \
|
||||
libevdev2, \
|
||||
libnuma1, \
|
||||
libopus0, \
|
||||
libpulse0, \
|
||||
libva2, \
|
||||
libva-drm2, \
|
||||
libvdpau1, \
|
||||
libwayland-client0, \
|
||||
libx11-6, \
|
||||
openssl | libssl3")
|
||||
set(CPACK_RPM_PACKAGE_REQUIRES "\
|
||||
${CPACK_RPM_PLATFORM_PACKAGE_REQUIRES} \
|
||||
boost-filesystem >= ${Boost_VERSION}, \
|
||||
boost-log >= ${Boost_VERSION}, \
|
||||
boost-program-options >= ${Boost_VERSION}, \
|
||||
boost-thread >= ${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, \
|
||||
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)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(CPack)
|
||||
|
||||
20
README.rst
20
README.rst
@@ -1,6 +1,6 @@
|
||||
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
|
||||
-----
|
||||
@@ -92,34 +92,34 @@ Integrations
|
||||
: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.svg?label=Docs&style=for-the-badge&logo=readthedocs
|
||||
.. image:: https://img.shields.io/readthedocs/sunshinestream?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
|
||||
|
||||
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.svg?style=for-the-badge&logo=github
|
||||
.. image:: https://img.shields.io/github/downloads/lizardbyte/sunshine/total?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.svg?style=for-the-badge&logo=docker
|
||||
.. image:: https://img.shields.io/docker/pulls/lizardbyte/sunshine?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.svg?logo=github&style=for-the-badge
|
||||
.. image:: https://img.shields.io/github/stars/lizardbyte/sunshine?logo=github&style=for-the-badge
|
||||
:alt: GitHub stars
|
||||
:target: https://github.com/LizardByte/Sunshine
|
||||
|
||||
|
||||
@@ -1,129 +0,0 @@
|
||||
# common compile definitions
|
||||
# this file will also load platform specific definitions
|
||||
|
||||
list(APPEND SUNSHINE_COMPILE_OPTIONS -Wall -Wno-sign-compare)
|
||||
# Wall - enable all warnings
|
||||
# Wno-sign-compare - disable warnings for signed/unsigned comparisons
|
||||
|
||||
# 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 third-party/nv-codec-headers/include)
|
||||
file(GLOB NVENC_SOURCES CONFIGURE_DEPENDS "src/nvenc/*.cpp" "src/nvenc/*.h")
|
||||
list(APPEND PLATFORM_TARGET_FILES ${NVENC_SOURCES})
|
||||
|
||||
configure_file(src/version.h.in version.h @ONLY)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set(SUNSHINE_TARGET_FILES
|
||||
third-party/nanors/rs.c
|
||||
third-party/nanors/rs.h
|
||||
third-party/moonlight-common-c/src/Input.h
|
||||
third-party/moonlight-common-c/src/Rtsp.h
|
||||
third-party/moonlight-common-c/src/RtspParser.c
|
||||
third-party/moonlight-common-c/src/Video.h
|
||||
third-party/tray/tray.h
|
||||
src/upnp.cpp
|
||||
src/upnp.h
|
||||
src/cbs.cpp
|
||||
src/utility.h
|
||||
src/uuid.h
|
||||
src/config.h
|
||||
src/config.cpp
|
||||
src/main.cpp
|
||||
src/main.h
|
||||
src/crypto.cpp
|
||||
src/crypto.h
|
||||
src/nvhttp.cpp
|
||||
src/nvhttp.h
|
||||
src/httpcommon.cpp
|
||||
src/httpcommon.h
|
||||
src/confighttp.cpp
|
||||
src/confighttp.h
|
||||
src/rtsp.cpp
|
||||
src/rtsp.h
|
||||
src/stream.cpp
|
||||
src/stream.h
|
||||
src/video.cpp
|
||||
src/video.h
|
||||
src/video_colorspace.cpp
|
||||
src/video_colorspace.h
|
||||
src/input.cpp
|
||||
src/input.h
|
||||
src/audio.cpp
|
||||
src/audio.h
|
||||
src/platform/common.h
|
||||
src/process.cpp
|
||||
src/process.h
|
||||
src/network.cpp
|
||||
src/network.h
|
||||
src/move_by_copy.h
|
||||
src/system_tray.cpp
|
||||
src/system_tray.h
|
||||
src/task_pool.h
|
||||
src/thread_pool.h
|
||||
src/thread_safe.h
|
||||
src/sync.h
|
||||
src/round_robin.h
|
||||
src/stat_trackers.h
|
||||
src/stat_trackers.cpp
|
||||
${PLATFORM_TARGET_FILES})
|
||||
|
||||
set_source_files_properties(src/upnp.cpp PROPERTIES COMPILE_FLAGS -Wno-pedantic)
|
||||
|
||||
set_source_files_properties(third-party/nanors/rs.c
|
||||
PROPERTIES COMPILE_FLAGS "-include deps/obl/autoshim.h -ftree-vectorize")
|
||||
|
||||
if(NOT SUNSHINE_ASSETS_DIR_DEF)
|
||||
set(SUNSHINE_ASSETS_DIR_DEF "${SUNSHINE_ASSETS_DIR}")
|
||||
endif()
|
||||
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_ASSETS_DIR="${SUNSHINE_ASSETS_DIR_DEF}")
|
||||
|
||||
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_TRAY=${SUNSHINE_TRAY})
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
include_directories(
|
||||
SYSTEM
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/third-party
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/third-party/moonlight-common-c/enet/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/third-party/nanors
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/third-party/nanors/deps/obl
|
||||
${FFMPEG_INCLUDE_DIRS}
|
||||
${PLATFORM_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
string(TOUPPER "x${CMAKE_BUILD_TYPE}" BUILD_TYPE)
|
||||
if("${BUILD_TYPE}" STREQUAL "XDEBUG")
|
||||
if(WIN32)
|
||||
set_source_files_properties(src/nvhttp.cpp PROPERTIES COMPILE_FLAGS -O2)
|
||||
endif()
|
||||
else()
|
||||
add_definitions(-DNDEBUG)
|
||||
endif()
|
||||
|
||||
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
|
||||
libminiupnpc-static
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
enet
|
||||
opus
|
||||
${FFMPEG_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
${OPENSSL_LIBRARIES}
|
||||
${CURL_LIBRARIES}
|
||||
${PLATFORM_LIBRARIES})
|
||||
@@ -1,227 +0,0 @@
|
||||
# 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()
|
||||
|
||||
if(NOT DEFINED SUNSHINE_EXECUTABLE_PATH)
|
||||
set(SUNSHINE_EXECUTABLE_PATH "sunshine")
|
||||
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 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()
|
||||
|
||||
# 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 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()
|
||||
|
||||
# wayland
|
||||
if(${SUNSHINE_ENABLE_WAYLAND})
|
||||
find_package(Wayland)
|
||||
else()
|
||||
set(WAYLAND_FOUND OFF)
|
||||
endif()
|
||||
if(WAYLAND_FOUND)
|
||||
add_compile_definitions(SUNSHINE_BUILD_WAYLAND)
|
||||
|
||||
GEN_WAYLAND("wayland-protocols" "unstable/xdg-output" xdg-output-unstable-v1)
|
||||
GEN_WAYLAND("wlr-protocols" "unstable" wlr-export-dmabuf-unstable-v1)
|
||||
|
||||
include_directories(
|
||||
SYSTEM
|
||||
${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()
|
||||
|
||||
# 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 src/platform/linux/x11grab.cpp)
|
||||
endif()
|
||||
|
||||
if(NOT ${CUDA_FOUND} AND NOT ${WAYLAND_FOUND} AND NOT ${X11_FOUND} AND NOT (${LIBDRM_FOUND} AND ${LIBCAP_FOUND}))
|
||||
message(FATAL_ERROR "Couldn't find either x11, wayland, cuda or (libdrm and libcap)")
|
||||
endif()
|
||||
|
||||
# tray icon
|
||||
if(${SUNSHINE_ENABLE_TRAY})
|
||||
pkg_check_modules(APPINDICATOR appindicator3-0.1)
|
||||
if(APPINDICATOR_FOUND)
|
||||
list(APPEND SUNSHINE_DEFINITIONS TRAY_LEGACY_APPINDICATOR=1)
|
||||
else()
|
||||
pkg_check_modules(APPINDICATOR ayatana-appindicator3-0.1)
|
||||
if(APPINDICATOR_FOUND)
|
||||
list(APPEND SUNSHINE_DEFINITIONS TRAY_AYATANA_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 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
|
||||
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
|
||||
Boost::dynamic_linking
|
||||
dl
|
||||
evdev
|
||||
numa
|
||||
pulse
|
||||
pulse-simple)
|
||||
|
||||
include_directories(
|
||||
SYSTEM
|
||||
/usr/include/libevdev-1.0
|
||||
third-party/nv-codec-headers/include
|
||||
third-party/glad/include)
|
||||
@@ -1,49 +0,0 @@
|
||||
# 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
|
||||
src/platform/macos/av_audio.h
|
||||
src/platform/macos/av_audio.m
|
||||
src/platform/macos/av_img_t.h
|
||||
src/platform/macos/av_video.h
|
||||
src/platform/macos/av_video.m
|
||||
src/platform/macos/display.mm
|
||||
src/platform/macos/input.cpp
|
||||
src/platform/macos/microphone.mm
|
||||
src/platform/macos/misc.mm
|
||||
src/platform/macos/misc.h
|
||||
src/platform/macos/nv12_zero_device.cpp
|
||||
src/platform/macos/nv12_zero_device.h
|
||||
src/platform/macos/publish.cpp
|
||||
third-party/TPCircularBuffer/TPCircularBuffer.c
|
||||
third-party/TPCircularBuffer/TPCircularBuffer.h
|
||||
${APPLE_PLIST_FILE})
|
||||
|
||||
if(SUNSHINE_ENABLE_TRAY)
|
||||
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
|
||||
${COCOA})
|
||||
list(APPEND PLATFORM_TARGET_FILES
|
||||
third-party/tray/tray_darwin.m)
|
||||
endif()
|
||||
@@ -1,9 +0,0 @@
|
||||
# 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()
|
||||
@@ -1,78 +0,0 @@
|
||||
# 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")
|
||||
|
||||
# curl
|
||||
add_definitions(-DCURL_STATICLIB)
|
||||
include_directories(SYSTEM ${CURL_STATIC_INCLUDE_DIRS})
|
||||
link_directories(${CURL_STATIC_LIBRARY_DIRS})
|
||||
|
||||
# extra tools/binaries for audio/display devices
|
||||
add_subdirectory(tools) # todo - this is temporary, only tools for Windows are needed, for now
|
||||
|
||||
# nvidia
|
||||
include_directories(SYSTEM third-party/nvapi-open-source-sdk)
|
||||
file(GLOB NVPREFS_FILES CONFIGURE_DEPENDS
|
||||
"third-party/nvapi-open-source-sdk/*.h"
|
||||
"src/platform/windows/nvprefs/*.cpp"
|
||||
"src/platform/windows/nvprefs/*.h")
|
||||
|
||||
# vigem
|
||||
include_directories(SYSTEM third-party/ViGEmClient/include)
|
||||
set_source_files_properties(third-party/ViGEmClient/src/ViGEmClient.cpp
|
||||
PROPERTIES COMPILE_DEFINITIONS "UNICODE=1;ERROR_INVALID_DEVICE_OBJECT_PARAMETER=650")
|
||||
set_source_files_properties(third-party/ViGEmClient/src/ViGEmClient.cpp
|
||||
PROPERTIES COMPILE_FLAGS "-Wno-unknown-pragmas -Wno-misleading-indentation -Wno-class-memaccess")
|
||||
|
||||
# sunshine icon
|
||||
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
|
||||
${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
|
||||
${CURL_STATIC_LIBRARIES})
|
||||
|
||||
if(SUNSHINE_ENABLE_TRAY)
|
||||
list(APPEND PLATFORM_TARGET_FILES
|
||||
third-party/tray/tray_windows.c)
|
||||
endif()
|
||||
@@ -1,86 +0,0 @@
|
||||
# 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(third-party/moonlight-common-c/enet)
|
||||
|
||||
# web server
|
||||
add_subdirectory(third-party/Simple-Web-Server)
|
||||
|
||||
# miniupnp
|
||||
set(UPNPC_BUILD_SHARED OFF CACHE BOOL "No shared libraries")
|
||||
set(UPNPC_BUILD_TESTS OFF CACHE BOOL "Don't build tests for miniupnpc")
|
||||
set(UPNPC_BUILD_SAMPLE OFF CACHE BOOL "Don't build samples for miniupnpc")
|
||||
set(UPNPC_NO_INSTALL ON CACHE BOOL "Don't install any libraries build for miniupnpc")
|
||||
add_subdirectory(third-party/miniupnp/miniupnpc)
|
||||
include_directories(SYSTEM third-party/miniupnp/miniupnpc/include)
|
||||
|
||||
# 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_CURRENT_SOURCE_DIR}/third-party/ffmpeg-windows-x86_64")
|
||||
elseif(APPLE)
|
||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-macos-x86_64")
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/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_CURRENT_SOURCE_DIR}/third-party/ffmpeg-linux-x86_64")
|
||||
set(CPACK_DEB_PLATFORM_PACKAGE_DEPENDS "libmfx1,")
|
||||
set(CPACK_RPM_PLATFORM_PACKAGE_REQUIRES "intel-mediasdk >= 22.3.0,")
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-linux-aarch64")
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64")
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-linux-powerpc64le")
|
||||
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})
|
||||
|
||||
# common dependencies
|
||||
find_package(OpenSSL REQUIRED)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
find_package(Threads REQUIRED)
|
||||
pkg_check_modules(CURL REQUIRED libcurl)
|
||||
|
||||
# platform specific dependencies
|
||||
if(WIN32)
|
||||
include(${CMAKE_MODULE_PATH}/dependencies/windows.cmake)
|
||||
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()
|
||||
@@ -1 +0,0 @@
|
||||
# linux specific dependencies
|
||||
@@ -1,12 +0,0 @@
|
||||
# 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()
|
||||
@@ -1,4 +0,0 @@
|
||||
# unix specific dependencies
|
||||
# put anything here that applies to both linux and macos
|
||||
|
||||
find_package(Boost COMPONENTS locale log filesystem program_options REQUIRED)
|
||||
@@ -1,6 +0,0 @@
|
||||
# windows specific dependencies
|
||||
|
||||
set(Boost_USE_STATIC_LIBS ON) # cmake-lint: disable=C0103
|
||||
# Boost >= 1.82.0 is required for boost::json::value::set_at_pointer() support
|
||||
# todo - are we actually using json? I think this was attempted to be used in a PR, but we ended up not using json
|
||||
find_package(Boost 1.82.0 COMPONENTS locale log filesystem program_options json REQUIRED)
|
||||
@@ -1,15 +0,0 @@
|
||||
# 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()
|
||||
@@ -1,31 +0,0 @@
|
||||
# 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 \
|
||||
${CMAKE_SOURCE_DIR}/third-party/${wayland_directory}/${subdirectory}/${filename}.xml \
|
||||
${CMAKE_BINARY_DIR}/generated-src/${filename}.c")
|
||||
message("wayland-scanner client-header \
|
||||
${CMAKE_SOURCE_DIR}/third-party/${wayland_directory}/${subdirectory}/${filename}.xml \
|
||||
${CMAKE_BINARY_DIR}/generated-src/${filename}.h")
|
||||
execute_process(
|
||||
COMMAND wayland-scanner private-code
|
||||
${CMAKE_SOURCE_DIR}/third-party/${wayland_directory}/${subdirectory}/${filename}.xml
|
||||
${CMAKE_BINARY_DIR}/generated-src/${filename}.c
|
||||
COMMAND wayland-scanner client-header
|
||||
${CMAKE_SOURCE_DIR}/third-party/${wayland_directory}/${subdirectory}/${filename}.xml
|
||||
${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()
|
||||
@@ -1,16 +0,0 @@
|
||||
# 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)
|
||||
@@ -1,2 +0,0 @@
|
||||
# unix specific macros
|
||||
# put anything here that applies to both linux and macos
|
||||
@@ -1 +0,0 @@
|
||||
# windows specific macros
|
||||
@@ -1,32 +0,0 @@
|
||||
# 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 npm modules
|
||||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/node_modules"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}/web")
|
||||
|
||||
# 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)
|
||||
@@ -1,105 +0,0 @@
|
||||
# linux specific packaging
|
||||
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/assets/"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}")
|
||||
if(${SUNSHINE_BUILD_APPIMAGE} OR ${SUNSHINE_BUILD_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_PREFIX}/lib/udev/rules.d")
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/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 "\
|
||||
${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, \
|
||||
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, \
|
||||
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_PREFIX}/share/icons/hicolor/scalable/apps")
|
||||
|
||||
# tray icon
|
||||
if(${SUNSHINE_TRAY} STREQUAL 1)
|
||||
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/status"
|
||||
RENAME "sunshine-tray.svg")
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/images/sunshine-playing.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/status")
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/images/sunshine-pausing.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/status")
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/images/sunshine-locked.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/status")
|
||||
|
||||
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_PREFIX}/share/applications")
|
||||
if(NOT ${SUNSHINE_BUILD_APPIMAGE})
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine_terminal.desktop"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications")
|
||||
endif()
|
||||
if(${SUNSHINE_BUILD_FLATPAK})
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine_kms.desktop"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications")
|
||||
endif()
|
||||
|
||||
# metadata file
|
||||
# todo - validate file with `appstream-util validate-relax`
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.appdata.xml"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/metainfo")
|
||||
@@ -1,26 +0,0 @@
|
||||
# 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(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}")
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}")
|
||||
|
||||
install(TARGETS sunshine
|
||||
BUNDLE DESTINATION . COMPONENT Runtime
|
||||
RUNTIME DESTINATION ${INSTALL_RUNTIME_DIR} COMPONENT Runtime)
|
||||
else()
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}")
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/misc/uninstall_pkg.sh"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}")
|
||||
endif()
|
||||
@@ -1,18 +0,0 @@
|
||||
# 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}")
|
||||
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}")
|
||||
@@ -1,155 +0,0 @@
|
||||
# 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}/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}")
|
||||
# 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-service.bat\\\"'
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\install-gamepad.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/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")
|
||||
@@ -1,58 +0,0 @@
|
||||
# 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_CURRENT_SOURCE_DIR}")
|
||||
get_filename_component(SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
|
||||
#Get current Branch
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
|
||||
#WORKING_DIRECTORY ${CMAKE_CURRENT_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_CURRENT_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_CURRENT_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()
|
||||
@@ -1,5 +0,0 @@
|
||||
# source assets will be installed from this directory
|
||||
set(SUNSHINE_SOURCE_ASSETS_DIR "${CMAKE_CURRENT_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)
|
||||
@@ -1,31 +0,0 @@
|
||||
# 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)
|
||||
|
||||
if(APPLE)
|
||||
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_WAYLAND
|
||||
"Enable building wayland specific code." ON)
|
||||
option(SUNSHINE_ENABLE_X11
|
||||
"Enable X11 grab if available." ON)
|
||||
endif()
|
||||
@@ -1,42 +0,0 @@
|
||||
if (APPLE)
|
||||
if(${SUNSHINE_CONFIGURE_PORTFILE})
|
||||
configure_file(packaging/macos/Portfile Portfile @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)
|
||||
endif()
|
||||
|
||||
# configure the flatpak manifest
|
||||
if(${SUNSHINE_CONFIGURE_FLATPAK_MAN})
|
||||
configure_file(packaging/linux/flatpak/dev.lizardbyte.sunshine.yml dev.lizardbyte.sunshine.yml @ONLY)
|
||||
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()
|
||||
@@ -1,35 +0,0 @@
|
||||
# common target definitions
|
||||
# this file will also load platform specific macros
|
||||
|
||||
add_executable(sunshine ${SUNSHINE_TARGET_FILES})
|
||||
|
||||
# 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})
|
||||
|
||||
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>) # cmake-lint: disable=C0301
|
||||
@@ -1 +0,0 @@
|
||||
# linux specific target definitions
|
||||
@@ -1,4 +0,0 @@
|
||||
# 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)
|
||||
@@ -1,2 +0,0 @@
|
||||
# unix specific target definitions
|
||||
# put anything here that applies to both linux and macos
|
||||
@@ -1,6 +0,0 @@
|
||||
# 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)
|
||||
@@ -2,7 +2,7 @@
|
||||
# artifacts: true
|
||||
# platforms: linux/amd64
|
||||
# archlinux does not have an arm64 base image
|
||||
# no-cache-filters: artifacts,sunshine
|
||||
# no-cache-filters: sunshine-base,artifacts,sunshine
|
||||
ARG BASE=archlinux
|
||||
ARG TAG=base-devel
|
||||
FROM ${BASE}:${TAG} AS sunshine-base
|
||||
@@ -11,7 +11,7 @@ FROM ${BASE}:${TAG} AS sunshine-base
|
||||
RUN <<_DEPS
|
||||
#!/bin/bash
|
||||
set -e
|
||||
pacman -Syu --disable-download-timeout --needed --noconfirm \
|
||||
pacman -Syu --noconfirm \
|
||||
archlinux-keyring
|
||||
_DEPS
|
||||
|
||||
@@ -22,27 +22,21 @@ RUN useradd -m builder && \
|
||||
|
||||
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, libcap, and libdrm are optional dependencies for PKGBUILD
|
||||
RUN <<_DEPS
|
||||
#!/bin/bash
|
||||
set -e
|
||||
pacman -Syu --disable-download-timeout --needed --noconfirm \
|
||||
pacman -Syu --noconfirm \
|
||||
base-devel \
|
||||
cmake \
|
||||
cuda \
|
||||
git \
|
||||
libcap \
|
||||
libdrm \
|
||||
namcap
|
||||
@@ -68,11 +62,9 @@ else
|
||||
sub_version=""
|
||||
fi
|
||||
cmake \
|
||||
-DSUNSHINE_CONFIGURE_PKGBUILD=ON \
|
||||
-DSUNSHINE_CONFIGURE_AUR=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
|
||||
@@ -104,10 +96,7 @@ COPY --link --from=artifacts /sunshine.pkg.tar.zst /
|
||||
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 \
|
||||
pacman -U --noconfirm \
|
||||
/sunshine.pkg.tar.zst
|
||||
_INSTALL_SUNSHINE
|
||||
|
||||
@@ -136,7 +125,7 @@ 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}"
|
||||
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}
|
||||
|
||||
@@ -14,15 +14,6 @@ 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
|
||||
@@ -30,40 +21,37 @@ RUN <<_DEPS
|
||||
set -e
|
||||
apt-get update -y
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
cmake=3.18.* \
|
||||
git \
|
||||
libavdevice-dev \
|
||||
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 \
|
||||
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 \
|
||||
wget
|
||||
build-essential=12.9* \
|
||||
cmake=3.18.4* \
|
||||
libavdevice-dev=7:4.3.* \
|
||||
libboost-filesystem-dev=1.74.0* \
|
||||
libboost-log-dev=1.74.0* \
|
||||
libboost-program-options-dev=1.74.0* \
|
||||
libboost-thread-dev=1.74.0* \
|
||||
libcap-dev=1:2.44* \
|
||||
libcurl4-openssl-dev=7.74.0* \
|
||||
libdrm-dev=2.4.104* \
|
||||
libevdev-dev=1.11.0* \
|
||||
libnuma-dev=2.0.12* \
|
||||
libopus-dev=1.3.1* \
|
||||
libpulse-dev=14.2* \
|
||||
libssl-dev=1.1.1* \
|
||||
libva-dev=2.10.0* \
|
||||
libvdpau-dev=1.4* \
|
||||
libwayland-dev=1.18.0* \
|
||||
libx11-dev=2:1.7.2* \
|
||||
libxcb-shm0-dev=1.14* \
|
||||
libxcb-xfixes0-dev=1.14* \
|
||||
libxcb1-dev=1.14* \
|
||||
libxfixes-dev=1:5.0.3* \
|
||||
libxrandr-dev=2:1.5.1* \
|
||||
libxtst-dev=2:1.2.3* \
|
||||
nodejs=12.22* \
|
||||
npm=7.5.2* \
|
||||
wget=1.21*
|
||||
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
|
||||
apt-get install -y --no-install-recommends \
|
||||
libmfx-dev
|
||||
libmfx-dev=21.1.0*
|
||||
fi
|
||||
apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
@@ -162,7 +150,7 @@ RUN <<_SETUP_USER
|
||||
#!/bin/bash
|
||||
set -e
|
||||
groupadd -f -g "${PGID}" "${UNAME}"
|
||||
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${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}
|
||||
|
||||
@@ -3,70 +3,56 @@
|
||||
# platforms: linux/amd64,linux/arm64/v8
|
||||
# platforms_pr: linux/amd64
|
||||
# no-cache-filters: sunshine-base,artifacts,sunshine
|
||||
ARG BASE=debian
|
||||
ARG TAG=bookworm
|
||||
ARG BASE=fedora
|
||||
ARG TAG=36
|
||||
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
|
||||
# hadolint ignore=DL3041
|
||||
RUN <<_DEPS
|
||||
#!/bin/bash
|
||||
set -e
|
||||
apt-get update -y
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
cmake=3.25.* \
|
||||
git \
|
||||
libavdevice-dev \
|
||||
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 \
|
||||
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 \
|
||||
wget
|
||||
dnf -y update
|
||||
dnf -y group install "Development Tools"
|
||||
dnf -y install \
|
||||
boost-devel-1.76.0* \
|
||||
cmake-3.22.2* \
|
||||
gcc-12.0.1* \
|
||||
gcc-c++-12.0.1* \
|
||||
libcap-devel-2.48* \
|
||||
libcurl-devel-7.82.0* \
|
||||
libdrm-devel-2.4.110* \
|
||||
libevdev-devel-1.12.0* \
|
||||
libva-devel-2.14.0* \
|
||||
libvdpau-devel-1.5* \
|
||||
libX11-devel-1.7.3* \
|
||||
libxcb-devel-1.13.1* \
|
||||
libXcursor-devel-1.2.0* \
|
||||
libXfixes-devel-6.0.0* \
|
||||
libXi-devel-1.8* \
|
||||
libXinerama-devel-1.1.4* \
|
||||
libXrandr-devel-1.5.2* \
|
||||
libXtst-devel-1.2.3* \
|
||||
mesa-libGL-devel-22.0.1* \
|
||||
npm-8.3.1* \
|
||||
numactl-devel-2.0.14* \
|
||||
openssl-devel-3.0.2* \
|
||||
opus-devel-1.3.1* \
|
||||
pulseaudio-libs-devel-15.0* \
|
||||
rpm-build-4.17.0* \
|
||||
wget-1.21.3* \
|
||||
which-2.21*
|
||||
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
|
||||
apt-get install -y --no-install-recommends \
|
||||
libmfx-dev
|
||||
dnf -y install intel-mediasdk-devel-22.3.0*
|
||||
fi
|
||||
apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
dnf clean all
|
||||
rm -rf /var/cache/yum
|
||||
_DEPS
|
||||
|
||||
# install cuda
|
||||
@@ -117,28 +103,28 @@ cmake \
|
||||
-DSUNSHINE_ENABLE_CUDA=ON \
|
||||
/build/sunshine
|
||||
make -j "$(nproc)"
|
||||
cpack -G DEB
|
||||
cpack -G RPM
|
||||
_MAKE
|
||||
|
||||
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
|
||||
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*.deb /sunshine.deb
|
||||
COPY --link --from=artifacts /sunshine*.rpm /sunshine.rpm
|
||||
|
||||
# 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/*
|
||||
dnf -y update
|
||||
dnf -y install /sunshine.rpm
|
||||
dnf clean all
|
||||
rm -rf /var/cache/yum
|
||||
_INSTALL_SUNSHINE
|
||||
|
||||
# network setup
|
||||
@@ -162,7 +148,7 @@ RUN <<_SETUP_USER
|
||||
#!/bin/bash
|
||||
set -e
|
||||
groupadd -f -g "${PGID}" "${UNAME}"
|
||||
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${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}
|
||||
@@ -12,15 +12,6 @@ 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
|
||||
@@ -30,38 +21,35 @@ set -e
|
||||
dnf -y update
|
||||
dnf -y group install "Development Tools"
|
||||
dnf -y install \
|
||||
boost-devel-1.78.* \
|
||||
cmake-3.27.* \
|
||||
gcc-12.2.* \
|
||||
gcc-c++-12.2.* \
|
||||
git \
|
||||
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 \
|
||||
nodejs-npm \
|
||||
numactl-devel \
|
||||
openssl-devel \
|
||||
opus-devel \
|
||||
pulseaudio-libs-devel \
|
||||
rpm-build \
|
||||
wget \
|
||||
which
|
||||
boost-devel-1.78.0* \
|
||||
cmake-3.24.1* \
|
||||
gcc-12.2.1* \
|
||||
gcc-c++-12.2.1* \
|
||||
libcap-devel-2.48* \
|
||||
libcurl-devel-7.85.0* \
|
||||
libdrm-devel-2.4.112* \
|
||||
libevdev-devel-1.13.0* \
|
||||
libva-devel-2.15.0* \
|
||||
libvdpau-devel-1.5* \
|
||||
libX11-devel-1.8.1* \
|
||||
libxcb-devel-1.13.1* \
|
||||
libXcursor-devel-1.2.1* \
|
||||
libXfixes-devel-6.0.0* \
|
||||
libXi-devel-1.8* \
|
||||
libXinerama-devel-1.1.4* \
|
||||
libXrandr-devel-1.5.2* \
|
||||
libXtst-devel-1.2.3* \
|
||||
mesa-libGL-devel-22.2.2* \
|
||||
npm-8.15.0* \
|
||||
numactl-devel-2.0.14* \
|
||||
openssl-devel-3.0.5* \
|
||||
opus-devel-1.3.1* \
|
||||
pulseaudio-libs-devel-16.1* \
|
||||
rpm-build-4.18.0* \
|
||||
wget-1.21.3* \
|
||||
which-2.21*
|
||||
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
|
||||
dnf -y install intel-mediasdk-devel
|
||||
dnf -y install intel-mediasdk-devel-22.4.4*
|
||||
fi
|
||||
dnf clean all
|
||||
rm -rf /var/cache/yum
|
||||
@@ -160,7 +148,7 @@ RUN <<_SETUP_USER
|
||||
#!/bin/bash
|
||||
set -e
|
||||
groupadd -f -g "${PGID}" "${UNAME}"
|
||||
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${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}
|
||||
|
||||
@@ -1,175 +0,0 @@
|
||||
# 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=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.* \
|
||||
gcc-13.2.* \
|
||||
gcc-c++-13.2.* \
|
||||
git \
|
||||
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 \
|
||||
nodejs-npm \
|
||||
numactl-devel \
|
||||
openssl-devel \
|
||||
opus-devel \
|
||||
pulseaudio-libs-devel \
|
||||
rpm-build \
|
||||
wget \
|
||||
which
|
||||
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
|
||||
dnf -y install intel-mediasdk-devel
|
||||
fi
|
||||
dnf clean all
|
||||
rm -rf /var/cache/yum
|
||||
_DEPS
|
||||
|
||||
# todo - enable cuda once it's supported for gcc 13 and fedora 38
|
||||
## install cuda
|
||||
#WORKDIR /build/cuda
|
||||
## 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 npm dependencies
|
||||
RUN npm install
|
||||
|
||||
# setup build directory
|
||||
WORKDIR /build/sunshine/build
|
||||
|
||||
# cmake and cpack
|
||||
# todo - add cmake argument back in for cuda support "-DCMAKE_CUDA_COMPILER:PATH=/build/cuda/bin/nvcc \"
|
||||
# todo - re-enable "DSUNSHINE_ENABLE_CUDA"
|
||||
RUN <<_MAKE
|
||||
#!/bin/bash
|
||||
set -e
|
||||
cmake \
|
||||
-DCMAKE_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=OFF \
|
||||
/build/sunshine
|
||||
make -j "$(nproc)"
|
||||
cpack -G RPM
|
||||
_MAKE
|
||||
|
||||
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"]
|
||||
@@ -14,15 +14,6 @@ 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
|
||||
@@ -30,41 +21,38 @@ RUN <<_DEPS
|
||||
set -e
|
||||
apt-get update -y
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
gcc-10=10.5.* \
|
||||
g++-10=10.5.* \
|
||||
git \
|
||||
libayatana-appindicator3-dev \
|
||||
libavdevice-dev \
|
||||
libboost-filesystem-dev=1.71.* \
|
||||
libboost-locale-dev=1.71.* \
|
||||
libboost-log-dev=1.71.* \
|
||||
libboost-program-options-dev=1.71.* \
|
||||
libcap-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libdrm-dev \
|
||||
libevdev-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 \
|
||||
wget
|
||||
build-essential=12.8* \
|
||||
gcc-10=10.3.0* \
|
||||
g++-10=10.3.0* \
|
||||
libavdevice-dev=7:4.2.* \
|
||||
libboost-filesystem-dev=1.71.0* \
|
||||
libboost-log-dev=1.71.0* \
|
||||
libboost-program-options-dev=1.71.0* \
|
||||
libboost-thread-dev=1.71.0* \
|
||||
libcap-dev=1:2.32* \
|
||||
libcurl4-openssl-dev=7.68.0* \
|
||||
libdrm-dev=2.4.107* \
|
||||
libevdev-dev=1.9.0* \
|
||||
libnuma-dev=2.0.12* \
|
||||
libopus-dev=1.3.1* \
|
||||
libpulse-dev=1:13.99.1* \
|
||||
libssl-dev=1.1.1* \
|
||||
libva-dev=2.7.0* \
|
||||
libvdpau-dev=1.3* \
|
||||
libwayland-dev=1.18.0* \
|
||||
libx11-dev=2:1.6.9* \
|
||||
libxcb-shm0-dev=1.14* \
|
||||
libxcb-xfixes0-dev=1.14* \
|
||||
libxcb1-dev=1.14* \
|
||||
libxfixes-dev=1:5.0.3* \
|
||||
libxrandr-dev=2:1.5.2* \
|
||||
libxtst-dev=2:1.2.3* \
|
||||
nodejs=10.19.0* \
|
||||
npm=6.14.4* \
|
||||
wget=1.20.3*
|
||||
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
|
||||
apt-get install -y --no-install-recommends \
|
||||
libmfx-dev
|
||||
libmfx-dev=20.1.0*
|
||||
fi
|
||||
apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
@@ -102,7 +90,7 @@ url="${cmake_prefix}${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-${cmake_arch}.
|
||||
echo "cmake url: ${url}"
|
||||
wget "$url" --progress=bar:force:noscroll -q --show-progress -O ./cmake.sh
|
||||
sh ./cmake.sh --prefix=/usr/local --skip-license
|
||||
rm ./cmake.sh
|
||||
cmake --version
|
||||
_INSTALL_CMAKE
|
||||
|
||||
# install cuda
|
||||
@@ -198,7 +186,7 @@ RUN <<_SETUP_USER
|
||||
#!/bin/bash
|
||||
set -e
|
||||
groupadd -f -g "${PGID}" "${UNAME}"
|
||||
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${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}
|
||||
|
||||
@@ -14,15 +14,6 @@ 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
|
||||
@@ -30,40 +21,37 @@ RUN <<_DEPS
|
||||
set -e
|
||||
apt-get update -y
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
cmake=3.22.* \
|
||||
git \
|
||||
libayatana-appindicator3-dev \
|
||||
libavdevice-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 \
|
||||
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 \
|
||||
wget
|
||||
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-program-options-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.113* \
|
||||
libevdev-dev=1.12.1* \
|
||||
libnuma-dev=2.0.14* \
|
||||
libopus-dev=1.3.1* \
|
||||
libpulse-dev=1:15.99.1* \
|
||||
libssl-dev=3.0.2* \
|
||||
libva-dev=2.14.0* \
|
||||
libvdpau-dev=1.4* \
|
||||
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* \
|
||||
nodejs=12.22.9* \
|
||||
npm=8.5.1* \
|
||||
wget=1.21.2*
|
||||
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
|
||||
apt-get install -y --no-install-recommends \
|
||||
libmfx-dev
|
||||
libmfx-dev=22.3.0*
|
||||
fi
|
||||
apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
@@ -162,7 +150,7 @@ RUN <<_SETUP_USER
|
||||
#!/bin/bash
|
||||
set -e
|
||||
groupadd -f -g "${PGID}" "${UNAME}"
|
||||
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${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}
|
||||
|
||||
2779
docs/Doxyfile
2779
docs/Doxyfile
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,4 @@
|
||||
breathe==4.35.0
|
||||
furo==2023.9.10
|
||||
furo==2022.12.7
|
||||
m2r2==0.3.3.post2
|
||||
rstcheck[sphinx]==6.2.0
|
||||
rstfmt==0.0.14
|
||||
Sphinx==7.2.6
|
||||
sphinx-copybutton==0.5.2
|
||||
sphinx_inline_tabs==2023.4.21
|
||||
Sphinx==6.1.3
|
||||
sphinx-copybutton==0.5.1
|
||||
|
||||
@@ -7,7 +7,7 @@ Performance Tips
|
||||
|
||||
AMD
|
||||
^^^
|
||||
In Windows, enabling `Enhanced Sync` in AMD's settings may help reduce the latency by an additional frame. This
|
||||
In Windows, enabling `Enahanced Sync` in AMD's settings may help reduce the latency by an additional frame. This
|
||||
applies to `amfenc` and `libx264`.
|
||||
|
||||
Nvidia
|
||||
@@ -107,20 +107,6 @@ log_path
|
||||
|
||||
log_path = sunshine.log
|
||||
|
||||
global_prep_cmd
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
**Description**
|
||||
A list of commands to be run before/after all applications. If any of the prep-commands fail, starting the application is aborted.
|
||||
|
||||
**Default**
|
||||
``[]``
|
||||
|
||||
**Example**
|
||||
.. code-block:: text
|
||||
|
||||
global_prep_cmd = [{"do":"nircmd.exe setdisplay 1280 720 32 144","undo":"nircmd.exe setdisplay 2560 1440 32 144"}]
|
||||
|
||||
Controls
|
||||
--------
|
||||
|
||||
@@ -140,46 +126,30 @@ gamepad
|
||||
===== ===========
|
||||
Value Description
|
||||
===== ===========
|
||||
auto Selected based on information from client
|
||||
x360 Xbox 360 controller
|
||||
ds4 DualShock 4 controller (PS4)
|
||||
x360 xbox 360 controller
|
||||
ds4 dualshock controller (PS4)
|
||||
===== ===========
|
||||
|
||||
**Default**
|
||||
``auto``
|
||||
``x360``
|
||||
|
||||
**Example**
|
||||
.. code-block:: text
|
||||
|
||||
gamepad = auto
|
||||
|
||||
ds4_back_as_touchpad_click
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Description**
|
||||
.. Hint:: Only applies when gamepad is set to ds4 manually. Unused in other gamepad modes.
|
||||
|
||||
Allow Select/Back inputs to also trigger DS4 touchpad click. Useful for clients looking to emulate touchpad click
|
||||
on Xinput devices.
|
||||
|
||||
**Default**
|
||||
``enabled``
|
||||
|
||||
**Example**
|
||||
.. code-block:: text
|
||||
|
||||
ds4_back_as_touchpad_click = enabled
|
||||
gamepad = x360
|
||||
|
||||
back_button_timeout
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Description**
|
||||
If the Back/Select button is held down for the specified number of milliseconds, a Home/Guide button press is emulated.
|
||||
If, after the timeout, the back/select button is still pressed down, Home/Guide button press is emulated.
|
||||
|
||||
On Nvidia Shield, the home and power button are not passed to Moonlight.
|
||||
|
||||
.. Tip:: If back_button_timeout < 0, then the Home/Guide button will not be emulated.
|
||||
|
||||
**Default**
|
||||
``-1``
|
||||
``2000``
|
||||
|
||||
**Example**
|
||||
.. code-block:: text
|
||||
@@ -190,7 +160,7 @@ key_repeat_delay
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
**Description**
|
||||
The initial delay, in milliseconds, before repeating keys. Controls how fast keys will repeat themselves.
|
||||
The initial delay in milliseconds before repeating keys. Controls how fast keys will repeat themselves.
|
||||
|
||||
**Default**
|
||||
``500``
|
||||
@@ -209,50 +179,25 @@ key_repeat_frequency
|
||||
.. Tip:: This configurable option supports decimals.
|
||||
|
||||
**Default**
|
||||
``24.9``
|
||||
.. Todo:: Unknown
|
||||
|
||||
**Example**
|
||||
.. code-block:: text
|
||||
|
||||
key_repeat_frequency = 24.9
|
||||
|
||||
always_send_scancodes
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Description**
|
||||
Sending scancodes enhances compatibility with games and apps but may result in incorrect keyboard input
|
||||
from certain clients that aren't using a US English keyboard layout.
|
||||
|
||||
Enable if keyboard input is not working at all in certain applications.
|
||||
|
||||
Disable if keys on the client are generating the wrong input on the host.
|
||||
|
||||
.. Caution:: Applies to Windows only.
|
||||
|
||||
**Default**
|
||||
``enabled``
|
||||
|
||||
**Example**
|
||||
.. code-block:: text
|
||||
|
||||
always_send_scancodes = enabled
|
||||
|
||||
keybindings
|
||||
^^^^^^^^^^^
|
||||
|
||||
**Description**
|
||||
Sometimes it may be useful to map keybindings. Wayland won't allow clients to capture the Win Key for example.
|
||||
|
||||
.. Tip:: See `virtual key codes <https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes>`__
|
||||
.. Tip:: See `virtual key codes <https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes>`_
|
||||
|
||||
.. Hint:: keybindings needs to have a multiple of two elements.
|
||||
|
||||
**Default**
|
||||
.. code-block:: text
|
||||
|
||||
0x10, 0xA0,
|
||||
0x11, 0xA2,
|
||||
0x12, 0xA4
|
||||
None
|
||||
|
||||
**Example**
|
||||
.. code-block:: text
|
||||
@@ -272,7 +217,7 @@ key_rightalt_to_key_win
|
||||
make Sunshine think the Right Alt key is the Windows key.
|
||||
|
||||
**Default**
|
||||
``disabled``
|
||||
None
|
||||
|
||||
**Example**
|
||||
.. code-block:: text
|
||||
@@ -336,18 +281,13 @@ output_name
|
||||
.. Tip:: To find the name of the appropriate values follow these instructions.
|
||||
|
||||
**Linux**
|
||||
During Sunshine startup, you should see the list of detected monitors:
|
||||
.. code-block:: bash
|
||||
|
||||
.. code-block:: text
|
||||
xrandr --listmonitors
|
||||
|
||||
Info: Detecting connected monitors
|
||||
Info: Detected monitor 0: DVI-D-0, connected: false
|
||||
Info: Detected monitor 1: HDMI-0, connected: true
|
||||
Info: Detected monitor 2: DP-0, connected: true
|
||||
Info: Detected monitor 3: DP-1, connected: false
|
||||
Info: Detected monitor 4: DVI-D-1, connected: false
|
||||
Example output: ``0: +HDMI-1 1920/518x1200/324+0+0 HDMI-1``
|
||||
|
||||
You need to use the value before the colon in the output, e.g. ``1``.
|
||||
You need to use the value before the colon in the output, e.g. ``0``.
|
||||
|
||||
.. Todo:: macOS
|
||||
|
||||
@@ -382,7 +322,7 @@ fps
|
||||
fps is supported.
|
||||
|
||||
**Default**
|
||||
``[10, 30, 60, 90, 120]``
|
||||
.. Todo:: Unknown
|
||||
|
||||
**Example**
|
||||
.. code-block:: text
|
||||
@@ -399,20 +339,7 @@ resolutions
|
||||
resolution is supported.
|
||||
|
||||
**Default**
|
||||
.. code-block:: text
|
||||
|
||||
[
|
||||
352x240,
|
||||
480x360,
|
||||
858x480,
|
||||
1280x720,
|
||||
1920x1080,
|
||||
2560x1080,
|
||||
3440x1440,
|
||||
1920x1200,
|
||||
3840x2160,
|
||||
3840x1600,
|
||||
]
|
||||
.. Todo:: Unknown
|
||||
|
||||
**Example**
|
||||
.. code-block:: text
|
||||
@@ -426,10 +353,31 @@ resolutions
|
||||
2560x1080,
|
||||
3440x1440,
|
||||
1920x1200,
|
||||
3840x2160,
|
||||
3860x2160,
|
||||
3840x1600,
|
||||
]
|
||||
|
||||
dwmflush
|
||||
^^^^^^^^
|
||||
|
||||
**Description**
|
||||
Invoke DwmFlush() to sync screen capture to the Windows presentation interval.
|
||||
|
||||
.. Caution:: Applies to Windows only. Alleviates visual stuttering during mouse movement.
|
||||
If enabled, this feature will automatically deactivate if the client framerate exceeds
|
||||
the host monitor's current refresh rate.
|
||||
|
||||
.. Note:: If you disable this option, you may see video stuttering during mouse movement in certain scenarios.
|
||||
It is recommended to leave enabled when possible.
|
||||
|
||||
**Default**
|
||||
``enabled``
|
||||
|
||||
**Example**
|
||||
.. code-block:: text
|
||||
|
||||
dwmflush = enabled
|
||||
|
||||
Audio
|
||||
-----
|
||||
|
||||
@@ -455,18 +403,14 @@ audio_sink
|
||||
|
||||
**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>`__.
|
||||
`Soundflower <https://github.com/mattingalls/Soundflower>`_ or
|
||||
`BlackHole <https://github.com/ExistentialAudio/BlackHole>`_.
|
||||
|
||||
**Windows**
|
||||
.. code-block:: batch
|
||||
|
||||
tools\audio-info.exe
|
||||
|
||||
.. Tip:: If you have multiple audio devices with identical names, use the Device ID instead.
|
||||
|
||||
.. Tip:: If you want to mute the host speakers, use `virtual_sink`_ instead.
|
||||
|
||||
**Default**
|
||||
Sunshine will select the default audio device.
|
||||
|
||||
@@ -484,7 +428,7 @@ audio_sink
|
||||
**Windows**
|
||||
.. code-block:: text
|
||||
|
||||
audio_sink = Speakers (High Definition Audio Device)
|
||||
audio_sink = {0.0.0.00000000}.{FD47D9CC-4218-4135-9CE2-0C195C87405B}
|
||||
|
||||
virtual_sink
|
||||
^^^^^^^^^^^^
|
||||
@@ -495,35 +439,13 @@ virtual_sink
|
||||
|
||||
.. Tip:: See `audio_sink`_!
|
||||
|
||||
.. Tip:: These are some options for virtual sound devices.
|
||||
|
||||
- Stream Streaming Speakers (Linux, macOS, Windows)
|
||||
|
||||
- Steam must be installed.
|
||||
- Enable `install_steam_audio_drivers`_ or use Steam Remote Play at least once to install the drivers.
|
||||
|
||||
- `Virtual Audio Cable <https://vb-audio.com/Cable/>`__ (macOS, Windows)
|
||||
|
||||
**Example**
|
||||
.. code-block:: text
|
||||
|
||||
virtual_sink = Steam Streaming Speakers
|
||||
|
||||
install_steam_audio_drivers
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Description**
|
||||
Installs the Steam Streaming Speakers driver (if Steam is installed) to support surround sound and muting host audio.
|
||||
|
||||
.. Tip:: This option is only supported on Windows.
|
||||
|
||||
**Default**
|
||||
``enabled``
|
||||
.. Todo:: Unknown
|
||||
|
||||
**Example**
|
||||
.. code-block:: text
|
||||
|
||||
install_steam_audio_drivers = enabled
|
||||
virtual_sink = {0.0.0.00000000}.{8edba70c-1125-467c-b89c-15da389bc1d4}
|
||||
|
||||
Network
|
||||
-------
|
||||
@@ -564,43 +486,16 @@ port
|
||||
Mic (unused) 48002 UDP +13
|
||||
================ ============ ===========================
|
||||
|
||||
.. Attention:: Custom ports may not be supported by all Moonlight clients.
|
||||
.. Attention:: Custom ports are only allowed on select Moonlight clients.
|
||||
|
||||
**Default**
|
||||
``47989``
|
||||
|
||||
**Range**
|
||||
``1029-65514``
|
||||
|
||||
**Example**
|
||||
.. code-block:: text
|
||||
|
||||
port = 47989
|
||||
|
||||
address_family
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
**Description**
|
||||
Set the address family that Sunshine will use.
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
===== ===========
|
||||
Value Description
|
||||
===== ===========
|
||||
ipv4 IPv4 only
|
||||
both IPv4+IPv6
|
||||
===== ===========
|
||||
|
||||
**Default**
|
||||
``ipv4``
|
||||
|
||||
**Example**
|
||||
.. code-block:: text
|
||||
|
||||
address_family = both
|
||||
|
||||
pkey
|
||||
^^^^
|
||||
|
||||
@@ -608,7 +503,7 @@ pkey
|
||||
The private key. This must be 2048 bits.
|
||||
|
||||
**Default**
|
||||
``credentials/cakey.pem``
|
||||
.. Todo:: Unknown
|
||||
|
||||
**Example**
|
||||
.. code-block:: text
|
||||
@@ -622,13 +517,40 @@ cert
|
||||
The certificate. Must be signed with a 2048 bit key.
|
||||
|
||||
**Default**
|
||||
``credentials/cacert.pem``
|
||||
.. Todo:: Unknown
|
||||
|
||||
**Example**
|
||||
.. code-block:: text
|
||||
|
||||
cert = /dir/cert.pem
|
||||
|
||||
origin_pin_allowed
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Description**
|
||||
The origin of the remote endpoint address that is not denied for HTTP method /pin.
|
||||
|
||||
**Choices**
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
===== ===========
|
||||
Value Description
|
||||
===== ===========
|
||||
pc Only localhost may access /pin
|
||||
lan Only LAN devices may access /pin
|
||||
wan Anyone may access /pin
|
||||
===== ===========
|
||||
|
||||
**Default**
|
||||
``pc``
|
||||
|
||||
**Example**
|
||||
.. code-block:: text
|
||||
|
||||
origin_pin_allowed = pc
|
||||
|
||||
origin_web_ui_allowed
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -675,7 +597,7 @@ upnp
|
||||
===== ===========
|
||||
|
||||
**Default**
|
||||
``disabled``
|
||||
``off``
|
||||
|
||||
**Example**
|
||||
.. code-block:: text
|
||||
@@ -686,7 +608,7 @@ ping_timeout
|
||||
^^^^^^^^^^^^
|
||||
|
||||
**Description**
|
||||
How long to wait, in milliseconds, for data from Moonlight before shutting down the stream.
|
||||
How long to wait in milliseconds for data from Moonlight before shutting down the stream.
|
||||
|
||||
**Default**
|
||||
``10000``
|
||||
@@ -792,7 +714,7 @@ hevc_mode
|
||||
===== ===========
|
||||
Value Description
|
||||
===== ===========
|
||||
0 advertise support for HEVC based on encoder capabilities (recommended)
|
||||
0 advertise support for HEVC based on encoder
|
||||
1 do not advertise support for HEVC
|
||||
2 advertise support for HEVC Main profile
|
||||
3 advertise support for HEVC Main and Main10 (HDR) profiles
|
||||
@@ -806,71 +728,6 @@ hevc_mode
|
||||
|
||||
hevc_mode = 2
|
||||
|
||||
av1_mode
|
||||
^^^^^^^^^
|
||||
|
||||
**Description**
|
||||
Allows the client to request AV1 Main 8-bit or 10-bit video streams.
|
||||
|
||||
.. Warning:: AV1 is more CPU-intensive to encode, so enabling this may reduce performance when using software
|
||||
encoding.
|
||||
|
||||
**Choices**
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
===== ===========
|
||||
Value Description
|
||||
===== ===========
|
||||
0 advertise support for AV1 based on encoder capabilities (recommended)
|
||||
1 do not advertise support for AV1
|
||||
2 advertise support for AV1 Main 8-bit profile
|
||||
3 advertise support for AV1 Main 8-bit and 10-bit (HDR) profiles
|
||||
===== ===========
|
||||
|
||||
**Default**
|
||||
``0``
|
||||
|
||||
**Example**
|
||||
.. code-block:: text
|
||||
|
||||
av1_mode = 2
|
||||
|
||||
capture
|
||||
^^^^^^^
|
||||
|
||||
**Description**
|
||||
Force specific screen capture method.
|
||||
|
||||
.. Caution:: Applies to Linux only.
|
||||
|
||||
**Choices**
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
========= ===========
|
||||
Value Description
|
||||
========= ===========
|
||||
nvfbc Use NVIDIA Frame Buffer Capture to capture direct to GPU memory. This is usually the fastest method for
|
||||
NVIDIA cards. For GeForce cards it will only work with drivers patched with
|
||||
`nvidia-patch <https://github.com/keylase/nvidia-patch/>`__
|
||||
or `nvlax <https://github.com/illnyang/nvlax/>`__.
|
||||
wlr Capture for wlroots based Wayland compositors via DMA-BUF.
|
||||
kms DRM/KMS screen capture from the kernel. This requires that sunshine has cap_sys_admin capability.
|
||||
See :ref:`Linux Setup <about/usage:linux>`.
|
||||
x11 Uses XCB. This is the slowest and most CPU intensive so should be avoided if possible.
|
||||
========= ===========
|
||||
|
||||
**Default**
|
||||
Automatic. Sunshine will use the first capture method available in the order of the table above.
|
||||
|
||||
**Example**
|
||||
.. code-block:: text
|
||||
|
||||
capture = kms
|
||||
|
||||
encoder
|
||||
^^^^^^^
|
||||
|
||||
@@ -907,7 +764,7 @@ sw_preset
|
||||
|
||||
.. Note:: This option only applies when using software `encoder`_.
|
||||
|
||||
.. Note:: From `FFmpeg <https://trac.ffmpeg.org/wiki/Encode/H.264#preset>`__.
|
||||
.. Note:: From `FFmpeg <https://trac.ffmpeg.org/wiki/Encode/H.264#preset>`_.
|
||||
|
||||
A preset is a collection of options that will provide a certain encoding speed to compression ratio. A slower
|
||||
preset will provide better compression (compression is quality per filesize). This means that, for example, if
|
||||
@@ -927,10 +784,12 @@ sw_preset
|
||||
ultrafast fastest
|
||||
superfast
|
||||
veryfast
|
||||
superfast
|
||||
faster
|
||||
fast
|
||||
medium
|
||||
slow
|
||||
slow
|
||||
slower
|
||||
veryslow slowest
|
||||
========= ===========
|
||||
@@ -951,7 +810,7 @@ sw_tune
|
||||
|
||||
.. Note:: This option only applies when using software `encoder`_.
|
||||
|
||||
.. Note:: From `FFmpeg <https://trac.ffmpeg.org/wiki/Encode/H.264#preset>`__.
|
||||
.. Note:: From `FFmpeg <https://trac.ffmpeg.org/wiki/Encode/H.264#preset>`_.
|
||||
|
||||
You can optionally use -tune to change settings based upon the specifics of your input.
|
||||
|
||||
@@ -979,15 +838,14 @@ sw_tune
|
||||
|
||||
sw_tune = zerolatency
|
||||
|
||||
nvenc_preset
|
||||
^^^^^^^^^^^^
|
||||
nv_preset
|
||||
^^^^^^^^^
|
||||
|
||||
**Description**
|
||||
NVENC encoder performance preset.
|
||||
Higher numbers improve compression (quality at given bitrate) at the cost of increased encoding latency.
|
||||
Recommended to change only when limited by network or decoder, otherwise similar effect can be accomplished by increasing bitrate.
|
||||
The encoder preset to use.
|
||||
|
||||
.. Note:: This option only applies when using NVENC `encoder`_.
|
||||
.. Note:: This option only applies when using nvenc `encoder`_. For more information on the presets, see
|
||||
`nvenc preset migration guide <https://docs.nvidia.com/video-technologies/video-codec-sdk/nvenc-preset-migration-guide/>`_.
|
||||
|
||||
**Choices**
|
||||
|
||||
@@ -997,65 +855,30 @@ nvenc_preset
|
||||
========== ===========
|
||||
Value Description
|
||||
========== ===========
|
||||
1 P1 (fastest)
|
||||
2 P2
|
||||
3 P3
|
||||
4 P4
|
||||
5 P5
|
||||
6 P6
|
||||
7 P7 (slowest)
|
||||
p1 fastest (lowest quality)
|
||||
p2 faster (lower quality)
|
||||
p3 fast (low quality)
|
||||
p4 medium (default)
|
||||
p5 slow (good quality)
|
||||
p6 slower (better quality)
|
||||
p7 slowest (best quality)
|
||||
========== ===========
|
||||
|
||||
**Default**
|
||||
``1``
|
||||
``p4``
|
||||
|
||||
**Example**
|
||||
.. code-block:: text
|
||||
|
||||
nvenc_preset = 1
|
||||
nv_preset = p4
|
||||
|
||||
nvenc_twopass
|
||||
^^^^^^^^^^^^^
|
||||
nv_tune
|
||||
^^^^^^^
|
||||
|
||||
**Description**
|
||||
Enable two-pass mode in NVENC encoder.
|
||||
This allows to detect more motion vectors, better distribute bitrate across the frame and more strictly adhere to bitrate limits.
|
||||
Disabling it is not recommended since this can lead to occasional bitrate overshoot and subsequent packet loss.
|
||||
The encoder tuning profile.
|
||||
|
||||
.. Note:: This option only applies when using NVENC `encoder`_.
|
||||
|
||||
**Choices**
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
=========== ===========
|
||||
Value Description
|
||||
=========== ===========
|
||||
disabled One pass (fastest)
|
||||
quarter_res Two passes, first pass at quarter resolution (faster)
|
||||
full_res Two passes, first pass at full resolution (slower)
|
||||
=========== ===========
|
||||
|
||||
**Default**
|
||||
``quarter_res``
|
||||
|
||||
**Example**
|
||||
.. code-block:: text
|
||||
|
||||
nvenc_twopass = quarter_res
|
||||
|
||||
nvenc_realtime_hags
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Description**
|
||||
Use realtime gpu scheduling priority in NVENC when hardware accelerated gpu scheduling (HAGS) is enabled in Windows.
|
||||
Currently NVIDIA drivers may freeze in encoder when HAGS is enabled, realtime priority is used and VRAM utilization is close to maximum.
|
||||
Disabling this option lowers the priority to high, sidestepping the freeze at the cost of reduced capture performance when the GPU is heavily loaded.
|
||||
|
||||
.. Note:: This option only applies when using NVENC `encoder`_.
|
||||
|
||||
.. Caution:: Applies to Windows only.
|
||||
.. Note:: This option only applies when using nvenc `encoder`_.
|
||||
|
||||
**Choices**
|
||||
|
||||
@@ -1065,26 +888,27 @@ nvenc_realtime_hags
|
||||
========== ===========
|
||||
Value Description
|
||||
========== ===========
|
||||
disabled Use high priority
|
||||
enabled Use realtime priority
|
||||
hq high quality
|
||||
ll low latency
|
||||
ull ultra low latency
|
||||
lossless lossless
|
||||
========== ===========
|
||||
|
||||
**Default**
|
||||
``enabled``
|
||||
``ull``
|
||||
|
||||
**Example**
|
||||
.. code-block:: text
|
||||
|
||||
nvenc_realtime_hags = enabled
|
||||
nv_tune = ull
|
||||
|
||||
nvenc_h264_cavlc
|
||||
^^^^^^^^^^^^^^^^
|
||||
nv_rc
|
||||
^^^^^
|
||||
|
||||
**Description**
|
||||
Prefer CAVLC entropy coding over CABAC in H.264 when using NVENC.
|
||||
CAVLC is outdated and needs around 10% more bitrate for same quality, but provides slightly faster decoding when using software decoder.
|
||||
The encoder rate control.
|
||||
|
||||
.. Note:: This option only applies when using H.264 format with NVENC `encoder`_.
|
||||
.. Note:: This option only applies when using nvenc `encoder`_.
|
||||
|
||||
**Choices**
|
||||
|
||||
@@ -1094,17 +918,47 @@ nvenc_h264_cavlc
|
||||
========== ===========
|
||||
Value Description
|
||||
========== ===========
|
||||
disabled Prefer CABAC
|
||||
enabled Prefer CAVLC
|
||||
constqp constant QP mode
|
||||
vbr variable bitrate
|
||||
cbr constant bitrate
|
||||
========== ===========
|
||||
|
||||
**Default**
|
||||
``disabled``
|
||||
``cbr``
|
||||
|
||||
**Example**
|
||||
.. code-block:: text
|
||||
|
||||
nvenc_h264_cavlc = disabled
|
||||
nv_rc = cbr
|
||||
|
||||
nv_coder
|
||||
^^^^^^^^
|
||||
|
||||
**Description**
|
||||
The entropy encoding to use.
|
||||
|
||||
.. Note:: This option only applies when using H264 with nvenc `encoder`_.
|
||||
|
||||
**Choices**
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
========== ===========
|
||||
Value Description
|
||||
========== ===========
|
||||
auto let ffmpeg decide
|
||||
cabac context adaptive binary arithmetic coding - higher quality
|
||||
cavlc context adaptive variable-length coding - faster decode
|
||||
========== ===========
|
||||
|
||||
**Default**
|
||||
``auto``
|
||||
|
||||
**Example**
|
||||
.. code-block:: text
|
||||
|
||||
nv_coder = auto
|
||||
|
||||
qsv_preset
|
||||
^^^^^^^^^^
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
.. mdinclude:: ../../../CHANGELOG.md
|
||||
@@ -1 +1,3 @@
|
||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/DOCKER_README.md
|
||||
|
||||
.. mdinclude:: ../../../DOCKER_README.md
|
||||
|
||||
@@ -1,289 +0,0 @@
|
||||
App Examples
|
||||
============
|
||||
Since not all applications behave the same, we decided to create some examples to help you get started adding games
|
||||
and applications to Sunshine.
|
||||
|
||||
.. Attention:: Throughout these examples, any fields not shown are left blank. You can enhance your experience by
|
||||
adding an image or a log file (via the ``Output`` field).
|
||||
|
||||
Common Examples
|
||||
---------------
|
||||
|
||||
Desktop
|
||||
^^^^^^^
|
||||
|
||||
+----------------------+-----------------+
|
||||
| **Field** | **Value** |
|
||||
+----------------------+-----------------+
|
||||
| Application Name | ``Desktop`` |
|
||||
+----------------------+-----------------+
|
||||
| Image | ``desktop.png`` |
|
||||
+----------------------+-----------------+
|
||||
|
||||
Steam Big Picture
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. Note:: Steam is launched as a detached command because Steam starts with a process that self updates itself and the original
|
||||
process is killed. Since the original process ends it will not work as a regular command.
|
||||
|
||||
+----------------------+------------------------------------------+----------------------------------+-----------------------------------+
|
||||
| **Field** | **Linux** | **macOS** | **Windows** |
|
||||
+----------------------+------------------------------------------+----------------------------------+-----------------------------------+
|
||||
| Application Name | ``Steam Big Picture`` |
|
||||
+----------------------+------------------------------------------+----------------------------------+-----------------------------------+
|
||||
| Detached Commands | ``setsid steam steam://open/bigpicture`` | ``open steam://open/bigpicture`` | ``steam steam://open/bigpicture`` |
|
||||
+----------------------+------------------------------------------+----------------------------------+-----------------------------------+
|
||||
| Image | ``steam.png`` |
|
||||
+----------------------+------------------------------------------+----------------------------------+-----------------------------------+
|
||||
|
||||
Epic Game Store game
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. Note:: Using URI method will be the most consistent between various games, but does not allow a game to be launched
|
||||
using the "Command" and therefore the stream will not end when the game ends.
|
||||
|
||||
URI (Epic)
|
||||
""""""""""
|
||||
|
||||
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| **Field** | **Windows** |
|
||||
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Application Name | ``Surviving Mars`` |
|
||||
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Detached Commands | ``cmd /C "start com.epicgames.launcher://apps/d759128018124dcabb1fbee9bb28e178%3A20729b9176c241f0b617c5723e70ec2d%3AOvenbird?action=launch&silent=true"`` |
|
||||
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Binary (Epic w/ working directory)
|
||||
""""""""""""""""""""""""""""""""""
|
||||
|
||||
+----------------------+-----------------------------------------------+
|
||||
| **Field** | **Windows** |
|
||||
+----------------------+-----------------------------------------------+
|
||||
| Application Name | ``Surviving Mars`` |
|
||||
+----------------------+-----------------------------------------------+
|
||||
| Command | ``cmd /c "MarsEpic.exe"`` |
|
||||
+----------------------+-----------------------------------------------+
|
||||
| Working Directory | ``C:\Program Files\Epic Games\SurvivingMars`` |
|
||||
+----------------------+-----------------------------------------------+
|
||||
|
||||
Binary (Epic w/o working directory)
|
||||
"""""""""""""""""""""""""""""""""""
|
||||
|
||||
+----------------------+--------------------------------------------------------------+
|
||||
| **Field** | **Windows** |
|
||||
+----------------------+--------------------------------------------------------------+
|
||||
| Application Name | ``Surviving Mars`` |
|
||||
+----------------------+--------------------------------------------------------------+
|
||||
| Command | ``"C:\Program Files\Epic Games\SurvivingMars\MarsEpic.exe"`` |
|
||||
+----------------------+--------------------------------------------------------------+
|
||||
|
||||
|
||||
Steam game
|
||||
^^^^^^^^^^
|
||||
|
||||
.. Note:: Using URI method will be the most consistent between various games, but does not allow a game to be launched
|
||||
using the "Command" and therefore the stream will not end when the game ends.
|
||||
|
||||
URI (Steam)
|
||||
"""""""""""
|
||||
|
||||
+----------------------+-------------------------------------------+-----------------------------------+---------------------------------------------+
|
||||
| **Field** | **Linux** | **macOS** | **Windows** |
|
||||
+----------------------+-------------------------------------------+-----------------------------------+---------------------------------------------+
|
||||
| Application Name | ``Surviving Mars`` |
|
||||
+----------------------+-------------------------------------------+-----------------------------------+---------------------------------------------+
|
||||
| Detached Commands | ``setsid steam steam://rungameid/464920`` | ``open steam://rungameid/464920`` | ``cmd /C "start steam://rungameid/464920"`` |
|
||||
+----------------------+-------------------------------------------+-----------------------------------+---------------------------------------------+
|
||||
|
||||
Binary (Steam w/ working directory)
|
||||
"""""""""""""""""""""""""""""""""""
|
||||
|
||||
+----------------------+-------------------------+-------------------------+------------------------------------------------------------------+
|
||||
| **Field** | **Linux** | **macOS** | **Windows** |
|
||||
+----------------------+-------------------------+-------------------------+------------------------------------------------------------------+
|
||||
| Application Name | ``Surviving Mars`` |
|
||||
+----------------------+-------------------------+-------------------------+------------------------------------------------------------------+
|
||||
| Command | ``MarsSteam`` | ``cmd /c "MarsSteam.exe"`` |
|
||||
+----------------------+-------------------------+-------------------------+------------------------------------------------------------------+
|
||||
| Working Directory | ``~/.steam/steam/SteamApps/common/Survivng Mars`` | ``C:\Program Files (x86)\Steam\steamapps\common\Surviving Mars`` |
|
||||
+----------------------+-------------------------+-------------------------+------------------------------------------------------------------+
|
||||
|
||||
Binary (Steam w/o working directory)
|
||||
""""""""""""""""""""""""""""""""""""
|
||||
|
||||
+----------------------+------------------------------+------------------------------+----------------------------------------------------------------------------------+
|
||||
| **Field** | **Linux** | **macOS** | **Windows** |
|
||||
+----------------------+------------------------------+------------------------------+----------------------------------------------------------------------------------+
|
||||
| Application Name | ``Surviving Mars`` |
|
||||
+----------------------+------------------------------+------------------------------+----------------------------------------------------------------------------------+
|
||||
| Command | ``~/.steam/steam/SteamApps/common/Survivng Mars/MarsSteam`` | ``"C:\Program Files (x86)\Steam\steamapps\common\Surviving Mars\MarsSteam.exe"`` |
|
||||
+----------------------+------------------------------+------------------------------+----------------------------------------------------------------------------------+
|
||||
|
||||
Linux
|
||||
-----
|
||||
|
||||
Changing Resolution and Refresh Rate (Linux - X11)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
+----------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| **Field** | **Value** |
|
||||
+----------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Command Preparations | Do: ``sh -c "xrandr --output HDMI-1 --mode \"${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}\" --rate ${SUNSHINE_CLIENT_FPS}"`` |
|
||||
| +---------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| | Undo: ``xrandr --output HDMI-1 --mode 3840x2160 --rate 120`` |
|
||||
+----------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. hint::
|
||||
The above only works if the xrandr mode already exists. You will need to create new modes to stream to macOS and iOS devices, since they use non standard resolutions.
|
||||
|
||||
You can update the ``Do`` command to this:
|
||||
.. code-block:: bash
|
||||
|
||||
bash -c "${HOME}/scripts/set-custom-res.sh \"${SUNSHINE_CLIENT_WIDTH}\" \"${SUNSHINE_CLIENT_HEIGHT}\" \"${SUNSHINE_CLIENT_FPS}\""
|
||||
|
||||
The ``set-custom-res.sh`` will have this content:
|
||||
.. code-block:: bash
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
# Get params and set any defaults
|
||||
width=${1:-1920}
|
||||
height=${2:-1080}
|
||||
refresh_rate=${3:-60}
|
||||
|
||||
# You may need to adjust the scaling differently so the UI/text isn't too small / big
|
||||
scale=${4:-0.55}
|
||||
|
||||
# Get the name of the active display
|
||||
display_output=$(xrandr | grep " connected" | awk '{ print $1 }')
|
||||
|
||||
# Get the modeline info from the 2nd row in the cvt output
|
||||
modeline=$(cvt ${width} ${height} ${refresh_rate} | awk 'FNR == 2')
|
||||
xrandr_mode_str=${modeline//Modeline \"*\" /}
|
||||
mode_alias="${width}x${height}"
|
||||
|
||||
echo "xrandr setting new mode ${mode_alias} ${xrandr_mode_str}"
|
||||
xrandr --newmode ${mode_alias} ${xrandr_mode_str}
|
||||
xrandr --addmode ${display_output} ${mode_alias}
|
||||
|
||||
# Reset scaling
|
||||
xrandr --output ${display_output} --scale 1
|
||||
|
||||
# Apply new xrandr mode
|
||||
xrandr --output ${display_output} --primary --mode ${mode_alias} --pos 0x0 --rotate normal --scale ${scale}
|
||||
|
||||
# Optional reset your wallpaper to fit to new resolution
|
||||
# xwallpaper --zoom /path/to/wallpaper.png
|
||||
|
||||
Changing Resolution and Refresh Rate (Linux - Wayland)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| **Field** | **Value** |
|
||||
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Command Preparations | Do: ``sh -c "wlr-xrandr --output HDMI-1 --mode \"${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}@${SUNSHINE_CLIENT_FPS}Hz\""`` |
|
||||
| +-------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| | Undo: ``wlr-xrandr --output HDMI-1 --mode 3840x2160@120Hz`` |
|
||||
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Changing Resolution and Refresh Rate (Linux - KDE Plasma - Wayland and X11)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
+----------------------+----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| **Field** | **Value** |
|
||||
+----------------------+----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Command Preparations | Do: ``sh -c "kscreen-doctor output.HDMI-A-1.mode.${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}@${SUNSHINE_CLIENT_FPS}"`` |
|
||||
| +----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| | Undo: ``kscreen-doctor output.HDMI-A-1.mode.3840x2160@120`` |
|
||||
+----------------------+----------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Changing Resolution (Linux - NVIDIA)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
+----------------------+------------------------------------------------------------------------------------------------------+
|
||||
| **Field** | **Value** |
|
||||
+----------------------+------------------------------------------------------------------------------------------------------+
|
||||
| Command Preparations | Do: ``sh -c "${HOME}/scripts/set-custom-res.sh ${SUNSHINE_CLIENT_WIDTH} ${SUNSHINE_CLIENT_HEIGHT}"`` |
|
||||
| +------------------------------------------------------------------------------------------------------+
|
||||
| | Undo: ``sh -c "${HOME}/scripts/set-custom-res.sh 3840 2160"`` |
|
||||
+----------------------+------------------------------------------------------------------------------------------------------+
|
||||
|
||||
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 }"
|
||||
|
||||
Flatpak
|
||||
^^^^^^^
|
||||
|
||||
.. Attention:: Because Flatpak packages run in a sandboxed environment and do not normally have access to the host,
|
||||
the Flatpak of Sunshine requires commands to be prefixed with ``flatpak-spawn --host``.
|
||||
|
||||
macOS
|
||||
-----
|
||||
|
||||
Changing Resolution and Refresh Rate (macOS)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. Note:: This example uses the `displayplacer` tool to change the resolution.
|
||||
This tool can be installed following instructions in their
|
||||
`GitHub repository <https://github.com/jakehilborn/displayplacer>`__.
|
||||
|
||||
+----------------------+-----------------------------------------------------------------------------------------------+
|
||||
| **Field** | **Value** |
|
||||
+----------------------+-----------------------------------------------------------------------------------------------+
|
||||
| Command Preparations | Do: ``displayplacer "id:<screenId> res:1920x1080 hz:60 scaling:on origin:(0,0) degree:0"`` |
|
||||
| +-----------------------------------------------------------------------------------------------+
|
||||
| | Undo: ``displayplacer "id:<screenId> res:3840x2160 hz:120 scaling:on origin:(0,0) degree:0"`` |
|
||||
+----------------------+-----------------------------------------------------------------------------------------------+
|
||||
|
||||
Windows
|
||||
-------
|
||||
|
||||
Changing Resolution and Refresh Rate (Windows)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. Note:: This example uses the `QRes` tool to change the resolution and refresh rate.
|
||||
This tool can be downloaded from their `SourceForge repository <https://sourceforge.net/projects/qres/>`__.
|
||||
|
||||
+----------------------+------------------------------------------------------------------------------------------------------------------+
|
||||
| **Field** | **Value** |
|
||||
+----------------------+------------------------------------------------------------------------------------------------------------------+
|
||||
| Command Preparations | Do: ``cmd /C FullPath\qres.exe /x:%SUNSHINE_CLIENT_WIDTH% /y:%SUNSHINE_CLIENT_HEIGHT% /r:%SUNSHINE_CLIENT_FPS%`` |
|
||||
| +------------------------------------------------------------------------------------------------------------------+
|
||||
| | Undo: ``cmd /C FullPath\qres.exe /x:3840 /y:2160 /r:120`` |
|
||||
+----------------------+------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Elevating Commands (Windows)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
If you've installed Sunshine as a service (default), you can now specify if a command should be elevated with adminsitrative privileges.
|
||||
Simply enable the elevated option in the WEB UI, or add it to the JSON configuration.
|
||||
This is an option for both prep-cmd and regular commands and will launch the process with the current user without a UAC prompt.
|
||||
|
||||
.. Note:: It's important to write the values "true" and "false" as string values, not as the typical true/false values in most JSON.
|
||||
|
||||
**Example**
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"name": "Game With AntiCheat that Requires Admin",
|
||||
"output": "",
|
||||
"cmd": "ping 127.0.0.1",
|
||||
"exclude-global-prep-cmd": "false",
|
||||
"elevated": "true",
|
||||
"prep-cmd": [
|
||||
{
|
||||
"do": "powershell.exe -command \"Start-Streaming\"",
|
||||
"undo": "powershell.exe -command \"Stop-Streaming\"",
|
||||
"elevated": "false"
|
||||
}
|
||||
],
|
||||
"image-path": ""
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
Guides
|
||||
======
|
||||
|
||||
Collection of guides written by the community!
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
app_examples
|
||||
linux/linux
|
||||
@@ -1,526 +0,0 @@
|
||||
Remote SSH Headless Setup
|
||||
=========================
|
||||
|
||||
.. csv-table:: Remote SSH Headless Setup
|
||||
:header-rows: 0
|
||||
:stub-columns: 1
|
||||
|
||||
Author, `Eric Dong <https://github.com/e-dong>`__
|
||||
Difficulty, Intermediate
|
||||
|
||||
This is a guide to setup remote SSH into host to startup X server and sunshine without physical login and dummy plug.
|
||||
The virtual display is accelerated by the NVidia GPU using the TwinView configuration.
|
||||
|
||||
.. attention::
|
||||
This guide is specific for Xorg and NVidia GPUs. I start the X server using the ``startx`` command.
|
||||
I also only tested this on an Artix runit init system on LAN.
|
||||
I didn't have to do anything special with pulseaudio (pipewire untested).
|
||||
|
||||
Keep your monitors plugged in until the `Checkpoint`_ step
|
||||
|
||||
.. tip::
|
||||
Prior to editing any system configurations, you should make a copy of the original file.
|
||||
This will allow you to use it for reference or revert your changes easily.
|
||||
|
||||
The Big Picture
|
||||
---------------
|
||||
Once you are done, you will need to perform these 3 steps:
|
||||
|
||||
#. Turn on the host machine
|
||||
#. Start sunshine on remote host with a script that:
|
||||
|
||||
- Edits permissions of ``/dev/uinput`` (added sudo config to execute script with no password prompt)
|
||||
- Starts X server with ``startx`` on virtual display
|
||||
- Starts ``Sunshine``
|
||||
|
||||
#. Startup Moonlight on the client of interest and connect to host
|
||||
|
||||
.. hint::
|
||||
|
||||
As an alternative to SSH...
|
||||
|
||||
**Step 2** can be replaced with autologin and starting sunshine as a service or putting
|
||||
``sunshine &`` in your ``.xinitrc`` file if you start your X server with ``startx``.
|
||||
In this case, the workaround for ``/dev/uinput`` permissions is not needed because the udev rule would be triggered
|
||||
for "physical" login. See :ref:`Linux Setup <about/usage:linux>`. I personally think autologin compromises the
|
||||
security of the PC, so I went with the remote SSH route. I use the PC more than for gaming, so I don't need a
|
||||
virtual display everytime I turn on the PC (E.g running updates, config changes, file/media server).
|
||||
|
||||
First we will setup the host and then the SSH Client (Which may not be the same as the machine running the
|
||||
moonlight client)
|
||||
|
||||
Host Setup
|
||||
----------
|
||||
|
||||
We will be setting up:
|
||||
|
||||
#. `Static IP Setup`_
|
||||
#. `SSH Server Setup`_
|
||||
#. `Virtual Display Setup`_
|
||||
#. `Uinput Permissions Workaround`_
|
||||
#. `Stream Launcher Script`_
|
||||
|
||||
|
||||
Static IP Setup
|
||||
^^^^^^^^^^^^^^^
|
||||
Setup static IP Address for host. For LAN connections you can use DHCP reservation within your assigned range.
|
||||
e.g. 192.168.x.x. This will allow you to ssh to the host consistently, so the assigned IP address does
|
||||
not change. It is preferred to set this through your router config.
|
||||
|
||||
|
||||
SSH Server Setup
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note::
|
||||
Most distros have OpenSSH already installed. If it is not present, install OpenSSH using your package manager.
|
||||
|
||||
.. tab:: Debian/Ubuntu
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo apt update
|
||||
sudo apt install openssh-server
|
||||
|
||||
.. tab:: Arch/Artix
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo pacman -S openssh
|
||||
# Install openssh-<other_init> if you are not using SystemD
|
||||
# e.g. sudo pacman -S openssh-runit
|
||||
|
||||
.. tab:: Alpine
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo apk update
|
||||
sudo apk add openssh
|
||||
|
||||
.. tab:: CentOS/RHEL/Fedora
|
||||
|
||||
**CentOS/RHEL 7**
|
||||
.. code-block:: bash
|
||||
|
||||
sudo yum install openssh-server
|
||||
|
||||
**CentOS/Fedora/RHEL 8**
|
||||
.. code-block:: bash
|
||||
|
||||
sudo dnf install openssh-server
|
||||
|
||||
Next make sure the OpenSSH daemon is enabled to run when the system starts.
|
||||
|
||||
.. tab:: SystemD
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo systemctl enable sshd.service
|
||||
sudo systemctl start sshd.service # Starts the service now
|
||||
sudo systemctl status sshd.service # See if the service is running
|
||||
|
||||
.. tab:: Runit
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo ln -s /etc/runit/sv/sshd /run/runit/service # Enables the OpenSSH daemon to run when system starts
|
||||
sudo sv start sshd # Starts the service now
|
||||
sudo sv status sshd # See if the service is running
|
||||
|
||||
.. tab:: OpenRC
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
rc-update add sshd # Enables service
|
||||
rc-status # List services to verify sshd is enabled
|
||||
rc-service sshd start # Starts the service now
|
||||
|
||||
**Disabling PAM in sshd**
|
||||
|
||||
I noticed when the ssh session is disconnected for any reason, ``pulseaudio`` would disconnect.
|
||||
This is due to PAM handling sessions. When running ``dmesg``, I noticed ``elogind`` would say removed user session.
|
||||
In this `Gentoo Forums post <https://forums.gentoo.org/viewtopic-t-1090186-start-0.html>`__,
|
||||
someone had a similar issue. Starting the X server in the background and exiting out of the console would cause your
|
||||
session to be removed.
|
||||
|
||||
.. caution::
|
||||
According to this `article <https://devicetests.com/ssh-usepam-security-session-status>`__
|
||||
disabling PAM increases security, but reduces certain functionality in terms of session handling.
|
||||
*Do so at your own risk!*
|
||||
|
||||
Edit the ``sshd_config`` file with the following to disable PAM.
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
usePAM no
|
||||
|
||||
After making changes to the ``sshd_config``, restart the sshd service for changes to take effect.
|
||||
|
||||
.. tip::
|
||||
Run the command to check the ssh configuration prior to restarting the sshd service.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo sshd -t -f /etc/ssh/sshd_config
|
||||
|
||||
An incorrect configuration will prevent the sshd service from starting, which might mean
|
||||
losing SSH access to the server.
|
||||
|
||||
.. tab:: SystemD
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo systemctl restart sshd.service
|
||||
|
||||
.. tab:: Runit
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo sv restart sshd
|
||||
|
||||
.. tab:: OpenRC
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo rc-service sshd restart
|
||||
|
||||
|
||||
Virtual Display Setup
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
As an alternative to a dummy dongle, you can use this config to create a virtual display.
|
||||
|
||||
.. important::
|
||||
This is only available for NVidia GPUs using Xorg.
|
||||
|
||||
.. hint::
|
||||
Use ``xrandr`` to see name of your active display output. Usually it starts with ``DP`` or ``HDMI``. For me, it is ``DP-0``.
|
||||
Put this name for the ``ConnectedMonitor`` option under the ``Device`` section.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
xrandr | grep " connected" | awk '{ print $1 }'
|
||||
|
||||
|
||||
.. code-block:: xorg.conf
|
||||
|
||||
Section "ServerLayout"
|
||||
Identifier "TwinLayout"
|
||||
Screen 0 "metaScreen" 0 0
|
||||
EndSection
|
||||
|
||||
Section "Monitor"
|
||||
Identifier "Monitor0"
|
||||
Option "Enable" "true"
|
||||
EndSection
|
||||
|
||||
Section "Device"
|
||||
Identifier "Card0"
|
||||
Driver "nvidia"
|
||||
VendorName "NVIDIA Corporation"
|
||||
Option "MetaModes" "1920x1080"
|
||||
Option "ConnectedMonitor" "DP-0"
|
||||
Option "ModeValidation" "NoDFPNativeResolutionCheck,NoVirtualSizeCheck,NoMaxPClkCheck,NoHorizSyncCheck,NoVertRefreshCheck,NoWidthAlignmentCheck"
|
||||
EndSection
|
||||
|
||||
Section "Screen"
|
||||
Identifier "metaScreen"
|
||||
Device "Card0"
|
||||
Monitor "Monitor0"
|
||||
DefaultDepth 24
|
||||
Option "TwinView" "True"
|
||||
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/usage:linux>` to get access to ``/dev/uinput``,
|
||||
I noticed when I sshed into the host without physical login, the ACL permissions on ``/dev/uinput`` were not changed.
|
||||
So I asked `reddit
|
||||
<https://www.reddit.com/r/linux_gaming/comments/14htuzv/does_sshing_into_host_trigger_udev_rule_on_the/>`__.
|
||||
I discovered that SSH sessions are not the same as a physical login.
|
||||
I suppose it's not possible for SSH to trigger a udev rule or create a physical login session.
|
||||
|
||||
**Setup Script**
|
||||
|
||||
This script will take care of any precondtions prior to starting up sunshine.
|
||||
|
||||
Run the following to create a script named something like ``sunshine-setup.sh``:
|
||||
.. code-block:: bash
|
||||
|
||||
echo "chown $(id -un):$(id -gn) /dev/uinput" > sunshine-setup.sh &&\
|
||||
chmod +x sunshine-setup.sh
|
||||
|
||||
(**Optional**) To Ensure ethernet is being used for streaming,
|
||||
you can block WiFi with ``rfkill``.
|
||||
|
||||
Run this command to append the rfkill block command to the script:
|
||||
.. code-block:: bash
|
||||
|
||||
echo "rfkill block $(rfkill list | grep "Wireless LAN" \
|
||||
| sed 's/^\([[:digit:]]\).*/\1/')" >> sunshine-setup.sh
|
||||
|
||||
**Sudo Configuration**
|
||||
|
||||
We will manually change the permissions of ``/dev/uinput`` using ``chown``.
|
||||
You need to use ``sudo`` to make this change, so add/update the entry in ``/etc/sudoers.d/${USER}``
|
||||
|
||||
.. danger::
|
||||
Do so at your own risk! It is more secure to give sudo and no password prompt to a single script,
|
||||
than a generic executable like chown.
|
||||
|
||||
.. warning::
|
||||
Be very careful of messing this config up. If you make a typo, *YOU LOSE THE ABILITY TO USE SUDO*.
|
||||
Fortunately, your system is not borked, you will need to login as root to fix the config.
|
||||
You may want to setup a backup user / SSH into the host as root to fix the config if this happens.
|
||||
Otherwise you will need to plug your machine back into a monitor and login as root to fix this.
|
||||
To enable root login over SSH edit your SSHD config, and add ``PermitRootLogin yes``, and restart the SSH server.
|
||||
|
||||
#. First make a backup of your ``/etc/sudoers.d/${USER}`` file.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo cp /etc/sudoers.d/${USER} /etc/sudoers.d/${USER}.backup
|
||||
|
||||
#. ``cd`` to the parent dir of the ``sunshine-setup.sh`` script.
|
||||
#. Execute the following to update your sudoer config file.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
echo "${USER} ALL=(ALL:ALL) ALL, NOPASSWD: $(pwd)/sunshine-setup.sh" \
|
||||
| sudo tee /etc/sudoers.d/${USER}
|
||||
|
||||
These changes allow the script to use sudo without being prompted with a password.
|
||||
|
||||
e.g. ``sudo $(pwd)/sunshine-setup.sh``
|
||||
|
||||
|
||||
Stream Launcher Script
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
This is the main entrypoint script that will run the ``sunshine-setup.sh`` script, start up X server, and Sunshine.
|
||||
The client will call this script that runs on the host via ssh.
|
||||
|
||||
|
||||
**Sunshine Startup Script**
|
||||
|
||||
This guide will refer to this script as ``~/scripts/sunshine.sh``.
|
||||
The setup script will be referred as ``~/scripts/sunshine-setup.sh``
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
export DISPLAY=:0
|
||||
|
||||
# Check existing X server
|
||||
ps -e | grep X >/dev/null
|
||||
[[ ${?} -ne 0 ]] && {
|
||||
echo "Starting X server"
|
||||
startx &>/dev/null &
|
||||
[[ ${?} -eq 0 ]] && {
|
||||
echo "X server started successfully"
|
||||
} || echo "X server failed to start"
|
||||
} || echo "X server already running"
|
||||
|
||||
# Check if sunshine is already running
|
||||
ps -e | grep -e .*sunshine$ >/dev/null
|
||||
[[ ${?} -ne 0 ]] && {
|
||||
sudo ~/scripts/sunshine-setup.sh
|
||||
echo "Starting Sunshine!"
|
||||
sunshine > /dev/null &
|
||||
[[ ${?} -eq 0 ]] && {
|
||||
echo "Sunshine started successfully"
|
||||
} || echo "Sunshine failed to start"
|
||||
} || echo "Sunshine is already running"
|
||||
|
||||
# Add any other Programs that you want to startup automatically
|
||||
# e.g.
|
||||
# steam &> /dev/null &
|
||||
# firefox &> /dev/null &
|
||||
# kdeconnect-app &> /dev/null &
|
||||
|
||||
----
|
||||
|
||||
SSH Client Setup
|
||||
----------------
|
||||
|
||||
We will be setting up:
|
||||
|
||||
#. `SSH Key Authentication Setup`_
|
||||
#. `SSH Client Script (Optional)`_
|
||||
|
||||
SSH Key Authentication Setup
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
#. Setup your SSH keys with ``ssh-keygen`` and use ``ssh-copy-id`` to authorize remote login to your host.
|
||||
Run ``ssh <user>@<ip_address>`` to login to your host.
|
||||
SSH keys automate login so you don't need to input your password!
|
||||
#. Optionally setup a ``~/.ssh/config`` file to simplify the ``ssh`` command
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
Host <some_alias>
|
||||
Hostname <ip_address>
|
||||
User <username>
|
||||
IdentityFile ~/.ssh/<your_private_key>
|
||||
|
||||
Now you can use ``ssh <some_alias>``.
|
||||
``ssh <some_alias> <commands/script>`` will execute the command or script on the remote host.
|
||||
|
||||
Checkpoint
|
||||
^^^^^^^^^^
|
||||
|
||||
As a sanity check, let's make sure your setup is working so far!
|
||||
|
||||
**Test Steps**
|
||||
|
||||
With your monitor still plugged into your Sunshine host PC:
|
||||
|
||||
#. ``ssh <alias>``
|
||||
#. ``~/scripts/sunshine.sh``
|
||||
#. ``nvidia-smi``
|
||||
|
||||
You should see the sunshine and Xorg processing running:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
nvidia-smi
|
||||
|
||||
*Output:*
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
+---------------------------------------------------------------------------------------+
|
||||
| NVIDIA-SMI 535.104.05 Driver Version: 535.104.05 CUDA Version: 12.2 |
|
||||
|-----------------------------------------+----------------------+----------------------+
|
||||
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
|
||||
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
|
||||
| | | MIG M. |
|
||||
|=========================================+======================+======================|
|
||||
| 0 NVIDIA GeForce RTX 3070 Off | 00000000:01:00.0 On | N/A |
|
||||
| 30% 46C P2 45W / 220W | 549MiB / 8192MiB | 2% Default |
|
||||
| | | N/A |
|
||||
+-----------------------------------------+----------------------+----------------------+
|
||||
|
||||
+---------------------------------------------------------------------------------------+
|
||||
| Processes: |
|
||||
| GPU GI CI PID Type Process name GPU Memory |
|
||||
| ID ID Usage |
|
||||
|=======================================================================================|
|
||||
| 0 N/A N/A 1393 G /usr/lib/Xorg 86MiB |
|
||||
| 0 N/A N/A 1440 C+G sunshine 293MiB |
|
||||
+---------------------------------------------------------------------------------------+
|
||||
|
||||
#. Check ``/dev/uinput`` permissions
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
ls -l /dev/uinput
|
||||
|
||||
*Output:*
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
crw------- 1 <user> <primary_group> 10, 223 Aug 29 17:31 /dev/uinput
|
||||
|
||||
#. Connect to Sunshine host from a moonlight client
|
||||
|
||||
Now kill X and sunshine by running ``pkill X`` on the host,
|
||||
unplug your monitors from your GPU, and repeat steps 1 - 5.
|
||||
You should get the same result.
|
||||
With this setup you don't need to modify the Xorg config regardless if monitors are plugged in or not.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
pkill X
|
||||
|
||||
|
||||
SSH Client Script (Optional)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
At this point you have a working setup! For convenience I created this bash script to automate the
|
||||
startup of the X server and Sunshine on the host.
|
||||
This can be run on Unix systems, or on Windows using the ``git-bash`` or any bash shell.
|
||||
|
||||
For Android/iOS you can install Linux emulators, e.g. ``Userland`` for Android and ``ISH`` for iOS.
|
||||
The neat part is that you can execute one script to launch Sunshine from your phone or tablet!
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
ssh_args="<user>@192.168.X.X" # Or use alias set in ~/.ssh/config
|
||||
|
||||
check_ssh(){
|
||||
result=1
|
||||
# Note this checks infinitely, you could update this to have a max # of retries
|
||||
while [[ $result -ne 0 ]]
|
||||
do
|
||||
echo "checking host..."
|
||||
ssh $ssh_args "exit 0" 2>/dev/null
|
||||
result=$?
|
||||
[[ $result -ne 0 ]] && {
|
||||
echo "Failed to ssh to $ssh_args, with exit code $result"
|
||||
}
|
||||
sleep 3
|
||||
done
|
||||
echo "Host is ready for streaming!"
|
||||
}
|
||||
|
||||
start_stream(){
|
||||
echo "Starting sunshine server on host..."
|
||||
echo "Start moonlight on your client of choice"
|
||||
# -f runs ssh in the background
|
||||
ssh -f $ssh_args "~/scripts/sunshine.sh &"
|
||||
}
|
||||
|
||||
check_ssh
|
||||
start_stream
|
||||
exit_code=${?}
|
||||
|
||||
sleep 3
|
||||
exit ${exit_code}
|
||||
|
||||
Next Steps
|
||||
----------
|
||||
|
||||
Congrats you can now stream your desktop headless! When trying this the first time,
|
||||
keep your monitors close by incase something isn't working right.
|
||||
|
||||
If you have any feedback and any suggestions, feel free to make a post on Discord!
|
||||
|
||||
.. seealso::
|
||||
Now that you have a virtual display, you may want to automate changing the resolution
|
||||
and refresh rate prior to connecting to an app. See :ref:`Changing Resolution and
|
||||
Refresh Rate <about/guides/app_examples:linux>` for more information.
|
||||
@@ -1,9 +0,0 @@
|
||||
Linux
|
||||
======
|
||||
|
||||
Collection of Sunshine Linux host guides.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
headless_ssh
|
||||
@@ -27,7 +27,7 @@ Follow the instructions for your preferred package type below.
|
||||
|
||||
CUDA is used for NVFBC capture.
|
||||
|
||||
.. Tip:: See `CUDA GPUS <https://developer.nvidia.com/cuda-gpus>`__ to cross reference Compute Capability to your GPU.
|
||||
.. Tip:: See `CUDA GPUS <https://developer.nvidia.com/cuda-gpus>`_ to cross reference Compute Capability to your GPU.
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -36,15 +36,14 @@ CUDA is used for NVFBC capture.
|
||||
Package CUDA Version Min Driver CUDA Compute Capabilities
|
||||
=========================================== ============== ============== ================================
|
||||
PKGBUILD User dependent User dependent User dependent
|
||||
sunshine.AppImage 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90
|
||||
sunshine.pkg.tar.zst 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90
|
||||
sunshine_{arch}.flatpak 12.0.0 525.60.13 50;52;60;61;62;70;75;80;86;90
|
||||
sunshine-debian-bookworm-{arch}.deb 12.0.0 525.60.13 50;52;60;61;62;70;75;80;86;90
|
||||
sunshine-debian-bullseye-{arch}.deb 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90
|
||||
sunshine.AppImage 11.8.0 450.80.02 50;52;60;61;62;70;75;80;86;90;35
|
||||
sunshine.pkg.tar.zst 11.8.0 450.80.02 50;52;60;61;62;70;75;80;86;90;35
|
||||
sunshine_{arch}.flatpak 11.8.0 450.80.02 50;52;60;61;62;70;75;80;86;90;35
|
||||
sunshine-debian-bullseye-{arch}.deb 11.8.0 450.80.02 50;52;60;61;62;70;75;80;86;90;35
|
||||
sunshine-fedora-36-{arch}.rpm 12.0.0 525.60.13 50;52;60;61;62;70;75;80;86;90
|
||||
sunshine-fedora-37-{arch}.rpm 12.0.0 525.60.13 50;52;60;61;62;70;75;80;86;90
|
||||
sunshine-fedora-38-{arch}.rpm unavailable unavailable none
|
||||
sunshine-ubuntu-20.04-{arch}.deb 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90
|
||||
sunshine-ubuntu-22.04-{arch}.deb 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90
|
||||
sunshine-ubuntu-20.04-{arch}.deb 11.8.0 450.80.02 50;52;60;61;62;70;75;80;86;90;35
|
||||
sunshine-ubuntu-22.04-{arch}.deb 11.8.0 450.80.02 50;52;60;61;62;70;75;80;86;90;35
|
||||
=========================================== ============== ============== ================================
|
||||
|
||||
AppImage
|
||||
@@ -128,7 +127,7 @@ Uninstall:
|
||||
|
||||
Flatpak Package
|
||||
^^^^^^^^^^^^^^^
|
||||
#. Install `Flatpak <https://flatpak.org/setup/>`__ as required.
|
||||
#. 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.
|
||||
@@ -191,11 +190,11 @@ macOS
|
||||
-----
|
||||
Sunshine on macOS is experimental. Gamepads do not work. Other features may not work as expected.
|
||||
|
||||
dmg
|
||||
pkg
|
||||
^^^
|
||||
.. Warning:: The `dmg` does not include runtime dependencies.
|
||||
.. Warning:: The `pkg` does not include runtime dependencies.
|
||||
|
||||
#. Download the ``sunshine.dmg`` file and install it.
|
||||
#. Download the ``sunshine.pkg`` file and install it as normal.
|
||||
|
||||
Uninstall:
|
||||
.. code-block:: bash
|
||||
@@ -205,7 +204,7 @@ Uninstall:
|
||||
|
||||
Portfile
|
||||
^^^^^^^^
|
||||
#. Install `MacPorts <https://www.macports.org>`__
|
||||
#. Install `MacPorts <https://www.macports.org>`_
|
||||
#. Update the Macports sources.
|
||||
|
||||
.. code-block:: bash
|
||||
@@ -244,7 +243,7 @@ Installer
|
||||
.. 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
|
||||
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
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -21,33 +21,9 @@ Usage
|
||||
|
||||
.. 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
|
||||
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
|
||||
@@ -92,17 +68,22 @@ The `deb`, `rpm`, `Flatpak` and `AppImage` packages handle these steps automatic
|
||||
|
||||
Sunshine needs access to `uinput` to create mouse and gamepad events.
|
||||
|
||||
#. Create `udev` rules.
|
||||
#. Add user to group `input`, if this is the first time installing.
|
||||
.. code-block:: bash
|
||||
|
||||
echo 'KERNEL=="uinput", SUBSYSTEM=="misc", OPTIONS+="static_node=uinput", TAG+="uaccess"' | \
|
||||
sudo tee /etc/udev/rules.d/85-sunshine.rules
|
||||
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:: cfg
|
||||
.. code-block::
|
||||
|
||||
[Unit]
|
||||
Description=Sunshine self-hosted game stream host for Moonlight.
|
||||
@@ -164,8 +145,8 @@ Sunshine needs access to `uinput` to create mouse and gamepad events.
|
||||
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>`__.
|
||||
`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.
|
||||
|
||||
@@ -179,7 +160,7 @@ Configure autostart service
|
||||
|
||||
Windows
|
||||
^^^^^^^
|
||||
For gamepad support, install `Nefarius Virtual Gamepad <https://github.com/nefarius/ViGEmBus/releases/latest>`__
|
||||
For gamepad support, install `ViGEmBus <https://github.com/ViGEm/ViGEmBus/releases/latest>`_
|
||||
|
||||
Sunshine firewall
|
||||
**Add rule**
|
||||
@@ -225,7 +206,7 @@ Application List
|
||||
- ``"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:
|
||||
- Example application:
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
@@ -254,7 +235,6 @@ Application List
|
||||
- ``image-path`` - The full path to the cover art image to use.
|
||||
- ``name`` - The name of the application/game
|
||||
- ``output`` - The file where the output of the command is stored
|
||||
- ``auto-detach`` - Specifies whether the app should be treated as detached if it exits quickly
|
||||
- ``prep-cmd`` - A list of commands to be run before/after the application
|
||||
|
||||
- If any of the prep-commands fail, starting the application is aborted
|
||||
@@ -268,22 +248,16 @@ Application List
|
||||
|
||||
- ``working-dir`` - The working directory to use. If not specified, Sunshine will use the application directory.
|
||||
|
||||
- For more examples see :ref:`app examples <about/guides/app_examples:app examples>`.
|
||||
|
||||
Considerations
|
||||
--------------
|
||||
- On Windows, Sunshine uses the Desktop Duplication API which only supports capturing from the GPU used for display.
|
||||
If you want to capture and encode on the eGPU, connect a display or HDMI dummy display dongle to it and run the games
|
||||
on that display.
|
||||
- When an application is started, if there is an application already running, it will be terminated.
|
||||
- When the application has been shutdown, the stream shuts down as well.
|
||||
|
||||
- For example, if you attempt to run ``steam`` as a ``cmd`` instead of ``detached`` the stream will immediately fail.
|
||||
This is due to the method in which the steam process is executed. Other applications may behave similarly.
|
||||
|
||||
- The "Desktop" app works the same as any other application except it has no commands. It does not start an application,
|
||||
instead it simply starts a stream. If you removed it and would like to get it back, just add a new application with
|
||||
the name "Desktop" and "desktop.png" as the image path.
|
||||
- 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``.
|
||||
|
||||
HDR Support
|
||||
@@ -298,17 +272,10 @@ You must have an HDR-capable display or EDID emulator dongle connected to your h
|
||||
- Older games that use NVIDIA-specific NVAPI HDR rather than native Windows 10 OS HDR support may not display in HDR.
|
||||
- Some GPUs can produce lower image quality or encoding performance when streaming in HDR compared to SDR.
|
||||
|
||||
.. seealso::
|
||||
`Arch wiki on HDR Support for Linux <https://wiki.archlinux.org/title/HDR_monitor_support>`__ and
|
||||
`Reddit Guide for HDR Support for AMD GPUs
|
||||
<https://www.reddit.com/r/linux_gaming/comments/10m2gyx/guide_alpha_test_hdr_on_linux>`__
|
||||
|
||||
Tutorials and Guides
|
||||
--------------------
|
||||
Tutorials
|
||||
---------
|
||||
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.
|
||||
Tutorials are community generated. Want to contribute? Reach out to us on our discord server.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -4,10 +4,9 @@ Linux
|
||||
Requirements
|
||||
------------
|
||||
|
||||
Debian Bullseye/Bookworm
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
End of Life (Bullseye): July, 2024
|
||||
End of Life (Bookworm): TBD
|
||||
Debian Bullseye
|
||||
^^^^^^^^^^^^^^^
|
||||
End of Life: TBD
|
||||
|
||||
Install Requirements
|
||||
.. code-block:: bash
|
||||
@@ -16,17 +15,15 @@ Install Requirements
|
||||
build-essential \
|
||||
cmake \
|
||||
libavdevice-dev \
|
||||
libayatana-appindicator3-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-locale-dev \
|
||||
libboost-log-dev \
|
||||
libboost-program-options-dev \
|
||||
libboost-thread-dev \
|
||||
libcap-dev \ # KMS
|
||||
libcurl4-openssl-dev \
|
||||
libdrm-dev \ # KMS
|
||||
libevdev-dev \
|
||||
libmfx-dev \ # x86_64 only
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
libopus-dev \
|
||||
libpulse-dev \
|
||||
@@ -46,8 +43,9 @@ Install Requirements
|
||||
nvidia-cuda-dev \ # Cuda, NvFBC
|
||||
nvidia-cuda-toolkit # Cuda, NvFBC
|
||||
|
||||
Fedora 37, 38
|
||||
Fedora 36, 37
|
||||
^^^^^^^^^^^^^
|
||||
End of Life: TBD
|
||||
|
||||
Install Requirements
|
||||
.. code-block:: bash
|
||||
@@ -60,12 +58,10 @@ Install Requirements
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
intel-mediasdk-devel \ # x86_64 only
|
||||
libappindicator-gtk3-devel \
|
||||
libcap-devel \
|
||||
libcurl-devel \
|
||||
libdrm-devel \
|
||||
libevdev-devel \
|
||||
libnotify-devel \
|
||||
libva-devel \
|
||||
libvdpau-devel \
|
||||
libX11-devel \ # X11
|
||||
@@ -97,17 +93,15 @@ Install Requirements
|
||||
build-essential \
|
||||
cmake \
|
||||
g++-10 \
|
||||
libayatana-appindicator3-dev \
|
||||
libavdevice-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-locale-dev \
|
||||
libboost-log-dev \
|
||||
libboost-thread-dev \
|
||||
libboost-program-options-dev \
|
||||
libcap-dev \ # KMS
|
||||
libdrm-dev \ # KMS
|
||||
libevdev-dev \
|
||||
libmfx-dev \ # x86_64 only
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
libopus-dev \
|
||||
libpulse-dev \
|
||||
@@ -146,17 +140,15 @@ Install Requirements
|
||||
sudo apt update && sudo apt install \
|
||||
build-essential \
|
||||
cmake \
|
||||
libappindicator3-dev \
|
||||
libavdevice-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-locale-dev \
|
||||
libboost-log-dev \
|
||||
libboost-thread-dev \
|
||||
libboost-program-options-dev \
|
||||
libcap-dev \ # KMS
|
||||
libdrm-dev \ # KMS
|
||||
libevdev-dev \
|
||||
libmfx-dev \ # x86_64 only
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
libopus-dev \
|
||||
libpulse-dev \
|
||||
@@ -179,14 +171,14 @@ CUDA
|
||||
If the version of CUDA available from your distro is not adequate, manually install CUDA.
|
||||
|
||||
.. Tip:: The version of CUDA you use will determine compatibility with various GPU generations.
|
||||
See `CUDA compatibility <https://docs.nvidia.com/deploy/cuda-compatibility/index.html>`__ for more info.
|
||||
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>`__.
|
||||
`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 \
|
||||
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
|
||||
|
||||
@@ -5,7 +5,7 @@ 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
|
||||
""""""""
|
||||
@@ -19,7 +19,7 @@ Homebrew
|
||||
Install Requirements
|
||||
.. code-block:: bash
|
||||
|
||||
brew install boost cmake node opus pkg-config
|
||||
brew install boost cmake node opus
|
||||
# if there are issues with an SSL header that is not found:
|
||||
cd /usr/local/include
|
||||
ln -s ../opt/openssl/include/openssl .
|
||||
|
||||
@@ -3,7 +3,7 @@ Windows
|
||||
|
||||
Requirements
|
||||
------------
|
||||
First you need to install `MSYS2 <https://www.msys2.org>`__, then startup "MSYS2 MinGW 64-bit" and execute the following
|
||||
First you need to install `MSYS2 <https://www.msys2.org>`_, then startup "MSYS2 MinGW 64-bit" and execute the following
|
||||
codes.
|
||||
|
||||
Update all packages:
|
||||
@@ -16,12 +16,12 @@ Install dependencies:
|
||||
|
||||
pacman -S base-devel cmake diffutils gcc git make mingw-w64-x86_64-binutils \
|
||||
mingw-w64-x86_64-boost mingw-w64-x86_64-cmake mingw-w64-x86_64-curl \
|
||||
mingw-w64-x86_64-onevpl mingw-w64-x86_64-openssl mingw-w64-x86_64-opus \
|
||||
mingw-w64-x86_64-libmfx mingw-w64-x86_64-openssl mingw-w64-x86_64-opus \
|
||||
mingw-w64-x86_64-toolchain
|
||||
|
||||
npm dependencies
|
||||
----------------
|
||||
Install nodejs and npm. Downloads available `here <https://nodejs.org/en/download/>`__.
|
||||
Install nodejs and npm. Downloads available `here <https://nodejs.org/en/download/>`_.
|
||||
|
||||
Install npm dependencies.
|
||||
.. code-block:: bash
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
from datetime import datetime
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
|
||||
|
||||
# -- Path setup --------------------------------------------------------------
|
||||
@@ -23,7 +22,7 @@ root_dir = os.path.dirname(source_dir) # the root folder directory
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
project = 'Sunshine'
|
||||
project_copyright = f'{datetime.now ().year}, {project}'
|
||||
copyright = f'{datetime.now ().year}, {project}'
|
||||
author = 'ReenigneArcher'
|
||||
|
||||
# The full version, including alpha/beta/rc tags
|
||||
@@ -44,14 +43,11 @@ To use cmake method for obtaining version instead of regex,
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
extensions = [
|
||||
'breathe', # c++ support for sphinx with doxygen
|
||||
'm2r2', # enable markdown files
|
||||
'sphinx.ext.autosectionlabel',
|
||||
'sphinx.ext.todo', # enable to-do sections
|
||||
'sphinx.ext.graphviz', # enable graphs for breathe
|
||||
'sphinx.ext.viewcode', # add links to view source code
|
||||
'sphinx_copybutton', # add a copy button to code blocks
|
||||
'sphinx_inline_tabs', # add tabs
|
||||
]
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
@@ -68,15 +64,13 @@ source_suffix = ['.rst', '.md']
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
|
||||
# images
|
||||
html_favicon = os.path.join(root_dir, 'src_assets', 'common', 'assets', 'web', 'images', 'sunshine.ico')
|
||||
html_logo = os.path.join(root_dir, 'sunshine.png')
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
# html_static_path = ['_static']
|
||||
|
||||
html_logo = os.path.join(root_dir, 'sunshine.png')
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
html_theme = 'furo'
|
||||
@@ -88,24 +82,4 @@ html_theme_options = {
|
||||
|
||||
# extension config options
|
||||
autosectionlabel_prefix_document = True # Make sure the target is unique
|
||||
breathe_default_project = 'src'
|
||||
breathe_implementation_filename_extensions = ['.c', '.cc', '.cpp', '.mm']
|
||||
breathe_order_parameters_first = False
|
||||
breathe_projects = dict(
|
||||
src="../build/doxyxml"
|
||||
)
|
||||
todo_include_todos = True
|
||||
|
||||
# disable epub mimetype warnings
|
||||
# https://github.com/readthedocs/readthedocs.org/blob/eadf6ac6dc6abc760a91e1cb147cc3c5f37d1ea8/docs/conf.py#L235-L236
|
||||
suppress_warnings = ["epub.unknown_project_files"]
|
||||
|
||||
# get doxygen version
|
||||
doxy_proc = subprocess.run('doxygen --version', shell=True, cwd=source_dir, capture_output=True)
|
||||
doxy_version = doxy_proc.stdout.decode('utf-8').strip()
|
||||
print('doxygen version: ' + doxy_version)
|
||||
|
||||
# run doxygen
|
||||
doxy_proc = subprocess.run('doxygen Doxyfile', shell=True, cwd=source_dir)
|
||||
if doxy_proc.returncode != 0:
|
||||
raise RuntimeError('doxygen failed with return code ' + str(doxy_proc.returncode))
|
||||
|
||||
@@ -2,4 +2,4 @@ Contributing
|
||||
============
|
||||
|
||||
Read our contribution guide in our organization level
|
||||
`docs <https://lizardbyte.readthedocs.io/en/latest/developers/contributing.html>`__.
|
||||
`docs <https://lizardbyte.readthedocs.io/en/latest/developers/contributing.html>`_.
|
||||
|
||||
@@ -1,14 +1,26 @@
|
||||
Localization
|
||||
============
|
||||
Sunshine and related LizardByte projects are being localized into various languages. The default language is
|
||||
`en` (English).
|
||||
Sunshine is being localized into various languages. The default language is `en` (English) and is highlighted green.
|
||||
|
||||
.. image:: https://badges.awesome-crowdin.com/translation-15178612-606145.png
|
||||
.. image:: https://img.shields.io/badge/dynamic/json?color=blue&label=de&style=for-the-badge&query=%24.progress.0.data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-15178612-503956.json
|
||||
.. image:: https://img.shields.io/badge/dynamic/json?color=green&label=en&style=for-the-badge&query=%24.progress.1.data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-15178612-503956.json
|
||||
.. image:: https://img.shields.io/badge/dynamic/json?color=blue&label=en-GB&style=for-the-badge&query=%24.progress.2.data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-15178612-503956.json
|
||||
.. image:: https://img.shields.io/badge/dynamic/json?color=blue&label=en-US&style=for-the-badge&query=%24.progress.3.data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-15178612-503956.json
|
||||
.. image:: https://img.shields.io/badge/dynamic/json?color=blue&label=es-ES&style=for-the-badge&query=%24.progress.4.data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-15178612-503956.json
|
||||
.. image:: https://img.shields.io/badge/dynamic/json?color=blue&label=fr&style=for-the-badge&query=%24.progress.5.data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-15178612-503956.json
|
||||
.. image:: https://img.shields.io/badge/dynamic/json?color=blue&label=it&style=for-the-badge&query=%24.progress.6.data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-15178612-503956.json
|
||||
.. image:: https://img.shields.io/badge/dynamic/json?color=blue&label=ru&style=for-the-badge&query=%24.progress.7.data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-15178612-503956.json
|
||||
|
||||
Graph
|
||||
.. image:: https://badges.awesome-crowdin.com/translation-15178612-503956.png
|
||||
|
||||
CrowdIn
|
||||
-------
|
||||
The translations occur on `CrowdIn <https://translate.lizardbyte.dev/>`__. Anyone is free to contribute to
|
||||
localization there.
|
||||
The translations occur on
|
||||
`CrowdIn <https://crowdin.com/project/sunshinestream>`_. Feel free to contribute to localization there.
|
||||
Only elements of the API are planned to be translated.
|
||||
|
||||
.. Attention:: The rest API has not yet been implemented.
|
||||
|
||||
**Translations Basics**
|
||||
- The brand names `LizardByte` and `Sunshine` should never be translated.
|
||||
@@ -37,12 +49,10 @@ situations. For example if a system tray icon is added it should be localized as
|
||||
.. code-block:: cpp
|
||||
|
||||
#include <boost/locale.hpp>
|
||||
#include <string>
|
||||
|
||||
std::string msg = boost::locale::translate("Hello world!");
|
||||
boost::locale::translate("Hello world!")
|
||||
|
||||
.. Tip:: More examples can be found in the documentation for
|
||||
`boost locale <https://www.boost.org/doc/libs/1_70_0/libs/locale/doc/html/messages_formatting.html>`__.
|
||||
`boost locale <https://www.boost.org/doc/libs/1_70_0/libs/locale/doc/html/messages_formatting.html>`_.
|
||||
|
||||
.. Warning:: This is for information only. Contributors should never include manually updated template files, or
|
||||
manually compiled language files in Pull Requests.
|
||||
@@ -58,7 +68,7 @@ any of the following paths are modified.
|
||||
|
||||
When testing locally it may be desirable to manually extract, initialize, update, and compile strings. Python is
|
||||
required for this, along with the python dependencies in the `./scripts/requirements.txt` file. Additionally,
|
||||
`xgettext <https://www.gnu.org/software/gettext/>`__ must be installed.
|
||||
`xgettext <https://www.gnu.org/software/gettext/>`_ must be installed.
|
||||
|
||||
**Extract, initialize, and update**
|
||||
.. code-block:: bash
|
||||
|
||||
@@ -13,22 +13,12 @@ Test clang-format locally.
|
||||
|
||||
Sphinx
|
||||
------
|
||||
Sunshine uses `Sphinx <https://www.sphinx-doc.org/en/master/>`__ for documentation building. Sphinx, along with other
|
||||
required python dependencies are included in the `./docs/requirements.txt` file. Python is required to build
|
||||
Sunshine uses `Sphinx <https://www.sphinx-doc.org/en/master/>`_ for documentation building. Sphinx, along with other
|
||||
required documentation depencies are included in the `./docs/requirements.txt` file. Python is required to build
|
||||
sphinx docs. Installation and setup of python will not be covered here.
|
||||
|
||||
Doxygen is used to generate the XML files required by Sphinx. Doxygen can be obtained from
|
||||
`Doxygen downloads <https://www.doxygen.nl/download.html>`__. Ensure that the `doxygen` executable is in your path.
|
||||
|
||||
.. seealso::
|
||||
Sphinx is configured to use the graphviz extension. To obtain the dot executable from the Graphviz library,
|
||||
see the `library’s downloads section <https://graphviz.org/download/>`__.
|
||||
|
||||
|
||||
The config file for Sphinx is `docs/source/conf.py`. This is already included in the repo and should not be modified.
|
||||
|
||||
The config file for Doxygen is `docs/Doxyfile`. This is already included in the repo and should not be modified.
|
||||
|
||||
Test with Sphinx
|
||||
.. code-block:: bash
|
||||
|
||||
@@ -42,21 +32,6 @@ Test with Sphinx
|
||||
cd docs
|
||||
sphinx-build -b html source build
|
||||
|
||||
Lint with rstcheck
|
||||
.. code-block:: bash
|
||||
|
||||
rstcheck -r .
|
||||
|
||||
Check formatting with rstfmt
|
||||
.. code-block:: bash
|
||||
|
||||
rstfmt --check --diff -w 120 .
|
||||
|
||||
Format inplace with rstfmt
|
||||
.. code-block:: bash
|
||||
|
||||
rstfmt -w 120 .
|
||||
|
||||
Unit Testing
|
||||
------------
|
||||
.. Todo:: Sunshine does not currently have any unit tests. If you would like to help us improve please get in contact
|
||||
|
||||
@@ -7,19 +7,11 @@ outperforms GameStream, so rest assured that Sunshine will be equally performant
|
||||
Migration
|
||||
---------
|
||||
We have developed a simple migration tool to help you migrate your GameStream games and apps to Sunshine automatically.
|
||||
Please check out our `GSMS <https://github.com/LizardByte/GSMS>`__ project if you're interested in an automated
|
||||
Please check out our `GSMS <https://github.com/LizardByte/GSMS>`_ project if you're interested in an automated
|
||||
migration option. At the time of writing this GSMS offers the ability to migrate your custom games and apps. The
|
||||
working directory, command, and image are all set in Sunshine's ``apps.json`` file. The box-art image is also copied
|
||||
to a specified directory.
|
||||
|
||||
Internet Streaming
|
||||
------------------
|
||||
If you are using the Moonlight Internet Hosting Tool, you can remove it from your system when you migrate to Sunshine.
|
||||
To stream over the Internet with Sunshine and a UPnP-capable router, enable the UPnP option in the Sunshine Web UI.
|
||||
|
||||
.. note:: Running Sunshine together with versions of the Moonlight Internet Hosting Tool prior to v5.6 will cause UPnP
|
||||
port forwarding to become unreliable. Either uninstall the tool entirely or update it to v5.6 or later.
|
||||
|
||||
Limitations
|
||||
-----------
|
||||
Sunshine does have some limitations, as compared to Nvidia GameStream.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/index.rst
|
||||
|
||||
Table of Contents
|
||||
=================
|
||||
.. include:: toc.rst
|
||||
|
||||
@@ -4,7 +4,7 @@ Legal
|
||||
any legal questions or concerns about using Sunshine, we recommend consulting with a lawyer.
|
||||
|
||||
Sunshine is licensed under the GPL-3.0 license, which allows for free use and modification of the software.
|
||||
The full text of the license can be reviewed `here <https://github.com/LizardByte/Sunshine/blob/master/LICENSE>`__.
|
||||
The full text of the license can be reviewed `here <https://github.com/LizardByte/Sunshine/blob/master/LICENSE>`_.
|
||||
|
||||
Commercial Use
|
||||
--------------
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
src
|
||||
===
|
||||
We are in process of improving the source code documentation. Code should be documented using Doxygen syntax.
|
||||
Some examples exist in `main.h` and `main.cpp`. In order for documentation within the code to appear in the
|
||||
rendered docs, the definition of the object must be in a header file, although the documentation itself can (and
|
||||
should) be in the source file.
|
||||
|
||||
Example Documentation Blocks
|
||||
----------------------------
|
||||
|
||||
**file.h**
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
// functions
|
||||
int main(int argc, char *argv[]);
|
||||
|
||||
**file.cpp** (with markdown)
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
/**
|
||||
* @brief Main application entry point.
|
||||
* @param argc The number of arguments.
|
||||
* @param argv The arguments.
|
||||
*
|
||||
* EXAMPLES:
|
||||
* ```cpp
|
||||
* main(1, const char* args[] = {"hello", "markdown", nullptr});
|
||||
* ```
|
||||
*/
|
||||
int main(int argc, char *argv[]) {
|
||||
// do stuff
|
||||
}
|
||||
|
||||
**file.cpp** (with ReStructuredText)
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
/**
|
||||
* @brief Main application entry point.
|
||||
* @param argc The number of arguments.
|
||||
* @param argv The arguments.
|
||||
* @rst
|
||||
* EXAMPLES:
|
||||
*
|
||||
* .. code-block:: cpp
|
||||
* main(1, const char* args[] = {"hello", "rst", nullptr});
|
||||
* @endrst
|
||||
*/
|
||||
int main(int argc, char *argv[]) {
|
||||
// do stuff
|
||||
}
|
||||
|
||||
Code
|
||||
----
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: src
|
||||
|
||||
src/main
|
||||
src/audio
|
||||
src/cbs
|
||||
src/config
|
||||
src/confighttp
|
||||
src/crypto
|
||||
src/httpcommon
|
||||
src/input
|
||||
src/move_by_copy
|
||||
src/network
|
||||
src/nvhttp
|
||||
src/process
|
||||
src/round_robin
|
||||
src/rtsp
|
||||
src/stream
|
||||
src/sync
|
||||
src/system_tray
|
||||
src/task_pool
|
||||
src/thread_pool
|
||||
src/thread_safe
|
||||
src/upnp
|
||||
src/utility
|
||||
src/uuid
|
||||
src/video
|
||||
src/platform
|
||||
@@ -1,5 +0,0 @@
|
||||
audio
|
||||
=====
|
||||
|
||||
.. doxygenfile:: audio.h
|
||||
:allow-dot-graphs:
|
||||
@@ -1,5 +0,0 @@
|
||||
cbs
|
||||
===
|
||||
|
||||
.. doxygenfile:: cbs.h
|
||||
:allow-dot-graphs:
|
||||
@@ -1,5 +0,0 @@
|
||||
config
|
||||
======
|
||||
|
||||
.. doxygenfile:: config.h
|
||||
:allow-dot-graphs:
|
||||
@@ -1,5 +0,0 @@
|
||||
confighttp
|
||||
==========
|
||||
|
||||
.. doxygenfile:: confighttp.h
|
||||
:allow-dot-graphs:
|
||||
@@ -1,5 +0,0 @@
|
||||
crypto
|
||||
======
|
||||
|
||||
.. doxygenfile:: crypto.h
|
||||
:allow-dot-graphs:
|
||||
@@ -1,5 +0,0 @@
|
||||
httpcommon
|
||||
==========
|
||||
|
||||
.. doxygenfile:: httpcommon.h
|
||||
:allow-dot-graphs:
|
||||
@@ -1,5 +0,0 @@
|
||||
input
|
||||
=====
|
||||
|
||||
.. doxygenfile:: input.h
|
||||
:allow-dot-graphs:
|
||||
@@ -1,5 +0,0 @@
|
||||
main
|
||||
====
|
||||
|
||||
.. doxygenfile:: main.h
|
||||
:allow-dot-graphs:
|
||||
@@ -1,5 +0,0 @@
|
||||
move_by_copy
|
||||
============
|
||||
|
||||
.. doxygenfile:: move_by_copy.h
|
||||
:allow-dot-graphs:
|
||||
@@ -1,5 +0,0 @@
|
||||
network
|
||||
=======
|
||||
|
||||
.. doxygenfile:: network.h
|
||||
:allow-dot-graphs:
|
||||
@@ -1,5 +0,0 @@
|
||||
nvhttp
|
||||
======
|
||||
|
||||
.. doxygenfile:: nvhttp.h
|
||||
:allow-dot-graphs:
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user