mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-08-10 00:52:16 +00:00
Compare commits
200 Commits
renovate/c
...
v0.22.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c63637f02f | ||
|
|
529f1b84f8 | ||
|
|
8d5a9054ec | ||
|
|
5606840c89 | ||
|
|
1ab30aa70b | ||
|
|
75a97883e7 | ||
|
|
e430f51e2f | ||
|
|
cb57322190 | ||
|
|
8081f4167e | ||
|
|
2e97c55005 | ||
|
|
84316b5ccd | ||
|
|
dfb212cc3c | ||
|
|
e9bb5697b0 | ||
|
|
4252f5df7c | ||
|
|
15272fb47e | ||
|
|
a0d5973799 | ||
|
|
1020d0c133 | ||
|
|
83e3ea5aa7 | ||
|
|
53b2217a34 | ||
|
|
c605a4da2b | ||
|
|
11c5b64d39 | ||
|
|
8a7a6c48f8 | ||
|
|
c6f94e93e0 | ||
|
|
dde804f14b | ||
|
|
341fdaad77 | ||
|
|
8074bf8c8d | ||
|
|
d1a635809a | ||
|
|
56da68c863 | ||
|
|
6ddc4b7ba3 | ||
|
|
69a3edd9b0 | ||
|
|
8689469ea8 | ||
|
|
a420760d36 | ||
|
|
65493d09e8 | ||
|
|
78ed91af5c | ||
|
|
c0ad9639c4 | ||
|
|
11c8cf176c | ||
|
|
cd2153f340 | ||
|
|
1c50bc502b | ||
|
|
d91e2c9ecb | ||
|
|
358aac9277 | ||
|
|
aa76b2398b | ||
|
|
ee93890d86 | ||
|
|
0aa4f06c39 | ||
|
|
8373a8b947 | ||
|
|
aee88f336a | ||
|
|
38d45b39ae | ||
|
|
ff8c8ce3ab | ||
|
|
040c3a6916 | ||
|
|
76e160bb0a | ||
|
|
dea1155983 | ||
|
|
be6f856840 | ||
|
|
b7a3985807 | ||
|
|
71d88ef9c9 | ||
|
|
3578727ff9 | ||
|
|
f80b23750b | ||
|
|
ca29eac53a | ||
|
|
e62d6915db | ||
|
|
328a300550 | ||
|
|
2008bc0eaa | ||
|
|
bb3b7984f3 | ||
|
|
5c9533f6d7 | ||
|
|
c7700f96fc | ||
|
|
fe8b0bad92 | ||
|
|
190ea41b2e | ||
|
|
5e948dc835 | ||
|
|
f82c3cbc99 | ||
|
|
f70c3f1c0e | ||
|
|
cf416f55e1 | ||
|
|
8182f592e8 | ||
|
|
9a3553db04 | ||
|
|
3b11bc86b0 | ||
|
|
a15bd65391 | ||
|
|
9dfe97d405 | ||
|
|
65851407b1 | ||
|
|
3f31400e7f | ||
|
|
75b6e1f1d8 | ||
|
|
0d4dfcd708 | ||
|
|
52511f3ccb | ||
|
|
fe886632dc | ||
|
|
6ded2a9577 | ||
|
|
ede59e17d8 | ||
|
|
66150872b0 | ||
|
|
270716b862 | ||
|
|
bf1b9a20ec | ||
|
|
bed58cf8b9 | ||
|
|
a10ec3a98a | ||
|
|
c88fa655f5 | ||
|
|
23fb07d4a2 | ||
|
|
2f80145b8e | ||
|
|
6b5a712506 | ||
|
|
3d6e7f447a | ||
|
|
77b0bab374 | ||
|
|
6cdb7f7d03 | ||
|
|
2e995355dc | ||
|
|
21e4450ee1 | ||
|
|
404b434754 | ||
|
|
f64712f277 | ||
|
|
8a86678d62 | ||
|
|
b94f8c0b50 | ||
|
|
df2d728af7 | ||
|
|
35b785ebb8 | ||
|
|
701b7081b1 | ||
|
|
d0049da2df | ||
|
|
c1a3903d20 | ||
|
|
bc3ab8a000 | ||
|
|
ec1ae4a3fe | ||
|
|
1ccda51df9 | ||
|
|
937d0d810c | ||
|
|
545af98459 | ||
|
|
056281b745 | ||
|
|
3fb384f868 | ||
|
|
593e170da8 | ||
|
|
d05a67166e | ||
|
|
de7b81e3b4 | ||
|
|
d873c8b088 | ||
|
|
b5fae464b6 | ||
|
|
88d46914ca | ||
|
|
60c95d6385 | ||
|
|
f88df0f596 | ||
|
|
791ed48a3f | ||
|
|
7d751f050e | ||
|
|
c7e5df5976 | ||
|
|
bc6cc2078e | ||
|
|
0dff8b16fd | ||
|
|
ebe01ce20b | ||
|
|
3adf9e5967 | ||
|
|
e1771de37a | ||
|
|
0403ad147a | ||
|
|
1bd45ca803 | ||
|
|
556d9586e9 | ||
|
|
a01a15a54b | ||
|
|
43992e7e9b | ||
|
|
0f640b8dd9 | ||
|
|
a9b459cdb1 | ||
|
|
beb51cc925 | ||
|
|
52e5662dd9 | ||
|
|
e7a3c485ee | ||
|
|
9a3106fcef | ||
|
|
caf5e02d8b | ||
|
|
3ca75bee19 | ||
|
|
729922d2c0 | ||
|
|
6ea836c511 | ||
|
|
97c921629a | ||
|
|
852db4877d | ||
|
|
c0164caaaa | ||
|
|
a452402267 | ||
|
|
8d14e7c6f1 | ||
|
|
faeeb7ec57 | ||
|
|
44b34d1e23 | ||
|
|
fe3bf0ee6f | ||
|
|
64be0aa67a | ||
|
|
d97f724e3b | ||
|
|
8efc15b58f | ||
|
|
a6ffeb4b53 | ||
|
|
66e31a21fb | ||
|
|
7640c504fa | ||
|
|
081936879b | ||
|
|
a9f2679a49 | ||
|
|
11d472362c | ||
|
|
0d7811ad43 | ||
|
|
eca26e664b | ||
|
|
1540f2cd52 | ||
|
|
b215fe0cd9 | ||
|
|
c27725c73b | ||
|
|
0e479bd476 | ||
|
|
96e7443cab | ||
|
|
5bdbda90b5 | ||
|
|
6b7b5996cc | ||
|
|
068c3fa303 | ||
|
|
4c984cacb5 | ||
|
|
88fc8f845b | ||
|
|
ef9ec40509 | ||
|
|
09ab49a869 | ||
|
|
1dbfdbcf4f | ||
|
|
a932f6bee8 | ||
|
|
a851ef6068 | ||
|
|
a009d1314f | ||
|
|
47b5fc1fc0 | ||
|
|
4a2f7023ec | ||
|
|
6dcc5e7c0f | ||
|
|
bd03ef974c | ||
|
|
3b9e37e1dd | ||
|
|
336062d467 | ||
|
|
29a1b1539f | ||
|
|
0a563947ea | ||
|
|
5bca024899 | ||
|
|
31e8b798da | ||
|
|
d70d084f9f | ||
|
|
483e2259d4 | ||
|
|
0dfbcfdbc4 | ||
|
|
956341930b | ||
|
|
446825b73d | ||
|
|
09dff34105 | ||
|
|
b2c5da2cfc | ||
|
|
b2fe0423d2 | ||
|
|
08d623ce44 | ||
|
|
e1b112cafd | ||
|
|
8509ee72c3 | ||
|
|
1e6d9da2d6 | ||
|
|
660d8e191c |
@@ -15,6 +15,7 @@ sudo apt-get install -y \
|
||||
libcurl4-openssl-dev \
|
||||
libdrm-dev \
|
||||
libevdev-dev \
|
||||
libminiupnpc-dev \
|
||||
libmfx-dev \
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
|
||||
96
.github/workflows/CI.yml
vendored
96
.github/workflows/CI.yml
vendored
@@ -251,7 +251,7 @@ jobs:
|
||||
../artifacts/sunshine_debug_${{ matrix.arch }}.flatpak dev.lizardbyte.sunshine.Debug'
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sunshine-linux-flatpak-${{ matrix.arch }}
|
||||
path: artifacts/
|
||||
@@ -286,7 +286,7 @@ jobs:
|
||||
- name: Maximize build space
|
||||
uses: easimon/maximize-build-space@v8
|
||||
with:
|
||||
root-reserve-mb: 20480
|
||||
root-reserve-mb: 30720
|
||||
remove-dotnet: 'true'
|
||||
remove-android: 'true'
|
||||
remove-haskell: 'true'
|
||||
@@ -325,7 +325,7 @@ jobs:
|
||||
# install newer tar from focal... appimagelint fails on 18.04 without this
|
||||
echo "original tar version"
|
||||
tar --version
|
||||
wget -O tar.deb http://security.ubuntu.com/ubuntu/pool/main/t/tar/tar_1.30+dfsg-7ubuntu0.20.04.2_amd64.deb
|
||||
wget -O tar.deb http://security.ubuntu.com/ubuntu/pool/main/t/tar/tar_1.30+dfsg-7ubuntu0.20.04.3_amd64.deb
|
||||
sudo apt-get -y install -f ./tar.deb
|
||||
echo "new tar version"
|
||||
tar --version
|
||||
@@ -350,6 +350,7 @@ jobs:
|
||||
libcurl4-openssl-dev \
|
||||
libdrm-dev \
|
||||
libevdev-dev \
|
||||
libminiupnpc-dev \
|
||||
libmfx-dev \
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
@@ -398,10 +399,10 @@ jobs:
|
||||
mkdir -p build
|
||||
mkdir -p artifacts
|
||||
|
||||
npm install
|
||||
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
cmake \
|
||||
-DBUILD_WERROR=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DSUNSHINE_ASSETS_DIR=share/sunshine \
|
||||
-DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
|
||||
@@ -427,7 +428,9 @@ 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)
|
||||
run: |
|
||||
version=${{ needs.check_changelog.outputs.next_version_bare }}
|
||||
echo "VERSION=${version}" >> $GITHUB_ENV
|
||||
@@ -483,7 +486,7 @@ jobs:
|
||||
./appimagelint-x86_64.AppImage ./artifacts/sunshine.AppImage
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sunshine-linux-${{ matrix.type }}-${{ matrix.dist }}
|
||||
path: artifacts/
|
||||
@@ -506,6 +509,8 @@ jobs:
|
||||
name: MacOS
|
||||
runs-on: macos-11
|
||||
needs: [check_changelog, setup_release]
|
||||
env:
|
||||
BOOST_VERSION: 1.83.0
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -516,10 +521,54 @@ jobs:
|
||||
- name: Setup Dependencies MacOS
|
||||
run: |
|
||||
# install dependencies using homebrew
|
||||
brew install boost cmake curl node opus pkg-config
|
||||
brew install cmake curl miniupnpc node openssl opus pkg-config
|
||||
|
||||
# fix openssl header not found
|
||||
ln -sf /usr/local/opt/openssl/include/openssl /usr/local/include/openssl
|
||||
# ln -sf /usr/local/opt/openssl/include/openssl /usr/local/include/openssl
|
||||
|
||||
# by installing boost from source, several headers cannot be found...
|
||||
# the above commented out link only works if boost is installed from homebrew... does not make sense
|
||||
ln -sf $(find /usr/local/Cellar -type d -name "openssl" -path "*/openssl@3/*/include" | head -n 1) \
|
||||
/usr/local/include/openssl
|
||||
|
||||
# fix opus header not found
|
||||
ln -sf $(find /usr/local/Cellar -type d -name "opus" -path "*/opus/*/include" | head -n 1) \
|
||||
/usr/local/include/opus
|
||||
|
||||
# fix miniupnpc header not found
|
||||
ln -sf $(find /usr/local/Cellar -type d -name "miniupnpc" -path "*/miniupnpc/*/include" | head -n 1) \
|
||||
/usr/local/include/miniupnpc
|
||||
|
||||
- name: Install Boost
|
||||
# installing boost from homebrew takes 30 minutes in a GitHub runner
|
||||
run: |
|
||||
export BOOST_ROOT=${HOME}/boost-${BOOST_VERSION}
|
||||
|
||||
# install boost
|
||||
wget \
|
||||
https://github.com/boostorg/boost/releases/download/boost-${BOOST_VERSION}/boost-${BOOST_VERSION}.tar.gz \
|
||||
--progress=bar:force:noscroll -q --show-progress
|
||||
tar xf boost-${BOOST_VERSION}.tar.gz
|
||||
cd boost-${BOOST_VERSION}
|
||||
|
||||
# libdir should be set by --prefix but isn't
|
||||
./bootstrap.sh \
|
||||
--prefix=${BOOST_ROOT} \
|
||||
--libdir=${BOOST_ROOT}/lib \
|
||||
--with-libraries=locale,log,program_options,system,thread
|
||||
./b2 headers
|
||||
./b2 install \
|
||||
--prefix=${BOOST_ROOT} \
|
||||
--libdir=${BOOST_ROOT}/lib \
|
||||
-j$(sysctl -n hw.ncpu) \
|
||||
link=shared,static \
|
||||
variant=release \
|
||||
cxxflags=-std=c++14 \
|
||||
cxxflags=-stdlib=libc++ \
|
||||
linkflags=-stdlib=libc++
|
||||
|
||||
# put boost in cmake prefix path
|
||||
echo "BOOST_ROOT=${BOOST_ROOT}" >> ${GITHUB_ENV}
|
||||
|
||||
- name: Build MacOS
|
||||
env:
|
||||
@@ -527,16 +576,16 @@ jobs:
|
||||
BUILD_VERSION: ${{ needs.check_changelog.outputs.next_version_bare }}
|
||||
COMMIT: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||
run: |
|
||||
npm install
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
cmake \
|
||||
-DBUILD_WERROR=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DSUNSHINE_ASSETS_DIR=local/sunshine/assets \
|
||||
-DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
|
||||
..
|
||||
make -j ${nproc}
|
||||
make -j $(sysctl -n hw.ncpu)
|
||||
|
||||
- name: Package MacOS
|
||||
run: |
|
||||
@@ -551,7 +600,7 @@ jobs:
|
||||
# mv ./cpack_artifacts/Sunshine.dmg ../artifacts/sunshine-bundle.dmg
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sunshine-macos
|
||||
path: artifacts/
|
||||
@@ -676,7 +725,7 @@ jobs:
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sunshine-macports
|
||||
path: artifacts/
|
||||
@@ -719,8 +768,11 @@ 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-miniupnpc
|
||||
mingw-w64-x86_64-nlohmann-json
|
||||
mingw-w64-x86_64-nodejs
|
||||
mingw-w64-x86_64-nsis
|
||||
mingw-w64-x86_64-onevpl
|
||||
mingw-w64-x86_64-openssl
|
||||
mingw-w64-x86_64-opus
|
||||
mingw-w64-x86_64-toolchain
|
||||
@@ -728,10 +780,6 @@ jobs:
|
||||
wget
|
||||
yasm
|
||||
|
||||
- name: Install npm packages
|
||||
run: |
|
||||
npm install
|
||||
|
||||
- name: Build Windows
|
||||
shell: msys2 {0}
|
||||
env:
|
||||
@@ -741,7 +789,9 @@ jobs:
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
cmake \
|
||||
-DBUILD_WERROR=ON \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DSUNSHINE_ASSETS_DIR=assets \
|
||||
-G "MinGW Makefiles" \
|
||||
..
|
||||
@@ -771,7 +821,7 @@ jobs:
|
||||
a "../artifacts/sunshine-debuginfo-win32.zip" "*.exe"
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sunshine-windows
|
||||
path: artifacts/
|
||||
|
||||
2
.github/workflows/automerge.yml
vendored
2
.github/workflows/automerge.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
- name: Label autoapproved
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.GH_BOT_TOKEN }}
|
||||
script: |
|
||||
|
||||
2
.github/workflows/ci-docker.yml
vendored
2
.github/workflows/ci-docker.yml
vendored
@@ -395,7 +395,7 @@ jobs:
|
||||
|
||||
- name: Upload Artifacts
|
||||
if: ${{ steps.prepare.outputs.artifacts == 'true' }}
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Docker${{ matrix.tag }}
|
||||
path: artifacts/
|
||||
|
||||
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 }}
|
||||
10
.github/workflows/codeql.yml
vendored
10
.github/workflows/codeql.yml
vendored
@@ -28,7 +28,7 @@ jobs:
|
||||
continue: ${{ steps.continue.outputs.result }}
|
||||
steps:
|
||||
- name: Get repo languages
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v7
|
||||
id: lang
|
||||
with:
|
||||
script: |
|
||||
@@ -70,7 +70,7 @@ jobs:
|
||||
return matrix
|
||||
|
||||
- name: Continue
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v7
|
||||
id: continue
|
||||
with:
|
||||
script: |
|
||||
@@ -116,7 +116,7 @@ jobs:
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
@@ -139,9 +139,9 @@ jobs:
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
uses: github/codeql-action/analyze@v3
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
|
||||
4
.github/workflows/cpp-lint.yml
vendored
4
.github/workflows/cpp-lint.yml
vendored
@@ -65,7 +65,7 @@ jobs:
|
||||
|
||||
- name: Upload Artifacts
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: clang-format-fixes
|
||||
path: ${{ steps.find_files.outputs.found_files }}
|
||||
@@ -79,7 +79,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
|
||||
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
|
||||
4
.github/workflows/issues-stale.yml
vendored
4
.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@v9
|
||||
with:
|
||||
close-issue-message: >
|
||||
This issue was closed because it has been stalled for 10 days with no activity.
|
||||
@@ -43,7 +43,7 @@ jobs:
|
||||
repo-token: ${{ secrets.GH_BOT_TOKEN }}
|
||||
|
||||
- name: Invalid Template
|
||||
uses: actions/stale@v8
|
||||
uses: actions/stale@v9
|
||||
with:
|
||||
close-issue-message: >
|
||||
This issue was closed because the the template was not completed after 5 days.
|
||||
|
||||
2
.github/workflows/issues.yml
vendored
2
.github/workflows/issues.yml
vendored
@@ -20,6 +20,6 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Label Actions
|
||||
uses: dessant/label-actions@v3
|
||||
uses: dessant/label-actions@v4
|
||||
with:
|
||||
github-token: ${{ secrets.GH_BOT_TOKEN }}
|
||||
|
||||
4
.github/workflows/localize.yml
vendored
4
.github/workflows/localize.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Python 3.9
|
||||
uses: actions/setup-python@v4 # https://github.com/actions/setup-python
|
||||
uses: actions/setup-python@v5 # https://github.com/actions/setup-python
|
||||
with:
|
||||
python-version: '3.9'
|
||||
|
||||
@@ -77,7 +77,7 @@ jobs:
|
||||
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create/Update Pull Request
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
uses: peter-evans/create-pull-request@v6
|
||||
with:
|
||||
add-paths: |
|
||||
locale/*.po
|
||||
|
||||
2
.github/workflows/python-flake8.yml
vendored
2
.github/workflows/python-flake8.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4 # https://github.com/actions/setup-python
|
||||
uses: actions/setup-python@v5 # https://github.com/actions/setup-python
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
|
||||
20
.github/workflows/release-notifier.yml
vendored
20
.github/workflows/release-notifier.yml
vendored
@@ -15,8 +15,8 @@ on:
|
||||
jobs:
|
||||
discord:
|
||||
if: >-
|
||||
startsWith(github.repository, 'LizardByte/') and
|
||||
not(github.event.release.prerelease) and
|
||||
startsWith(github.repository, 'LizardByte/') &&
|
||||
not(github.event.release.prerelease) &&
|
||||
not(github.event.release.draft)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -34,8 +34,8 @@ jobs:
|
||||
|
||||
facebook_group:
|
||||
if: >-
|
||||
startsWith(github.repository, 'LizardByte/') and
|
||||
not(github.event.release.prerelease) and
|
||||
startsWith(github.repository, 'LizardByte/') &&
|
||||
not(github.event.release.prerelease) &&
|
||||
not(github.event.release.draft)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -51,8 +51,8 @@ jobs:
|
||||
|
||||
facebook_page:
|
||||
if: >-
|
||||
startsWith(github.repository, 'LizardByte/') and
|
||||
not(github.event.release.prerelease) and
|
||||
startsWith(github.repository, 'LizardByte/') &&
|
||||
not(github.event.release.prerelease) &&
|
||||
not(github.event.release.draft)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -68,8 +68,8 @@ jobs:
|
||||
|
||||
reddit:
|
||||
if: >-
|
||||
startsWith(github.repository, 'LizardByte/') and
|
||||
not(github.event.release.prerelease) and
|
||||
startsWith(github.repository, 'LizardByte/') &&
|
||||
not(github.event.release.prerelease) &&
|
||||
not(github.event.release.draft)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -88,8 +88,8 @@ jobs:
|
||||
|
||||
twitter:
|
||||
if: >-
|
||||
startsWith(github.repository, 'LizardByte/') and
|
||||
not(github.event.release.prerelease) and
|
||||
startsWith(github.repository, 'LizardByte/') &&
|
||||
not(github.event.release.prerelease) &&
|
||||
not(github.event.release.draft)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
2
.github/workflows/update-pages.yml
vendored
2
.github/workflows/update-pages.yml
vendored
@@ -39,7 +39,7 @@ jobs:
|
||||
|
||||
- name: Upload Artifacts
|
||||
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: gh-pages
|
||||
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
|
||||
|
||||
62
.gitmodules
vendored
62
.gitmodules
vendored
@@ -1,63 +1,39 @@
|
||||
[submodule "third-party/build-deps"]
|
||||
path = third-party/build-deps
|
||||
url = https://github.com/LizardByte/build-deps.git
|
||||
branch = dist
|
||||
[submodule "third-party/moonlight-common-c"]
|
||||
path = third-party/moonlight-common-c
|
||||
url = https://github.com/moonlight-stream/moonlight-common-c.git
|
||||
branch = master
|
||||
[submodule "third-party/Simple-Web-Server"]
|
||||
path = third-party/Simple-Web-Server
|
||||
url = https://gitlab.com/eidheim/Simple-Web-Server.git
|
||||
branch = master
|
||||
[submodule "third-party/ViGEmClient"]
|
||||
path = third-party/ViGEmClient
|
||||
url = https://github.com/nefarius/ViGEmClient
|
||||
branch = master
|
||||
[submodule "third-party/miniupnp"]
|
||||
path = third-party/miniupnp
|
||||
url = https://github.com/miniupnp/miniupnp
|
||||
[submodule "third-party/nanors"]
|
||||
path = third-party/nanors
|
||||
url = https://github.com/sleepybishop/nanors.git
|
||||
branch = master
|
||||
[submodule "third-party/nv-codec-headers"]
|
||||
path = third-party/nv-codec-headers
|
||||
url = https://github.com/FFmpeg/nv-codec-headers
|
||||
branch = sdk/12.0
|
||||
[submodule "third-party/nvapi-open-source-sdk"]
|
||||
path = third-party/nvapi-open-source-sdk
|
||||
url = https://github.com/LizardByte/nvapi-open-source-sdk
|
||||
branch = sdk
|
||||
[submodule "third-party/Simple-Web-Server"]
|
||||
path = third-party/Simple-Web-Server
|
||||
url = https://gitlab.com/eidheim/Simple-Web-Server.git
|
||||
branch = master
|
||||
[submodule "third-party/TPCircularBuffer"]
|
||||
path = third-party/TPCircularBuffer
|
||||
url = https://github.com/michaeltyson/TPCircularBuffer
|
||||
branch = master
|
||||
[submodule "third-party/ffmpeg-windows-x86_64"]
|
||||
path = third-party/ffmpeg-windows-x86_64
|
||||
url = https://github.com/LizardByte/build-deps
|
||||
branch = ffmpeg-windows-x86_64
|
||||
[submodule "third-party/ffmpeg-macos-x86_64"]
|
||||
path = third-party/ffmpeg-macos-x86_64
|
||||
url = https://github.com/LizardByte/build-deps
|
||||
branch = ffmpeg-macos-x86_64
|
||||
[submodule "third-party/ffmpeg-linux-x86_64"]
|
||||
path = third-party/ffmpeg-linux-x86_64
|
||||
url = https://github.com/LizardByte/build-deps
|
||||
branch = ffmpeg-linux-x86_64
|
||||
[submodule "third-party/ffmpeg-linux-aarch64"]
|
||||
path = third-party/ffmpeg-linux-aarch64
|
||||
url = https://github.com/LizardByte/build-deps
|
||||
branch = ffmpeg-linux-aarch64
|
||||
[submodule "third-party/ffmpeg-macos-aarch64"]
|
||||
path = third-party/ffmpeg-macos-aarch64
|
||||
url = https://github.com/LizardByte/build-deps
|
||||
branch = ffmpeg-macos-aarch64
|
||||
[submodule "third-party/nanors"]
|
||||
path = third-party/nanors
|
||||
url = https://github.com/sleepybishop/nanors.git
|
||||
branch = master
|
||||
[submodule "third-party/tray"]
|
||||
path = third-party/tray
|
||||
url = https://github.com/LizardByte/tray
|
||||
branch = master
|
||||
[submodule "third-party/nvapi-open-source-sdk"]
|
||||
path = third-party/nvapi-open-source-sdk
|
||||
url = https://github.com/LizardByte/nvapi-open-source-sdk
|
||||
branch = sdk
|
||||
[submodule "third-party/ffmpeg-linux-powerpc64le"]
|
||||
path = third-party/ffmpeg-linux-powerpc64le
|
||||
url = https://github.com/LizardByte/build-deps
|
||||
branch = ffmpeg-linux-powerpc64le
|
||||
[submodule "third-party/ViGEmClient"]
|
||||
path = third-party/ViGEmClient
|
||||
url = https://github.com/LizardByte/Virtual-Gamepad-Emulation-Client.git
|
||||
branch = master
|
||||
[submodule "third-party/wayland-protocols"]
|
||||
path = third-party/wayland-protocols
|
||||
url = https://gitlab.freedesktop.org/wayland/wayland-protocols
|
||||
|
||||
128
CHANGELOG.md
128
CHANGELOG.md
@@ -1,5 +1,132 @@
|
||||
# Changelog
|
||||
|
||||
## [0.22.0] - 2024-03-03
|
||||
**Breaking**
|
||||
- (Network) Clients must now be paired with the host before they can use Wake-on-LAN
|
||||
- (Build/Linux) Drop Fedora 37 support
|
||||
|
||||
**Added**
|
||||
- (Input/Linux) Add native/pen touch support for Linux
|
||||
- (Capture/Linux) Add HDR streaming support for Linux using KMS capture backend
|
||||
- (Capture/Linux) Add KMS capture support for Nvidia GPUs running Wayland
|
||||
- (Network) Add support for full E2E stream encryption, configurable for LAN and WAN independently
|
||||
- (Process) Add process group tracking to automatically handle launchers that spawn other child processes
|
||||
- (Capture/Windows) Add setting for controlling GPU power saving and encoding latency tradeoff for NVENC
|
||||
- (Capture/Windows) Add additional encoding settings for NVENC
|
||||
- (Process/Windows) Add experimental support for launching URLs and other non-exe files
|
||||
- (Capture/Windows) Add setting to allow use of slower HEVC encoding on older Intel GPUs
|
||||
- (Input/Windows) Add settings to control automatic gamepad type selection heuristics
|
||||
- (Input/Windows) Add setting to allow DS4 back/select button to trigger touchpad click
|
||||
- (Input) Add setting to disable high resolution scrolling and native pen/touch support
|
||||
- (Network) Add support for certificates types other than RSA-2048
|
||||
- (Build/Linux) Add Fedora 39 docker image and rpm package
|
||||
- (Capture/Linux) Display monitor indexes in logs for wlroots and KMS capture backends
|
||||
- (UI) Add link to logs inside fatal error container
|
||||
- (UI) Add hash handler and ids for all configuration categories and settings
|
||||
|
||||
**Changed**
|
||||
- (UI) Several configuration options have been moved to more suitable locations
|
||||
- (Network) Client-selected bitrate is now adjusted for FEC percentage and other stream overhead
|
||||
- (Capture/Linux) Improve VAAPI encoding performance on Intel GPUs
|
||||
- (Capture) Connection establishment delay is reduced by eliminating many encoder probing operations
|
||||
- (Process) Graceful termination of running processes is attempted first when stopping apps
|
||||
- (Capture) Improve software encoding performance by enabling multi-threaded color conversion
|
||||
- (Capture) Adjust default CPU thread count for software encoding from 1 to 2 for improved performance
|
||||
- (Steam/Windows) Modernized the default Steam app shortcut to avoid depending on Steam's install location and support app termination
|
||||
- (Linux) Updated desktop files
|
||||
- (Config) Add 2560x1440 to default resolutions
|
||||
- (Network) Use the configured ping timeout for the initial launch event timeout
|
||||
- (UI) Migrate UI to Vite and Vue3, and various UX improvements
|
||||
- (Logging) Adjust wording and severity of some log messages
|
||||
- (Build) Use a single submodule for ffmpeg
|
||||
- (Install/Windows) Skip ViGEmBus installation if a supported version is already installed
|
||||
- (Build/Linux) Optionally, allow using the system installation of wayland-protocols
|
||||
- (Build/Linux) Make vaapi optional
|
||||
- (Windows) Replace boost::json with nlohmann/json
|
||||
|
||||
**Fixed**
|
||||
- (Network/Windows) Fix auto-discovery of hosts by iOS/tvOS clients
|
||||
- (Network) Fix immediate connection termination when streaming over some Internet connections
|
||||
- (Capture/Linux) Fix missing mouse cursor when using KMS capture on a GPU with hardware cursor support
|
||||
- (Capture/Windows) Add workaround for Nvidia driver bug causing Sunshine to crash when RTX HDR is globally enabled
|
||||
- (Capture/Windows) Add workaround for AMD driver bug on pre-RDNA GPUs causing hardware encoding failure
|
||||
- (Capture/Windows) Reintroduce support for NVENC on older Nvidia GPU drivers (v456.71-v522.25)
|
||||
- (Capture/Windows) Fix encoding on old Intel GPUs that don't support low-power H.264 encoding
|
||||
- (Capture/Linux) Fix GL errors or corrupt video output on GPUs that use aux planes such as Intel Arc
|
||||
- (Capture/Linux) Fix GL errors or corrupt video output on GPUs that use DRM modifiers on YUV buffers
|
||||
- (Input/Windows) Fix non-functional duplicate controllers appearing in rare cases
|
||||
- (Input/Windows) Avoid triggering crash in ViGEmBus when the system goes to sleep
|
||||
- (Input/Linux) Fix scrolling in applications that don't support high-resolution scrolling
|
||||
- (Input/Linux) Fix absolute mouse input being interpreted as touch input
|
||||
- (Capture/Linux) Fix wlroots capture causing GL errors and crashes
|
||||
- (Capture/Linux) Fix wlroots capture failing when the display scale factor was not 1
|
||||
- (Capture/Linux) Fix excessive CPU usage when using wlroots capture backend
|
||||
- (Capture/Linux) Fix capture of virtual displays created by the amdgpu kernel driver
|
||||
- (Audio/Windows) Fix audio capture failures on Insider Preview versions of Windows 11
|
||||
- (Capture/Windows) Fix incorrect portrait mode rotation
|
||||
- (Capture/Windows) Fix capture recovery when a driver update/crash occurs while streaming
|
||||
- (Capture/Windows) Fix delay displaying UAC dialogs when the mouse cursor is not moving
|
||||
- (Capture/Linux) Fix corrupt video output or stream disconnections if the display resolution changes while streaming
|
||||
- (Capture/Linux) Fix color of aspect ratio padding in the capture image with VAAPI
|
||||
- (Capture/Linux) Fix NVENC initialization error when using X11 capture with some GPUs
|
||||
- (Tray/Linux) Fix random crash when the tray icon is updating
|
||||
- (Network) Fix QoS tagging when running in IPv4+IPv6 mode
|
||||
- (Process) Fix termination of child processes upon app quit when the parent has already terminated
|
||||
- (Process) Fix notification of graceful termination to connected clients when Sunshine quits
|
||||
- (Capture) Fix corrupt output or green aspect-ratio padding when using software encoding with some video resolutions
|
||||
- (Windows) Fix crashes when processing file paths or other strings with certain non-ASCII characters
|
||||
- (Capture) Ensure user supplied framerates are used exclusively in place of pre-defined framerates
|
||||
- (CMake/Linux) Skip including unnecessary headers
|
||||
- (Capture/Linux) Replace vaTerminate method with dl handle
|
||||
- (Capture/Linux) Fix capture when DRM is enabled and x11 is disabled
|
||||
- (Tray) Use PROJECT_NAME definition for tooltip
|
||||
- (CMake) Use GNUInstallDirs to install data and lib directories
|
||||
- (macOS) Replace deprecated code
|
||||
- (API) Allow trailing slashes in on API endpoints
|
||||
- (API) Add additional pin validation
|
||||
- (Linux) Use XDG spec for fetching config directory
|
||||
- (CMake) Properly find evdev
|
||||
- (Config) Properly save global_prep_cmd and fps settings
|
||||
|
||||
**Dependencies**
|
||||
- Bump third-party/wayland-protocols from 681c33c to 46f201b
|
||||
- Bump third-party/nv-codec-headers from 9402b5a to 22441b5
|
||||
- Bump third-party/nanors from 395e5ad to e9e242e
|
||||
- Bump third-party/Simple-Web-Server from 2f29926 to 27b41f5
|
||||
- Bump ffmpeg
|
||||
- Bump third-party/tray from 2664388 to 2bf1c61
|
||||
- Bump actions/setup-python from 4 to 5
|
||||
- Bump actions/upload-artifact from 3 to 4
|
||||
- Bump @fortawesome/fontawesome-free from 6.4.2 to 6.5.1
|
||||
- Bump babel from 2.13.0 to 2.14.0
|
||||
- Move miniupnpc from submodule to system installed package
|
||||
- Bump furo from 2023.9.10 to 2024.1.29
|
||||
- Bump third-party/moonlight-common-c from f78f213 to cbd0ec1
|
||||
- Bump third-party/ViGEmClient from 1920260 to 8d71f67
|
||||
- Bump peter-evans/create-pull-request from 5 to 6
|
||||
- Bump bootstrap from 5.3.2 to 5.3.3
|
||||
|
||||
**Misc**
|
||||
- (Build) Update global workflows
|
||||
- (Docs/Linux) Add example for setting custom resolution with NVIDIA
|
||||
- (Docs) Fix broken links
|
||||
- (Docs/Windows) Add information about disk permissions
|
||||
- (Docs) Fix failing images
|
||||
- (Docs) Use glob pattern to match source code docs
|
||||
- (CI/macOS) Install boost from source
|
||||
- (Docs) Add reset credentials examples for unique packages
|
||||
- (Docs) Refactor and general cleanup
|
||||
- (Docs) Cross-reference config settings to the UI
|
||||
- (Docs/Docker) Add podman notes
|
||||
- (Build) Use CMAKE_SOURCE_DIR property everywhere
|
||||
- (Build/Docker) Add docker toolchain file for CLion
|
||||
- (macOS) Various code style fixes
|
||||
- (Deps) Alphabetize git submodules
|
||||
- (Docs/Examples) Update URI examples
|
||||
- (Refactor) Refactored some code in preparation for unit testing implementation
|
||||
- (CMake) Add option to skip cuda inheriting compile options
|
||||
- (CMake) Add option to error build on warnings
|
||||
|
||||
## [0.21.0] - 2023-10-15
|
||||
**Added**
|
||||
- (Input) Add support for automatically selecting the emulated controller type based on the physical controller connected to the client
|
||||
@@ -592,3 +719,4 @@ settings. In v0.17.0, games now run under your user account without elevated pri
|
||||
[0.19.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.19.1
|
||||
[0.20.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.20.0
|
||||
[0.21.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.21.0
|
||||
[0.22.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.22.0
|
||||
|
||||
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 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.22.0
|
||||
DESCRIPTION "Sunshine is a self-hosted game stream host for Moonlight."
|
||||
HOMEPAGE_URL "https://app.lizardbyte.dev/Sunshine")
|
||||
|
||||
@@ -20,7 +20,7 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
endif()
|
||||
|
||||
# set the module path, used for includes
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||
|
||||
# set version info for this build
|
||||
include(${CMAKE_MODULE_PATH}/prep/build_version.cmake)
|
||||
|
||||
@@ -52,8 +52,9 @@ Create and run the container (substitute your `<values>`):
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--device /dev/dri/ \
|
||||
--name=<image_name> \
|
||||
--restart=unless-stopped
|
||||
--restart=unless-stopped \
|
||||
-e PUID=<uid> \
|
||||
-e PGID=<gid> \
|
||||
-e TZ=<timezone> \
|
||||
@@ -86,6 +87,25 @@ services:
|
||||
- "47998-48000:47998-48000/udp"
|
||||
```
|
||||
|
||||
### Using podman run
|
||||
Create and run the container (substitute your `<values>`):
|
||||
|
||||
```bash
|
||||
podman run -d \
|
||||
--device /dev/dri/ \
|
||||
--name=<image_name> \
|
||||
--restart=unless-stopped \
|
||||
--userns=keep-id \
|
||||
-e PUID=<uid> \
|
||||
-e PGID=<gid> \
|
||||
-e TZ=<timezone> \
|
||||
-v <path to data>:/config \
|
||||
-p 47984-47990:47984-47990/tcp \
|
||||
-p 48010:48010 \
|
||||
-p 47998-48000:47998-48000/udp \
|
||||
<image>
|
||||
```
|
||||
|
||||
### Parameters
|
||||
You must substitute the `<values>` with your own settings.
|
||||
|
||||
@@ -132,8 +152,9 @@ The architectures supported by these images are shown in the table below.
|
||||
| tag suffix | amd64/x86_64 | arm64/aarch64 |
|
||||
|-----------------|--------------|---------------|
|
||||
| archlinux | ✅ | ❌ |
|
||||
| debian-bookworm | ✅ | ✅ |
|
||||
| debian-bullseye | ✅ | ✅ |
|
||||
| fedora-36 | ✅ | ✅ |
|
||||
| fedora-37 | ✅ | ✅ |
|
||||
| fedora-38 | ✅ | ✅ |
|
||||
| fedora-39 | ✅ | ✅ |
|
||||
| ubuntu-20.04 | ✅ | ✅ |
|
||||
| ubuntu-22.04 | ✅ | ✅ |
|
||||
|
||||
@@ -36,7 +36,7 @@ System Requirements
|
||||
| +------------------------------------------------------------+
|
||||
| | Linux/Debian: 11 (bullseye) |
|
||||
| +------------------------------------------------------------+
|
||||
| | Linux/Fedora: 36+ |
|
||||
| | Linux/Fedora: 37+ |
|
||||
| +------------------------------------------------------------+
|
||||
| | Linux/Ubuntu: 20.04+ (focal) |
|
||||
+------------+------------------------------------------------------------+
|
||||
|
||||
70
cmake/FindLibva.cmake
Normal file
70
cmake/FindLibva.cmake
Normal file
@@ -0,0 +1,70 @@
|
||||
# - Try to find Libva
|
||||
# This module defines the following variables:
|
||||
#
|
||||
# * LIBVA_FOUND - The component was found
|
||||
# * LIBVA_INCLUDE_DIRS - The component include directory
|
||||
# * LIBVA_LIBRARIES - The component library Libva
|
||||
# * LIBVA_DRM_LIBRARIES - The component library Libva DRM
|
||||
|
||||
# Use pkg-config to get the directories and then use these values in the
|
||||
# find_path() and find_library() calls
|
||||
# cmake-format: on
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_LIBVA libva)
|
||||
pkg_check_modules(_LIBVA_DRM libva-drm)
|
||||
endif()
|
||||
|
||||
find_path(
|
||||
LIBVA_INCLUDE_DIR
|
||||
NAMES va/va.h va/va_drm.h
|
||||
HINTS ${_LIBVA_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include /opt/local/include)
|
||||
|
||||
find_library(
|
||||
LIBVA_LIB
|
||||
NAMES ${_LIBVA_LIBRARIES} libva
|
||||
HINTS ${_LIBVA_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib /opt/local/lib)
|
||||
|
||||
find_library(
|
||||
LIBVA_DRM_LIB
|
||||
NAMES ${_LIBVA_DRM_LIBRARIES} libva-drm
|
||||
HINTS ${_LIBVA_DRM_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib /opt/local/lib)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libva REQUIRED_VARS LIBVA_INCLUDE_DIR LIBVA_LIB LIBVA_DRM_LIB)
|
||||
mark_as_advanced(LIBVA_INCLUDE_DIR LIBVA_LIB LIBVA_DRM_LIB)
|
||||
|
||||
if(LIBVA_FOUND)
|
||||
set(LIBVA_INCLUDE_DIRS ${LIBVA_INCLUDE_DIR})
|
||||
set(LIBVA_LIBRARIES ${LIBVA_LIB})
|
||||
set(LIBVA_DRM_LIBRARIES ${LIBVA_DRM_LIB})
|
||||
|
||||
if(NOT TARGET Libva::va)
|
||||
if(IS_ABSOLUTE "${LIBVA_LIBRARIES}")
|
||||
add_library(Libva::va UNKNOWN IMPORTED)
|
||||
set_target_properties(Libva::va PROPERTIES IMPORTED_LOCATION "${LIBVA_LIBRARIES}")
|
||||
else()
|
||||
add_library(Libva::va INTERFACE IMPORTED)
|
||||
set_target_properties(Libva::va PROPERTIES IMPORTED_LIBNAME "${LIBVA_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
set_target_properties(Libva::va PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBVA_INCLUDE_DIRS}")
|
||||
endif()
|
||||
|
||||
if(NOT TARGET Libva::drm)
|
||||
if(IS_ABSOLUTE "${LIBVA_DRM_LIBRARIES}")
|
||||
add_library(Libva::drm UNKNOWN IMPORTED)
|
||||
set_target_properties(Libva::drm PROPERTIES IMPORTED_LOCATION "${LIBVA_DRM_LIBRARIES}")
|
||||
else()
|
||||
add_library(Libva::drm INTERFACE IMPORTED)
|
||||
set_target_properties(Libva::drm PROPERTIES IMPORTED_LIBNAME "${LIBVA_DRM_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
set_target_properties(Libva::drm PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBVA_INCLUDE_DIRS}")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
34
cmake/FindSystemd.cmake
Normal file
34
cmake/FindSystemd.cmake
Normal file
@@ -0,0 +1,34 @@
|
||||
# - Try to find Systemd
|
||||
# Once done this will define
|
||||
#
|
||||
# SYSTEMD_FOUND - system has systemd
|
||||
# SYSTEMD_USER_UNIT_INSTALL_DIR - the systemd system unit install directory
|
||||
# SYSTEMD_SYSTEM_UNIT_INSTALL_DIR - the systemd user unit install directory
|
||||
|
||||
IF (NOT WIN32)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(SYSTEMD "systemd")
|
||||
endif()
|
||||
|
||||
if (SYSTEMD_FOUND)
|
||||
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE}
|
||||
--variable=systemduserunitdir systemd
|
||||
OUTPUT_VARIABLE SYSTEMD_USER_UNIT_INSTALL_DIR)
|
||||
|
||||
string(REGEX REPLACE "[ \t\n]+" "" SYSTEMD_USER_UNIT_INSTALL_DIR
|
||||
"${SYSTEMD_USER_UNIT_INSTALL_DIR}")
|
||||
|
||||
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE}
|
||||
--variable=systemdsystemunitdir systemd
|
||||
OUTPUT_VARIABLE SYSTEMD_SYSTEM_UNIT_INSTALL_DIR)
|
||||
|
||||
string(REGEX REPLACE "[ \t\n]+" "" SYSTEMD_SYSTEM_UNIT_INSTALL_DIR
|
||||
"${SYSTEMD_SYSTEM_UNIT_INSTALL_DIR}")
|
||||
|
||||
mark_as_advanced(SYSTEMD_USER_UNIT_INSTALL_DIR SYSTEMD_SYSTEM_UNIT_INSTALL_DIR)
|
||||
|
||||
endif ()
|
||||
|
||||
ENDIF ()
|
||||
28
cmake/FindUdev.cmake
Normal file
28
cmake/FindUdev.cmake
Normal file
@@ -0,0 +1,28 @@
|
||||
# - Try to find Udev
|
||||
# Once done this will define
|
||||
#
|
||||
# UDEV_FOUND - system has udev
|
||||
# UDEV_RULES_INSTALL_DIR - the udev rules install directory
|
||||
|
||||
IF (NOT WIN32)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(UDEV "udev")
|
||||
endif()
|
||||
|
||||
if (UDEV_FOUND)
|
||||
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE}
|
||||
--variable=udevdir udev
|
||||
OUTPUT_VARIABLE UDEV_RULES_INSTALL_DIR)
|
||||
|
||||
string(REGEX REPLACE "[ \t\n]+" "" UDEV_RULES_INSTALL_DIR
|
||||
"${UDEV_RULES_INSTALL_DIR}")
|
||||
|
||||
set(UDEV_RULES_INSTALL_DIR "${UDEV_RULES_INSTALL_DIR}/rules.d")
|
||||
|
||||
mark_as_advanced(UDEV_RULES_INSTALL_DIR)
|
||||
|
||||
endif ()
|
||||
|
||||
ENDIF ()
|
||||
@@ -3,7 +3,25 @@
|
||||
|
||||
list(APPEND SUNSHINE_COMPILE_OPTIONS -Wall -Wno-sign-compare)
|
||||
# Wall - enable all warnings
|
||||
# Werror - treat warnings as errors
|
||||
# Wno-maybe-uninitialized/Wno-uninitialized - disable warnings for maybe uninitialized variables
|
||||
# Wno-sign-compare - disable warnings for signed/unsigned comparisons
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
# GCC specific compile options
|
||||
|
||||
# GCC 12 and higher will complain about maybe-uninitialized
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12)
|
||||
list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-maybe-uninitialized)
|
||||
endif()
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
# Clang specific compile options
|
||||
|
||||
# Clang doesn't actually complain about this this, so disabling for now
|
||||
# list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-uninitialized)
|
||||
endif()
|
||||
if(BUILD_WERROR)
|
||||
list(APPEND SUNSHINE_COMPILE_OPTIONS -Werror)
|
||||
endif()
|
||||
|
||||
# setup assets directory
|
||||
if(NOT SUNSHINE_ASSETS_DIR)
|
||||
@@ -23,70 +41,78 @@ elseif(UNIX)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include_directories(SYSTEM third-party/nv-codec-headers/include)
|
||||
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/third-party/nv-codec-headers/include")
|
||||
file(GLOB NVENC_SOURCES CONFIGURE_DEPENDS "src/nvenc/*.cpp" "src/nvenc/*.h")
|
||||
list(APPEND PLATFORM_TARGET_FILES ${NVENC_SOURCES})
|
||||
|
||||
configure_file(src/version.h.in version.h @ONLY)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
configure_file("${CMAKE_SOURCE_DIR}/src/version.h.in" version.h @ONLY)
|
||||
include_directories("${CMAKE_CURRENT_BINARY_DIR}") # required for importing version.h
|
||||
|
||||
set(SUNSHINE_TARGET_FILES
|
||||
third-party/nanors/rs.c
|
||||
third-party/nanors/rs.h
|
||||
third-party/moonlight-common-c/src/Input.h
|
||||
third-party/moonlight-common-c/src/Rtsp.h
|
||||
third-party/moonlight-common-c/src/RtspParser.c
|
||||
third-party/moonlight-common-c/src/Video.h
|
||||
third-party/tray/tray.h
|
||||
src/upnp.cpp
|
||||
src/upnp.h
|
||||
src/cbs.cpp
|
||||
src/utility.h
|
||||
src/uuid.h
|
||||
src/config.h
|
||||
src/config.cpp
|
||||
src/main.cpp
|
||||
src/main.h
|
||||
src/crypto.cpp
|
||||
src/crypto.h
|
||||
src/nvhttp.cpp
|
||||
src/nvhttp.h
|
||||
src/httpcommon.cpp
|
||||
src/httpcommon.h
|
||||
src/confighttp.cpp
|
||||
src/confighttp.h
|
||||
src/rtsp.cpp
|
||||
src/rtsp.h
|
||||
src/stream.cpp
|
||||
src/stream.h
|
||||
src/video.cpp
|
||||
src/video.h
|
||||
src/video_colorspace.cpp
|
||||
src/video_colorspace.h
|
||||
src/input.cpp
|
||||
src/input.h
|
||||
src/audio.cpp
|
||||
src/audio.h
|
||||
src/platform/common.h
|
||||
src/process.cpp
|
||||
src/process.h
|
||||
src/network.cpp
|
||||
src/network.h
|
||||
src/move_by_copy.h
|
||||
src/system_tray.cpp
|
||||
src/system_tray.h
|
||||
src/task_pool.h
|
||||
src/thread_pool.h
|
||||
src/thread_safe.h
|
||||
src/sync.h
|
||||
src/round_robin.h
|
||||
src/stat_trackers.h
|
||||
src/stat_trackers.cpp
|
||||
"${CMAKE_SOURCE_DIR}/third-party/nanors/rs.c"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/nanors/rs.h"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/Input.h"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/Rtsp.h"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/RtspParser.c"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/Video.h"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/tray/tray.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/upnp.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/upnp.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/cbs.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/utility.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/uuid.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/config.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/config.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/entry_handler.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/entry_handler.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/file_handler.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/file_handler.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/globals.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/globals.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/logging.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/logging.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/main.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/main.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/crypto.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/crypto.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/nvhttp.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/nvhttp.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/httpcommon.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/httpcommon.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/confighttp.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/confighttp.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/rtsp.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/rtsp.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/stream.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/stream.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/video.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/video.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/video_colorspace.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/video_colorspace.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/input.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/input.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/audio.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/audio.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/common.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/process.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/process.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/network.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/network.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/move_by_copy.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/system_tray.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/system_tray.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/task_pool.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/thread_pool.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/thread_safe.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/sync.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/round_robin.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/stat_trackers.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/stat_trackers.cpp"
|
||||
${PLATFORM_TARGET_FILES})
|
||||
|
||||
set_source_files_properties(src/upnp.cpp PROPERTIES COMPILE_FLAGS -Wno-pedantic)
|
||||
set_source_files_properties("${CMAKE_SOURCE_DIR}/src/upnp.cpp" PROPERTIES COMPILE_FLAGS -Wno-pedantic)
|
||||
|
||||
set_source_files_properties(third-party/nanors/rs.c
|
||||
set_source_files_properties("${CMAKE_SOURCE_DIR}/third-party/nanors/rs.c"
|
||||
PROPERTIES COMPILE_FLAGS "-include deps/obl/autoshim.h -ftree-vectorize")
|
||||
|
||||
if(NOT SUNSHINE_ASSETS_DIR_DEF)
|
||||
@@ -96,14 +122,14 @@ list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_ASSETS_DIR="${SUNSHINE_ASSETS_DIR_DEF}
|
||||
|
||||
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_TRAY=${SUNSHINE_TRAY})
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
include_directories("${CMAKE_SOURCE_DIR}")
|
||||
|
||||
include_directories(
|
||||
SYSTEM
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/third-party
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/third-party/moonlight-common-c/enet/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/third-party/nanors
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/third-party/nanors/deps/obl
|
||||
"${CMAKE_SOURCE_DIR}/third-party"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/enet/include"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/nanors"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/nanors/deps/obl"
|
||||
${FFMPEG_INCLUDE_DIRS}
|
||||
${PLATFORM_INCLUDE_DIRS}
|
||||
)
|
||||
@@ -111,14 +137,14 @@ include_directories(
|
||||
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)
|
||||
set_source_files_properties("${CMAKE_SOURCE_DIR}/src/nvhttp.cpp" PROPERTIES COMPILE_FLAGS -O2)
|
||||
endif()
|
||||
else()
|
||||
add_definitions(-DNDEBUG)
|
||||
endif()
|
||||
|
||||
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
|
||||
libminiupnpc-static
|
||||
${MINIUPNP_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
enet
|
||||
opus
|
||||
|
||||
@@ -89,11 +89,12 @@ if(${SUNSHINE_ENABLE_CUDA})
|
||||
endif()
|
||||
endif()
|
||||
if(CUDA_FOUND)
|
||||
include_directories(SYSTEM third-party/nvfbc)
|
||||
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/third-party/nvfbc")
|
||||
list(APPEND PLATFORM_TARGET_FILES
|
||||
src/platform/linux/cuda.cu
|
||||
src/platform/linux/cuda.cpp
|
||||
third-party/nvfbc/NvFBC.h)
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/cuda.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/cuda.cu"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/cuda.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/nvfbc/NvFBC.h")
|
||||
|
||||
add_compile_definitions(SUNSHINE_BUILD_CUDA)
|
||||
endif()
|
||||
@@ -110,7 +111,8 @@ if(LIBDRM_FOUND AND LIBCAP_FOUND)
|
||||
add_compile_definitions(SUNSHINE_BUILD_DRM)
|
||||
include_directories(SYSTEM ${LIBDRM_INCLUDE_DIRS} ${LIBCAP_INCLUDE_DIRS})
|
||||
list(APPEND PLATFORM_LIBRARIES ${LIBDRM_LIBRARIES} ${LIBCAP_LIBRARIES})
|
||||
list(APPEND PLATFORM_TARGET_FILES src/platform/linux/kmsgrab.cpp)
|
||||
list(APPEND PLATFORM_TARGET_FILES
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/kmsgrab.cpp")
|
||||
list(APPEND SUNSHINE_DEFINITIONS EGL_NO_X11=1)
|
||||
elseif(NOT LIBDRM_FOUND)
|
||||
message(WARNING "Missing libdrm")
|
||||
@@ -118,6 +120,32 @@ elseif(NOT LIBDRM_FOUND)
|
||||
message(WARNING "Missing libcap")
|
||||
endif()
|
||||
|
||||
# evdev
|
||||
pkg_check_modules(PC_EVDEV libevdev REQUIRED)
|
||||
find_path(EVDEV_INCLUDE_DIR libevdev/libevdev.h
|
||||
HINTS ${PC_EVDEV_INCLUDE_DIRS} ${PC_EVDEV_INCLUDEDIR})
|
||||
find_library(EVDEV_LIBRARY
|
||||
NAMES evdev libevdev)
|
||||
if(EVDEV_INCLUDE_DIR AND EVDEV_LIBRARY)
|
||||
include_directories(SYSTEM ${EVDEV_INCLUDE_DIR})
|
||||
list(APPEND PLATFORM_LIBRARIES ${EVDEV_LIBRARY})
|
||||
endif()
|
||||
|
||||
# vaapi
|
||||
if(${SUNSHINE_ENABLE_VAAPI})
|
||||
find_package(Libva)
|
||||
else()
|
||||
set(LIBVA_FOUND OFF)
|
||||
endif()
|
||||
if(LIBVA_FOUND)
|
||||
add_compile_definitions(SUNSHINE_BUILD_VAAPI)
|
||||
include_directories(SYSTEM ${LIBVA_INCLUDE_DIR})
|
||||
list(APPEND PLATFORM_LIBRARIES ${LIBVA_LIBRARIES} ${LIBVA_DRM_LIBRARIES})
|
||||
list(APPEND PLATFORM_TARGET_FILES
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/vaapi.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/vaapi.cpp")
|
||||
endif()
|
||||
|
||||
# wayland
|
||||
if(${SUNSHINE_ENABLE_WAYLAND})
|
||||
find_package(Wayland)
|
||||
@@ -127,8 +155,15 @@ endif()
|
||||
if(WAYLAND_FOUND)
|
||||
add_compile_definitions(SUNSHINE_BUILD_WAYLAND)
|
||||
|
||||
GEN_WAYLAND("wayland-protocols" "unstable/xdg-output" xdg-output-unstable-v1)
|
||||
GEN_WAYLAND("wlr-protocols" "unstable" wlr-export-dmabuf-unstable-v1)
|
||||
if(NOT SUNSHINE_SYSTEM_WAYLAND_PROTOCOLS)
|
||||
set(WAYLAND_PROTOCOLS_DIR "${CMAKE_SOURCE_DIR}/third-party/wayland-protocols")
|
||||
else()
|
||||
pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
|
||||
pkg_check_modules(WAYLAND_PROTOCOLS wayland-protocols REQUIRED)
|
||||
endif()
|
||||
|
||||
GEN_WAYLAND("${WAYLAND_PROTOCOLS_DIR}" "unstable/xdg-output" xdg-output-unstable-v1)
|
||||
GEN_WAYLAND("${CMAKE_SOURCE_DIR}/third-party/wlr-protocols" "unstable" wlr-export-dmabuf-unstable-v1)
|
||||
|
||||
include_directories(
|
||||
SYSTEM
|
||||
@@ -138,8 +173,9 @@ if(WAYLAND_FOUND)
|
||||
|
||||
list(APPEND PLATFORM_LIBRARIES ${WAYLAND_LIBRARIES})
|
||||
list(APPEND PLATFORM_TARGET_FILES
|
||||
src/platform/linux/wlgrab.cpp
|
||||
src/platform/linux/wayland.cpp)
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/wlgrab.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/wayland.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/wayland.cpp")
|
||||
endif()
|
||||
|
||||
# x11
|
||||
@@ -152,11 +188,17 @@ if(X11_FOUND)
|
||||
add_compile_definitions(SUNSHINE_BUILD_X11)
|
||||
include_directories(SYSTEM ${X11_INCLUDE_DIR})
|
||||
list(APPEND PLATFORM_LIBRARIES ${X11_LIBRARIES})
|
||||
list(APPEND PLATFORM_TARGET_FILES src/platform/linux/x11grab.cpp)
|
||||
list(APPEND PLATFORM_TARGET_FILES
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/x11grab.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/x11grab.cpp")
|
||||
endif()
|
||||
|
||||
if(NOT ${CUDA_FOUND} AND NOT ${WAYLAND_FOUND} AND NOT ${X11_FOUND} AND NOT (${LIBDRM_FOUND} AND ${LIBCAP_FOUND}))
|
||||
message(FATAL_ERROR "Couldn't find either x11, wayland, cuda or (libdrm and libcap)")
|
||||
if(NOT ${CUDA_FOUND}
|
||||
AND NOT ${WAYLAND_FOUND}
|
||||
AND NOT ${X11_FOUND}
|
||||
AND NOT (${LIBDRM_FOUND} AND ${LIBCAP_FOUND})
|
||||
AND NOT ${LIBVA_FOUND})
|
||||
message(FATAL_ERROR "Couldn't find either cuda, wayland, x11, (libdrm and libcap), or libva")
|
||||
endif()
|
||||
|
||||
# tray icon
|
||||
@@ -180,7 +222,7 @@ if(${SUNSHINE_ENABLE_TRAY})
|
||||
include_directories(SYSTEM ${APPINDICATOR_INCLUDE_DIRS} ${LIBNOTIFY_INCLUDE_DIRS})
|
||||
link_directories(${APPINDICATOR_LIBRARY_DIRS} ${LIBNOTIFY_LIBRARY_DIRS})
|
||||
|
||||
list(APPEND PLATFORM_TARGET_FILES third-party/tray/tray_linux.c)
|
||||
list(APPEND PLATFORM_TARGET_FILES "${CMAKE_SOURCE_DIR}/third-party/tray/tray_linux.c")
|
||||
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES ${APPINDICATOR_LIBRARIES} ${LIBNOTIFY_LIBRARIES})
|
||||
endif()
|
||||
else()
|
||||
@@ -193,35 +235,28 @@ if (${SUNSHINE_TRAY} EQUAL 0 AND SUNSHINE_REQUIRE_TRAY)
|
||||
endif()
|
||||
|
||||
list(APPEND PLATFORM_TARGET_FILES
|
||||
src/platform/linux/publish.cpp
|
||||
src/platform/linux/vaapi.h
|
||||
src/platform/linux/vaapi.cpp
|
||||
src/platform/linux/cuda.h
|
||||
src/platform/linux/graphics.h
|
||||
src/platform/linux/graphics.cpp
|
||||
src/platform/linux/misc.h
|
||||
src/platform/linux/misc.cpp
|
||||
src/platform/linux/audio.cpp
|
||||
src/platform/linux/input.cpp
|
||||
src/platform/linux/x11grab.h
|
||||
src/platform/linux/wayland.h
|
||||
third-party/glad/src/egl.c
|
||||
third-party/glad/src/gl.c
|
||||
third-party/glad/include/EGL/eglplatform.h
|
||||
third-party/glad/include/KHR/khrplatform.h
|
||||
third-party/glad/include/glad/gl.h
|
||||
third-party/glad/include/glad/egl.h)
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/publish.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/graphics.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/graphics.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/misc.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/misc.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/audio.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/input.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/glad/src/egl.c"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/glad/src/gl.c"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/glad/include/EGL/eglplatform.h"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/glad/include/KHR/khrplatform.h"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/glad/include/glad/gl.h"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/glad/include/glad/egl.h")
|
||||
|
||||
list(APPEND PLATFORM_LIBRARIES
|
||||
Boost::dynamic_linking
|
||||
dl
|
||||
evdev
|
||||
numa
|
||||
pulse
|
||||
pulse-simple)
|
||||
|
||||
include_directories(
|
||||
SYSTEM
|
||||
/usr/include/libevdev-1.0
|
||||
third-party/nv-codec-headers/include
|
||||
third-party/glad/include)
|
||||
"${CMAKE_SOURCE_DIR}/third-party/nv-codec-headers/include"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/glad/include")
|
||||
|
||||
@@ -18,32 +18,32 @@ list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
|
||||
set(PLATFORM_INCLUDE_DIRS
|
||||
${Boost_INCLUDE_DIR})
|
||||
|
||||
set(APPLE_PLIST_FILE ${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/Info.plist)
|
||||
set(APPLE_PLIST_FILE "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/Info.plist")
|
||||
|
||||
# todo - tray is not working on macos
|
||||
set(SUNSHINE_TRAY 0)
|
||||
|
||||
set(PLATFORM_TARGET_FILES
|
||||
src/platform/macos/av_audio.h
|
||||
src/platform/macos/av_audio.m
|
||||
src/platform/macos/av_img_t.h
|
||||
src/platform/macos/av_video.h
|
||||
src/platform/macos/av_video.m
|
||||
src/platform/macos/display.mm
|
||||
src/platform/macos/input.cpp
|
||||
src/platform/macos/microphone.mm
|
||||
src/platform/macos/misc.mm
|
||||
src/platform/macos/misc.h
|
||||
src/platform/macos/nv12_zero_device.cpp
|
||||
src/platform/macos/nv12_zero_device.h
|
||||
src/platform/macos/publish.cpp
|
||||
third-party/TPCircularBuffer/TPCircularBuffer.c
|
||||
third-party/TPCircularBuffer/TPCircularBuffer.h
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/macos/av_audio.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/macos/av_audio.m"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/macos/av_img_t.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/macos/av_video.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/macos/av_video.m"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/macos/display.mm"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/macos/input.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/macos/microphone.mm"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/macos/misc.mm"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/macos/misc.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/macos/nv12_zero_device.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/macos/nv12_zero_device.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/macos/publish.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/TPCircularBuffer/TPCircularBuffer.c"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/TPCircularBuffer/TPCircularBuffer.h"
|
||||
${APPLE_PLIST_FILE})
|
||||
|
||||
if(SUNSHINE_ENABLE_TRAY)
|
||||
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
|
||||
${COCOA})
|
||||
list(APPEND PLATFORM_TARGET_FILES
|
||||
third-party/tray/tray_darwin.m)
|
||||
"${CMAKE_SOURCE_DIR}/third-party/tray/tray_darwin.m")
|
||||
endif()
|
||||
|
||||
@@ -6,51 +6,63 @@ enable_language(RC)
|
||||
set(CMAKE_RC_COMPILER windres)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
|
||||
|
||||
# gcc complains about misleading indentation in some mingw includes
|
||||
list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-misleading-indentation)
|
||||
|
||||
# curl
|
||||
add_definitions(-DCURL_STATICLIB)
|
||||
include_directories(SYSTEM ${CURL_STATIC_INCLUDE_DIRS})
|
||||
link_directories(${CURL_STATIC_LIBRARY_DIRS})
|
||||
|
||||
# miniupnpc
|
||||
add_definitions(-DMINIUPNP_STATICLIB)
|
||||
|
||||
# extra tools/binaries for audio/display devices
|
||||
add_subdirectory(tools) # todo - this is temporary, only tools for Windows are needed, for now
|
||||
|
||||
# nvidia
|
||||
include_directories(SYSTEM third-party/nvapi-open-source-sdk)
|
||||
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/third-party/nvapi-open-source-sdk")
|
||||
file(GLOB NVPREFS_FILES CONFIGURE_DEPENDS
|
||||
"third-party/nvapi-open-source-sdk/*.h"
|
||||
"src/platform/windows/nvprefs/*.cpp"
|
||||
"src/platform/windows/nvprefs/*.h")
|
||||
"${CMAKE_SOURCE_DIR}/third-party/nvapi-open-source-sdk/*.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/windows/nvprefs/*.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/windows/nvprefs/*.h")
|
||||
|
||||
# vigem
|
||||
include_directories(SYSTEM third-party/ViGEmClient/include)
|
||||
set_source_files_properties(third-party/ViGEmClient/src/ViGEmClient.cpp
|
||||
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include")
|
||||
set_source_files_properties("${CMAKE_SOURCE_DIR}/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")
|
||||
set(VIGEM_COMPILE_FLAGS "")
|
||||
string(APPEND VIGEM_COMPILE_FLAGS "-Wno-unknown-pragmas ")
|
||||
string(APPEND VIGEM_COMPILE_FLAGS "-Wno-misleading-indentation ")
|
||||
string(APPEND VIGEM_COMPILE_FLAGS "-Wno-class-memaccess ")
|
||||
string(APPEND VIGEM_COMPILE_FLAGS "-Wno-unused-function ")
|
||||
string(APPEND VIGEM_COMPILE_FLAGS "-Wno-unused-variable ")
|
||||
set_source_files_properties("${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/src/ViGEmClient.cpp"
|
||||
PROPERTIES COMPILE_FLAGS ${VIGEM_COMPILE_FLAGS})
|
||||
|
||||
# sunshine icon
|
||||
if(NOT DEFINED SUNSHINE_ICON_PATH)
|
||||
set(SUNSHINE_ICON_PATH "${CMAKE_CURRENT_SOURCE_DIR}/sunshine.ico")
|
||||
set(SUNSHINE_ICON_PATH "${CMAKE_SOURCE_DIR}/sunshine.ico")
|
||||
endif()
|
||||
|
||||
configure_file(src/platform/windows/windows.rs.in windows.rc @ONLY)
|
||||
configure_file("${CMAKE_SOURCE_DIR}/src/platform/windows/windows.rs.in" windows.rc @ONLY)
|
||||
|
||||
set(PLATFORM_TARGET_FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/windows.rc"
|
||||
src/platform/windows/publish.cpp
|
||||
src/platform/windows/misc.h
|
||||
src/platform/windows/misc.cpp
|
||||
src/platform/windows/input.cpp
|
||||
src/platform/windows/display.h
|
||||
src/platform/windows/display_base.cpp
|
||||
src/platform/windows/display_vram.cpp
|
||||
src/platform/windows/display_ram.cpp
|
||||
src/platform/windows/audio.cpp
|
||||
third-party/ViGEmClient/src/ViGEmClient.cpp
|
||||
third-party/ViGEmClient/include/ViGEm/Client.h
|
||||
third-party/ViGEmClient/include/ViGEm/Common.h
|
||||
third-party/ViGEmClient/include/ViGEm/Util.h
|
||||
third-party/ViGEmClient/include/ViGEm/km/BusShared.h
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/windows/publish.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/windows/misc.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/windows/misc.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/windows/input.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/windows/display.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/windows/display_base.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/windows/display_vram.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/windows/display_ram.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/windows/audio.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/src/ViGEmClient.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include/ViGEm/Client.h"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include/ViGEm/Common.h"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include/ViGEm/Util.h"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include/ViGEm/km/BusShared.h"
|
||||
${NVPREFS_FILES})
|
||||
|
||||
set(OPENSSL_LIBRARIES
|
||||
@@ -70,9 +82,12 @@ list(PREPEND PLATFORM_LIBRARIES
|
||||
userenv
|
||||
synchronization.lib
|
||||
avrt
|
||||
iphlpapi
|
||||
shlwapi
|
||||
PkgConfig::NLOHMANN_JSON
|
||||
${CURL_STATIC_LIBRARIES})
|
||||
|
||||
if(SUNSHINE_ENABLE_TRAY)
|
||||
list(APPEND PLATFORM_TARGET_FILES
|
||||
third-party/tray/tray_windows.c)
|
||||
"${CMAKE_SOURCE_DIR}/third-party/tray/tray_windows.c")
|
||||
endif()
|
||||
|
||||
@@ -4,18 +4,20 @@
|
||||
# submodules
|
||||
# moonlight common library
|
||||
set(ENET_NO_INSTALL ON CACHE BOOL "Don't install any libraries build for enet")
|
||||
add_subdirectory(third-party/moonlight-common-c/enet)
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/enet")
|
||||
|
||||
# web server
|
||||
add_subdirectory(third-party/Simple-Web-Server)
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/Simple-Web-Server")
|
||||
|
||||
# common dependencies
|
||||
find_package(OpenSSL REQUIRED)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
find_package(Threads REQUIRED)
|
||||
pkg_check_modules(CURL REQUIRED libcurl)
|
||||
|
||||
# miniupnp
|
||||
set(UPNPC_BUILD_SHARED OFF CACHE BOOL "No shared libraries")
|
||||
set(UPNPC_BUILD_TESTS OFF CACHE BOOL "Don't build tests for miniupnpc")
|
||||
set(UPNPC_BUILD_SAMPLE OFF CACHE BOOL "Don't build samples for miniupnpc")
|
||||
set(UPNPC_NO_INSTALL ON CACHE BOOL "Don't install any libraries build for miniupnpc")
|
||||
add_subdirectory(third-party/miniupnp/miniupnpc)
|
||||
include_directories(SYSTEM third-party/miniupnp/miniupnpc/include)
|
||||
pkg_check_modules(MINIUPNP miniupnpc REQUIRED)
|
||||
include_directories(SYSTEM ${MINIUPNP_INCLUDE_DIRS})
|
||||
|
||||
# ffmpeg pre-compiled binaries
|
||||
if(WIN32)
|
||||
@@ -23,12 +25,12 @@ if(WIN32)
|
||||
message(FATAL_ERROR "Unsupported system processor:" ${CMAKE_SYSTEM_PROCESSOR})
|
||||
endif()
|
||||
set(FFMPEG_PLATFORM_LIBRARIES mfplat ole32 strmiids mfuuid vpl)
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-windows-x86_64")
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_SOURCE_DIR}/third-party/build-deps/ffmpeg/windows-x86_64")
|
||||
elseif(APPLE)
|
||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-macos-x86_64")
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_SOURCE_DIR}/third-party/build-deps/ffmpeg/macos-x86_64")
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-macos-aarch64")
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_SOURCE_DIR}/third-party/build-deps/ffmpeg/macos-aarch64")
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "powerpc")
|
||||
message(FATAL_ERROR "PowerPC is not supported on macOS")
|
||||
else()
|
||||
@@ -38,49 +40,43 @@ elseif(UNIX)
|
||||
set(FFMPEG_PLATFORM_LIBRARIES va va-drm va-x11 vdpau X11)
|
||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
||||
list(APPEND FFMPEG_PLATFORM_LIBRARIES mfx)
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-linux-x86_64")
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_SOURCE_DIR}/third-party/build-deps/ffmpeg/linux-x86_64")
|
||||
set(CPACK_DEB_PLATFORM_PACKAGE_DEPENDS "libmfx1,")
|
||||
set(CPACK_RPM_PLATFORM_PACKAGE_REQUIRES "intel-mediasdk >= 22.3.0,")
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-linux-aarch64")
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_SOURCE_DIR}/third-party/build-deps/ffmpeg/linux-aarch64")
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64")
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-linux-powerpc64le")
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_SOURCE_DIR}/third-party/build-deps/ffmpeg/linux-powerpc64le")
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported system processor:" ${CMAKE_SYSTEM_PROCESSOR})
|
||||
endif()
|
||||
endif()
|
||||
set(FFMPEG_INCLUDE_DIRS
|
||||
${FFMPEG_PREPARED_BINARIES}/include)
|
||||
if(EXISTS ${FFMPEG_PREPARED_BINARIES}/lib/libhdr10plus.a)
|
||||
"${FFMPEG_PREPARED_BINARIES}/include")
|
||||
if(EXISTS "${FFMPEG_PREPARED_BINARIES}/lib/libhdr10plus.a")
|
||||
set(HDR10_PLUS_LIBRARY
|
||||
${FFMPEG_PREPARED_BINARIES}/lib/libhdr10plus.a)
|
||||
"${FFMPEG_PREPARED_BINARIES}/lib/libhdr10plus.a")
|
||||
endif()
|
||||
set(FFMPEG_LIBRARIES
|
||||
${FFMPEG_PREPARED_BINARIES}/lib/libavcodec.a
|
||||
${FFMPEG_PREPARED_BINARIES}/lib/libavutil.a
|
||||
${FFMPEG_PREPARED_BINARIES}/lib/libcbs.a
|
||||
${FFMPEG_PREPARED_BINARIES}/lib/libSvtAv1Enc.a
|
||||
${FFMPEG_PREPARED_BINARIES}/lib/libswscale.a
|
||||
${FFMPEG_PREPARED_BINARIES}/lib/libx264.a
|
||||
${FFMPEG_PREPARED_BINARIES}/lib/libx265.a
|
||||
"${FFMPEG_PREPARED_BINARIES}/lib/libavcodec.a"
|
||||
"${FFMPEG_PREPARED_BINARIES}/lib/libavutil.a"
|
||||
"${FFMPEG_PREPARED_BINARIES}/lib/libcbs.a"
|
||||
"${FFMPEG_PREPARED_BINARIES}/lib/libSvtAv1Enc.a"
|
||||
"${FFMPEG_PREPARED_BINARIES}/lib/libswscale.a"
|
||||
"${FFMPEG_PREPARED_BINARIES}/lib/libx264.a"
|
||||
"${FFMPEG_PREPARED_BINARIES}/lib/libx265.a"
|
||||
${HDR10_PLUS_LIBRARY}
|
||||
${FFMPEG_PLATFORM_LIBRARIES})
|
||||
|
||||
# common dependencies
|
||||
find_package(OpenSSL REQUIRED)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
find_package(Threads REQUIRED)
|
||||
pkg_check_modules(CURL REQUIRED libcurl)
|
||||
|
||||
# platform specific dependencies
|
||||
if(WIN32)
|
||||
include(${CMAKE_MODULE_PATH}/dependencies/windows.cmake)
|
||||
include("${CMAKE_MODULE_PATH}/dependencies/windows.cmake")
|
||||
elseif(UNIX)
|
||||
include(${CMAKE_MODULE_PATH}/dependencies/unix.cmake)
|
||||
include("${CMAKE_MODULE_PATH}/dependencies/unix.cmake")
|
||||
|
||||
if(APPLE)
|
||||
include(${CMAKE_MODULE_PATH}/dependencies/macos.cmake)
|
||||
include("${CMAKE_MODULE_PATH}/dependencies/macos.cmake")
|
||||
else()
|
||||
include(${CMAKE_MODULE_PATH}/dependencies/linux.cmake)
|
||||
include("${CMAKE_MODULE_PATH}/dependencies/linux.cmake")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# windows specific dependencies
|
||||
|
||||
set(Boost_USE_STATIC_LIBS ON) # cmake-lint: disable=C0103
|
||||
# Boost >= 1.82.0 is required for boost::json::value::set_at_pointer() support
|
||||
# todo - are we actually using json? I think this was attempted to be used in a PR, but we ended up not using json
|
||||
find_package(Boost 1.82.0 COMPONENTS locale log filesystem program_options json REQUIRED)
|
||||
find_package(Boost 1.71.0 COMPONENTS locale log filesystem program_options REQUIRED)
|
||||
|
||||
# nlohmann_json
|
||||
pkg_check_modules(NLOHMANN_JSON nlohmann_json REQUIRED IMPORTED_TARGET)
|
||||
|
||||
@@ -5,17 +5,17 @@ macro(GEN_WAYLAND wayland_directory subdirectory filename)
|
||||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/generated-src)
|
||||
|
||||
message("wayland-scanner private-code \
|
||||
${CMAKE_SOURCE_DIR}/third-party/${wayland_directory}/${subdirectory}/${filename}.xml \
|
||||
${wayland_directory}/${subdirectory}/${filename}.xml \
|
||||
${CMAKE_BINARY_DIR}/generated-src/${filename}.c")
|
||||
message("wayland-scanner client-header \
|
||||
${CMAKE_SOURCE_DIR}/third-party/${wayland_directory}/${subdirectory}/${filename}.xml \
|
||||
${wayland_directory}/${subdirectory}/${filename}.xml \
|
||||
${CMAKE_BINARY_DIR}/generated-src/${filename}.h")
|
||||
execute_process(
|
||||
COMMAND wayland-scanner private-code
|
||||
${CMAKE_SOURCE_DIR}/third-party/${wayland_directory}/${subdirectory}/${filename}.xml
|
||||
${wayland_directory}/${subdirectory}/${filename}.xml
|
||||
${CMAKE_BINARY_DIR}/generated-src/${filename}.c
|
||||
COMMAND wayland-scanner client-header
|
||||
${CMAKE_SOURCE_DIR}/third-party/${wayland_directory}/${subdirectory}/${filename}.xml
|
||||
${wayland_directory}/${subdirectory}/${filename}.xml
|
||||
${CMAKE_BINARY_DIR}/generated-src/${filename}.h
|
||||
|
||||
RESULT_VARIABLE EXIT_INT
|
||||
|
||||
@@ -12,9 +12,14 @@ set(CPACK_PACKAGE_ICON ${PROJECT_SOURCE_DIR}/sunshine.png)
|
||||
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}")
|
||||
set(CPACK_STRIP_FILES YES)
|
||||
|
||||
# install npm modules
|
||||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/node_modules"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}/web")
|
||||
#install common assets
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}"
|
||||
PATTERN "web" EXCLUDE)
|
||||
|
||||
# install built vite assets
|
||||
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/assets/web"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}")
|
||||
|
||||
# platform specific packaging
|
||||
if(WIN32)
|
||||
|
||||
@@ -8,10 +8,13 @@ if(${SUNSHINE_BUILD_APPIMAGE} OR ${SUNSHINE_BUILD_FLATPAK})
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}/systemd/user")
|
||||
else()
|
||||
find_package(Systemd)
|
||||
find_package(Udev)
|
||||
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/85-sunshine.rules"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/udev/rules.d")
|
||||
DESTINATION "${UDEV_RULES_INSTALL_DIR}")
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/systemd/user")
|
||||
DESTINATION "${SYSTEMD_USER_UNIT_INSTALL_DIR}")
|
||||
endif()
|
||||
|
||||
# Post install
|
||||
@@ -38,6 +41,7 @@ set(CPACK_DEBIAN_PACKAGE_DEPENDS "\
|
||||
libvdpau1, \
|
||||
libwayland-client0, \
|
||||
libx11-6, \
|
||||
miniupnpc, \
|
||||
openssl | libssl3")
|
||||
set(CPACK_RPM_PACKAGE_REQUIRES "\
|
||||
${CPACK_RPM_PLATFORM_PACKAGE_REQUIRES} \
|
||||
@@ -54,6 +58,7 @@ set(CPACK_RPM_PACKAGE_REQUIRES "\
|
||||
libvdpau >= 1.5, \
|
||||
libwayland-client >= 1.20.0, \
|
||||
libX11 >= 1.7.3.1, \
|
||||
miniupnpc >= 2.2.4, \
|
||||
numactl-libs >= 2.0.14, \
|
||||
openssl >= 3.0.2, \
|
||||
pulseaudio-libs >= 10.0")
|
||||
@@ -63,19 +68,19 @@ set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF)
|
||||
|
||||
# application icon
|
||||
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps")
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps")
|
||||
|
||||
# tray icon
|
||||
if(${SUNSHINE_TRAY} STREQUAL 1)
|
||||
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/status"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status"
|
||||
RENAME "sunshine-tray.svg")
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/images/sunshine-playing.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/status")
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/images/sunshine-pausing.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/status")
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/images/sunshine-locked.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/status")
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-playing.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status")
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-pausing.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status")
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-locked.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status")
|
||||
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "\
|
||||
${CPACK_DEBIAN_PACKAGE_DEPENDS}, \
|
||||
@@ -89,17 +94,17 @@ endif()
|
||||
# desktop file
|
||||
# todo - validate desktop files with `desktop-file-validate`
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.desktop"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications")
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
|
||||
if(NOT ${SUNSHINE_BUILD_APPIMAGE})
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine_terminal.desktop"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications")
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
|
||||
endif()
|
||||
if(${SUNSHINE_BUILD_FLATPAK})
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine_kms.desktop"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications")
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
|
||||
endif()
|
||||
|
||||
# metadata file
|
||||
# todo - validate file with `appstream-util validate-relax`
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.appdata.xml"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/metainfo")
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo")
|
||||
|
||||
@@ -10,8 +10,6 @@ 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}")
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# unix specific packaging
|
||||
# put anything here that applies to both linux and macos
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
# return here if building a macos package
|
||||
if(SUNSHINE_PACKAGE_MACOS)
|
||||
return()
|
||||
@@ -13,6 +15,3 @@ if(NOT CMAKE_INSTALL_PREFIX)
|
||||
endif()
|
||||
|
||||
install(TARGETS sunshine RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}")
|
||||
|
||||
@@ -36,15 +36,12 @@ install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/gamepad/"
|
||||
COMPONENT gamepad)
|
||||
|
||||
# Sunshine assets
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}"
|
||||
COMPONENT assets)
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/assets/"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}"
|
||||
COMPONENT assets)
|
||||
|
||||
# set(CPACK_NSIS_MUI_HEADERIMAGE "") # TODO: image should be 150x57 bmp
|
||||
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\sunshine.ico")
|
||||
set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}\\\\sunshine.ico")
|
||||
set(CPACK_NSIS_INSTALLED_ICON_NAME "${PROJECT__DIR}\\\\${PROJECT_EXE}")
|
||||
# The name of the directory that will be created in C:/Program files/
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
|
||||
@@ -60,8 +57,8 @@ SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
|
||||
nsExec::ExecToLog 'icacls \\\"$INSTDIR\\\" /reset'
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\migrate-config.bat\\\"'
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\add-firewall-rule.bat\\\"'
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\install-service.bat\\\"'
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\install-gamepad.bat\\\"'
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\install-service.bat\\\"'
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\autostart-service.bat\\\"'
|
||||
NoController:
|
||||
")
|
||||
@@ -103,7 +100,7 @@ set(CPACK_NSIS_DELETE_ICONS_EXTRA
|
||||
# Checking for previous installed versions
|
||||
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL "ON")
|
||||
|
||||
set(CPACK_NSIS_HELP_LINK "https://sunshinestream.readthedocs.io/about/installation.html")
|
||||
set(CPACK_NSIS_HELP_LINK "https://sunshinestream.readthedocs.io/en/latest/about/installation.html")
|
||||
set(CPACK_NSIS_URL_INFO_ABOUT "${CMAKE_PROJECT_HOMEPAGE_URL}")
|
||||
set(CPACK_NSIS_CONTACT "${CMAKE_PROJECT_HOMEPAGE_URL}/support")
|
||||
|
||||
|
||||
@@ -14,12 +14,12 @@ if((DEFINED ENV{BRANCH}) AND (DEFINED ENV{BUILD_VERSION}) AND (DEFINED ENV{COMMI
|
||||
else()
|
||||
find_package(Git)
|
||||
if(GIT_EXECUTABLE)
|
||||
MESSAGE("${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
get_filename_component(SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
|
||||
MESSAGE("${CMAKE_SOURCE_DIR}")
|
||||
get_filename_component(SRC_DIR "${CMAKE_SOURCE_DIR}" DIRECTORY)
|
||||
#Get current Branch
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
|
||||
#WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
#WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
OUTPUT_VARIABLE GIT_DESCRIBE_BRANCH
|
||||
RESULT_VARIABLE GIT_DESCRIBE_ERROR_CODE
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
@@ -27,7 +27,7 @@ else()
|
||||
# Gather current commit
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
|
||||
#WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
#WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
OUTPUT_VARIABLE GIT_DESCRIBE_VERSION
|
||||
RESULT_VARIABLE GIT_DESCRIBE_ERROR_CODE
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
@@ -35,7 +35,7 @@ else()
|
||||
# Check if Dirty
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} diff --quiet --exit-code
|
||||
#WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
#WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
RESULT_VARIABLE GIT_IS_DIRTY
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# source assets will be installed from this directory
|
||||
set(SUNSHINE_SOURCE_ASSETS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src_assets")
|
||||
set(SUNSHINE_SOURCE_ASSETS_DIR "${CMAKE_SOURCE_DIR}/src_assets")
|
||||
|
||||
# enable system tray, we will disable this later if we cannot find the required package config on linux
|
||||
set(SUNSHINE_TRAY 1)
|
||||
|
||||
@@ -1,9 +1,17 @@
|
||||
option(BUILD_WERROR "Enable -Werror flag." OFF)
|
||||
|
||||
# if this option is set, the build will exit after configuring special package configuration files
|
||||
option(SUNSHINE_CONFIGURE_ONLY "Configure special files only, then exit." OFF)
|
||||
|
||||
option(SUNSHINE_ENABLE_TRAY "Enable system tray icon. This option will be ignored on macOS." ON)
|
||||
option(SUNSHINE_REQUIRE_TRAY "Require system tray icon. Fail the build if tray requirements are not met." ON)
|
||||
|
||||
option(SUNSHINE_SYSTEM_WAYLAND_PROTOCOLS "Use system installation of wayland-protocols rather than the submodule." OFF)
|
||||
|
||||
option(CUDA_INHERIT_COMPILE_OPTIONS
|
||||
"When building CUDA code, inherit compile options from the the main project. You may want to disable this if
|
||||
your IDE throws errors about unknown flags after running cmake." ON)
|
||||
|
||||
if(APPLE)
|
||||
option(SUNSHINE_CONFIGURE_PORTFILE
|
||||
"Configure macOS Portfile. Recommended to use with SUNSHINE_CONFIGURE_ONLY" OFF)
|
||||
@@ -24,6 +32,8 @@ elseif(UNIX) # Linux
|
||||
"Enable cuda specific code." ON)
|
||||
option(SUNSHINE_ENABLE_DRM
|
||||
"Enable KMS grab if available." ON)
|
||||
option(SUNSHINE_ENABLE_VAAPI
|
||||
"Enable building vaapi specific code." ON)
|
||||
option(SUNSHINE_ENABLE_WAYLAND
|
||||
"Enable building wayland specific code." ON)
|
||||
option(SUNSHINE_ENABLE_X11
|
||||
|
||||
@@ -28,8 +28,17 @@ 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()
|
||||
# CLion complains about unknown flags after running cmake, and cannot add symbols to the index for cuda files
|
||||
if(CUDA_INHERIT_COMPILE_OPTIONS)
|
||||
foreach(flag IN LISTS SUNSHINE_COMPILE_OPTIONS)
|
||||
list(APPEND SUNSHINE_COMPILE_OPTIONS_CUDA "$<$<COMPILE_LANGUAGE:CUDA>:--compiler-options=${flag}>")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
target_compile_options(sunshine PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${SUNSHINE_COMPILE_OPTIONS}>;$<$<COMPILE_LANGUAGE:CUDA>:${SUNSHINE_COMPILE_OPTIONS_CUDA};-std=c++17>) # cmake-lint: disable=C0301
|
||||
|
||||
#WebUI build
|
||||
add_custom_target(web-ui ALL
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
COMMENT "Installing NPM Dependencies and Building the Web UI"
|
||||
COMMAND bash -c \"npm install && SUNSHINE_SOURCE_ASSETS_DIR=${SUNSHINE_SOURCE_ASSETS_DIR} SUNSHINE_ASSETS_DIR=${CMAKE_BINARY_DIR} npm run build\") # cmake-lint: disable=C0301
|
||||
|
||||
100
docker/clion-toolchain.dockerfile
Normal file
100
docker/clion-toolchain.dockerfile
Normal file
@@ -0,0 +1,100 @@
|
||||
# syntax=docker/dockerfile:1.4
|
||||
# artifacts: false
|
||||
# platforms: linux/amd64
|
||||
# platforms_pr: linux/amd64
|
||||
# no-cache-filters: toolchain-base,toolchain
|
||||
ARG BASE=ubuntu
|
||||
ARG TAG=22.04
|
||||
FROM ${BASE}:${TAG} AS toolchain-base
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
FROM toolchain-base as toolchain
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
RUN echo "target_platform: ${TARGETPLATFORM}"
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
# install dependencies
|
||||
RUN <<_DEPS
|
||||
#!/bin/bash
|
||||
set -e
|
||||
apt-get update -y
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
cmake=3.22.* \
|
||||
ca-certificates \
|
||||
gcc=4:11.2.* \
|
||||
g++=4:11.2.* \
|
||||
gdb \
|
||||
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 \
|
||||
libminiupnpc-dev \
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
libopus-dev \
|
||||
libpulse-dev \
|
||||
libssl-dev \
|
||||
libva-dev \
|
||||
libvdpau-dev \
|
||||
libwayland-dev \
|
||||
libx11-dev \
|
||||
libxcb-shm0-dev \
|
||||
libxcb-xfixes0-dev \
|
||||
libxcb1-dev \
|
||||
libxfixes-dev \
|
||||
libxrandr-dev \
|
||||
libxtst-dev \
|
||||
udev \
|
||||
wget
|
||||
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
|
||||
apt-get install -y --no-install-recommends \
|
||||
libmfx-dev
|
||||
fi
|
||||
apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
_DEPS
|
||||
|
||||
#Install Node
|
||||
# hadolint ignore=SC1091
|
||||
RUN <<_INSTALL_NODE
|
||||
#!/bin/bash
|
||||
set -e
|
||||
node_version="20.9.0"
|
||||
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
|
||||
source "$HOME/.nvm/nvm.sh"
|
||||
nvm install "$node_version"
|
||||
nvm use "$node_version"
|
||||
nvm alias default "$node_version"
|
||||
_INSTALL_NODE
|
||||
|
||||
# install cuda
|
||||
WORKDIR /build/cuda
|
||||
# versions: https://developer.nvidia.com/cuda-toolkit-archive
|
||||
ENV CUDA_VERSION="11.8.0"
|
||||
ENV CUDA_BUILD="520.61.05"
|
||||
# hadolint ignore=SC3010
|
||||
RUN <<_INSTALL_CUDA
|
||||
#!/bin/bash
|
||||
set -e
|
||||
cuda_prefix="https://developer.download.nvidia.com/compute/cuda/"
|
||||
cuda_suffix=""
|
||||
if [[ "${TARGETPLATFORM}" == 'linux/arm64' ]]; then
|
||||
cuda_suffix="_sbsa"
|
||||
fi
|
||||
url="${cuda_prefix}${CUDA_VERSION}/local_installers/cuda_${CUDA_VERSION}_${CUDA_BUILD}_linux${cuda_suffix}.run"
|
||||
echo "cuda url: ${url}"
|
||||
wget "$url" --progress=bar:force:noscroll -q --show-progress -O ./cuda.run
|
||||
chmod a+x ./cuda.run
|
||||
./cuda.run --silent --toolkit --toolkitpath=/usr/local --no-opengl-libs --no-man-page --no-drm
|
||||
rm ./cuda.run
|
||||
_INSTALL_CUDA
|
||||
@@ -43,6 +43,7 @@ apt-get install -y --no-install-recommends \
|
||||
libcurl4-openssl-dev \
|
||||
libdrm-dev \
|
||||
libevdev-dev \
|
||||
libminiupnpc-dev \
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
libopus-dev \
|
||||
@@ -60,6 +61,7 @@ apt-get install -y --no-install-recommends \
|
||||
libxtst-dev \
|
||||
nodejs \
|
||||
npm \
|
||||
udev \
|
||||
wget
|
||||
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
|
||||
apt-get install -y --no-install-recommends \
|
||||
@@ -95,9 +97,6 @@ _INSTALL_CUDA
|
||||
WORKDIR /build/sunshine/
|
||||
COPY --link .. .
|
||||
|
||||
# setup npm dependencies
|
||||
RUN npm install
|
||||
|
||||
# setup build directory
|
||||
WORKDIR /build/sunshine/build
|
||||
|
||||
@@ -106,6 +105,7 @@ RUN <<_MAKE
|
||||
#!/bin/bash
|
||||
set -e
|
||||
cmake \
|
||||
-DBUILD_WERROR=ON \
|
||||
-DCMAKE_CUDA_COMPILER:PATH=/build/cuda/bin/nvcc \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
|
||||
@@ -31,6 +31,7 @@ set -e
|
||||
apt-get update -y
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
cmake=3.18.* \
|
||||
git \
|
||||
libavdevice-dev \
|
||||
@@ -43,6 +44,7 @@ apt-get install -y --no-install-recommends \
|
||||
libcurl4-openssl-dev \
|
||||
libdrm-dev \
|
||||
libevdev-dev \
|
||||
libminiupnpc-dev \
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
libopus-dev \
|
||||
@@ -58,8 +60,7 @@ apt-get install -y --no-install-recommends \
|
||||
libxfixes-dev \
|
||||
libxrandr-dev \
|
||||
libxtst-dev \
|
||||
nodejs \
|
||||
npm \
|
||||
udev \
|
||||
wget
|
||||
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
|
||||
apt-get install -y --no-install-recommends \
|
||||
@@ -69,6 +70,17 @@ apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
_DEPS
|
||||
|
||||
#Install Node
|
||||
# hadolint ignore=SC1091
|
||||
RUN <<_INSTALL_NODE
|
||||
#!/bin/bash
|
||||
set -e
|
||||
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
|
||||
source "$HOME/.nvm/nvm.sh"
|
||||
nvm install 20.9.0
|
||||
nvm use 20.9.0
|
||||
_INSTALL_NODE
|
||||
|
||||
# install cuda
|
||||
WORKDIR /build/cuda
|
||||
# versions: https://developer.nvidia.com/cuda-toolkit-archive
|
||||
@@ -95,17 +107,19 @@ _INSTALL_CUDA
|
||||
WORKDIR /build/sunshine/
|
||||
COPY --link .. .
|
||||
|
||||
# setup npm dependencies
|
||||
RUN npm install
|
||||
|
||||
# setup build directory
|
||||
WORKDIR /build/sunshine/build
|
||||
|
||||
# cmake and cpack
|
||||
# hadolint ignore=SC1091
|
||||
RUN <<_MAKE
|
||||
#!/bin/bash
|
||||
set -e
|
||||
#Set Node version
|
||||
source "$HOME/.nvm/nvm.sh"
|
||||
nvm use 20.9.0
|
||||
cmake \
|
||||
-DBUILD_WERROR=ON \
|
||||
-DCMAKE_CUDA_COMPILER:PATH=/build/cuda/bin/nvcc \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
|
||||
@@ -52,7 +52,8 @@ dnf -y install \
|
||||
libXrandr-devel \
|
||||
libXtst-devel \
|
||||
mesa-libGL-devel \
|
||||
nodejs-npm \
|
||||
miniupnpc-devel \
|
||||
nodejs \
|
||||
numactl-devel \
|
||||
openssl-devel \
|
||||
opus-devel \
|
||||
@@ -94,9 +95,6 @@ _DEPS
|
||||
WORKDIR /build/sunshine/
|
||||
COPY --link .. .
|
||||
|
||||
# setup npm dependencies
|
||||
RUN npm install
|
||||
|
||||
# setup build directory
|
||||
WORKDIR /build/sunshine/build
|
||||
|
||||
@@ -107,6 +105,7 @@ RUN <<_MAKE
|
||||
#!/bin/bash
|
||||
set -e
|
||||
cmake \
|
||||
-DBUILD_WERROR=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DSUNSHINE_ASSETS_DIR=share/sunshine \
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# platforms_pr: linux/amd64
|
||||
# no-cache-filters: sunshine-base,artifacts,sunshine
|
||||
ARG BASE=fedora
|
||||
ARG TAG=37
|
||||
ARG TAG=39
|
||||
FROM ${BASE}:${TAG} AS sunshine-base
|
||||
|
||||
FROM sunshine-base as sunshine-build
|
||||
@@ -30,10 +30,10 @@ set -e
|
||||
dnf -y update
|
||||
dnf -y group install "Development Tools"
|
||||
dnf -y install \
|
||||
boost-devel-1.78.* \
|
||||
boost-devel-1.81.0* \
|
||||
cmake-3.27.* \
|
||||
gcc-12.2.* \
|
||||
gcc-c++-12.2.* \
|
||||
gcc-13.2.* \
|
||||
gcc-c++-13.2.* \
|
||||
git \
|
||||
libappindicator-gtk3-devel \
|
||||
libcap-devel \
|
||||
@@ -52,7 +52,8 @@ dnf -y install \
|
||||
libXrandr-devel \
|
||||
libXtst-devel \
|
||||
mesa-libGL-devel \
|
||||
nodejs-npm \
|
||||
miniupnpc-devel \
|
||||
nodejs \
|
||||
numactl-devel \
|
||||
openssl-devel \
|
||||
opus-devel \
|
||||
@@ -67,44 +68,44 @@ dnf clean all
|
||||
rm -rf /var/cache/yum
|
||||
_DEPS
|
||||
|
||||
# install cuda
|
||||
WORKDIR /build/cuda
|
||||
# versions: https://developer.nvidia.com/cuda-toolkit-archive
|
||||
ENV CUDA_VERSION="12.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
|
||||
# todo - enable cuda once it's supported for gcc 13 and fedora 39
|
||||
## 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_CUDA_COMPILER:PATH=/build/cuda/bin/nvcc \
|
||||
-DBUILD_WERROR=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DSUNSHINE_ASSETS_DIR=share/sunshine \
|
||||
@@ -112,7 +113,7 @@ cmake \
|
||||
-DSUNSHINE_ENABLE_WAYLAND=ON \
|
||||
-DSUNSHINE_ENABLE_X11=ON \
|
||||
-DSUNSHINE_ENABLE_DRM=ON \
|
||||
-DSUNSHINE_ENABLE_CUDA=ON \
|
||||
-DSUNSHINE_ENABLE_CUDA=OFF \
|
||||
/build/sunshine
|
||||
make -j "$(nproc)"
|
||||
cpack -G RPM
|
||||
@@ -31,6 +31,7 @@ set -e
|
||||
apt-get update -y
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
gcc-10=10.5.* \
|
||||
g++-10=10.5.* \
|
||||
git \
|
||||
@@ -44,6 +45,7 @@ apt-get install -y --no-install-recommends \
|
||||
libcurl4-openssl-dev \
|
||||
libdrm-dev \
|
||||
libevdev-dev \
|
||||
libminiupnpc-dev \
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
libopus-dev \
|
||||
@@ -59,8 +61,7 @@ apt-get install -y --no-install-recommends \
|
||||
libxfixes-dev \
|
||||
libxrandr-dev \
|
||||
libxtst-dev \
|
||||
nodejs \
|
||||
npm \
|
||||
udev \
|
||||
wget
|
||||
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
|
||||
apt-get install -y --no-install-recommends \
|
||||
@@ -70,6 +71,17 @@ apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
_DEPS
|
||||
|
||||
#Install Node
|
||||
# hadolint ignore=SC1091
|
||||
RUN <<_INSTALL_NODE
|
||||
#!/bin/bash
|
||||
set -e
|
||||
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
|
||||
source "$HOME/.nvm/nvm.sh"
|
||||
nvm install 20.9.0
|
||||
nvm use 20.9.0
|
||||
_INSTALL_NODE
|
||||
|
||||
# Update gcc alias
|
||||
# https://stackoverflow.com/a/70653945/11214013
|
||||
RUN <<_GCC_ALIAS
|
||||
@@ -131,17 +143,19 @@ _INSTALL_CUDA
|
||||
WORKDIR /build/sunshine/
|
||||
COPY --link .. .
|
||||
|
||||
# setup npm dependencies
|
||||
RUN npm install
|
||||
|
||||
# setup build directory
|
||||
WORKDIR /build/sunshine/build
|
||||
|
||||
# cmake and cpack
|
||||
# hadolint ignore=SC1091
|
||||
RUN <<_MAKE
|
||||
#!/bin/bash
|
||||
set -e
|
||||
#Set Node version
|
||||
source "$HOME/.nvm/nvm.sh"
|
||||
nvm use 20.9.0
|
||||
cmake \
|
||||
-DBUILD_WERROR=ON \
|
||||
-DCMAKE_CUDA_COMPILER:PATH=/build/cuda/bin/nvcc \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
|
||||
@@ -32,6 +32,7 @@ apt-get update -y
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
cmake=3.22.* \
|
||||
ca-certificates \
|
||||
git \
|
||||
libayatana-appindicator3-dev \
|
||||
libavdevice-dev \
|
||||
@@ -43,6 +44,7 @@ apt-get install -y --no-install-recommends \
|
||||
libcurl4-openssl-dev \
|
||||
libdrm-dev \
|
||||
libevdev-dev \
|
||||
libminiupnpc-dev \
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
libopus-dev \
|
||||
@@ -58,8 +60,7 @@ apt-get install -y --no-install-recommends \
|
||||
libxfixes-dev \
|
||||
libxrandr-dev \
|
||||
libxtst-dev \
|
||||
nodejs \
|
||||
npm \
|
||||
udev \
|
||||
wget
|
||||
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
|
||||
apt-get install -y --no-install-recommends \
|
||||
@@ -69,6 +70,17 @@ apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
_DEPS
|
||||
|
||||
#Install Node
|
||||
# hadolint ignore=SC1091
|
||||
RUN <<_INSTALL_NODE
|
||||
#!/bin/bash
|
||||
set -e
|
||||
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
|
||||
source "$HOME/.nvm/nvm.sh"
|
||||
nvm install 20.9.0
|
||||
nvm use 20.9.0
|
||||
_INSTALL_NODE
|
||||
|
||||
# install cuda
|
||||
WORKDIR /build/cuda
|
||||
# versions: https://developer.nvidia.com/cuda-toolkit-archive
|
||||
@@ -95,17 +107,20 @@ _INSTALL_CUDA
|
||||
WORKDIR /build/sunshine/
|
||||
COPY --link .. .
|
||||
|
||||
# setup npm dependencies
|
||||
RUN npm install
|
||||
|
||||
# setup build directory
|
||||
WORKDIR /build/sunshine/build
|
||||
|
||||
# cmake and cpack
|
||||
# hadolint ignore=SC1091
|
||||
RUN <<_MAKE
|
||||
#!/bin/bash
|
||||
set -e
|
||||
#Set Node version
|
||||
source "$HOME/.nvm/nvm.sh"
|
||||
nvm use 20.9.0
|
||||
#Actually build
|
||||
cmake \
|
||||
-DBUILD_WERROR=ON \
|
||||
-DCMAKE_CUDA_COMPILER:PATH=/build/cuda/bin/nvcc \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
|
||||
@@ -2355,7 +2355,7 @@ SEARCH_INCLUDES = YES
|
||||
# RECURSIVE has no effect here.
|
||||
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
|
||||
|
||||
INCLUDE_PATH = ../third-party/ffmpeg-linux-x86_64/include/
|
||||
INCLUDE_PATH = ../third-party/build-deps/ffmpeg/linux-x86_64/include/
|
||||
|
||||
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
|
||||
# patterns (like *.h and *.hpp) to filter out the header-files in the
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
breathe==4.35.0
|
||||
furo==2023.9.10
|
||||
furo==2024.1.29
|
||||
m2r2==0.3.3.post2
|
||||
rstcheck[sphinx]==6.2.0
|
||||
rstfmt==0.0.14
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@ App Examples
|
||||
Since not all applications behave the same, we decided to create some examples to help you get started adding games
|
||||
and applications to Sunshine.
|
||||
|
||||
.. Attention:: Throughout these examples, any fields not shown are left blank. You can enhance your experience by
|
||||
.. attention:: Throughout these examples, any fields not shown are left blank. You can enhance your experience by
|
||||
adding an image or a log file (via the ``Output`` field).
|
||||
|
||||
Common Examples
|
||||
@@ -23,267 +23,330 @@ Desktop
|
||||
Steam Big Picture
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. Note:: Steam is launched as a detached command because Steam starts with a process that self updates itself and the original
|
||||
.. 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`` |
|
||||
+----------------------+------------------------------------------+----------------------------------+-----------------------------------+
|
||||
.. tab:: Linux
|
||||
|
||||
+----------------------+------------------------------------------+
|
||||
| Application Name | ``Steam Big Picture`` |
|
||||
+----------------------+------------------------------------------+
|
||||
| Detached Commands | ``setsid steam steam://open/bigpicture`` |
|
||||
+----------------------+------------------------------------------+
|
||||
| Image | ``steam.png`` |
|
||||
+----------------------+------------------------------------------+
|
||||
|
||||
.. tab:: macOS
|
||||
|
||||
+----------------------+----------------------------------+
|
||||
| Application Name | ``Steam Big Picture`` |
|
||||
+----------------------+----------------------------------+
|
||||
| Detached Commands | ``open steam://open/bigpicture`` |
|
||||
+----------------------+----------------------------------+
|
||||
| Image | ``steam.png`` |
|
||||
+----------------------+----------------------------------+
|
||||
|
||||
.. tab:: Windows
|
||||
|
||||
+----------------------+-----------------------------+
|
||||
| Application Name | ``Steam Big Picture`` |
|
||||
+----------------------+-----------------------------+
|
||||
| Detached Commands | ``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
|
||||
.. 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"`` |
|
||||
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
.. tab:: Windows
|
||||
|
||||
+----------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Application Name | ``Surviving Mars`` |
|
||||
+----------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Detached Commands | ``com.epicgames.launcher://apps/d759128018124dcabb1fbee9bb28e178%3A20729b9176c241f0b617c5723e70ec2d%3AOvenbird?action=launch&silent=true`` |
|
||||
+----------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Binary (Epic w/ working directory)
|
||||
""""""""""""""""""""""""""""""""""
|
||||
|
||||
+----------------------+-----------------------------------------------+
|
||||
| **Field** | **Windows** |
|
||||
+----------------------+-----------------------------------------------+
|
||||
| Application Name | ``Surviving Mars`` |
|
||||
+----------------------+-----------------------------------------------+
|
||||
| Command | ``cmd /c "MarsEpic.exe"`` |
|
||||
+----------------------+-----------------------------------------------+
|
||||
| Working Directory | ``C:\Program Files\Epic Games\SurvivingMars`` |
|
||||
+----------------------+-----------------------------------------------+
|
||||
.. tab:: Windows
|
||||
|
||||
+----------------------+-----------------------------------------------+
|
||||
| Application Name | ``Surviving Mars`` |
|
||||
+----------------------+-----------------------------------------------+
|
||||
| Command | ``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"`` |
|
||||
+----------------------+--------------------------------------------------------------+
|
||||
.. tab:: Windows
|
||||
|
||||
+----------------------+--------------------------------------------------------------+
|
||||
| Application Name | ``Surviving Mars`` |
|
||||
+----------------------+--------------------------------------------------------------+
|
||||
| Command | ``"C:\Program Files\Epic Games\SurvivingMars\MarsEpic.exe"`` |
|
||||
+----------------------+--------------------------------------------------------------+
|
||||
|
||||
Steam game
|
||||
^^^^^^^^^^
|
||||
|
||||
.. Note:: Using URI method will be the most consistent between various games, but does not allow a game to be launched
|
||||
.. 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"`` |
|
||||
+----------------------+-------------------------------------------+-----------------------------------+---------------------------------------------+
|
||||
.. tab:: Linux
|
||||
|
||||
+----------------------+-------------------------------------------+
|
||||
| Application Name | ``Surviving Mars`` |
|
||||
+----------------------+-------------------------------------------+
|
||||
| Detached Commands | ``setsid steam steam://rungameid/464920`` |
|
||||
+----------------------+-------------------------------------------+
|
||||
|
||||
.. tab:: macOS
|
||||
|
||||
+----------------------+-----------------------------------+
|
||||
| Application Name | ``Surviving Mars`` |
|
||||
+----------------------+-----------------------------------+
|
||||
| Detached Commands | ``open steam://rungameid/464920`` |
|
||||
+----------------------+-----------------------------------+
|
||||
|
||||
.. tab:: Windows
|
||||
|
||||
+----------------------+------------------------------+
|
||||
| Application Name | ``Surviving Mars`` |
|
||||
+----------------------+------------------------------+
|
||||
| Detached Commands | ``steam://rungameid/464920`` |
|
||||
+----------------------+------------------------------+
|
||||
|
||||
Binary (Steam w/ working directory)
|
||||
"""""""""""""""""""""""""""""""""""
|
||||
|
||||
+----------------------+-------------------------+-------------------------+------------------------------------------------------------------+
|
||||
| **Field** | **Linux** | **macOS** | **Windows** |
|
||||
+----------------------+-------------------------+-------------------------+------------------------------------------------------------------+
|
||||
| Application Name | ``Surviving Mars`` |
|
||||
+----------------------+-------------------------+-------------------------+------------------------------------------------------------------+
|
||||
| Command | ``MarsSteam`` | ``cmd /c "MarsSteam.exe"`` |
|
||||
+----------------------+-------------------------+-------------------------+------------------------------------------------------------------+
|
||||
| Working Directory | ``~/.steam/steam/SteamApps/common/Survivng Mars`` | ``C:\Program Files (x86)\Steam\steamapps\common\Surviving Mars`` |
|
||||
+----------------------+-------------------------+-------------------------+------------------------------------------------------------------+
|
||||
.. tab:: Linux
|
||||
|
||||
+----------------------+---------------------------------------------------+
|
||||
| Application Name | ``Surviving Mars`` |
|
||||
+----------------------+---------------------------------------------------+
|
||||
| Command | ``MarsSteam`` |
|
||||
+----------------------+---------------------------------------------------+
|
||||
| Working Directory | ``~/.steam/steam/SteamApps/common/Survivng Mars`` |
|
||||
+----------------------+---------------------------------------------------+
|
||||
|
||||
.. tab:: macOS
|
||||
|
||||
+----------------------+---------------------------------------------------+
|
||||
| Application Name | ``Surviving Mars`` |
|
||||
+----------------------+---------------------------------------------------+
|
||||
| Command | ``MarsSteam`` |
|
||||
+----------------------+---------------------------------------------------+
|
||||
| Working Directory | ``~/.steam/steam/SteamApps/common/Survivng Mars`` |
|
||||
+----------------------+---------------------------------------------------+
|
||||
|
||||
.. tab:: Windows
|
||||
|
||||
+----------------------+------------------------------------------------------------------+
|
||||
| Application Name | ``Surviving Mars`` |
|
||||
+----------------------+------------------------------------------------------------------+
|
||||
| Command | ``MarsSteam.exe`` |
|
||||
+----------------------+------------------------------------------------------------------+
|
||||
| Working Directory | ``C:\Program Files (x86)\Steam\steamapps\common\Surviving Mars`` |
|
||||
+----------------------+------------------------------------------------------------------+
|
||||
|
||||
Binary (Steam w/o working directory)
|
||||
""""""""""""""""""""""""""""""""""""
|
||||
|
||||
+----------------------+------------------------------+------------------------------+----------------------------------------------------------------------------------+
|
||||
| **Field** | **Linux** | **macOS** | **Windows** |
|
||||
+----------------------+------------------------------+------------------------------+----------------------------------------------------------------------------------+
|
||||
| Application Name | ``Surviving Mars`` |
|
||||
+----------------------+------------------------------+------------------------------+----------------------------------------------------------------------------------+
|
||||
| Command | ``~/.steam/steam/SteamApps/common/Survivng Mars/MarsSteam`` | ``"C:\Program Files (x86)\Steam\steamapps\common\Surviving Mars\MarsSteam.exe"`` |
|
||||
+----------------------+------------------------------+------------------------------+----------------------------------------------------------------------------------+
|
||||
.. tab:: Linux
|
||||
|
||||
Linux
|
||||
-----
|
||||
+----------------------+-------------------------------------------------------------+
|
||||
| Application Name | ``Surviving Mars`` |
|
||||
+----------------------+-------------------------------------------------------------+
|
||||
| Command | ``~/.steam/steam/SteamApps/common/Survivng Mars/MarsSteam`` |
|
||||
+----------------------+-------------------------------------------------------------+
|
||||
|
||||
Changing Resolution and Refresh Rate (Linux - X11)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
.. tab:: macOS
|
||||
|
||||
+----------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| **Field** | **Value** |
|
||||
+----------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Command Preparations | Do: ``sh -c "xrandr --output HDMI-1 --mode \"${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}\" --rate ${SUNSHINE_CLIENT_FPS}"`` |
|
||||
| +---------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| | Undo: ``xrandr --output HDMI-1 --mode 3840x2160 --rate 120`` |
|
||||
+----------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+----------------------+-------------------------------------------------------------+
|
||||
| Application Name | ``Surviving Mars`` |
|
||||
+----------------------+-------------------------------------------------------------+
|
||||
| Command | ``~/.steam/steam/SteamApps/common/Survivng Mars/MarsSteam`` |
|
||||
+----------------------+-------------------------------------------------------------+
|
||||
|
||||
.. hint::
|
||||
The above only works if the xrandr mode already exists. You will need to create new modes to stream to macOS and iOS devices, since they use non standard resolutions.
|
||||
.. tab:: Windows
|
||||
|
||||
You can update the ``Do`` command to this:
|
||||
.. code-block:: bash
|
||||
+----------------------+----------------------------------------------------------------------------------+
|
||||
| Application Name | ``Surviving Mars`` |
|
||||
+----------------------+----------------------------------------------------------------------------------+
|
||||
| Command | ``"C:\Program Files (x86)\Steam\steamapps\common\Surviving Mars\MarsSteam.exe"`` |
|
||||
+----------------------+----------------------------------------------------------------------------------+
|
||||
|
||||
bash -c "${HOME}/scripts/set-custom-res.sh \"${SUNSHINE_CLIENT_WIDTH}\" \"${SUNSHINE_CLIENT_HEIGHT}\" \"${SUNSHINE_CLIENT_FPS}\""
|
||||
Prep Commands
|
||||
-------------
|
||||
|
||||
The ``set-custom-res.sh`` will have this content:
|
||||
.. code-block:: bash
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
# Get params and set any defaults
|
||||
width=${1:-1920}
|
||||
height=${2:-1080}
|
||||
refresh_rate=${3:-60}
|
||||
|
||||
# You may need to adjust the scaling differently so the UI/text isn't too small / big
|
||||
scale=${4:-0.55}
|
||||
|
||||
# Get the name of the active display
|
||||
display_output=$(xrandr | grep " connected" | awk '{ print $1 }')
|
||||
|
||||
# Get the modeline info from the 2nd row in the cvt output
|
||||
modeline=$(cvt ${width} ${height} ${refresh_rate} | awk 'FNR == 2')
|
||||
xrandr_mode_str=${modeline//Modeline \"*\" /}
|
||||
mode_alias="${width}x${height}"
|
||||
|
||||
echo "xrandr setting new mode ${mode_alias} ${xrandr_mode_str}"
|
||||
xrandr --newmode ${mode_alias} ${xrandr_mode_str}
|
||||
xrandr --addmode ${display_output} ${mode_alias}
|
||||
|
||||
# Reset scaling
|
||||
xrandr --output ${display_output} --scale 1
|
||||
|
||||
# Apply new xrandr mode
|
||||
xrandr --output ${display_output} --primary --mode ${mode_alias} --pos 0x0 --rotate normal --scale ${scale}
|
||||
|
||||
# Optional reset your wallpaper to fit to new resolution
|
||||
# xwallpaper --zoom /path/to/wallpaper.png
|
||||
|
||||
Changing Resolution and Refresh Rate (Linux - Wayland)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| **Field** | **Value** |
|
||||
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Command Preparations | Do: ``sh -c "wlr-xrandr --output HDMI-1 --mode \"${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}@${SUNSHINE_CLIENT_FPS}Hz\""`` |
|
||||
| +-------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| | Undo: ``wlr-xrandr --output HDMI-1 --mode 3840x2160@120Hz`` |
|
||||
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Changing Resolution and Refresh Rate (Linux - KDE Plasma - Wayland and X11)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
+----------------------+----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| **Field** | **Value** |
|
||||
+----------------------+----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Command Preparations | Do: ``sh -c "kscreen-doctor output.HDMI-A-1.mode.${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}@${SUNSHINE_CLIENT_FPS}"`` |
|
||||
| +----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| | Undo: ``kscreen-doctor output.HDMI-A-1.mode.3840x2160@120`` |
|
||||
+----------------------+----------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Changing Resolution (Linux - NVIDIA)
|
||||
Changing Resolution and Refresh Rate
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
+----------------------+------------------------------------------------------------------------------------------------------+
|
||||
| **Field** | **Value** |
|
||||
+----------------------+------------------------------------------------------------------------------------------------------+
|
||||
| Command Preparations | Do: ``sh -c "${HOME}/scripts/set-custom-res.sh ${SUNSHINE_CLIENT_WIDTH} ${SUNSHINE_CLIENT_HEIGHT}"`` |
|
||||
| +------------------------------------------------------------------------------------------------------+
|
||||
| | Undo: ``sh -c "${HOME}/scripts/set-custom-res.sh 3840 2160"`` |
|
||||
+----------------------+------------------------------------------------------------------------------------------------------+
|
||||
.. tab:: Linux
|
||||
|
||||
The ``set-custom-res.sh`` will have this content:
|
||||
.. code-block:: bash
|
||||
.. tab:: X11
|
||||
|
||||
#!/bin/bash
|
||||
+----------------------+------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Command Preparations | Do: ``sh -c "xrandr --output HDMI-1 --mode \"${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}\" --rate ${SUNSHINE_CLIENT_FPS}"`` |
|
||||
| +------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| | Undo: ``xrandr --output HDMI-1 --mode 3840x2160 --rate 120`` |
|
||||
+----------------------+------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
# Get params and set any defaults
|
||||
width=${1:-1920}
|
||||
height=${2:-1080}
|
||||
output=${3:-HDMI-1}
|
||||
nvidia-settings -a CurrentMetaMode="${output}: nvidia-auto-select { ViewPortIn=${width}x${height}, ViewPortOut=${width}x${height}+0+0 }"
|
||||
.. hint::
|
||||
The above only works if the xrandr mode already exists. You will need to create new modes to stream to macOS and iOS devices, since they use non standard resolutions.
|
||||
|
||||
Flatpak
|
||||
^^^^^^^
|
||||
You can update the ``Do`` command to this:
|
||||
.. code-block:: bash
|
||||
|
||||
.. Attention:: Because Flatpak packages run in a sandboxed environment and do not normally have access to the host,
|
||||
the Flatpak of Sunshine requires commands to be prefixed with ``flatpak-spawn --host``.
|
||||
bash -c "${HOME}/scripts/set-custom-res.sh \"${SUNSHINE_CLIENT_WIDTH}\" \"${SUNSHINE_CLIENT_HEIGHT}\" \"${SUNSHINE_CLIENT_FPS}\""
|
||||
|
||||
macOS
|
||||
-----
|
||||
The ``set-custom-res.sh`` will have this content:
|
||||
.. code-block:: bash
|
||||
|
||||
Changing Resolution and Refresh Rate (macOS)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
#!/bin/bash
|
||||
|
||||
.. Note:: This example uses the `displayplacer` tool to change the resolution.
|
||||
This tool can be installed following instructions in their
|
||||
`GitHub repository <https://github.com/jakehilborn/displayplacer>`__.
|
||||
# Get params and set any defaults
|
||||
width=${1:-1920}
|
||||
height=${2:-1080}
|
||||
refresh_rate=${3:-60}
|
||||
|
||||
+----------------------+-----------------------------------------------------------------------------------------------+
|
||||
| **Field** | **Value** |
|
||||
+----------------------+-----------------------------------------------------------------------------------------------+
|
||||
| Command Preparations | Do: ``displayplacer "id:<screenId> res:1920x1080 hz:60 scaling:on origin:(0,0) degree:0"`` |
|
||||
| +-----------------------------------------------------------------------------------------------+
|
||||
| | Undo: ``displayplacer "id:<screenId> res:3840x2160 hz:120 scaling:on origin:(0,0) degree:0"`` |
|
||||
+----------------------+-----------------------------------------------------------------------------------------------+
|
||||
# You may need to adjust the scaling differently so the UI/text isn't too small / big
|
||||
scale=${4:-0.55}
|
||||
|
||||
Windows
|
||||
-------
|
||||
# Get the name of the active display
|
||||
display_output=$(xrandr | grep " connected" | awk '{ print $1 }')
|
||||
|
||||
Changing Resolution and Refresh Rate (Windows)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
# Get the modeline info from the 2nd row in the cvt output
|
||||
modeline=$(cvt ${width} ${height} ${refresh_rate} | awk 'FNR == 2')
|
||||
xrandr_mode_str=${modeline//Modeline \"*\" /}
|
||||
mode_alias="${width}x${height}"
|
||||
|
||||
.. Note:: This example uses the `QRes` tool to change the resolution and refresh rate.
|
||||
This tool can be downloaded from their `SourceForge repository <https://sourceforge.net/projects/qres/>`__.
|
||||
echo "xrandr setting new mode ${mode_alias} ${xrandr_mode_str}"
|
||||
xrandr --newmode ${mode_alias} ${xrandr_mode_str}
|
||||
xrandr --addmode ${display_output} ${mode_alias}
|
||||
|
||||
+----------------------+------------------------------------------------------------------------------------------------------------------+
|
||||
| **Field** | **Value** |
|
||||
+----------------------+------------------------------------------------------------------------------------------------------------------+
|
||||
| Command Preparations | Do: ``cmd /C FullPath\qres.exe /x:%SUNSHINE_CLIENT_WIDTH% /y:%SUNSHINE_CLIENT_HEIGHT% /r:%SUNSHINE_CLIENT_FPS%`` |
|
||||
| +------------------------------------------------------------------------------------------------------------------+
|
||||
| | Undo: ``cmd /C FullPath\qres.exe /x:3840 /y:2160 /r:120`` |
|
||||
+----------------------+------------------------------------------------------------------------------------------------------------------+
|
||||
# Reset scaling
|
||||
xrandr --output ${display_output} --scale 1
|
||||
|
||||
Elevating Commands (Windows)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
# Apply new xrandr mode
|
||||
xrandr --output ${display_output} --primary --mode ${mode_alias} --pos 0x0 --rotate normal --scale ${scale}
|
||||
|
||||
If you've installed Sunshine as a service (default), you can now specify if a command should be elevated with adminsitrative privileges.
|
||||
Simply enable the elevated option in the WEB UI, or add it to the JSON configuration.
|
||||
This is an option for both prep-cmd and regular commands and will launch the process with the current user without a UAC prompt.
|
||||
# Optional reset your wallpaper to fit to new resolution
|
||||
# xwallpaper --zoom /path/to/wallpaper.png
|
||||
|
||||
.. Note:: It's important to write the values "true" and "false" as string values, not as the typical true/false values in most JSON.
|
||||
.. tab:: Wayland
|
||||
|
||||
**Example**
|
||||
.. code-block:: json
|
||||
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Command Preparations | Do: ``sh -c "wlr-xrandr --output HDMI-1 --mode \"${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}@${SUNSHINE_CLIENT_FPS}Hz\""`` |
|
||||
| +-----------------------------------------------------------------------------------------------------------------------------------+
|
||||
| | Undo: ``wlr-xrandr --output HDMI-1 --mode 3840x2160@120Hz`` |
|
||||
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
{
|
||||
"name": "Game With AntiCheat that Requires Admin",
|
||||
"output": "",
|
||||
"cmd": "ping 127.0.0.1",
|
||||
"exclude-global-prep-cmd": "false",
|
||||
"elevated": "true",
|
||||
"prep-cmd": [
|
||||
{
|
||||
"do": "powershell.exe -command \"Start-Streaming\"",
|
||||
"undo": "powershell.exe -command \"Stop-Streaming\"",
|
||||
"elevated": "false"
|
||||
}
|
||||
],
|
||||
"image-path": ""
|
||||
}
|
||||
.. tab:: KDE Plasma (Wayland, X11)
|
||||
|
||||
+----------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Command Preparations | Do: ``sh -c "kscreen-doctor output.HDMI-A-1.mode.${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}@${SUNSHINE_CLIENT_FPS}"`` |
|
||||
| +-------------------------------------------------------------------------------------------------------------------------------+
|
||||
| | Undo: ``kscreen-doctor output.HDMI-A-1.mode.3840x2160@120`` |
|
||||
+----------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. tab:: NVIDIA
|
||||
|
||||
+----------------------+------------------------------------------------------------------------------------------------------+
|
||||
| Command Preparations | Do: ``sh -c "${HOME}/scripts/set-custom-res.sh ${SUNSHINE_CLIENT_WIDTH} ${SUNSHINE_CLIENT_HEIGHT}"`` |
|
||||
| +------------------------------------------------------------------------------------------------------+
|
||||
| | Undo: ``sh -c "${HOME}/scripts/set-custom-res.sh 3840 2160"`` |
|
||||
+----------------------+------------------------------------------------------------------------------------------------------+
|
||||
|
||||
The ``set-custom-res.sh`` will have this content:
|
||||
.. code-block:: bash
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
# Get params and set any defaults
|
||||
width=${1:-1920}
|
||||
height=${2:-1080}
|
||||
output=${3:-HDMI-1}
|
||||
nvidia-settings -a CurrentMetaMode="${output}: nvidia-auto-select { ViewPortIn=${width}x${height}, ViewPortOut=${width}x${height}+0+0 }"
|
||||
|
||||
.. tab:: macOS
|
||||
|
||||
.. tab:: displayplacer
|
||||
|
||||
.. note:: This example uses the `displayplacer` tool to change the resolution.
|
||||
This tool can be installed following instructions in their
|
||||
`GitHub repository <https://github.com/jakehilborn/displayplacer>`__.
|
||||
|
||||
+----------------------+-----------------------------------------------------------------------------------------------+
|
||||
| Command Preparations | Do: ``displayplacer "id:<screenId> res:1920x1080 hz:60 scaling:on origin:(0,0) degree:0"`` |
|
||||
| +-----------------------------------------------------------------------------------------------+
|
||||
| | Undo: ``displayplacer "id:<screenId> res:3840x2160 hz:120 scaling:on origin:(0,0) degree:0"`` |
|
||||
+----------------------+-----------------------------------------------------------------------------------------------+
|
||||
|
||||
.. tab:: Windows
|
||||
|
||||
.. tab:: QRes
|
||||
|
||||
.. note:: This example uses the `QRes` tool to change the resolution and refresh rate.
|
||||
This tool can be downloaded from their `SourceForge repository <https://sourceforge.net/projects/qres/>`__.
|
||||
|
||||
+----------------------+------------------------------------------------------------------------------------------------------------------+
|
||||
| Command Preparations | Do: ``cmd /C FullPath\qres.exe /x:%SUNSHINE_CLIENT_WIDTH% /y:%SUNSHINE_CLIENT_HEIGHT% /r:%SUNSHINE_CLIENT_FPS%`` |
|
||||
| +------------------------------------------------------------------------------------------------------------------+
|
||||
| | Undo: ``cmd /C FullPath\qres.exe /x:3840 /y:2160 /r:120`` |
|
||||
+----------------------+------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Additional Considerations
|
||||
-------------------------
|
||||
|
||||
.. tab:: Linux
|
||||
|
||||
.. tab:: Flatpak
|
||||
|
||||
.. attention:: Because Flatpak packages run in a sandboxed environment and do not normally have access to the
|
||||
host, the Flatpak of Sunshine requires commands to be prefixed with ``flatpak-spawn --host``.
|
||||
|
||||
.. tab:: Windows
|
||||
|
||||
**Elevating Commands (Windows)**
|
||||
|
||||
If you've installed Sunshine as a service (default), you can specify if a command should be elevated with
|
||||
administrative privileges. Simply enable the elevated option in the WEB UI, or add it to the JSON configuration.
|
||||
This is an option for both prep-cmd and regular commands and will launch the process with the current user without a
|
||||
UAC prompt.
|
||||
|
||||
.. note:: It is important to write the values "true" and "false" as string values, not as the typical true/false
|
||||
values in most JSON.
|
||||
|
||||
**Example**
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"name": "Game With AntiCheat that Requires Admin",
|
||||
"output": "",
|
||||
"cmd": "ping 127.0.0.1",
|
||||
"exclude-global-prep-cmd": "false",
|
||||
"elevated": "true",
|
||||
"prep-cmd": [
|
||||
{
|
||||
"do": "powershell.exe -command \"Start-Streaming\"",
|
||||
"undo": "powershell.exe -command \"Stop-Streaming\"",
|
||||
"elevated": "false"
|
||||
}
|
||||
],
|
||||
"image-path": ""
|
||||
}
|
||||
|
||||
@@ -7,4 +7,4 @@ Collection of guides written by the community!
|
||||
:maxdepth: 2
|
||||
|
||||
app_examples
|
||||
linux/linux
|
||||
linux
|
||||
|
||||
@@ -5,5 +5,6 @@ Collection of Sunshine Linux host guides.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:glob:
|
||||
|
||||
headless_ssh
|
||||
linux/*
|
||||
@@ -42,7 +42,7 @@ Once you are done, you will need to perform these 3 steps:
|
||||
**Step 2** can be replaced with autologin and starting sunshine as a service or putting
|
||||
``sunshine &`` in your ``.xinitrc`` file if you start your X server with ``startx``.
|
||||
In this case, the workaround for ``/dev/uinput`` permissions is not needed because the udev rule would be triggered
|
||||
for "physical" login. See :ref:`Linux Setup <about/usage:linux>`. I personally think autologin compromises the
|
||||
for "physical" login. See :ref:`Linux Setup <about/setup:install>`. I personally think autologin compromises the
|
||||
security of the PC, so I went with the remote SSH route. I use the PC more than for gaming, so I don't need a
|
||||
virtual display everytime I turn on the PC (E.g running updates, config changes, file/media server).
|
||||
|
||||
@@ -264,7 +264,7 @@ we will need to update the sudo configuration to execute this without being prom
|
||||
script to be executed with ``sudo``.
|
||||
|
||||
.. note::
|
||||
After I setup the :ref:`udev rule <about/usage:linux>` to get access to ``/dev/uinput``,
|
||||
After I setup the :ref:`udev rule <about/setup:install>` to get access to ``/dev/uinput``,
|
||||
I noticed when I sshed into the host without physical login, the ACL permissions on ``/dev/uinput`` were not changed.
|
||||
So I asked `reddit
|
||||
<https://www.reddit.com/r/linux_gaming/comments/14htuzv/does_sshing_into_host_trigger_udev_rule_on_the/>`__.
|
||||
@@ -273,7 +273,7 @@ we will need to update the sudo configuration to execute this without being prom
|
||||
|
||||
**Setup Script**
|
||||
|
||||
This script will take care of any precondtions prior to starting up sunshine.
|
||||
This script will take care of any preconditions prior to starting up sunshine.
|
||||
|
||||
Run the following to create a script named something like ``sunshine-setup.sh``:
|
||||
.. code-block:: bash
|
||||
@@ -522,5 +522,5 @@ If you have any feedback and any suggestions, feel free to make a post on Discor
|
||||
|
||||
.. seealso::
|
||||
Now that you have a virtual display, you may want to automate changing the resolution
|
||||
and refresh rate prior to connecting to an app. See :ref:`Changing Resolution and
|
||||
Refresh Rate <about/guides/app_examples:linux>` for more information.
|
||||
and refresh rate prior to connecting to an app. See :ref:`Changing Resolution and Refresh Rate
|
||||
<about/guides/app_examples:changing resolution and refresh rate>` for more information.
|
||||
|
||||
@@ -1,258 +0,0 @@
|
||||
Installation
|
||||
============
|
||||
The recommended method for running Sunshine is to use the `binaries`_ bundled with the `latest release`_.
|
||||
|
||||
.. Attention:: Additional setup is required after installation. See
|
||||
:ref:`Setup <about/usage:setup>`.
|
||||
|
||||
Binaries
|
||||
--------
|
||||
Binaries of Sunshine are created for each release. They are available for Linux, macOS, and Windows.
|
||||
Binaries can be found in the `latest release`_.
|
||||
|
||||
.. Tip:: Some third party packages also exist. See
|
||||
:ref:`Third Party Packages <about/third_party_packages:third party packages>`.
|
||||
|
||||
Docker
|
||||
------
|
||||
Docker images are available on `Dockerhub.io`_ and `ghcr.io`_.
|
||||
|
||||
See :ref:`Docker <about/docker:docker>` for additional information.
|
||||
|
||||
Linux
|
||||
-----
|
||||
Follow the instructions for your preferred package type below.
|
||||
|
||||
**CUDA Compatibility**
|
||||
|
||||
CUDA is used for NVFBC capture.
|
||||
|
||||
.. Tip:: See `CUDA GPUS <https://developer.nvidia.com/cuda-gpus>`__ to cross reference Compute Capability to your GPU.
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
=========================================== ============== ============== ================================
|
||||
Package CUDA Version Min Driver CUDA Compute Capabilities
|
||||
=========================================== ============== ============== ================================
|
||||
PKGBUILD User dependent User dependent User dependent
|
||||
sunshine.AppImage 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90
|
||||
sunshine.pkg.tar.zst 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90
|
||||
sunshine_{arch}.flatpak 12.0.0 525.60.13 50;52;60;61;62;70;75;80;86;90
|
||||
sunshine-debian-bookworm-{arch}.deb 12.0.0 525.60.13 50;52;60;61;62;70;75;80;86;90
|
||||
sunshine-debian-bullseye-{arch}.deb 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90
|
||||
sunshine-fedora-37-{arch}.rpm 12.0.0 525.60.13 50;52;60;61;62;70;75;80;86;90
|
||||
sunshine-fedora-38-{arch}.rpm unavailable unavailable none
|
||||
sunshine-ubuntu-20.04-{arch}.deb 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90
|
||||
sunshine-ubuntu-22.04-{arch}.deb 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90
|
||||
=========================================== ============== ============== ================================
|
||||
|
||||
AppImage
|
||||
^^^^^^^^
|
||||
According to AppImageLint the supported distro matrix of the AppImage is below.
|
||||
|
||||
- [✖] Debian oldstable (buster)
|
||||
- [✔] Debian stable (bullseye)
|
||||
- [✔] Debian testing (bookworm)
|
||||
- [✔] Debian unstable (sid)
|
||||
- [✔] Ubuntu kinetic
|
||||
- [✔] Ubuntu jammy
|
||||
- [✔] Ubuntu focal
|
||||
- [✖] Ubuntu bionic
|
||||
- [✖] Ubuntu xenial
|
||||
- [✖] Ubuntu trusty
|
||||
- [✖] CentOS 7
|
||||
|
||||
#. Download ``sunshine.AppImage`` to your home directory.
|
||||
#. Open terminal and run the following code.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
./sunshine.AppImage --install
|
||||
|
||||
Start:
|
||||
.. code-block:: bash
|
||||
|
||||
./sunshine.AppImage --install && ./sunshine.AppImage
|
||||
|
||||
Uninstall:
|
||||
.. code-block:: bash
|
||||
|
||||
./sunshine.AppImage --remove
|
||||
|
||||
Archlinux PKGBUILD
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
#. Open terminal and run the following code.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
wget https://github.com/LizardByte/Sunshine/releases/latest/download/PKGBUILD
|
||||
makepkg -fi
|
||||
|
||||
Uninstall:
|
||||
.. code-block:: bash
|
||||
|
||||
pacman -R sunshine
|
||||
|
||||
Archlinux pkg
|
||||
^^^^^^^^^^^^^
|
||||
#. Open terminal and run the following code.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
wget https://github.com/LizardByte/Sunshine/releases/latest/download/sunshine.pkg.tar.zst
|
||||
pacman -U --noconfirm sunshine.pkg.tar.zst
|
||||
|
||||
Uninstall:
|
||||
.. code-block:: bash
|
||||
|
||||
pacman -R sunshine
|
||||
|
||||
Debian Package
|
||||
^^^^^^^^^^^^^^
|
||||
#. Download ``sunshine-{ubuntu-version}.deb`` and run the following code.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo apt install -f ./sunshine-{ubuntu-version}.deb
|
||||
|
||||
.. Note:: The ``{ubuntu-version}`` is the version of ubuntu we built the package on. If you are not using Ubuntu and
|
||||
have an issue with one package, you can try another.
|
||||
|
||||
.. Tip:: You can double click the deb file to see details about the package and begin installation.
|
||||
|
||||
Uninstall:
|
||||
.. code-block:: bash
|
||||
|
||||
sudo apt remove sunshine
|
||||
|
||||
Flatpak Package
|
||||
^^^^^^^^^^^^^^^
|
||||
#. Install `Flatpak <https://flatpak.org/setup/>`__ as required.
|
||||
#. Download ``sunshine_{arch}.flatpak`` and run the following code.
|
||||
|
||||
.. Note:: Be sure to replace ``{arch}`` with the architecture for your operating system.
|
||||
|
||||
System level (recommended)
|
||||
.. code-block:: bash
|
||||
|
||||
flatpak install --system ./sunshine_{arch}.flatpak
|
||||
|
||||
User level
|
||||
.. code-block:: bash
|
||||
|
||||
flatpak install --user ./sunshine_{arch}.flatpak
|
||||
|
||||
Additional installation (required)
|
||||
.. code-block:: bash
|
||||
|
||||
flatpak run --command=additional-install.sh dev.lizardbyte.sunshine
|
||||
|
||||
Start:
|
||||
X11 and NVFBC capture (X11 Only)
|
||||
.. code-block:: bash
|
||||
|
||||
flatpak run dev.lizardbyte.sunshine
|
||||
|
||||
KMS capture (Wayland & X11)
|
||||
.. code-block:: bash
|
||||
|
||||
sudo -i PULSE_SERVER=unix:$(pactl info | awk '/Server String/{print$3}') flatpak run dev.lizardbyte.sunshine
|
||||
|
||||
Uninstall:
|
||||
.. code-block:: bash
|
||||
|
||||
flatpak run --command=remove-additional-install.sh dev.lizardbyte.sunshine
|
||||
flatpak uninstall --delete-data dev.lizardbyte.sunshine
|
||||
|
||||
RPM Package
|
||||
^^^^^^^^^^^
|
||||
#. Add `rpmfusion` repositories by running the following code.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
|
||||
https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
|
||||
|
||||
#. Download ``sunshine.rpm`` and run the following code.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo dnf install ./sunshine.rpm
|
||||
|
||||
.. Tip:: You can double click the rpm file to see details about the package and begin installation.
|
||||
|
||||
Uninstall:
|
||||
.. code-block:: bash
|
||||
|
||||
sudo dnf remove sunshine
|
||||
|
||||
macOS
|
||||
-----
|
||||
Sunshine on macOS is experimental. Gamepads do not work. Other features may not work as expected.
|
||||
|
||||
dmg
|
||||
^^^
|
||||
.. Warning:: The `dmg` does not include runtime dependencies.
|
||||
|
||||
#. Download the ``sunshine.dmg`` file and install it.
|
||||
|
||||
Uninstall:
|
||||
.. code-block:: bash
|
||||
|
||||
cd /etc/sunshine/assets
|
||||
uninstall_pkg.sh
|
||||
|
||||
Portfile
|
||||
^^^^^^^^
|
||||
#. Install `MacPorts <https://www.macports.org>`__
|
||||
#. Update the Macports sources.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo nano /opt/local/etc/macports/sources.conf
|
||||
|
||||
Add this line, replacing your username, below the line that starts with ``rsync``.
|
||||
``file:///Users/<username>/ports``
|
||||
|
||||
``Ctrl+x``, then ``Y`` to exit and save changes.
|
||||
|
||||
#. Download the ``Portfile`` to ``~/Downloads`` and run the following code.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
mkdir -p ~/ports/multimedia/sunshine
|
||||
mv ~/Downloads/Portfile ~/ports/multimedia/sunshine/
|
||||
cd ~/ports
|
||||
portindex
|
||||
sudo port install sunshine
|
||||
|
||||
#. The first time you start Sunshine, you will be asked to grant access to screen recording and your microphone.
|
||||
|
||||
Uninstall:
|
||||
.. code-block:: bash
|
||||
|
||||
sudo port uninstall sunshine
|
||||
|
||||
Windows
|
||||
-------
|
||||
|
||||
Installer
|
||||
^^^^^^^^^
|
||||
#. Download and install ``sunshine-windows-installer.exe``
|
||||
|
||||
.. Attention:: You should carefully select or unselect the options you want to install. Do not blindly install or enable
|
||||
features.
|
||||
|
||||
To uninstall, find Sunshine in the list `here <ms-settings:installed-apps>`__ and select "Uninstall" from the overflow
|
||||
menu. Different versions of Windows may provide slightly different steps for uninstall.
|
||||
|
||||
Standalone
|
||||
^^^^^^^^^^
|
||||
#. Download and extract ``sunshine-windows-portable.zip``
|
||||
|
||||
To uninstall, delete the extracted directory which contains the ``sunshine.exe`` file.
|
||||
|
||||
.. _latest release: https://github.com/LizardByte/Sunshine/releases/latest
|
||||
.. _Dockerhub.io: https://hub.docker.com/repository/docker/lizardbyte/sunshine
|
||||
.. _ghcr.io: https://github.com/orgs/LizardByte/packages?repo_name=sunshine
|
||||
626
docs/source/about/setup.rst
Normal file
626
docs/source/about/setup.rst
Normal file
@@ -0,0 +1,626 @@
|
||||
Setup
|
||||
=====
|
||||
.. _latest release: https://github.com/LizardByte/Sunshine/releases/latest
|
||||
|
||||
The recommended method for running Sunshine is to use the `binaries`_ bundled with the `latest release`_.
|
||||
|
||||
Binaries
|
||||
--------
|
||||
Binaries of Sunshine are created for each release. They are available for Linux, macOS, and Windows.
|
||||
Binaries can be found in the `latest release`_.
|
||||
|
||||
.. tip:: Some third party packages also exist. See
|
||||
:ref:`Third Party Packages <about/third_party_packages:third party packages>`.
|
||||
No support will be provided for third party packages!
|
||||
|
||||
Install
|
||||
-------
|
||||
.. tab:: Docker
|
||||
|
||||
.. warning:: The Docker images are not recommended for most users. No support will be provided!
|
||||
|
||||
Docker images are available on `Dockerhub.io <https://hub.docker.com/repository/docker/lizardbyte/sunshine>`__
|
||||
and `ghcr.io <https://github.com/orgs/LizardByte/packages?repo_name=sunshine>`__.
|
||||
|
||||
See :ref:`Docker <about/docker:docker>` for additional information.
|
||||
|
||||
.. tab:: Linux
|
||||
|
||||
**CUDA Compatibility**
|
||||
|
||||
CUDA is used for NVFBC capture.
|
||||
|
||||
.. tip:: See `CUDA GPUS <https://developer.nvidia.com/cuda-gpus>`__ to cross reference Compute Capability to your GPU.
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
=========================================== ============== ============== ================================
|
||||
Package CUDA Version Min Driver CUDA Compute Capabilities
|
||||
=========================================== ============== ============== ================================
|
||||
PKGBUILD User dependent User dependent User dependent
|
||||
sunshine.AppImage 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90
|
||||
sunshine.pkg.tar.zst 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90
|
||||
sunshine_{arch}.flatpak 12.0.0 525.60.13 50;52;60;61;62;70;75;80;86;90
|
||||
sunshine-debian-bookworm-{arch}.deb 12.0.0 525.60.13 50;52;60;61;62;70;75;80;86;90
|
||||
sunshine-debian-bullseye-{arch}.deb 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90
|
||||
sunshine-fedora-38-{arch}.rpm unavailable unavailable none
|
||||
sunshine-fedora-39-{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
|
||||
=========================================== ============== ============== ================================
|
||||
|
||||
.. tab:: AppImage
|
||||
|
||||
According to AppImageLint the supported distro matrix of the AppImage is below.
|
||||
|
||||
- ✔ Debian bullseye
|
||||
- ✔ Debian bookworm
|
||||
- ✔ Debian trixie
|
||||
- ✖ Debian sid
|
||||
- ✔ Ubuntu mantic
|
||||
- ✔ Ubuntu lunar
|
||||
- ✔ Ubuntu jammy
|
||||
- ✔ Ubuntu focal
|
||||
- ✖ Ubuntu bionic
|
||||
- ✖ Ubuntu xenial
|
||||
- ✖ Ubuntu trusty
|
||||
- ✖ CentOS 7
|
||||
|
||||
#. Download ``sunshine.AppImage`` to your home directory.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cd ~
|
||||
wget https://github.com/LizardByte/Sunshine/releases/latest/download/sunshine.AppImage
|
||||
|
||||
#. Open terminal and run the following code.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
./sunshine.AppImage --install
|
||||
|
||||
Start:
|
||||
.. code-block:: bash
|
||||
|
||||
./sunshine.AppImage --install && ./sunshine.AppImage
|
||||
|
||||
Uninstall:
|
||||
.. code-block:: bash
|
||||
|
||||
./sunshine.AppImage --remove
|
||||
|
||||
.. tab:: Archlinux PKGBUILD
|
||||
|
||||
#. Open terminal and run the following code.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
wget https://github.com/LizardByte/Sunshine/releases/latest/download/PKGBUILD
|
||||
makepkg -fi
|
||||
|
||||
Uninstall:
|
||||
.. code-block:: bash
|
||||
|
||||
pacman -R sunshine
|
||||
|
||||
.. tab:: Archlinux pkg
|
||||
|
||||
#. Open terminal and run the following code.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
wget https://github.com/LizardByte/Sunshine/releases/latest/download/sunshine.pkg.tar.zst
|
||||
pacman -U --noconfirm sunshine.pkg.tar.zst
|
||||
|
||||
Uninstall:
|
||||
.. code-block:: bash
|
||||
|
||||
pacman -R sunshine
|
||||
|
||||
.. tab:: Debian Package
|
||||
|
||||
#. Download ``sunshine-{distro}-{distro-version}-{arch}.deb`` and run the following code.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo apt install -f ./sunshine-{distro}-{distro-version}-{arch}.deb
|
||||
|
||||
.. note:: The ``{distro-version}`` is the version of the distro we built the package on. The ``{arch}`` is the
|
||||
architecture of your operating system.
|
||||
|
||||
.. tip:: You can double click the deb file to see details about the package and begin installation.
|
||||
|
||||
Uninstall:
|
||||
.. code-block:: bash
|
||||
|
||||
sudo apt remove sunshine
|
||||
|
||||
.. tab:: Flatpak Package
|
||||
|
||||
.. important:: The instructions provided here are for the version supplied in the `latest release`_, which does
|
||||
not necessarily match the version in the Flathub repository!
|
||||
|
||||
#. Install `Flatpak <https://flatpak.org/setup/>`__ as required.
|
||||
#. Download ``sunshine_{arch}.flatpak`` and run the following code.
|
||||
|
||||
.. note:: Be sure to replace ``{arch}`` with the architecture for your operating system.
|
||||
|
||||
System level (recommended)
|
||||
.. code-block:: bash
|
||||
|
||||
flatpak install --system ./sunshine_{arch}.flatpak
|
||||
|
||||
User level
|
||||
.. code-block:: bash
|
||||
|
||||
flatpak install --user ./sunshine_{arch}.flatpak
|
||||
|
||||
Additional installation (required)
|
||||
.. code-block:: bash
|
||||
|
||||
flatpak run --command=additional-install.sh dev.lizardbyte.sunshine
|
||||
|
||||
Start:
|
||||
X11 and NVFBC capture (X11 Only)
|
||||
.. code-block:: bash
|
||||
|
||||
flatpak run dev.lizardbyte.sunshine
|
||||
|
||||
KMS capture (Wayland & X11)
|
||||
.. code-block:: bash
|
||||
|
||||
sudo -i PULSE_SERVER=unix:$(pactl info | awk '/Server String/{print$3}') \
|
||||
flatpak run dev.lizardbyte.sunshine
|
||||
|
||||
Uninstall:
|
||||
.. code-block:: bash
|
||||
|
||||
flatpak run --command=remove-additional-install.sh dev.lizardbyte.sunshine
|
||||
flatpak uninstall --delete-data dev.lizardbyte.sunshine
|
||||
|
||||
.. tab:: RPM Package
|
||||
|
||||
#. Add `rpmfusion` repositories by running the following code.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo dnf install \
|
||||
https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
|
||||
https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
|
||||
|
||||
#. Download ``sunshine-{distro}-{distro-version}-{arch}.rpm`` and run the following code.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo dnf install ./sunshine-{distro}-{distro-version}-{arch}.rpm
|
||||
|
||||
.. note:: The ``{distro-version}`` is the version of the distro we built the package on. The ``{arch}`` is the
|
||||
architecture of your operating system.
|
||||
|
||||
.. tip:: You can double click the rpm file to see details about the package and begin installation.
|
||||
|
||||
Uninstall:
|
||||
.. code-block:: bash
|
||||
|
||||
sudo dnf remove sunshine
|
||||
|
||||
The `deb`, `rpm`, `Flatpak` and `AppImage` packages should handle these steps automatically.
|
||||
Third party packages may not.
|
||||
|
||||
Sunshine needs access to `uinput` to create mouse and gamepad events.
|
||||
|
||||
#. Create `udev` rules.
|
||||
.. code-block:: bash
|
||||
|
||||
echo 'KERNEL=="uinput", SUBSYSTEM=="misc", OPTIONS+="static_node=uinput", TAG+="uaccess"' | \
|
||||
sudo tee /etc/udev/rules.d/85-sunshine.rules
|
||||
|
||||
#. Optionally, configure autostart service
|
||||
|
||||
- filename: ``~/.config/systemd/user/sunshine.service``
|
||||
- contents:
|
||||
.. code-block:: cfg
|
||||
|
||||
[Unit]
|
||||
Description=Sunshine self-hosted game stream host for Moonlight.
|
||||
StartLimitIntervalSec=500
|
||||
StartLimitBurst=5
|
||||
|
||||
[Service]
|
||||
ExecStart=<see table>
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
#Flatpak Only
|
||||
#ExecStop=flatpak kill dev.lizardbyte.sunshine
|
||||
|
||||
[Install]
|
||||
WantedBy=graphical-session.target
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
======== ============================================== ===============
|
||||
package ExecStart Auto Configured
|
||||
======== ============================================== ===============
|
||||
aur /usr/bin/sunshine ✔
|
||||
deb /usr/bin/sunshine ✔
|
||||
rpm /usr/bin/sunshine ✔
|
||||
AppImage ~/sunshine.AppImage ✔
|
||||
Flatpak flatpak run dev.lizardbyte.sunshine ✔
|
||||
======== ============================================== ===============
|
||||
|
||||
**Start once**
|
||||
.. code-block:: bash
|
||||
|
||||
systemctl --user start sunshine
|
||||
|
||||
**Start on boot**
|
||||
.. code-block:: bash
|
||||
|
||||
systemctl --user enable sunshine
|
||||
|
||||
#. Additional Setup for KMS
|
||||
.. note:: ``cap_sys_admin`` may as well be root, except you don't need to be root to run it. It is necessary to
|
||||
allow Sunshine to use KMS.
|
||||
|
||||
**Enable**
|
||||
.. code-block:: bash
|
||||
|
||||
sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))
|
||||
|
||||
**Disable (for Xorg/X11)**
|
||||
.. code-block:: bash
|
||||
|
||||
sudo setcap -r $(readlink -f $(which sunshine))
|
||||
|
||||
#. Reboot
|
||||
.. code-block:: bash
|
||||
|
||||
sudo reboot now
|
||||
|
||||
.. tab:: macOS
|
||||
|
||||
.. important:: Sunshine on macOS is experimental. Gamepads do not work. Other features may not work as expected.
|
||||
|
||||
.. tab:: dmg
|
||||
|
||||
.. warning:: The `dmg` does not include runtime dependencies. This package is not recommended for most users.
|
||||
No support will be provided!
|
||||
|
||||
#. Download the ``sunshine.dmg`` file and install it.
|
||||
|
||||
Uninstall:
|
||||
.. code-block:: bash
|
||||
|
||||
cd /etc/sunshine/assets
|
||||
uninstall_pkg.sh
|
||||
|
||||
.. tab:: Portfile
|
||||
|
||||
#. Install `MacPorts <https://www.macports.org>`__
|
||||
#. Update the Macports sources.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo nano /opt/local/etc/macports/sources.conf
|
||||
|
||||
Add this line, replacing your username, below the line that starts with ``rsync``.
|
||||
``file:///Users/<username>/ports``
|
||||
|
||||
``Ctrl+x``, then ``Y`` to exit and save changes.
|
||||
|
||||
#. Download and install by running the following code.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
mkdir -p ~/ports/multimedia/sunshine
|
||||
cd ~/ports/multimedia/sunshine
|
||||
curl -O https://github.com/LizardByte/Sunshine/releases/latest/download/Portfile
|
||||
cd ~/ports
|
||||
portindex
|
||||
sudo port install sunshine
|
||||
|
||||
#. The first time you start Sunshine, you will be asked to grant access to screen recording and your microphone.
|
||||
|
||||
#. Optionally, install service
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo port load Sunshine
|
||||
|
||||
Uninstall:
|
||||
.. code-block:: bash
|
||||
|
||||
sudo port uninstall sunshine
|
||||
|
||||
Sunshine can only access microphones on macOS due to system limitations. To stream system audio use
|
||||
`Soundflower <https://github.com/mattingalls/Soundflower>`__ or
|
||||
`BlackHole <https://github.com/ExistentialAudio/BlackHole>`__.
|
||||
|
||||
.. note:: Command Keys are not forwarded by Moonlight. Right Option-Key is mapped to CMD-Key.
|
||||
|
||||
.. caution:: Gamepads are not currently supported.
|
||||
|
||||
.. tab:: Windows
|
||||
|
||||
.. tab:: Installer
|
||||
|
||||
#. Download and install ``sunshine-windows-installer.exe``
|
||||
|
||||
.. attention:: You should carefully select or unselect the options you want to install. Do not blindly install or
|
||||
enable features.
|
||||
|
||||
To uninstall, find Sunshine in the list `here <ms-settings:installed-apps>`__ and select "Uninstall" from the
|
||||
overflow menu. Different versions of Windows may provide slightly different steps for uninstall.
|
||||
|
||||
.. tab:: Standalone
|
||||
|
||||
.. warning:: By using this package instead of the installer, performance will be reduced. This package is not
|
||||
recommended for most users. No support will be provided!
|
||||
|
||||
#. Download and extract ``sunshine-windows-portable.zip``
|
||||
#. Open command prompt as administrator
|
||||
#. Firewall rules
|
||||
|
||||
Install:
|
||||
.. code-block:: bash
|
||||
|
||||
cd /d {path to extracted directory}
|
||||
scripts/add-firewall-rule.bat
|
||||
|
||||
Uninstall:
|
||||
.. code-block:: bash
|
||||
|
||||
cd /d {path to extracted directory}
|
||||
scripts/delete-firewall-rule.bat
|
||||
|
||||
#. Virtual Gamepad Support
|
||||
|
||||
Install:
|
||||
.. code-block:: bash
|
||||
|
||||
cd /d {path to extracted directory}
|
||||
scripts/install-gamepad.bat
|
||||
|
||||
Uninstall:
|
||||
.. code-block:: bash
|
||||
|
||||
cd /d {path to extracted directory}
|
||||
scripts/uninstall-gamepad.bat
|
||||
|
||||
#. Windows service
|
||||
|
||||
Install:
|
||||
.. code-block:: bash
|
||||
|
||||
cd /d {path to extracted directory}
|
||||
scripts/install-service.bat
|
||||
scripts/autostart-service.bat
|
||||
|
||||
Uninstall:
|
||||
.. code-block:: bash
|
||||
|
||||
cd /d {path to extracted directory}
|
||||
scripts/uninstall-service.bat
|
||||
|
||||
To uninstall, delete the extracted directory which contains the ``sunshine.exe`` file.
|
||||
|
||||
Usage
|
||||
-----
|
||||
#. If Sunshine is not installed/running as a service, then start sunshine with the following command, unless a start
|
||||
command is listed in the specified package `install`_ instructions above.
|
||||
|
||||
.. note:: A service is a process that runs in the background. This is the default when installing Sunshine from the
|
||||
Windows installer. Running multiple instances of Sunshine is not advised.
|
||||
|
||||
**Basic usage**
|
||||
.. code-block:: bash
|
||||
|
||||
sunshine
|
||||
|
||||
**Specify config file**
|
||||
.. code-block:: bash
|
||||
|
||||
sunshine <directory of conf file>/sunshine.conf
|
||||
|
||||
.. note:: You do not need to specify a config file.
|
||||
If no config file is entered the default location will be used.
|
||||
|
||||
.. attention:: The configuration file specified will be created if it doesn't exist.
|
||||
|
||||
**Start Sunshine over SSH (Linux/X11)**
|
||||
Assuming you are already logged into the host, you can use this command
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
ssh <user>@<ip_address> 'export DISPLAY=:0; sunshine'
|
||||
|
||||
If you are logged into the host with only a tty (teletypewriter), you can use ``startx`` to start the
|
||||
X server prior to executing sunshine.
|
||||
You nay need to add ``sleep`` between ``startx`` and ``sunshine`` to allow more time for the display to be ready.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
ssh <user>@<ip_address> 'startx &; export DISPLAY=:0; sunshine'
|
||||
|
||||
.. tip:: You could also utilize the ``~/.bash_profile`` or ``~/.bashrc`` files to setup the ``DISPLAY``
|
||||
variable.
|
||||
|
||||
.. seealso::
|
||||
|
||||
See :ref:`Remote SSH Headless Setup
|
||||
<about/guides/linux/headless_ssh:Remote SSH Headless Setup>` on
|
||||
how to setup a headless streaming server without autologin and dummy plugs (X11 + NVidia GPUs)
|
||||
|
||||
#. Configure Sunshine in the web ui
|
||||
|
||||
The web ui is available on `https://localhost:47990 <https://localhost:47990>`__ by default. You may replace
|
||||
`localhost` with your internal ip address.
|
||||
|
||||
.. attention:: Ignore any warning given by your browser about "insecure website". This is due to the SSL certificate
|
||||
being self signed.
|
||||
|
||||
.. caution:: If running for the first time, make sure to note the username and password that you created.
|
||||
|
||||
#. Add games and applications.
|
||||
#. Adjust any configuration settings as needed.
|
||||
|
||||
#. In Moonlight, you may need to add the PC manually.
|
||||
#. When Moonlight requests for you insert the pin:
|
||||
|
||||
- Login to the web ui
|
||||
- Go to "PIN" in the Navbar
|
||||
- Type in your PIN and press Enter, you should get a Success Message
|
||||
- In Moonlight, select one of the Applications listed
|
||||
|
||||
Network
|
||||
-------
|
||||
The Sunshine user interface will be available on port 47990 by default.
|
||||
|
||||
.. warning:: Exposing ports to the internet can be dangerous. Do this at your own risk.
|
||||
|
||||
Arguments
|
||||
---------
|
||||
To get a list of available arguments run the following:
|
||||
|
||||
.. tab:: General
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sunshine --help
|
||||
|
||||
.. tab:: AppImage
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
./sunshine.AppImage --help
|
||||
|
||||
.. tab:: Flatpak
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
flatpak run --command=sunshine dev.lizardbyte.Sunshine --help
|
||||
|
||||
Shortcuts
|
||||
---------
|
||||
All shortcuts start with ``CTRL + ALT + SHIFT``, just like Moonlight
|
||||
|
||||
- ``CTRL + ALT + SHIFT + N`` - Hide/Unhide the cursor (This may be useful for Remote Desktop Mode for Moonlight)
|
||||
- ``CTRL + ALT + SHIFT + F1/F12`` - Switch to different monitor for Streaming
|
||||
|
||||
Application List
|
||||
----------------
|
||||
- Applications should be configured via the web UI.
|
||||
- A basic understanding of working directories and commands is required.
|
||||
- You can use Environment variables in place of values
|
||||
- ``$(HOME)`` will be replaced by the value of ``$HOME``
|
||||
- ``$$`` will be replaced by ``$``, e.g. ``$$(HOME)`` will be become ``$(HOME)``
|
||||
- ``env`` - Adds or overwrites Environment variables for the commands/applications run by Sunshine
|
||||
- ``"Variable name":"Variable value"``
|
||||
- ``apps`` - The list of applications
|
||||
- Advanced users may want to edit the application list manually. The format is ``json``.
|
||||
- Example ``json`` application:
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"cmd": "command to open app",
|
||||
"detached": [
|
||||
"some-command",
|
||||
"another-command"
|
||||
],
|
||||
"image-path": "/full-path/to/png-image",
|
||||
"name": "An App",
|
||||
"output": "/full-path/to/command-log-file",
|
||||
"prep-cmd": [
|
||||
{
|
||||
"do": "some-command",
|
||||
"undo": "undo-that-command"
|
||||
}
|
||||
],
|
||||
"working-dir": "/full-path/to/working-directory"
|
||||
}
|
||||
|
||||
- ``cmd`` - The main application
|
||||
- ``detached`` - A list of commands to be run and forgotten about
|
||||
|
||||
- If not specified, a process is started that sleeps indefinitely
|
||||
|
||||
- ``image-path`` - The full path to the cover art image to use.
|
||||
- ``name`` - The name of the application/game
|
||||
- ``output`` - The file where the output of the command is stored
|
||||
- ``auto-detach`` - Specifies whether the app should be treated as detached if it exits quickly
|
||||
- ``wait-all`` - Specifies whether to wait for all processes to terminate rather than just the initial process
|
||||
- ``exit-timeout`` - Specifies how long to wait in seconds for the process to gracefully exit (default: 5 seconds)
|
||||
- ``prep-cmd`` - A list of commands to be run before/after the application
|
||||
|
||||
- If any of the prep-commands fail, starting the application is aborted
|
||||
- ``do`` - Run before the application
|
||||
|
||||
- If it fails, all ``undo`` commands of the previously succeeded ``do`` commands are run
|
||||
|
||||
- ``undo`` - Run after the application has terminated
|
||||
|
||||
- Failures of ``undo`` commands are ignored
|
||||
|
||||
- ``working-dir`` - The working directory to use. If not specified, Sunshine will use the application directory.
|
||||
|
||||
- For more examples see :ref:`app examples <about/guides/app_examples:app examples>`.
|
||||
|
||||
Considerations
|
||||
--------------
|
||||
- On Windows, Sunshine uses the Desktop Duplication API which only supports capturing from the GPU used for display.
|
||||
If you want to capture and encode on the eGPU, connect a display or HDMI dummy display dongle to it and run the games
|
||||
on that display.
|
||||
- When an application is started, if there is an application already running, it will be terminated.
|
||||
- When the application has been shutdown, the stream shuts down as well.
|
||||
|
||||
- For example, if you attempt to run ``steam`` as a ``cmd`` instead of ``detached`` the stream will immediately fail.
|
||||
This is due to the method in which the steam process is executed. Other applications may behave similarly.
|
||||
- This does not apply to ``detached`` applications.
|
||||
|
||||
- The "Desktop" app works the same as any other application except it has no commands. It does not start an application,
|
||||
instead it simply starts a stream. If you removed it and would like to get it back, just add a new application with
|
||||
the name "Desktop" and "desktop.png" as the image path.
|
||||
- For the Linux flatpak you must prepend commands with ``flatpak-spawn --host``.
|
||||
|
||||
HDR Support
|
||||
-----------
|
||||
Streaming HDR content is officially supported on Windows hosts and experimentally supported for Linux hosts.
|
||||
|
||||
- General HDR support information and requirements:
|
||||
|
||||
- HDR must be activated in the host OS, which may require an HDR-capable display or EDID emulator dongle connected to your host PC.
|
||||
- You must also enable the HDR option in your Moonlight client settings, otherwise the stream will be SDR (and probably overexposed if your host is HDR).
|
||||
- A good HDR experience relies on proper HDR display calibration both in the OS and in game. HDR calibration can differ significantly between client and host displays.
|
||||
- You may also need to tune the brightness slider or HDR calibration options in game to the different HDR brightness capabilities of your client's display.
|
||||
- Some GPUs video encoders can produce lower image quality or encoding performance when streaming in HDR compared to SDR.
|
||||
|
||||
- Additional information:
|
||||
|
||||
.. tab:: Windows
|
||||
|
||||
- HDR streaming is supported for Intel, AMD, and NVIDIA GPUs that support encoding HEVC Main 10 or AV1 10-bit profiles.
|
||||
- We recommend calibrating the display by streaming the Windows HDR Calibration app to your client device and saving an HDR calibration profile to use while streaming.
|
||||
- Older games that use NVIDIA-specific NVAPI HDR rather than native Windows HDR support may not display properly in HDR.
|
||||
|
||||
.. tab:: Linux
|
||||
|
||||
- HDR streaming is supported for Intel and AMD GPUs that support encoding HEVC Main 10 or AV1 10-bit profiles using VAAPI.
|
||||
- The KMS capture backend is required for HDR capture. Other capture methods, like NvFBC or X11, do not support HDR.
|
||||
- You will need a desktop environment with a compositor that supports HDR rendering, such as Gamescope or KDE Plasma 6.
|
||||
|
||||
.. seealso::
|
||||
`Arch wiki on HDR Support for Linux <https://wiki.archlinux.org/title/HDR_monitor_support>`__ and
|
||||
`Reddit Guide for HDR Support for AMD GPUs
|
||||
<https://www.reddit.com/r/linux_gaming/comments/10m2gyx/guide_alpha_test_hdr_on_linux>`__
|
||||
|
||||
Tutorials and Guides
|
||||
--------------------
|
||||
Tutorial videos are available `here <https://www.youtube.com/playlist?list=PLMYr5_xSeuXAbhxYHz86hA1eCDugoxXY0>`_.
|
||||
|
||||
Guides are available :doc:`here <./guides/guides>`.
|
||||
|
||||
.. admonition:: Community!
|
||||
|
||||
Tutorials and Guides are community generated. Want to contribute? Reach out to us on our discord server.
|
||||
File diff suppressed because one or more lines are too long
@@ -1,314 +0,0 @@
|
||||
Usage
|
||||
=====
|
||||
#. See the `setup`_ section for your specific OS.
|
||||
#. If you did not install the service, then start sunshine with the following command, unless a start command is listed
|
||||
in the specified package :ref:`installation <about/installation:installation>` instructions.
|
||||
|
||||
.. Note:: A service is a process that runs in the background. Running multiple instances of Sunshine is not
|
||||
advised.
|
||||
|
||||
**Basic usage**
|
||||
.. code-block:: bash
|
||||
|
||||
sunshine
|
||||
|
||||
**Specify config file**
|
||||
.. code-block:: bash
|
||||
|
||||
sunshine <directory of conf file>/sunshine.conf
|
||||
|
||||
.. Note:: You do not need to specify a config file. If no config file is entered the default location will be used.
|
||||
|
||||
.. Attention:: The configuration file specified will be created if it doesn't exist.
|
||||
|
||||
**Start Sunshine over SSH (Linux/X11)**
|
||||
Assuming you are already logged into the host, you can use this command
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
ssh <user>@<ip_address> 'export DISPLAY=:0; sunshine'
|
||||
|
||||
If you are logged into the host with only a tty (teletypewriter), you can use ``startx`` to start the
|
||||
X server prior to executing sunshine.
|
||||
You nay need to add ``sleep`` between ``startx`` and ``sunshine`` to allow more time for the display to be ready.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
ssh <user>@<ip_address> 'startx &; export DISPLAY=:0; sunshine'
|
||||
|
||||
.. tip:: You could also utilize the ``~/.bash_profile`` or ``~/.bashrc`` files to setup the ``DISPLAY``
|
||||
variable.
|
||||
|
||||
.. seealso::
|
||||
|
||||
See :ref:`Remote SSH Headless Setup
|
||||
<about/guides/linux/headless_ssh:Remote SSH Headless Setup>` on
|
||||
how to setup a headless streaming server without autologin and dummy plugs (X11 + NVidia GPUs)
|
||||
|
||||
#. Configure Sunshine in the web ui
|
||||
|
||||
The web ui is available on `https://localhost:47990 <https://localhost:47990>`__ by default. You may replace
|
||||
`localhost` with your internal ip address.
|
||||
|
||||
.. Attention:: Ignore any warning given by your browser about "insecure website". This is due to the SSL certificate
|
||||
being self signed.
|
||||
|
||||
.. Caution:: If running for the first time, make sure to note the username and password that you created.
|
||||
|
||||
**Add games and applications.**
|
||||
This can be configured in the web ui.
|
||||
|
||||
.. Note:: Additionally, apps can be configured manually. `src_assets/<os>/config/apps.json` is an example of a
|
||||
list of applications that are started just before running a stream. This is the directory within the GitHub
|
||||
repo.
|
||||
|
||||
#. In Moonlight, you may need to add the PC manually.
|
||||
#. When Moonlight request you insert the correct pin on sunshine:
|
||||
|
||||
- Login to the web ui
|
||||
- Go to "PIN" in the Navbar
|
||||
- Type in your PIN and press Enter, you should get a Success Message
|
||||
- In Moonlight, select one of the Applications listed
|
||||
|
||||
Network
|
||||
-------
|
||||
The Sunshine user interface will be available on port 47990 by default.
|
||||
|
||||
.. Warning:: Exposing ports to the internet can be dangerous. Do this at your own risk.
|
||||
|
||||
Arguments
|
||||
---------
|
||||
To get a list of available arguments run the following:
|
||||
.. code-block:: bash
|
||||
|
||||
sunshine --help
|
||||
|
||||
Setup
|
||||
-----
|
||||
|
||||
Linux
|
||||
^^^^^
|
||||
The `deb`, `rpm`, `Flatpak` and `AppImage` packages handle these steps automatically. Third party packages may not.
|
||||
|
||||
Sunshine needs access to `uinput` to create mouse and gamepad events.
|
||||
|
||||
#. Create `udev` rules.
|
||||
.. code-block:: bash
|
||||
|
||||
echo 'KERNEL=="uinput", SUBSYSTEM=="misc", OPTIONS+="static_node=uinput", TAG+="uaccess"' | \
|
||||
sudo tee /etc/udev/rules.d/85-sunshine.rules
|
||||
|
||||
#. Optionally, configure autostart service
|
||||
|
||||
- filename: ``~/.config/systemd/user/sunshine.service``
|
||||
- contents:
|
||||
.. code-block:: cfg
|
||||
|
||||
[Unit]
|
||||
Description=Sunshine self-hosted game stream host for Moonlight.
|
||||
StartLimitIntervalSec=500
|
||||
StartLimitBurst=5
|
||||
|
||||
[Service]
|
||||
ExecStart=<see table>
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
#Flatpak Only
|
||||
#ExecStop=flatpak kill dev.lizardbyte.sunshine
|
||||
|
||||
[Install]
|
||||
WantedBy=graphical-session.target
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
======== ============================================== ===============
|
||||
package ExecStart Auto Configured
|
||||
======== ============================================== ===============
|
||||
aur /usr/bin/sunshine ✔
|
||||
deb /usr/bin/sunshine ✔
|
||||
rpm /usr/bin/sunshine ✔
|
||||
AppImage ~/sunshine.AppImage ✔
|
||||
Flatpak flatpak run dev.lizardbyte.sunshine ✔
|
||||
======== ============================================== ===============
|
||||
|
||||
**Start once**
|
||||
.. code-block:: bash
|
||||
|
||||
systemctl --user start sunshine
|
||||
|
||||
**Start on boot**
|
||||
.. code-block:: bash
|
||||
|
||||
systemctl --user enable sunshine
|
||||
|
||||
#. Additional Setup for KMS
|
||||
.. Note:: ``cap_sys_admin`` may as well be root, except you don't need to be root to run it. It is necessary to
|
||||
allow Sunshine to use KMS.
|
||||
|
||||
**Enable**
|
||||
.. code-block:: bash
|
||||
|
||||
sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))
|
||||
|
||||
**Disable (for Xorg/X11)**
|
||||
.. code-block:: bash
|
||||
|
||||
sudo setcap -r $(readlink -f $(which sunshine))
|
||||
|
||||
#. Reboot
|
||||
.. code-block:: bash
|
||||
|
||||
sudo reboot now
|
||||
|
||||
macOS
|
||||
^^^^^
|
||||
Sunshine can only access microphones on macOS due to system limitations. To stream system audio use
|
||||
`Soundflower <https://github.com/mattingalls/Soundflower>`__ or
|
||||
`BlackHole <https://github.com/ExistentialAudio/BlackHole>`__.
|
||||
|
||||
.. Note:: Command Keys are not forwarded by Moonlight. Right Option-Key is mapped to CMD-Key.
|
||||
|
||||
.. Caution:: Gamepads are not currently supported.
|
||||
|
||||
Configure autostart service
|
||||
**MacPorts**
|
||||
.. code-block:: bash
|
||||
|
||||
sudo port load Sunshine
|
||||
|
||||
Windows
|
||||
^^^^^^^
|
||||
For gamepad support, install `Nefarius Virtual Gamepad <https://github.com/nefarius/ViGEmBus/releases/latest>`__
|
||||
|
||||
Sunshine firewall
|
||||
**Add rule**
|
||||
.. code-block:: batch
|
||||
|
||||
cd /d "C:\Program Files\Sunshine\scripts"
|
||||
add-firewall-rule.bat
|
||||
|
||||
**Remove rule**
|
||||
.. code-block:: batch
|
||||
|
||||
cd /d "C:\Program Files\Sunshine\scripts"
|
||||
remove-firewall-rule.bat
|
||||
|
||||
Sunshine service
|
||||
**Enable**
|
||||
.. code-block:: batch
|
||||
|
||||
cd /d "C:\Program Files\Sunshine\scripts"
|
||||
install-service.bat
|
||||
|
||||
**Disable**
|
||||
.. code-block:: batch
|
||||
|
||||
cd /d "C:\Program Files\Sunshine\scripts"
|
||||
uninstall-service.bat
|
||||
|
||||
Shortcuts
|
||||
---------
|
||||
All shortcuts start with ``CTRL + ALT + SHIFT``, just like Moonlight
|
||||
|
||||
- ``CTRL + ALT + SHIFT + N`` - Hide/Unhide the cursor (This may be useful for Remote Desktop Mode for Moonlight)
|
||||
- ``CTRL + ALT + SHIFT + F1/F12`` - Switch to different monitor for Streaming
|
||||
|
||||
Application List
|
||||
----------------
|
||||
- Applications should be configured via the web UI.
|
||||
- A basic understanding of working directories and commands is required.
|
||||
- You can use Environment variables in place of values
|
||||
- ``$(HOME)`` will be replaced by the value of ``$HOME``
|
||||
- ``$$`` will be replaced by ``$``, e.g. ``$$(HOME)`` will be become ``$(HOME)``
|
||||
- ``env`` - Adds or overwrites Environment variables for the commands/applications run by Sunshine
|
||||
- ``"Variable name":"Variable value"``
|
||||
- ``apps`` - The list of applications
|
||||
- Advanced users may want to edit the application list manually. The format is ``json``.
|
||||
- Example ``json`` application:
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"cmd": "command to open app",
|
||||
"detached": [
|
||||
"some-command",
|
||||
"another-command"
|
||||
],
|
||||
"image-path": "/full-path/to/png-image",
|
||||
"name": "An App",
|
||||
"output": "/full-path/to/command-log-file",
|
||||
"prep-cmd": [
|
||||
{
|
||||
"do": "some-command",
|
||||
"undo": "undo-that-command"
|
||||
}
|
||||
],
|
||||
"working-dir": "/full-path/to/working-directory"
|
||||
}
|
||||
|
||||
- ``cmd`` - The main application
|
||||
- ``detached`` - A list of commands to be run and forgotten about
|
||||
|
||||
- If not specified, a process is started that sleeps indefinitely
|
||||
|
||||
- ``image-path`` - The full path to the cover art image to use.
|
||||
- ``name`` - The name of the application/game
|
||||
- ``output`` - The file where the output of the command is stored
|
||||
- ``auto-detach`` - Specifies whether the app should be treated as detached if it exits quickly
|
||||
- ``prep-cmd`` - A list of commands to be run before/after the application
|
||||
|
||||
- If any of the prep-commands fail, starting the application is aborted
|
||||
- ``do`` - Run before the application
|
||||
|
||||
- If it fails, all ``undo`` commands of the previously succeeded ``do`` commands are run
|
||||
|
||||
- ``undo`` - Run after the application has terminated
|
||||
|
||||
- Failures of ``undo`` commands are ignored
|
||||
|
||||
- ``working-dir`` - The working directory to use. If not specified, Sunshine will use the application directory.
|
||||
|
||||
- For more examples see :ref:`app examples <about/guides/app_examples:app examples>`.
|
||||
|
||||
Considerations
|
||||
--------------
|
||||
- On Windows, Sunshine uses the Desktop Duplication API which only supports capturing from the GPU used for display.
|
||||
If you want to capture and encode on the eGPU, connect a display or HDMI dummy display dongle to it and run the games
|
||||
on that display.
|
||||
- When an application is started, if there is an application already running, it will be terminated.
|
||||
- When the application has been shutdown, the stream shuts down as well.
|
||||
|
||||
- For example, if you attempt to run ``steam`` as a ``cmd`` instead of ``detached`` the stream will immediately fail.
|
||||
This is due to the method in which the steam process is executed. Other applications may behave similarly.
|
||||
|
||||
- The "Desktop" app works the same as any other application except it has no commands. It does not start an application,
|
||||
instead it simply starts a stream. If you removed it and would like to get it back, just add a new application with
|
||||
the name "Desktop" and "desktop.png" as the image path.
|
||||
- For the Linux flatpak you must prepend commands with ``flatpak-spawn --host``.
|
||||
|
||||
HDR Support
|
||||
-----------
|
||||
Streaming HDR content is supported for Windows hosts with NVIDIA, AMD, or Intel GPUs that support encoding HEVC Main 10.
|
||||
You must have an HDR-capable display or EDID emulator dongle connected to your host PC to activate HDR in Windows.
|
||||
|
||||
- Ensure you enable the HDR option in your Moonlight client settings, otherwise the stream will be SDR.
|
||||
- A good HDR experience relies on proper HDR display calibration both in Windows and in game. HDR calibration can differ significantly between client and host displays.
|
||||
- We recommend calibrating the display by streaming the Windows HDR Calibration app to your client device and saving an HDR calibration profile to use while streaming.
|
||||
- You may also need to tune the brightness slider or HDR calibration options in game to the different HDR brightness capabilities of your client's display.
|
||||
- Older games that use NVIDIA-specific NVAPI HDR rather than native Windows 10 OS HDR support may not display in HDR.
|
||||
- Some GPUs can produce lower image quality or encoding performance when streaming in HDR compared to SDR.
|
||||
|
||||
.. seealso::
|
||||
`Arch wiki on HDR Support for Linux <https://wiki.archlinux.org/title/HDR_monitor_support>`__ and
|
||||
`Reddit Guide for HDR Support for AMD GPUs
|
||||
<https://www.reddit.com/r/linux_gaming/comments/10m2gyx/guide_alpha_test_hdr_on_linux>`__
|
||||
|
||||
Tutorials and Guides
|
||||
--------------------
|
||||
Tutorial videos are available `here <https://www.youtube.com/playlist?list=PLMYr5_xSeuXAbhxYHz86hA1eCDugoxXY0>`_.
|
||||
|
||||
Guides are available :doc:`here <./guides/guides>`.
|
||||
|
||||
.. admonition:: Community!
|
||||
|
||||
Tutorials and Guides are community generated. Want to contribute? Reach out to us on our discord server.
|
||||
@@ -25,13 +25,14 @@ Install Requirements
|
||||
libcurl4-openssl-dev \
|
||||
libdrm-dev \ # KMS
|
||||
libevdev-dev \
|
||||
libminiupnpc-dev \
|
||||
libmfx-dev \ # x86_64 only
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
libopus-dev \
|
||||
libpulse-dev \
|
||||
libssl-dev \
|
||||
libva-dev \
|
||||
libva-dev \ # VA-API
|
||||
libvdpau-dev \
|
||||
libwayland-dev \ # Wayland
|
||||
libx11-dev \ # X11
|
||||
@@ -46,7 +47,7 @@ Install Requirements
|
||||
nvidia-cuda-dev \ # Cuda, NvFBC
|
||||
nvidia-cuda-toolkit # Cuda, NvFBC
|
||||
|
||||
Fedora 37, 38
|
||||
Fedora 38, 39
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
Install Requirements
|
||||
@@ -66,7 +67,7 @@ Install Requirements
|
||||
libdrm-devel \
|
||||
libevdev-devel \
|
||||
libnotify-devel \
|
||||
libva-devel \
|
||||
libva-devel \ # VA-API
|
||||
libvdpau-devel \
|
||||
libX11-devel \ # X11
|
||||
libxcb-devel \ # X11
|
||||
@@ -77,6 +78,7 @@ Install Requirements
|
||||
libXrandr-devel \ # X11
|
||||
libXtst-devel \ # X11
|
||||
mesa-libGL-devel \
|
||||
miniupnpc-devel \
|
||||
npm \
|
||||
numactl-devel \
|
||||
openssl-devel \
|
||||
@@ -104,15 +106,17 @@ Install Requirements
|
||||
libboost-log-dev \
|
||||
libboost-program-options-dev \
|
||||
libcap-dev \ # KMS
|
||||
libcurl4-openssl-dev \
|
||||
libdrm-dev \ # KMS
|
||||
libevdev-dev \
|
||||
libminiupnpc-dev \
|
||||
libmfx-dev \ # x86_64 only
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
libopus-dev \
|
||||
libpulse-dev \
|
||||
libssl-dev \
|
||||
libva-dev \
|
||||
libva-dev \ # VA-API
|
||||
libvdpau-dev \
|
||||
libwayland-dev \ # Wayland
|
||||
libx11-dev \ # X11
|
||||
@@ -153,14 +157,17 @@ Install Requirements
|
||||
libboost-log-dev \
|
||||
libboost-program-options-dev \
|
||||
libcap-dev \ # KMS
|
||||
libcurl4-openssl-dev \
|
||||
libdrm-dev \ # KMS
|
||||
libevdev-dev \
|
||||
libminiupnpc-dev \
|
||||
libmfx-dev \ # x86_64 only
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
libopus-dev \
|
||||
libpulse-dev \
|
||||
libssl-dev \
|
||||
libva-dev \ # VA-API
|
||||
libwayland-dev \ # Wayland
|
||||
libx11-dev \ # X11
|
||||
libxcb-shm0-dev \ # X11
|
||||
@@ -178,7 +185,7 @@ CUDA
|
||||
----
|
||||
If the version of CUDA available from your distro is not adequate, manually install CUDA.
|
||||
|
||||
.. Tip:: The version of CUDA you use will determine compatibility with various GPU generations.
|
||||
.. tip:: The version of CUDA you use will determine compatibility with various GPU generations.
|
||||
See `CUDA compatibility <https://docs.nvidia.com/deploy/cuda-compatibility/index.html>`__ for more info.
|
||||
|
||||
Select the appropriate run file based on your desired CUDA version and architecture according to
|
||||
@@ -192,16 +199,9 @@ If the version of CUDA available from your distro is not adequate, manually inst
|
||||
./cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm
|
||||
rm ./cuda.run
|
||||
|
||||
npm dependencies
|
||||
----------------
|
||||
Install npm dependencies.
|
||||
.. code-block:: bash
|
||||
|
||||
npm install
|
||||
|
||||
Build
|
||||
-----
|
||||
.. Attention:: Ensure you are in the build directory created during the clone step earlier before continuing.
|
||||
.. attention:: Ensure you are in the build directory created during the clone step earlier before continuing.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
||||
@@ -12,28 +12,21 @@ MacPorts
|
||||
Install Requirements
|
||||
.. code-block:: bash
|
||||
|
||||
sudo port install avahi boost180 cmake curl libopus npm9 pkgconfig
|
||||
sudo port install avahi boost180 cmake curl libopus miniupnpc npm9 pkgconfig
|
||||
|
||||
Homebrew
|
||||
""""""""
|
||||
Install Requirements
|
||||
.. code-block:: bash
|
||||
|
||||
brew install boost cmake node opus pkg-config
|
||||
brew install boost cmake miniupnpc node opus pkg-config
|
||||
# if there are issues with an SSL header that is not found:
|
||||
cd /usr/local/include
|
||||
ln -s ../opt/openssl/include/openssl .
|
||||
|
||||
npm dependencies
|
||||
----------------
|
||||
Install npm dependencies.
|
||||
.. code-block:: bash
|
||||
|
||||
npm install
|
||||
|
||||
Build
|
||||
-----
|
||||
.. Attention:: Ensure you are in the build directory created during the clone step earlier before continuing.
|
||||
.. attention:: Ensure you are in the build directory created during the clone step earlier before continuing.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
||||
@@ -14,23 +14,28 @@ Update all packages:
|
||||
Install dependencies:
|
||||
.. code-block:: bash
|
||||
|
||||
pacman -S base-devel cmake diffutils gcc git make mingw-w64-x86_64-binutils \
|
||||
mingw-w64-x86_64-boost mingw-w64-x86_64-cmake mingw-w64-x86_64-curl \
|
||||
mingw-w64-x86_64-onevpl mingw-w64-x86_64-openssl mingw-w64-x86_64-opus \
|
||||
mingw-w64-x86_64-toolchain
|
||||
|
||||
npm dependencies
|
||||
----------------
|
||||
Install nodejs and npm. Downloads available `here <https://nodejs.org/en/download/>`__.
|
||||
|
||||
Install npm dependencies.
|
||||
.. code-block:: bash
|
||||
|
||||
npm install
|
||||
pacman -S \
|
||||
base-devel \
|
||||
cmake \
|
||||
diffutils \
|
||||
gcc \
|
||||
git \
|
||||
make \
|
||||
mingw-w64-x86_64-binutils \
|
||||
mingw-w64-x86_64-boost \
|
||||
mingw-w64-x86_64-cmake \
|
||||
mingw-w64-x86_64-curl \
|
||||
mingw-w64-x86_64-miniupnpc \
|
||||
mingw-w64-x86_64-nlohmann-json \
|
||||
mingw-w64-x86_64-nodejs \
|
||||
mingw-w64-x86_64-onevpl \
|
||||
mingw-w64-x86_64-openssl \
|
||||
mingw-w64-x86_64-opus \
|
||||
mingw-w64-x86_64-toolchain
|
||||
|
||||
Build
|
||||
-----
|
||||
.. Attention:: Ensure you are in the build directory created during the clone step earlier before continuing.
|
||||
.. attention:: Ensure you are in the build directory created during the clone step earlier before continuing.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ source_suffix = ['.rst', '.md']
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
|
||||
# images
|
||||
html_favicon = os.path.join(root_dir, 'src_assets', 'common', 'assets', 'web', 'images', 'sunshine.ico')
|
||||
html_favicon = os.path.join(root_dir, 'src_assets', 'common', 'assets', 'web', 'public', 'images', 'sunshine.ico')
|
||||
html_logo = os.path.join(root_dir, 'sunshine.png')
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
|
||||
@@ -3,3 +3,23 @@ Contributing
|
||||
|
||||
Read our contribution guide in our organization level
|
||||
`docs <https://lizardbyte.readthedocs.io/en/latest/developers/contributing.html>`__.
|
||||
|
||||
Web UI
|
||||
------
|
||||
The Web UI uses `Vite <https://vitejs.dev/>`__ as its build system, to handle the integration of the NPM libraries.
|
||||
|
||||
The HTML pages used by the Web UI are found in ``src_assets/common/assets/web``.
|
||||
|
||||
`EJS <https://www.npmjs.com/package/vite-plugin-ejs>`__ is used as a templating system for the pages (check ``template_header.html`` and ``template_header_main.html``).
|
||||
|
||||
The Style System is provided by `Bootstrap <https://getbootstrap.com/>`__.
|
||||
|
||||
The JS framework used by the more interactive pages is `Vue <https://vuejs.org/>`__.
|
||||
|
||||
Building
|
||||
^^^^^^^^
|
||||
Sunshine already builds the UI as part of its build process, but you can make faster changes by starting vite manually.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
npm run dev
|
||||
@@ -3,7 +3,7 @@ Localization
|
||||
Sunshine and related LizardByte projects are being localized into various languages. The default language is
|
||||
`en` (English).
|
||||
|
||||
.. image:: https://badges.awesome-crowdin.com/translation-15178612-606145.png
|
||||
.. image:: https://app.lizardbyte.dev/uno/crowdin/LizardByte_graph.svg
|
||||
|
||||
CrowdIn
|
||||
-------
|
||||
@@ -41,10 +41,10 @@ situations. For example if a system tray icon is added it should be localized as
|
||||
|
||||
std::string msg = boost::locale::translate("Hello world!");
|
||||
|
||||
.. Tip:: More examples can be found in the documentation for
|
||||
.. tip:: More examples can be found in the documentation for
|
||||
`boost locale <https://www.boost.org/doc/libs/1_70_0/libs/locale/doc/html/messages_formatting.html>`__.
|
||||
|
||||
.. Warning:: This is for information only. Contributors should never include manually updated template files, or
|
||||
.. warning:: This is for information only. Contributors should never include manually updated template files, or
|
||||
manually compiled language files in Pull Requests.
|
||||
|
||||
Strings are automatically extracted from the code to the `locale/sunshine.po` template file. The generated file is
|
||||
|
||||
@@ -59,5 +59,5 @@ Format inplace with rstfmt
|
||||
|
||||
Unit Testing
|
||||
------------
|
||||
.. Todo:: Sunshine does not currently have any unit tests. If you would like to help us improve please get in contact
|
||||
.. todo:: Sunshine does not currently have any unit tests. If you would like to help us improve please get in contact
|
||||
with us, or make a PR with suggested changes.
|
||||
|
||||
@@ -8,7 +8,7 @@ Migration
|
||||
---------
|
||||
We have developed a simple migration tool to help you migrate your GameStream games and apps to Sunshine automatically.
|
||||
Please check out our `GSMS <https://github.com/LizardByte/GSMS>`__ project if you're interested in an automated
|
||||
migration option. At the time of writing this GSMS offers the ability to migrate your custom games and apps. The
|
||||
migration option. GSMS offers the ability to migrate your custom and auto-detected games and apps. The
|
||||
working directory, command, and image are all set in Sunshine's ``apps.json`` file. The box-art image is also copied
|
||||
to a specified directory.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Legal
|
||||
=====
|
||||
.. Attention:: This documentation is for informational purposes only and is not intended as legal advice. If you have
|
||||
.. attention:: This documentation is for informational purposes only and is not intended as legal advice. If you have
|
||||
any legal questions or concerns about using Sunshine, we recommend consulting with a lawyer.
|
||||
|
||||
Sunshine is licensed under the GPL-3.0 license, which allows for free use and modification of the software.
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
platform
|
||||
========
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
platform/common
|
||||
platform/linux
|
||||
platform/macos
|
||||
platform/windows
|
||||
@@ -1,4 +0,0 @@
|
||||
common
|
||||
======
|
||||
|
||||
.. Todo:: Add common.h
|
||||
@@ -1,12 +0,0 @@
|
||||
linux
|
||||
=====
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
linux/cuda
|
||||
linux/graphics
|
||||
linux/misc
|
||||
linux/vaapi
|
||||
linux/wayland
|
||||
linux/x11grab
|
||||
@@ -1,4 +0,0 @@
|
||||
graphics
|
||||
========
|
||||
|
||||
.. Todo:: Add graphics.h
|
||||
@@ -1,4 +0,0 @@
|
||||
misc
|
||||
====
|
||||
|
||||
.. Todo:: Add misc.h
|
||||
@@ -1,4 +0,0 @@
|
||||
x11grab
|
||||
=======
|
||||
|
||||
.. Todo:: Add x11grab.h
|
||||
@@ -1,11 +0,0 @@
|
||||
macos
|
||||
=====
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
macos/av_audio
|
||||
macos/av_img_t
|
||||
macos/av_video
|
||||
macos/misc
|
||||
macos/nv12_zero_device
|
||||
@@ -1,4 +0,0 @@
|
||||
av_audio
|
||||
========
|
||||
|
||||
.. Todo:: Add av_audio.h
|
||||
@@ -1,4 +0,0 @@
|
||||
av_img_t
|
||||
========
|
||||
|
||||
.. Todo:: Add av_img_t.h
|
||||
@@ -1,4 +0,0 @@
|
||||
av_video
|
||||
========
|
||||
|
||||
.. Todo:: Add av_video.h
|
||||
@@ -1,9 +0,0 @@
|
||||
windows
|
||||
=======
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
windows/display
|
||||
windows/misc
|
||||
windows/PolicyConfig
|
||||
@@ -1,4 +0,0 @@
|
||||
PolicyConfig
|
||||
============
|
||||
|
||||
.. Todo:: Add PolicyConfig.h
|
||||
@@ -1,4 +0,0 @@
|
||||
display
|
||||
=======
|
||||
|
||||
.. Todo:: Add display.h
|
||||
@@ -1,4 +0,0 @@
|
||||
utility
|
||||
=======
|
||||
|
||||
.. Todo:: Add utility.h
|
||||
@@ -1,5 +1,5 @@
|
||||
src
|
||||
===
|
||||
Source Code
|
||||
===========
|
||||
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
|
||||
@@ -52,35 +52,40 @@ Example Documentation Blocks
|
||||
// do stuff
|
||||
}
|
||||
|
||||
Code
|
||||
----
|
||||
Source
|
||||
------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: src
|
||||
:maxdepth: 1
|
||||
:glob:
|
||||
|
||||
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
|
||||
src/*
|
||||
|
||||
.. toctree::
|
||||
:caption: src/platform
|
||||
:maxdepth: 1
|
||||
:glob:
|
||||
|
||||
src/platform/*
|
||||
|
||||
.. toctree::
|
||||
:caption: src/platform/linux
|
||||
:maxdepth: 1
|
||||
:glob:
|
||||
|
||||
src/platform/linux/*
|
||||
|
||||
.. toctree::
|
||||
:caption: src/platform/macos
|
||||
:maxdepth: 1
|
||||
:glob:
|
||||
|
||||
src/platform/macos/*
|
||||
|
||||
.. toctree::
|
||||
:caption: src/platform/windows
|
||||
:maxdepth: 1
|
||||
:glob:
|
||||
|
||||
src/platform/windows/*
|
||||
5
docs/source/source_code/src/entry_handler.rst
Normal file
5
docs/source/source_code/src/entry_handler.rst
Normal file
@@ -0,0 +1,5 @@
|
||||
entry_handler
|
||||
=============
|
||||
|
||||
.. doxygenfile:: entry_handler.h
|
||||
:allow-dot-graphs:
|
||||
5
docs/source/source_code/src/file_handler.rst
Normal file
5
docs/source/source_code/src/file_handler.rst
Normal file
@@ -0,0 +1,5 @@
|
||||
file_handler
|
||||
============
|
||||
|
||||
.. doxygenfile:: file_handler.h
|
||||
:allow-dot-graphs:
|
||||
5
docs/source/source_code/src/globals.rst
Normal file
5
docs/source/source_code/src/globals.rst
Normal file
@@ -0,0 +1,5 @@
|
||||
globals
|
||||
=======
|
||||
|
||||
.. doxygenfile:: globals.h
|
||||
:allow-dot-graphs:
|
||||
5
docs/source/source_code/src/logging.rst
Normal file
5
docs/source/source_code/src/logging.rst
Normal file
@@ -0,0 +1,5 @@
|
||||
logging
|
||||
=======
|
||||
|
||||
.. doxygenfile:: logging.h
|
||||
:allow-dot-graphs:
|
||||
4
docs/source/source_code/src/platform/common.rst
Normal file
4
docs/source/source_code/src/platform/common.rst
Normal file
@@ -0,0 +1,4 @@
|
||||
common
|
||||
======
|
||||
|
||||
.. todo:: Add common.h
|
||||
4
docs/source/source_code/src/platform/linux/graphics.rst
Normal file
4
docs/source/source_code/src/platform/linux/graphics.rst
Normal file
@@ -0,0 +1,4 @@
|
||||
graphics
|
||||
========
|
||||
|
||||
.. todo:: Add graphics.h
|
||||
4
docs/source/source_code/src/platform/linux/misc.rst
Normal file
4
docs/source/source_code/src/platform/linux/misc.rst
Normal file
@@ -0,0 +1,4 @@
|
||||
misc
|
||||
====
|
||||
|
||||
.. todo:: Add misc.h
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user