Merge branch 'nightly' into nightly
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
linux/amd64
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# ignore git files
|
||||||
|
.git*
|
||||||
|
|
||||||
|
# ignore hidden files
|
||||||
|
.*
|
||||||
|
|
||||||
|
# ignore repo directories and files
|
||||||
|
docs/
|
||||||
|
packaging/
|
||||||
|
scripts/
|
||||||
|
tools/
|
||||||
|
crowdin.yml
|
||||||
|
|
||||||
|
# ignore dev directories
|
||||||
|
build/
|
||||||
|
venv/
|
||||||
@@ -6,7 +6,22 @@ body:
|
|||||||
attributes:
|
attributes:
|
||||||
value: >
|
value: >
|
||||||
**THIS IS NOT THE PLACE TO ASK FOR SUPPORT!**
|
**THIS IS NOT THE PLACE TO ASK FOR SUPPORT!**
|
||||||
Please use [Discord](https://docs.lizardbyte.dev/en/latest/about/support.html#discord) for support issues.
|
Please use our [Support Center](https://app.lizardbyte.dev/support) for support issues.
|
||||||
|
Non actionable bug reports will be locked and closed!
|
||||||
|
- type: checkboxes
|
||||||
|
attributes:
|
||||||
|
label: Is there an existing issue for this?
|
||||||
|
description: Please search to see if an issue already exists for the bug you encountered.
|
||||||
|
options:
|
||||||
|
- label: I have searched the existing issues
|
||||||
|
required: true
|
||||||
|
- type: checkboxes
|
||||||
|
attributes:
|
||||||
|
label: Is your issue described in the documentation?
|
||||||
|
description: Please read our [documentation](https://docs.lizardbyte.dev/projects/sunshine)
|
||||||
|
options:
|
||||||
|
- label: I have read the documentation
|
||||||
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: description
|
id: description
|
||||||
attributes:
|
attributes:
|
||||||
@@ -30,10 +45,11 @@ body:
|
|||||||
label: Host Operating System
|
label: Host Operating System
|
||||||
description: What version operating system are you running the software on?
|
description: What version operating system are you running the software on?
|
||||||
options:
|
options:
|
||||||
|
- Docker
|
||||||
- Linux
|
- Linux
|
||||||
- macOS
|
- macOS
|
||||||
- Windows
|
- Windows
|
||||||
- other
|
- other, n/a
|
||||||
- type: input
|
- type: input
|
||||||
id: os-version
|
id: os-version
|
||||||
attributes:
|
attributes:
|
||||||
@@ -41,28 +57,50 @@ body:
|
|||||||
description: Provide the version of the operating system. Additionally a build number would be helpful.
|
description: Provide the version of the operating system. Additionally a build number would be helpful.
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: input
|
- type: dropdown
|
||||||
id: os-architecture
|
id: os-architecture
|
||||||
attributes:
|
attributes:
|
||||||
label: Architecture
|
label: Architecture
|
||||||
placeholder: e.g. 32 bit, 64 bit, arm
|
options:
|
||||||
validations:
|
- 32 bit
|
||||||
required: true
|
- 64 bit
|
||||||
|
- arm
|
||||||
|
- other, n/a
|
||||||
- type: input
|
- type: input
|
||||||
id: version
|
id: version
|
||||||
attributes:
|
attributes:
|
||||||
label: Sunshine Version
|
label: Sunshine commit or version
|
||||||
placeholder: eg. 0.14.0
|
placeholder: eg. 0.14.0
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: input
|
- type: dropdown
|
||||||
|
id: package_type
|
||||||
|
attributes:
|
||||||
|
label: Package
|
||||||
|
description: The package you installed
|
||||||
|
options:
|
||||||
|
- Linux - AppImage
|
||||||
|
- Linux - deb
|
||||||
|
- Linux - flatpak
|
||||||
|
- Linux - rpm
|
||||||
|
- macOS - dmg
|
||||||
|
- macOS - Portfile
|
||||||
|
- macOS - pkg
|
||||||
|
- Windows - installer
|
||||||
|
- Windows - portable
|
||||||
|
- other (not listed)
|
||||||
|
- other (self built)
|
||||||
|
- other (fork of this repo)
|
||||||
|
- type: dropdown
|
||||||
id: graphics_type
|
id: graphics_type
|
||||||
attributes:
|
attributes:
|
||||||
label: GPU Type
|
label: GPU Type
|
||||||
description: The type of the installed graphics card.
|
description: The type of the installed graphics card.
|
||||||
placeholder: e.g. Intel, AMD, Nvidia
|
options:
|
||||||
validations:
|
- AMD
|
||||||
required: true
|
- Intel
|
||||||
|
- Nvidia
|
||||||
|
- none (software encoding)
|
||||||
- type: input
|
- type: input
|
||||||
id: graphics_model
|
id: graphics_model
|
||||||
attributes:
|
attributes:
|
||||||
@@ -83,8 +121,8 @@ body:
|
|||||||
id: capture_method
|
id: capture_method
|
||||||
attributes:
|
attributes:
|
||||||
label: Capture Method (Linux Only)
|
label: Capture Method (Linux Only)
|
||||||
description: The driver/mesa version of the installed graphics card.
|
description: If on Linux, the capture method being used.
|
||||||
placeholder: e.g. PipeWire/KVM/X11
|
placeholder: e.g. PipeWire/KVM/X11/KMS
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
- type: textarea
|
- type: textarea
|
||||||
|
|||||||
+149
-43
@@ -6,7 +6,7 @@ on:
|
|||||||
branches: [master, nightly]
|
branches: [master, nightly]
|
||||||
types: [opened, synchronize, reopened]
|
types: [opened, synchronize, reopened]
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
branches: [master, nightly]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -26,6 +26,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
if: ${{ github.ref == 'refs/heads/master' || github.base_ref == 'master' }}
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Verify Changelog
|
- name: Verify Changelog
|
||||||
@@ -66,10 +67,80 @@ jobs:
|
|||||||
"project(Sunshine [VERSION ${{ needs.check_changelog.outputs.next_version_bare }}]"
|
"project(Sunshine [VERSION ${{ needs.check_changelog.outputs.next_version_bare }}]"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
|
setup_release:
|
||||||
|
name: Setup Release
|
||||||
|
needs: check_changelog
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Set release details
|
||||||
|
id: release_details
|
||||||
|
run: |
|
||||||
|
# determine to create a release or not
|
||||||
|
if [[ $GITHUB_EVENT_NAME == "push" ]]; then
|
||||||
|
RELEASE=true
|
||||||
|
else
|
||||||
|
RELEASE=false
|
||||||
|
fi
|
||||||
|
|
||||||
|
# set the release tag
|
||||||
|
COMMIT=${{ github.sha }}
|
||||||
|
if [[ $GITHUB_REF == refs/heads/master ]]; then
|
||||||
|
TAG="${{ needs.check_changelog.outputs.next_version }}"
|
||||||
|
RELEASE_NAME="${{ needs.check_changelog.outputs.next_version }}"
|
||||||
|
RELEASE_BODY="${{ needs.check_changelog.outputs.release_body }}"
|
||||||
|
PRE_RELEASE="false"
|
||||||
|
elif [[ $GITHUB_REF == refs/heads/nightly ]]; then
|
||||||
|
TAG="nightly-dev"
|
||||||
|
RELEASE_NAME="nightly"
|
||||||
|
RELEASE_BODY="automated nightly release - $(date -u +'%Y-%m-%dT%H:%M:%SZ') - ${COMMIT}"
|
||||||
|
PRE_RELEASE="true"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "create_release=${RELEASE}" >> $GITHUB_OUTPUT
|
||||||
|
echo "release_tag=${TAG}" >> $GITHUB_OUTPUT
|
||||||
|
echo "release_commit=${COMMIT}" >> $GITHUB_OUTPUT
|
||||||
|
echo "release_name=${RELEASE_NAME}" >> $GITHUB_OUTPUT
|
||||||
|
echo "release_body=${RELEASE_BODY}" >> $GITHUB_OUTPUT
|
||||||
|
echo "pre_release=${PRE_RELEASE}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
create_release: ${{ steps.release_details.outputs.create_release }}
|
||||||
|
release_tag: ${{ steps.release_details.outputs.release_tag }}
|
||||||
|
release_commit: ${{ steps.release_details.outputs.release_commit }}
|
||||||
|
release_name: ${{ steps.release_details.outputs.release_name }}
|
||||||
|
release_body: ${{ steps.release_details.outputs.release_body }}
|
||||||
|
pre_release: ${{ steps.release_details.outputs.pre_release }}
|
||||||
|
|
||||||
|
setup_flatpak_matrix:
|
||||||
|
name: Setup Flatpak Matrix
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Set release details
|
||||||
|
id: flatpak_matrix
|
||||||
|
# https://www.cynkra.com/blog/2020-12-23-dynamic-gha
|
||||||
|
run: |
|
||||||
|
# determine which architectures to build
|
||||||
|
if [[ $GITHUB_EVENT_NAME == "push" ]]; then
|
||||||
|
matrix=$((
|
||||||
|
echo '{ "arch" : ["x86_64", "aarch64"] }'
|
||||||
|
) | jq -c .)
|
||||||
|
else
|
||||||
|
matrix=$((
|
||||||
|
echo '{ "arch" : ["x86_64"] }'
|
||||||
|
) | jq -c .)
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo $matrix
|
||||||
|
echo $matrix | jq .
|
||||||
|
echo "matrix=$matrix" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
matrix: ${{ steps.flatpak_matrix.outputs.matrix }}
|
||||||
|
|
||||||
build_linux_aur:
|
build_linux_aur:
|
||||||
name: Linux AUR
|
name: Linux AUR
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: check_changelog
|
needs: setup_release
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -172,14 +243,10 @@ jobs:
|
|||||||
build_linux_flatpak:
|
build_linux_flatpak:
|
||||||
name: Linux Flatpak
|
name: Linux Flatpak
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
needs: check_changelog
|
needs: [setup_release, setup_flatpak_matrix]
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false # false to test all, true to fail entire job if any fail
|
fail-fast: false # false to test all, true to fail entire job if any fail
|
||||||
matrix:
|
matrix: ${{fromJson(needs.setup_flatpak_matrix.outputs.matrix)}}
|
||||||
arch: ['x86_64', 'aarch64']
|
|
||||||
exclude:
|
|
||||||
# exclude `aarch64` on anything except a release triggering event
|
|
||||||
- arch: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) && '' || 'aarch64' }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -260,19 +327,24 @@ jobs:
|
|||||||
name: sunshine-linux-flatpak-${{ matrix.arch }}
|
name: sunshine-linux-flatpak-${{ matrix.arch }}
|
||||||
path: artifacts/
|
path: artifacts/
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create/Update GitHub Release
|
||||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
if: ${{ needs.setup_release.outputs.create_release == 'true' }}
|
||||||
uses: LizardByte/.github/actions/create_release@master
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
|
name: ${{ needs.setup_release.outputs.release_name }}
|
||||||
|
tag: ${{ needs.setup_release.outputs.release_tag }}
|
||||||
|
commit: ${{ needs.setup_release.outputs.release_commit }}
|
||||||
|
artifacts: "*artifacts/*"
|
||||||
token: ${{ secrets.GH_BOT_TOKEN }}
|
token: ${{ secrets.GH_BOT_TOKEN }}
|
||||||
next_version: ${{ needs.check_changelog.outputs.next_version }}
|
allowUpdates: true
|
||||||
last_version: ${{ needs.check_changelog.outputs.last_version }}
|
body: ${{ needs.setup_release.outputs.release_body }}
|
||||||
release_body: ${{ needs.check_changelog.outputs.release_body }}
|
discussionCategory: announcements
|
||||||
|
prerelease: ${{ needs.setup_release.outputs.pre_release }}
|
||||||
|
|
||||||
build_linux:
|
build_linux:
|
||||||
name: Linux
|
name: Linux
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs: check_changelog
|
needs: [check_changelog, setup_release]
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false # false to test all, true to fail entire job if any fail
|
fail-fast: false # false to test all, true to fail entire job if any fail
|
||||||
matrix:
|
matrix:
|
||||||
@@ -385,7 +457,7 @@ jobs:
|
|||||||
mv ./cpack_artifacts/Sunshine.rpm ../artifacts/sunshine.rpm
|
mv ./cpack_artifacts/Sunshine.rpm ../artifacts/sunshine.rpm
|
||||||
|
|
||||||
- name: Set AppImage Version
|
- name: Set AppImage Version
|
||||||
if: ${{ matrix.type == 'appimage' && ( needs.check_changelog.outputs.next_version_bare != needs.check_changelog.outputs.latest_version ) }} # yamllint disable-line rule:line-length
|
if: ${{ matrix.type == 'appimage' && ( needs.check_changelog.outputs.next_version_bare != needs.check_changelog.outputs.last_version ) }} # yamllint disable-line rule:line-length
|
||||||
run: |
|
run: |
|
||||||
version=${{ needs.check_changelog.outputs.next_version_bare }}
|
version=${{ needs.check_changelog.outputs.next_version_bare }}
|
||||||
echo "VERSION=${version}" >> $GITHUB_ENV
|
echo "VERSION=${version}" >> $GITHUB_ENV
|
||||||
@@ -442,19 +514,24 @@ jobs:
|
|||||||
name: sunshine-linux-${{ matrix.type }}
|
name: sunshine-linux-${{ matrix.type }}
|
||||||
path: artifacts/
|
path: artifacts/
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create/Update GitHub Release
|
||||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
if: ${{ needs.setup_release.outputs.create_release == 'true' }}
|
||||||
uses: LizardByte/.github/actions/create_release@master
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
|
name: ${{ needs.setup_release.outputs.release_name }}
|
||||||
|
tag: ${{ needs.setup_release.outputs.release_tag }}
|
||||||
|
commit: ${{ needs.setup_release.outputs.release_commit }}
|
||||||
|
artifacts: "*artifacts/*"
|
||||||
token: ${{ secrets.GH_BOT_TOKEN }}
|
token: ${{ secrets.GH_BOT_TOKEN }}
|
||||||
next_version: ${{ needs.check_changelog.outputs.next_version }}
|
allowUpdates: true
|
||||||
last_version: ${{ needs.check_changelog.outputs.last_version }}
|
body: ${{ needs.setup_release.outputs.release_body }}
|
||||||
release_body: ${{ needs.check_changelog.outputs.release_body }}
|
discussionCategory: announcements
|
||||||
|
prerelease: ${{ needs.setup_release.outputs.pre_release }}
|
||||||
|
|
||||||
build_mac:
|
build_mac:
|
||||||
name: MacOS
|
name: MacOS
|
||||||
runs-on: macos-11
|
runs-on: macos-11
|
||||||
needs: check_changelog
|
needs: setup_release
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -512,18 +589,23 @@ jobs:
|
|||||||
rm -f ./sunshine-macos-experimental-archive.zip
|
rm -f ./sunshine-macos-experimental-archive.zip
|
||||||
|
|
||||||
# # no artifacts to release currently
|
# # no artifacts to release currently
|
||||||
# - name: Create Release
|
# - name: Create/Update GitHub Release
|
||||||
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
# if: ${{ needs.setup_release.outputs.create_release == 'true' }}
|
||||||
# uses: LizardByte/.github/actions/create_release@master
|
# uses: ncipollo/release-action@v1
|
||||||
# with:
|
# with:
|
||||||
|
# name: ${{ needs.setup_release.outputs.release_name }}
|
||||||
|
# tag: ${{ needs.setup_release.outputs.release_tag }}
|
||||||
|
# commit: ${{ needs.setup_release.outputs.release_commit }}
|
||||||
|
# artifacts: "*artifacts/*"
|
||||||
# token: ${{ secrets.GH_BOT_TOKEN }}
|
# token: ${{ secrets.GH_BOT_TOKEN }}
|
||||||
# next_version: ${{ needs.check_changelog.outputs.next_version }}
|
# allowUpdates: true
|
||||||
# last_version: ${{ needs.check_changelog.outputs.last_version }}
|
# body: ${{ needs.setup_release.outputs.release_body }}
|
||||||
# release_body: ${{ needs.check_changelog.outputs.release_body }}
|
# discussionCategory: announcements
|
||||||
|
# prerelease: ${{ needs.setup_release.outputs.pre_release }}
|
||||||
|
|
||||||
build_mac_port:
|
build_mac_port:
|
||||||
name: Macports
|
name: Macports
|
||||||
needs: check_changelog
|
needs: setup_release
|
||||||
runs-on: macos-11
|
runs-on: macos-11
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -721,19 +803,24 @@ jobs:
|
|||||||
name: sunshine-macports
|
name: sunshine-macports
|
||||||
path: artifacts/
|
path: artifacts/
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create/Update GitHub Release
|
||||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
if: ${{ needs.setup_release.outputs.create_release == 'true' }}
|
||||||
uses: LizardByte/.github/actions/create_release@master
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
|
name: ${{ needs.setup_release.outputs.release_name }}
|
||||||
|
tag: ${{ needs.setup_release.outputs.release_tag }}
|
||||||
|
commit: ${{ needs.setup_release.outputs.release_commit }}
|
||||||
|
artifacts: "*artifacts/*"
|
||||||
token: ${{ secrets.GH_BOT_TOKEN }}
|
token: ${{ secrets.GH_BOT_TOKEN }}
|
||||||
next_version: ${{ needs.check_changelog.outputs.next_version }}
|
allowUpdates: true
|
||||||
last_version: ${{ needs.check_changelog.outputs.last_version }}
|
body: ${{ needs.setup_release.outputs.release_body }}
|
||||||
release_body: ${{ needs.check_changelog.outputs.release_body }}
|
discussionCategory: announcements
|
||||||
|
prerelease: ${{ needs.setup_release.outputs.pre_release }}
|
||||||
|
|
||||||
build_win:
|
build_win:
|
||||||
name: Windows
|
name: Windows
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
needs: check_changelog
|
needs: setup_release
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -792,11 +879,30 @@ jobs:
|
|||||||
name: sunshine-windows
|
name: sunshine-windows
|
||||||
path: artifacts/
|
path: artifacts/
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create/Update GitHub Release
|
||||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
if: ${{ needs.setup_release.outputs.create_release == 'true' }}
|
||||||
uses: LizardByte/.github/actions/create_release@master
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
|
name: ${{ needs.setup_release.outputs.release_name }}
|
||||||
|
tag: ${{ needs.setup_release.outputs.release_tag }}
|
||||||
|
commit: ${{ needs.setup_release.outputs.release_commit }}
|
||||||
|
artifacts: "*artifacts/*"
|
||||||
|
token: ${{ secrets.GH_BOT_TOKEN }}
|
||||||
|
allowUpdates: true
|
||||||
|
body: ${{ needs.setup_release.outputs.release_body }}
|
||||||
|
discussionCategory: announcements
|
||||||
|
prerelease: ${{ needs.setup_release.outputs.pre_release }}
|
||||||
|
|
||||||
|
release-winget:
|
||||||
|
name: Release to WinGet
|
||||||
|
needs: build_win
|
||||||
|
if: ${{ needs.setup_release.outputs.create_release == 'true' && github.ref == 'refs/heads/master' }}
|
||||||
|
runs-on: windows-latest # the required action can only be run on Windows
|
||||||
|
steps:
|
||||||
|
- name: Release to WinGet
|
||||||
|
uses: vedantmgoyal2009/winget-releaser@v1
|
||||||
|
with:
|
||||||
|
identifier: LizardByte.Sunshine
|
||||||
|
release-tag: ${{ needs.setup_release.outputs.release_tag }}
|
||||||
|
installers-regex: '\.exe$' # only .exe files
|
||||||
token: ${{ secrets.GH_BOT_TOKEN }}
|
token: ${{ secrets.GH_BOT_TOKEN }}
|
||||||
next_version: ${{ needs.check_changelog.outputs.next_version }}
|
|
||||||
last_version: ${{ needs.check_changelog.outputs.last_version }}
|
|
||||||
release_body: ${{ needs.check_changelog.outputs.release_body }}
|
|
||||||
|
|||||||
@@ -0,0 +1,203 @@
|
|||||||
|
---
|
||||||
|
# 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: CI Docker
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [master, nightly]
|
||||||
|
types: [opened, synchronize, reopened]
|
||||||
|
push:
|
||||||
|
branches: [master, nightly]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check_dockerfile:
|
||||||
|
name: Check Dockerfile
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Check
|
||||||
|
id: check
|
||||||
|
run: |
|
||||||
|
if [ -f "./Dockerfile" ]
|
||||||
|
then
|
||||||
|
FOUND=true
|
||||||
|
else
|
||||||
|
FOUND=false
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "dockerfile=${FOUND}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
dockerfile: ${{ steps.check.outputs.dockerfile }}
|
||||||
|
|
||||||
|
lint_dockerfile:
|
||||||
|
name: Lint Dockerfile
|
||||||
|
needs: [check_dockerfile]
|
||||||
|
if: ${{ needs.check_dockerfile.outputs.dockerfile == 'true' }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Hadolint
|
||||||
|
id: hadolint
|
||||||
|
uses: hadolint/hadolint-action@v2.1.0
|
||||||
|
with:
|
||||||
|
dockerfile: ./Dockerfile
|
||||||
|
ignore: DL3008,DL3013,DL3016,DL3018,DL3028,DL3059
|
||||||
|
output-file: ./hadolint.log
|
||||||
|
verbose: true
|
||||||
|
|
||||||
|
- name: Log
|
||||||
|
if: failure()
|
||||||
|
run: |
|
||||||
|
echo "Hadolint outcome: ${{ steps.hadolint.outcome }}" >> $GITHUB_STEP_SUMMARY
|
||||||
|
cat "./hadolint.log" >> $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
|
check_changelog:
|
||||||
|
name: Check Changelog
|
||||||
|
needs: [check_dockerfile]
|
||||||
|
if: ${{ needs.check_dockerfile.outputs.dockerfile == 'true' }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
if: ${{ github.ref == 'refs/heads/master' || github.base_ref == 'master' }}
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Verify Changelog
|
||||||
|
id: verify_changelog
|
||||||
|
if: ${{ github.ref == 'refs/heads/master' || github.base_ref == 'master' }}
|
||||||
|
# base_ref for pull request check, ref for push
|
||||||
|
uses: LizardByte/.github/actions/verify_changelog@master
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
outputs:
|
||||||
|
next_version: ${{ steps.verify_changelog.outputs.changelog_parser_version }}
|
||||||
|
|
||||||
|
docker:
|
||||||
|
name: Docker
|
||||||
|
needs: [check_dockerfile, check_changelog]
|
||||||
|
if: ${{ needs.check_dockerfile.outputs.dockerfile == 'true' }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
packages: write
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
id: prepare
|
||||||
|
env:
|
||||||
|
NEXT_VERSION: ${{ needs.check_changelog.outputs.next_version }}
|
||||||
|
run: |
|
||||||
|
# get branch name
|
||||||
|
BRANCH=${GITHUB_HEAD_REF}
|
||||||
|
|
||||||
|
if [ -z "$BRANCH" ]
|
||||||
|
then
|
||||||
|
echo "This is a PUSH event"
|
||||||
|
BRANCH=${{ github.ref_name }}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# determine to push image to dockerhub and ghcr or not
|
||||||
|
if [[ $GITHUB_EVENT_NAME == "push" ]]; then
|
||||||
|
PUSH=true
|
||||||
|
else
|
||||||
|
PUSH=false
|
||||||
|
fi
|
||||||
|
|
||||||
|
# setup the tags
|
||||||
|
REPOSITORY=${{ github.repository }}
|
||||||
|
BASE_TAG=$(echo $REPOSITORY | tr '[:upper:]' '[:lower:]')
|
||||||
|
COMMIT=${{ github.sha }}
|
||||||
|
|
||||||
|
TAGS="${BASE_TAG}:${COMMIT:0:7},ghcr.io/${BASE_TAG}:${COMMIT:0:7}"
|
||||||
|
|
||||||
|
if [[ $GITHUB_REF == refs/heads/master ]]; then
|
||||||
|
TAGS="${TAGS},${BASE_TAG}:latest,ghcr.io/${BASE_TAG}:latest"
|
||||||
|
TAGS="${TAGS},${BASE_TAG}:master,ghcr.io/${BASE_TAG}:master"
|
||||||
|
elif [[ $GITHUB_REF == refs/heads/nightly ]]; then
|
||||||
|
TAGS="${TAGS},${BASE_TAG}:nightly,ghcr.io/${BASE_TAG}:nightly"
|
||||||
|
else
|
||||||
|
TAGS="${TAGS},${BASE_TAG}:test,ghcr.io/${BASE_TAG}:test"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ${NEXT_VERSION} != "" ]]; then
|
||||||
|
TAGS="${TAGS},${BASE_TAG}:${NEXT_VERSION},ghcr.io/${BASE_TAG}:${NEXT_VERSION}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# read the platforms from `.docker_platforms`
|
||||||
|
PLATFORMS=$(<.docker_platforms)
|
||||||
|
|
||||||
|
echo "branch=${BRANCH}" >> $GITHUB_OUTPUT
|
||||||
|
echo "build_date=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
|
||||||
|
echo "commit=${COMMIT}" >> $GITHUB_OUTPUT
|
||||||
|
echo "platforms=${PLATFORMS}" >> $GITHUB_OUTPUT
|
||||||
|
echo "push=${PUSH}" >> $GITHUB_OUTPUT
|
||||||
|
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Set Up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
id: buildx
|
||||||
|
|
||||||
|
- name: Cache Docker Layers
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: /tmp/.buildx-cache
|
||||||
|
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-buildx-
|
||||||
|
|
||||||
|
- name: Log in to Docker Hub
|
||||||
|
if: ${{ steps.prepare.outputs.push == 'true' }} # PRs do not have access to secrets
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Log in to the Container registry
|
||||||
|
if: ${{ steps.prepare.outputs.push == 'true' }} # PRs do not have access to secrets
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ secrets.GH_BOT_NAME }}
|
||||||
|
password: ${{ secrets.GH_BOT_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v3
|
||||||
|
with:
|
||||||
|
context: ./
|
||||||
|
file: ./Dockerfile
|
||||||
|
push: ${{ steps.prepare.outputs.push }}
|
||||||
|
platforms: ${{ steps.prepare.outputs.platforms }}
|
||||||
|
build-args: |
|
||||||
|
BRANCH=${{ steps.prepare.outputs.branch }}
|
||||||
|
BUILD_DATE=${{ steps.prepare.outputs.build_date }}
|
||||||
|
BUILD_VERSION=${{ needs.check_changelog.outputs.next_version }}
|
||||||
|
COMMIT=${{ steps.prepare.outputs.commit }}
|
||||||
|
tags: ${{ steps.prepare.outputs.tags }}
|
||||||
|
cache-from: type=local,src=/tmp/.buildx-cache
|
||||||
|
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||||
|
|
||||||
|
- name: Update Docker Hub Description
|
||||||
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||||
|
uses: peter-evans/dockerhub-description@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_HUB_PASSWORD }} # token is not currently supported
|
||||||
|
repository: ${{ env.BASE_TAG }}
|
||||||
|
short-description: ${{ github.event.repository.description }}
|
||||||
|
readme-filepath: ./DOCKER_README.md
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
---
|
|
||||||
name: Publish to WinGet
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [released]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
winget-releaser:
|
|
||||||
name: winget releaser
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
- name: winget releaser
|
|
||||||
uses: vedantmgoyal2009/winget-releaser@latest
|
|
||||||
with:
|
|
||||||
identifier: LizardByte.Sunshine
|
|
||||||
token: ${{ secrets.GH_BOT_TOKEN }}
|
|
||||||
+2
-2
@@ -10,7 +10,7 @@ version: 2
|
|||||||
build:
|
build:
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
tools:
|
tools:
|
||||||
python: "3.9"
|
python: "3.10"
|
||||||
|
|
||||||
## apt packages required packages to run cmake on sunshine, note that additional packages are required
|
## apt packages required packages to run cmake on sunshine, note that additional packages are required
|
||||||
# apt_packages:
|
# apt_packages:
|
||||||
@@ -41,5 +41,5 @@ formats: all
|
|||||||
|
|
||||||
python:
|
python:
|
||||||
install:
|
install:
|
||||||
- requirements: ./scripts/requirements.txt
|
- requirements: ./docs/requirements.txt
|
||||||
system_packages: true
|
system_packages: true
|
||||||
|
|||||||
+37
-42
@@ -1,44 +1,50 @@
|
|||||||
# Docker
|
# Docker
|
||||||
|
|
||||||
## Using docker run
|
## Build your own containers
|
||||||
|
This image provides a method for you to easily use the latest Sunshine release in your own docker projects. It is not
|
||||||
|
intended to use as a standalone container at this point, and should be considered experimental.
|
||||||
|
|
||||||
|
```dockerfile
|
||||||
|
FROM lizardbyte/sunshine
|
||||||
|
|
||||||
|
# install Steam, Wayland, etc.
|
||||||
|
|
||||||
|
ENTRYPOINT steam && sunshine
|
||||||
|
```
|
||||||
|
|
||||||
|
## Where used
|
||||||
|
This is a list of docker projects using Sunshine. Something missing? Let us know about it!
|
||||||
|
|
||||||
|
- [Games on Whales](https://games-on-whales.github.io)
|
||||||
|
|
||||||
|
## Port and Volume mappings
|
||||||
|
Examples are below of the required mappings. The configuration file will be saved to `/config` in the container.
|
||||||
|
|
||||||
|
### Using docker run
|
||||||
Create and run the container (substitute your `<values>`):
|
Create and run the container (substitute your `<values>`):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -d \
|
docker run -d \
|
||||||
--name=sunshine \
|
--name=<image_name> \
|
||||||
--restart=unless-stopped
|
--restart=unless-stopped
|
||||||
-v <path to data>:/config \
|
|
||||||
-e PUID=<uid> \
|
-e PUID=<uid> \
|
||||||
-e PGID=<gid> \
|
-e PGID=<gid> \
|
||||||
-e TZ=<timezone> \
|
-e TZ=<timezone> \
|
||||||
|
-v <path to data>:/config \
|
||||||
-p 47984-47990:47984-47990/tcp \
|
-p 47984-47990:47984-47990/tcp \
|
||||||
-p 48010:48010 \
|
-p 48010:48010 \
|
||||||
-p 47998-48000:47998-48000/udp \
|
-p 47998-48000:47998-48000/udp \
|
||||||
lizardbyte/sunshine
|
<image>
|
||||||
```
|
```
|
||||||
|
|
||||||
To update the container it must be removed and recreated:
|
### Using docker-compose
|
||||||
|
|
||||||
```bash
|
|
||||||
# Stop the container
|
|
||||||
docker stop sunshine
|
|
||||||
# Remove the container
|
|
||||||
docker rm sunshine
|
|
||||||
# Pull the latest update
|
|
||||||
docker pull lizardbyte/sunshine
|
|
||||||
# Run the container with the same parameters as before
|
|
||||||
docker run -d ...
|
|
||||||
```
|
|
||||||
|
|
||||||
## Using docker-compose
|
|
||||||
|
|
||||||
Create a `docker-compose.yml` file with the following contents (substitute your `<values>`):
|
Create a `docker-compose.yml` file with the following contents (substitute your `<values>`):
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
sunshine:
|
<image_name>:
|
||||||
image: lizardbyte/sunshine
|
image: <image>
|
||||||
container_name: sunshine
|
container_name: sunshine
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
@@ -48,26 +54,12 @@ services:
|
|||||||
- PGID=<gid>
|
- PGID=<gid>
|
||||||
- TZ=<timezone>
|
- TZ=<timezone>
|
||||||
ports:
|
ports:
|
||||||
- 47984-47990:47984-47990/tcp
|
- "47984-47990:47984-47990/tcp"
|
||||||
- 48010:48010
|
- "48010:48010"
|
||||||
- 47998-48000:47998-48000/udp
|
- "47998-48000:47998-48000/udp"
|
||||||
```
|
```
|
||||||
|
|
||||||
Create and start the container (run the command from the same folder as your `docker-compose.yml` file):
|
### Parameters
|
||||||
|
|
||||||
```bash
|
|
||||||
docker-compose up -d
|
|
||||||
```
|
|
||||||
|
|
||||||
To update the container:
|
|
||||||
```bash
|
|
||||||
# Pull the latest update
|
|
||||||
docker-compose pull
|
|
||||||
# Update and restart the container
|
|
||||||
docker-compose up -d
|
|
||||||
```
|
|
||||||
|
|
||||||
## Parameters
|
|
||||||
You must substitute the `<values>` with your own settings.
|
You must substitute the `<values>` with your own settings.
|
||||||
|
|
||||||
Parameters are split into two halves separated by a colon. The left side represents the host and the right side the
|
Parameters are split into two halves separated by a colon. The left side represents the host and the right side the
|
||||||
@@ -80,15 +72,16 @@ port `47990` (e.g. `http://<host_ip>:47990`). The internal port must be `47990`,
|
|||||||
|
|
||||||
|
|
||||||
| Parameter | Function | Example Value | Required |
|
| Parameter | Function | Example Value | Required |
|
||||||
| --------------------------- | -------------------- | ------------------- | -------- |
|
|-----------------------------|---------------------------|--------------------|----------|
|
||||||
| `-p <port>:47990` | Web UI Port | `47990` | True |
|
| `-p <port>:47990` | Web UI Port | `47990` | True |
|
||||||
| `-v <path to data>:/config` | Volume mapping | `/home/sunshine` | True |
|
| `-v <path to data>:/config` | Volume mapping | `/home/sunshine` | True |
|
||||||
| `-e PUID=<uid>` | User ID | `1001` | False |
|
| `-e PUID=<uid>` | User ID | `1001` | False |
|
||||||
| `-e PGID=<gid>` | Group ID | `1001` | False |
|
| `-e PGID=<gid>` | Group ID | `1001` | False |
|
||||||
| `-e TZ=<timezone>` | Lookup TZ value [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) | `America/New_York` | True |
|
| `-e TZ=<timezone>` | Lookup TZ value [here][1] | `America/New_York` | False |
|
||||||
|
|
||||||
### User / Group Identifiers:
|
[1]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||||
|
|
||||||
|
#### User / Group Identifiers:
|
||||||
When using data volumes (-v flags) permissions issues can arise between the host OS and the container. To avoid this
|
When using data volumes (-v flags) permissions issues can arise between the host OS and the container. To avoid this
|
||||||
issue you can specify the user PUID and group PGID. Ensure the data volume directory on the host is owned by the same
|
issue you can specify the user PUID and group PGID. Ensure the data volume directory on the host is owned by the same
|
||||||
user you specify.
|
user you specify.
|
||||||
@@ -99,3 +92,5 @@ In this instance `PUID=1001` and `PGID=1001`. To find yours use id user as below
|
|||||||
$ id dockeruser
|
$ id dockeruser
|
||||||
uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)
|
uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you want to change the PUID or PGID after the image has been built, it will require rebuilding the image.
|
||||||
|
|||||||
+92
@@ -0,0 +1,92 @@
|
|||||||
|
FROM ubuntu:22.04 AS sunshine-base
|
||||||
|
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
FROM sunshine-base as sunshine-build
|
||||||
|
|
||||||
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||||
|
RUN apt-get update -y \
|
||||||
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
build-essential=12.9* \
|
||||||
|
cmake=3.22.1* \
|
||||||
|
libavdevice-dev=7:4.4.* \
|
||||||
|
libboost-filesystem-dev=1.74.0* \
|
||||||
|
libboost-log-dev=1.74.0* \
|
||||||
|
libboost-thread-dev=1.74.0* \
|
||||||
|
libcap-dev=1:2.44* \
|
||||||
|
libdrm-dev=2.4.110* \
|
||||||
|
libevdev-dev=1.12.1* \
|
||||||
|
libpulse-dev=1:15.99.1* \
|
||||||
|
libopus-dev=1.3.1* \
|
||||||
|
libssl-dev=3.0.2* \
|
||||||
|
libwayland-dev=1.20.0* \
|
||||||
|
libx11-dev=2:1.7.5* \
|
||||||
|
libxcb-shm0-dev=1.14* \
|
||||||
|
libxcb-xfixes0-dev=1.14* \
|
||||||
|
libxcb1-dev=1.14* \
|
||||||
|
libxfixes-dev=1:6.0.0* \
|
||||||
|
libxrandr-dev=2:1.5.2* \
|
||||||
|
libxtst-dev=2:1.2.3* \
|
||||||
|
nvidia-cuda-dev=11.5.1* \
|
||||||
|
nvidia-cuda-toolkit=11.5.1* \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# copy repository
|
||||||
|
WORKDIR /root/sunshine-build/
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# setup build directory
|
||||||
|
WORKDIR /root/sunshine-build/build
|
||||||
|
|
||||||
|
# cmake and cpack
|
||||||
|
RUN cmake -DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||||
|
-DSUNSHINE_ASSETS_DIR=share/sunshine \
|
||||||
|
-DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
|
||||||
|
-DSUNSHINE_ENABLE_WAYLAND=ON \
|
||||||
|
-DSUNSHINE_ENABLE_X11=ON \
|
||||||
|
-DSUNSHINE_ENABLE_DRM=ON \
|
||||||
|
-DSUNSHINE_ENABLE_CUDA=ON \
|
||||||
|
/root/sunshine-build \
|
||||||
|
&& make -j "$(nproc)" \
|
||||||
|
&& cpack -G DEB
|
||||||
|
|
||||||
|
FROM sunshine-base as sunshine
|
||||||
|
|
||||||
|
# copy deb from builder
|
||||||
|
COPY --from=sunshine-build /root/sunshine-build/build/cpack_artifacts/Sunshine.deb /sunshine.deb
|
||||||
|
|
||||||
|
# install sunshine
|
||||||
|
RUN apt-get update -y \
|
||||||
|
&& apt-get install -y --no-install-recommends /sunshine.deb \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# network setup
|
||||||
|
EXPOSE 47984-47990/tcp
|
||||||
|
EXPOSE 48010
|
||||||
|
EXPOSE 47998-48000/udp
|
||||||
|
|
||||||
|
# setup user
|
||||||
|
ARG PGID=1000
|
||||||
|
ENV PGID=${PGID}
|
||||||
|
ARG PUID=1000
|
||||||
|
ENV PUID=${PUID}
|
||||||
|
ENV TZ="UTC"
|
||||||
|
ARG UNAME=lizard
|
||||||
|
ENV UNAME=${UNAME}
|
||||||
|
|
||||||
|
ENV HOME=/home/$UNAME
|
||||||
|
|
||||||
|
RUN groupadd -f -g "${PGID}" "${UNAME}" && \
|
||||||
|
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -G input -u "${PUID}" "${UNAME}" && \
|
||||||
|
mkdir -p ${HOME}/.config/sunshine && \
|
||||||
|
ln -s ${HOME}/.config/sunshine /config && \
|
||||||
|
chown -R ${UNAME} ${HOME}
|
||||||
|
|
||||||
|
USER ${UNAME}
|
||||||
|
WORKDIR ${HOME}
|
||||||
|
|
||||||
|
# entrypoint
|
||||||
|
ENTRYPOINT ["/usr/bin/sunshine"]
|
||||||
+13
-9
@@ -1,8 +1,6 @@
|
|||||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/README.rst
|
|
||||||
|
|
||||||
Overview
|
Overview
|
||||||
========
|
========
|
||||||
LizardByte has the full documentation hosted on `Read the Docs <https://docs.lizardbyte.dev/projects/sunshine/>`_.
|
LizardByte has the full documentation hosted on `Read the Docs <https://sunshinestream.readthedocs.io/>`_.
|
||||||
|
|
||||||
About
|
About
|
||||||
-----
|
-----
|
||||||
@@ -48,7 +46,8 @@ Integrations
|
|||||||
Support
|
Support
|
||||||
---------
|
---------
|
||||||
|
|
||||||
Our support methods are listed in our `LizardByte Docs <https://docs.lizardbyte.dev/en/latest/about/support.html>`_.
|
Our support methods are listed in our
|
||||||
|
`LizardByte Docs <https://lizardbyte.readthedocs.io/en/latest/about/support.html>`_.
|
||||||
|
|
||||||
Downloads
|
Downloads
|
||||||
---------
|
---------
|
||||||
@@ -57,11 +56,16 @@ Downloads
|
|||||||
:alt: GitHub Releases
|
:alt: GitHub Releases
|
||||||
:target: https://github.com/LizardByte/Sunshine/releases/latest
|
:target: https://github.com/LizardByte/Sunshine/releases/latest
|
||||||
|
|
||||||
|
.. image:: https://img.shields.io/docker/pulls/lizardbyte/sunshine?style=for-the-badge&logo=docker
|
||||||
|
:alt: Docker
|
||||||
|
:target: https://hub.docker.com/r/lizardbyte/sunshine
|
||||||
|
|
||||||
|
Stats
|
||||||
|
------
|
||||||
|
.. image:: https://img.shields.io/github/stars/lizardbyte/sunshine?logo=github&style=for-the-badge
|
||||||
|
:alt: GitHub stars
|
||||||
|
:target: https://github.com/LizardByte/Sunshine
|
||||||
|
|
||||||
.. image:: https://img.shields.io/badge/dynamic/json?color=blue&label=AUR&style=for-the-badge&query=$.results.0.NumVotes&url=https%3A%2F%2Fapp.lizardbyte.dev%2Funo%2Faur%2Fsunshine.json&logo=archlinux
|
.. image:: https://img.shields.io/badge/dynamic/json?color=blue&label=AUR&style=for-the-badge&query=$.results.0.NumVotes&url=https%3A%2F%2Fapp.lizardbyte.dev%2Funo%2Faur%2Fsunshine.json&logo=archlinux
|
||||||
:alt: AUR votes
|
:alt: AUR votes
|
||||||
:target: https://aur.archlinux.org/packages/sunshine
|
:target: https://aur.archlinux.org/packages/sunshine
|
||||||
|
|
||||||
.. comment
|
|
||||||
image:: https://img.shields.io/docker/pulls/lizardbyte/sunshine?style=for-the-badge&logo=docker
|
|
||||||
:alt: Docker
|
|
||||||
:target: https://hub.docker.com/r/lizardbyte/sunshine
|
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
furo==2022.9.29
|
||||||
|
m2r2==0.3.3
|
||||||
|
Sphinx==5.3.0
|
||||||
|
sphinx-copybutton==0.5.0
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/about/advanced_usage.rst
|
|
||||||
|
|
||||||
Advanced Usage
|
Advanced Usage
|
||||||
==============
|
==============
|
||||||
Sunshine will work with the default settings for most users. In some cases you may want to configure Sunshine further.
|
Sunshine will work with the default settings for most users. In some cases you may want to configure Sunshine further.
|
||||||
@@ -26,7 +24,7 @@ location by modifying the configuration file.
|
|||||||
Windows ./config/
|
Windows ./config/
|
||||||
========= ===========
|
========= ===========
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
sunshine ~/sunshine_config.conf
|
sunshine ~/sunshine_config.conf
|
||||||
@@ -41,13 +39,13 @@ General
|
|||||||
sunshine_name
|
sunshine_name
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
The name displayed by Moonlight
|
The name displayed by Moonlight
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
PC hostname
|
PC hostname
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
sunshine_name = Sunshine
|
sunshine_name = Sunshine
|
||||||
@@ -55,7 +53,7 @@ Example
|
|||||||
min_log_level
|
min_log_level
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
The minimum log level printed to standard out.
|
The minimum log level printed to standard out.
|
||||||
|
|
||||||
**Choices**
|
**Choices**
|
||||||
@@ -75,10 +73,10 @@ Description
|
|||||||
none no logging
|
none no logging
|
||||||
======= ===========
|
======= ===========
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``info``
|
``info``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
min_log_level = info
|
min_log_level = info
|
||||||
@@ -89,7 +87,7 @@ Controls
|
|||||||
gamepad
|
gamepad
|
||||||
^^^^^^^
|
^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
The type of gamepad to emulate on the host.
|
The type of gamepad to emulate on the host.
|
||||||
|
|
||||||
.. Caution:: Applies to Windows only.
|
.. Caution:: Applies to Windows only.
|
||||||
@@ -106,10 +104,10 @@ Description
|
|||||||
ds4 dualshock controller (PS4)
|
ds4 dualshock controller (PS4)
|
||||||
===== ===========
|
===== ===========
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``x360``
|
``x360``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
gamepad = x360
|
gamepad = x360
|
||||||
@@ -117,17 +115,17 @@ Example
|
|||||||
back_button_timeout
|
back_button_timeout
|
||||||
^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
If, after the timeout, the back/select button is still pressed down, Home/Guide button press is emulated.
|
If, after the timeout, the back/select button is still pressed down, Home/Guide button press is emulated.
|
||||||
|
|
||||||
On Nvidia Shield, the home and power button are not passed to Moonlight.
|
On Nvidia Shield, the home and power button are not passed to Moonlight.
|
||||||
|
|
||||||
.. Tip:: If back_button_timeout < 0, then the Home/Guide button will not be emulated.
|
.. Tip:: If back_button_timeout < 0, then the Home/Guide button will not be emulated.
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``2000``
|
``2000``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
back_button_timeout = 2000
|
back_button_timeout = 2000
|
||||||
@@ -135,13 +133,13 @@ Example
|
|||||||
key_repeat_delay
|
key_repeat_delay
|
||||||
^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
The initial delay in milliseconds before repeating keys. Controls how fast keys will repeat themselves.
|
The initial delay in milliseconds before repeating keys. Controls how fast keys will repeat themselves.
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``500``
|
``500``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
key_repeat_delay = 500
|
key_repeat_delay = 500
|
||||||
@@ -149,15 +147,15 @@ Example
|
|||||||
key_repeat_frequency
|
key_repeat_frequency
|
||||||
^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
How often keys repeat every second.
|
How often keys repeat every second.
|
||||||
|
|
||||||
.. Tip:: This configurable option supports decimals.
|
.. Tip:: This configurable option supports decimals.
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
.. Todo:: Unknown
|
.. Todo:: Unknown
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
key_repeat_frequency = 24.9
|
key_repeat_frequency = 24.9
|
||||||
@@ -165,17 +163,17 @@ Example
|
|||||||
keybindings
|
keybindings
|
||||||
^^^^^^^^^^^
|
^^^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
Sometimes it may be useful to map keybindings. Wayland won't allow clients to capture the Win Key for example.
|
Sometimes it may be useful to map keybindings. Wayland won't allow clients to capture the Win Key for example.
|
||||||
|
|
||||||
.. Tip:: See `virtual key codes <https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes>`_
|
.. Tip:: See `virtual key codes <https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes>`_
|
||||||
|
|
||||||
.. Hint:: keybindings needs to have a multiple of two elements.
|
.. Hint:: keybindings needs to have a multiple of two elements.
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
None
|
None
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
keybindings = [
|
keybindings = [
|
||||||
@@ -188,14 +186,14 @@ Example
|
|||||||
key_rightalt_to_key_win
|
key_rightalt_to_key_win
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
It may be possible that you cannot send the Windows Key from Moonlight directly. In those cases it may be useful to
|
It may be possible that you cannot send the Windows Key from Moonlight directly. In those cases it may be useful to
|
||||||
make Sunshine think the Right Alt key is the Windows key.
|
make Sunshine think the Right Alt key is the Windows key.
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
None
|
None
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
key_rightalt_to_key_win = enabled
|
key_rightalt_to_key_win = enabled
|
||||||
@@ -206,12 +204,12 @@ Display
|
|||||||
adapter_name
|
adapter_name
|
||||||
^^^^^^^^^^^^
|
^^^^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
Select the video card you want to stream.
|
Select the video card you want to stream.
|
||||||
|
|
||||||
.. Tip:: To find the name of the appropriate values follow these instructions.
|
.. Tip:: To find the name of the appropriate values follow these instructions.
|
||||||
|
|
||||||
Linux + VA-API
|
**Linux + VA-API**
|
||||||
Unlike with `amdvce` and `nvenc`, it doesn't matter if video encoding is done on a different GPU.
|
Unlike with `amdvce` and `nvenc`, it doesn't matter if video encoding is done on a different GPU.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
@@ -227,23 +225,23 @@ Description
|
|||||||
|
|
||||||
.. Todo:: macOS
|
.. Todo:: macOS
|
||||||
|
|
||||||
Windows
|
**Windows**
|
||||||
.. code-block:: batch
|
.. code-block:: batch
|
||||||
|
|
||||||
tools\dxgi-info.exe
|
tools\dxgi-info.exe
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
Sunshine will select the default video card.
|
Sunshine will select the default video card.
|
||||||
|
|
||||||
Examples
|
**Examples**
|
||||||
Linux
|
**Linux**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
adapter_name = /dev/dri/renderD128
|
adapter_name = /dev/dri/renderD128
|
||||||
|
|
||||||
.. Todo:: macOS
|
.. Todo:: macOS
|
||||||
|
|
||||||
Windows
|
**Windows**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
adapter_name = Radeon RX 580 Series
|
adapter_name = Radeon RX 580 Series
|
||||||
@@ -251,12 +249,12 @@ Examples
|
|||||||
output_name
|
output_name
|
||||||
^^^^^^^^^^^
|
^^^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
Select the display number you want to stream.
|
Select the display number you want to stream.
|
||||||
|
|
||||||
.. Tip:: To find the name of the appropriate values follow these instructions.
|
.. Tip:: To find the name of the appropriate values follow these instructions.
|
||||||
|
|
||||||
Linux
|
**Linux**
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
xrandr --listmonitors
|
xrandr --listmonitors
|
||||||
@@ -267,23 +265,23 @@ Description
|
|||||||
|
|
||||||
.. Todo:: macOS
|
.. Todo:: macOS
|
||||||
|
|
||||||
Windows
|
**Windows**
|
||||||
.. code-block:: batch
|
.. code-block:: batch
|
||||||
|
|
||||||
tools\dxgi-info.exe
|
tools\dxgi-info.exe
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
Sunshine will select the default display.
|
Sunshine will select the default display.
|
||||||
|
|
||||||
Examples
|
**Examples**
|
||||||
Linux
|
**Linux**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
output_name = 0
|
output_name = 0
|
||||||
|
|
||||||
.. Todo:: macOS
|
.. Todo:: macOS
|
||||||
|
|
||||||
Windows
|
**Windows**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
output_name = \\.\DISPLAY1
|
output_name = \\.\DISPLAY1
|
||||||
@@ -291,16 +289,16 @@ Examples
|
|||||||
fps
|
fps
|
||||||
^^^
|
^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
The fps modes advertised by Sunshine.
|
The fps modes advertised by Sunshine.
|
||||||
|
|
||||||
.. Note:: Some versions of Moonlight, such as Moonlight-nx (Switch), rely on this list to ensure that the requested
|
.. Note:: Some versions of Moonlight, such as Moonlight-nx (Switch), rely on this list to ensure that the requested
|
||||||
fps is supported.
|
fps is supported.
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
.. Todo:: Unknown
|
.. Todo:: Unknown
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
fps = [10, 30, 60, 90, 120]
|
fps = [10, 30, 60, 90, 120]
|
||||||
@@ -308,16 +306,16 @@ Example
|
|||||||
resolutions
|
resolutions
|
||||||
^^^^^^^^^^^
|
^^^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
The resolutions advertised by Sunshine.
|
The resolutions advertised by Sunshine.
|
||||||
|
|
||||||
.. Note:: Some versions of Moonlight, such as Moonlight-nx (Switch), rely on this list to ensure that the requested
|
.. Note:: Some versions of Moonlight, such as Moonlight-nx (Switch), rely on this list to ensure that the requested
|
||||||
resolution is supported.
|
resolution is supported.
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
.. Todo:: Unknown
|
.. Todo:: Unknown
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
resolutions = [
|
resolutions = [
|
||||||
@@ -336,19 +334,17 @@ Example
|
|||||||
dwmflush
|
dwmflush
|
||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
Invoke DwmFlush() to sync screen capture to the Windows presentation interval.
|
Invoke DwmFlush() to sync screen capture to the Windows presentation interval.
|
||||||
|
|
||||||
.. Caution:: Applies to Windows only. Alleviates visual stuttering during mouse movement.
|
.. Caution:: Applies to Windows only. Alleviates visual stuttering during mouse movement.
|
||||||
If enabled, this feature will automatically deactivate if the client framerate exceeds
|
If enabled, this feature will automatically deactivate if the client framerate exceeds
|
||||||
the host monitor's current refresh rate.
|
the host monitor's current refresh rate.
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``enabled``
|
``enabled``
|
||||||
|
|
||||||
Examples
|
**Example**
|
||||||
|
|
||||||
Windows
|
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
dwmflush = enabled
|
dwmflush = enabled
|
||||||
@@ -359,48 +355,48 @@ Audio
|
|||||||
audio_sink
|
audio_sink
|
||||||
^^^^^^^^^^
|
^^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
The name of the audio sink used for audio loopback.
|
The name of the audio sink used for audio loopback.
|
||||||
|
|
||||||
.. Tip:: To find the name of the audio sink follow these instructions.
|
.. Tip:: To find the name of the audio sink follow these instructions.
|
||||||
|
|
||||||
Linux + pulseaudio
|
**Linux + pulseaudio**
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
pacmd list-sinks | grep "name:"
|
pacmd list-sinks | grep "name:"
|
||||||
|
|
||||||
Linux + pipewire
|
**Linux + pipewire**
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
pactl info | grep Source
|
pactl info | grep Source
|
||||||
# in some causes you'd need to use the `Sink` device, if `Source` doesn't work, so try:
|
# in some causes you'd need to use the `Sink` device, if `Source` doesn't work, so try:
|
||||||
pactl info | grep Sink
|
pactl info | grep Sink
|
||||||
|
|
||||||
macOS
|
**macOS**
|
||||||
Sunshine can only access microphones on macOS due to system limitations. To stream system audio use
|
Sunshine can only access microphones on macOS due to system limitations. To stream system audio use
|
||||||
`Soundflower <https://github.com/mattingalls/Soundflower>`_ or
|
`Soundflower <https://github.com/mattingalls/Soundflower>`_ or
|
||||||
`BlackHole <https://github.com/ExistentialAudio/BlackHole>`_.
|
`BlackHole <https://github.com/ExistentialAudio/BlackHole>`_.
|
||||||
|
|
||||||
Windows
|
**Windows**
|
||||||
.. code-block:: batch
|
.. code-block:: batch
|
||||||
|
|
||||||
tools\audio-info.exe
|
tools\audio-info.exe
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
Sunshine will select the default audio device.
|
Sunshine will select the default audio device.
|
||||||
|
|
||||||
Examples
|
**Examples**
|
||||||
Linux
|
**Linux**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
audio_sink = alsa_output.pci-0000_09_00.3.analog-stereo
|
audio_sink = alsa_output.pci-0000_09_00.3.analog-stereo
|
||||||
|
|
||||||
macOS
|
**macOS**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
audio_sink = BlackHole 2ch
|
audio_sink = BlackHole 2ch
|
||||||
|
|
||||||
Windows
|
**Windows**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
audio_sink = {0.0.0.00000000}.{FD47D9CC-4218-4135-9CE2-0C195C87405B}
|
audio_sink = {0.0.0.00000000}.{FD47D9CC-4218-4135-9CE2-0C195C87405B}
|
||||||
@@ -408,16 +404,16 @@ Examples
|
|||||||
virtual_sink
|
virtual_sink
|
||||||
^^^^^^^^^^^^
|
^^^^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
The audio device that's virtual, like Steam Streaming Speakers. This allows Sunshine to stream audio, while muting
|
The audio device that's virtual, like Steam Streaming Speakers. This allows Sunshine to stream audio, while muting
|
||||||
the speakers.
|
the speakers.
|
||||||
|
|
||||||
.. Tip:: See `audio_sink`_!
|
.. Tip:: See `audio_sink`_!
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
.. Todo:: Unknown
|
.. Todo:: Unknown
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
virtual_sink = {0.0.0.00000000}.{8edba70c-1125-467c-b89c-15da389bc1d4}
|
virtual_sink = {0.0.0.00000000}.{8edba70c-1125-467c-b89c-15da389bc1d4}
|
||||||
@@ -428,13 +424,13 @@ Network
|
|||||||
external_ip
|
external_ip
|
||||||
^^^^^^^^^^^
|
^^^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
If no external IP address is given, Sunshine will attempt to automatically detect external ip-address.
|
If no external IP address is given, Sunshine will attempt to automatically detect external ip-address.
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
Automatic
|
Automatic
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
external_ip = 123.456.789.12
|
external_ip = 123.456.789.12
|
||||||
@@ -442,7 +438,7 @@ Example
|
|||||||
port
|
port
|
||||||
^^^^
|
^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
Set the family of ports used by Sunshine. Changing this value will offset other ports per the table below.
|
Set the family of ports used by Sunshine. Changing this value will offset other ports per the table below.
|
||||||
|
|
||||||
.. table::
|
.. table::
|
||||||
@@ -458,18 +454,15 @@ Description
|
|||||||
Video 47998 UDP +9
|
Video 47998 UDP +9
|
||||||
Control 47999 UDP +10
|
Control 47999 UDP +10
|
||||||
Audio 48000 UDP +11
|
Audio 48000 UDP +11
|
||||||
tbd 48002 UDP +13
|
Mic (unused) 48002 UDP +13
|
||||||
================ ============ ===========================
|
================ ============ ===========================
|
||||||
|
|
||||||
.. Attention:: Custom ports are only allowed on select Moonlight clients.
|
.. Attention:: Custom ports are only allowed on select Moonlight clients.
|
||||||
|
|
||||||
.. Todo:: Determine the function of port 48002 UDP. See
|
**Default**
|
||||||
`here <https://github.com/moonlight-stream/moonlight-docs/wiki/Setup-Guide#manual-port-forwarding-advanced>`_.
|
|
||||||
|
|
||||||
Default
|
|
||||||
``47989``
|
``47989``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
port = 47989
|
port = 47989
|
||||||
@@ -477,13 +470,13 @@ Example
|
|||||||
pkey
|
pkey
|
||||||
^^^^
|
^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
The private key. This must be 2048 bits.
|
The private key. This must be 2048 bits.
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
.. Todo:: Unknown
|
.. Todo:: Unknown
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
pkey = /dir/pkey.pem
|
pkey = /dir/pkey.pem
|
||||||
@@ -491,13 +484,13 @@ Example
|
|||||||
cert
|
cert
|
||||||
^^^^
|
^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
The certificate. Must be signed with a 2048 bit key.
|
The certificate. Must be signed with a 2048 bit key.
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
.. Todo:: Unknown
|
.. Todo:: Unknown
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
cert = /dir/cert.pem
|
cert = /dir/cert.pem
|
||||||
@@ -505,7 +498,7 @@ Example
|
|||||||
origin_pin_allowed
|
origin_pin_allowed
|
||||||
^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
The origin of the remote endpoint address that is not denied for HTTP method /pin.
|
The origin of the remote endpoint address that is not denied for HTTP method /pin.
|
||||||
|
|
||||||
**Choices**
|
**Choices**
|
||||||
@@ -521,10 +514,10 @@ Description
|
|||||||
wan Anyone may access /pin
|
wan Anyone may access /pin
|
||||||
===== ===========
|
===== ===========
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``pc``
|
``pc``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
origin_pin_allowed = pc
|
origin_pin_allowed = pc
|
||||||
@@ -532,7 +525,7 @@ Example
|
|||||||
origin_web_ui_allowed
|
origin_web_ui_allowed
|
||||||
^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
The origin of the remote endpoint address that is not denied for HTTPS Web UI.
|
The origin of the remote endpoint address that is not denied for HTTPS Web UI.
|
||||||
|
|
||||||
**Choices**
|
**Choices**
|
||||||
@@ -548,10 +541,10 @@ Description
|
|||||||
wan Anyone may access the web ui
|
wan Anyone may access the web ui
|
||||||
===== ===========
|
===== ===========
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``lan``
|
``lan``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
origin_web_ui_allowed = lan
|
origin_web_ui_allowed = lan
|
||||||
@@ -559,7 +552,7 @@ Example
|
|||||||
upnp
|
upnp
|
||||||
^^^^
|
^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
Sunshine will attempt to open ports for streaming over the internet.
|
Sunshine will attempt to open ports for streaming over the internet.
|
||||||
|
|
||||||
**Choices**
|
**Choices**
|
||||||
@@ -574,10 +567,10 @@ Description
|
|||||||
off disable UPnP
|
off disable UPnP
|
||||||
===== ===========
|
===== ===========
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``off``
|
``off``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
upnp = on
|
upnp = on
|
||||||
@@ -585,13 +578,13 @@ Example
|
|||||||
ping_timeout
|
ping_timeout
|
||||||
^^^^^^^^^^^^
|
^^^^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
How long to wait in milliseconds for data from Moonlight before shutting down the stream.
|
How long to wait in milliseconds for data from Moonlight before shutting down the stream.
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``10000``
|
``10000``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
ping_timeout = 10000
|
ping_timeout = 10000
|
||||||
@@ -602,7 +595,7 @@ Encoding
|
|||||||
channels
|
channels
|
||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
This will generate distinct video streams, unlike simply broadcasting to multiple Clients.
|
This will generate distinct video streams, unlike simply broadcasting to multiple Clients.
|
||||||
|
|
||||||
When multicasting, it could be useful to have different configurations for each connected Client.
|
When multicasting, it could be useful to have different configurations for each connected Client.
|
||||||
@@ -614,10 +607,10 @@ Description
|
|||||||
|
|
||||||
.. Warning:: CPU usage increases for each distinct video stream generated.
|
.. Warning:: CPU usage increases for each distinct video stream generated.
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``1``
|
``1``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
channels = 1
|
channels = 1
|
||||||
@@ -625,18 +618,18 @@ Example
|
|||||||
fec_percentage
|
fec_percentage
|
||||||
^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
Percentage of error correcting packets per data packet in each video frame.
|
Percentage of error correcting packets per data packet in each video frame.
|
||||||
|
|
||||||
.. Warning:: Higher values can correct for more network packet loss, but at the cost of increasing bandwidth usage.
|
.. Warning:: Higher values can correct for more network packet loss, but at the cost of increasing bandwidth usage.
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``20``
|
``20``
|
||||||
|
|
||||||
Range
|
**Range**
|
||||||
``1-255``
|
``1-255``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
fec_percentage = 20
|
fec_percentage = 20
|
||||||
@@ -644,15 +637,15 @@ Example
|
|||||||
qp
|
qp
|
||||||
^^
|
^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
Quantitization Parameter. Some devices don't support Constant Bit Rate. For those devices, QP is used instead.
|
Quantitization Parameter. Some devices don't support Constant Bit Rate. For those devices, QP is used instead.
|
||||||
|
|
||||||
.. Warning:: Higher value means more compression, but less quality.
|
.. Warning:: Higher value means more compression, but less quality.
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``28``
|
``28``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
qp = 28
|
qp = 28
|
||||||
@@ -660,17 +653,17 @@ Example
|
|||||||
min_threads
|
min_threads
|
||||||
^^^^^^^^^^^
|
^^^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
Minimum number of threads used by ffmpeg to encode the video.
|
Minimum number of threads used by ffmpeg to encode the video.
|
||||||
|
|
||||||
.. Note:: Increasing the value slightly reduces encoding efficiency, but the tradeoff is usually worth it to gain
|
.. Note:: Increasing the value slightly reduces encoding efficiency, but the tradeoff is usually worth it to gain
|
||||||
the use of more CPU cores for encoding. The ideal value is the lowest value that can reliably encode at your
|
the use of more CPU cores for encoding. The ideal value is the lowest value that can reliably encode at your
|
||||||
desired streaming settings on your hardware.
|
desired streaming settings on your hardware.
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``1``
|
``1``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
min_threads = 1
|
min_threads = 1
|
||||||
@@ -678,7 +671,7 @@ Example
|
|||||||
hevc_mode
|
hevc_mode
|
||||||
^^^^^^^^^
|
^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
Allows the client to request HEVC Main or HEVC Main10 video streams.
|
Allows the client to request HEVC Main or HEVC Main10 video streams.
|
||||||
|
|
||||||
.. Warning:: HEVC is more CPU-intensive to encode, so enabling this may reduce performance when using software
|
.. Warning:: HEVC is more CPU-intensive to encode, so enabling this may reduce performance when using software
|
||||||
@@ -698,10 +691,10 @@ Description
|
|||||||
3 advertise support for HEVC Main and Main10 (HDR) profiles
|
3 advertise support for HEVC Main and Main10 (HDR) profiles
|
||||||
===== ===========
|
===== ===========
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``0``
|
``0``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
hevc_mode = 2
|
hevc_mode = 2
|
||||||
@@ -709,7 +702,7 @@ Example
|
|||||||
encoder
|
encoder
|
||||||
^^^^^^^
|
^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
Force a specific encoder.
|
Force a specific encoder.
|
||||||
|
|
||||||
**Choices**
|
**Choices**
|
||||||
@@ -725,10 +718,10 @@ Description
|
|||||||
software Encoding occurs on the CPU
|
software Encoding occurs on the CPU
|
||||||
======== ===========
|
======== ===========
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
Sunshine will use the first encoder that is available.
|
Sunshine will use the first encoder that is available.
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
encoder = nvenc
|
encoder = nvenc
|
||||||
@@ -736,7 +729,7 @@ Example
|
|||||||
sw_preset
|
sw_preset
|
||||||
^^^^^^^^^
|
^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
The encoder preset to use.
|
The encoder preset to use.
|
||||||
|
|
||||||
.. Note:: This option only applies when using software `encoder`_.
|
.. Note:: This option only applies when using software `encoder`_.
|
||||||
@@ -771,10 +764,10 @@ Description
|
|||||||
veryslow slowest
|
veryslow slowest
|
||||||
========= ===========
|
========= ===========
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``superfast``
|
``superfast``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
sw_preset = superfast
|
sw_preset = superfast
|
||||||
@@ -782,7 +775,7 @@ Example
|
|||||||
sw_tune
|
sw_tune
|
||||||
^^^^^^^
|
^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
The tuning preset to use.
|
The tuning preset to use.
|
||||||
|
|
||||||
.. Note:: This option only applies when using software `encoder`_.
|
.. Note:: This option only applies when using software `encoder`_.
|
||||||
@@ -807,10 +800,10 @@ Description
|
|||||||
zerolatency good for fast encoding and low-latency streaming
|
zerolatency good for fast encoding and low-latency streaming
|
||||||
=========== ===========
|
=========== ===========
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``zerolatency``
|
``zerolatency``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
sw_tune = zerolatency
|
sw_tune = zerolatency
|
||||||
@@ -818,7 +811,7 @@ Example
|
|||||||
nv_preset
|
nv_preset
|
||||||
^^^^^^^^^
|
^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
The encoder preset to use.
|
The encoder preset to use.
|
||||||
|
|
||||||
.. Note:: This option only applies when using nvenc `encoder`_.
|
.. Note:: This option only applies when using nvenc `encoder`_.
|
||||||
@@ -845,10 +838,10 @@ Description
|
|||||||
losslesshp lossless, high performance
|
losslesshp lossless, high performance
|
||||||
========== ===========
|
========== ===========
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``llhq``
|
``llhq``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
nv_preset = llhq
|
nv_preset = llhq
|
||||||
@@ -856,7 +849,7 @@ Example
|
|||||||
nv_rc
|
nv_rc
|
||||||
^^^^^
|
^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
The encoder rate control.
|
The encoder rate control.
|
||||||
|
|
||||||
.. Note:: This option only applies when using nvenc `encoder`_.
|
.. Note:: This option only applies when using nvenc `encoder`_.
|
||||||
@@ -880,10 +873,10 @@ Description
|
|||||||
vbr_hq variable bitrate, high quality
|
vbr_hq variable bitrate, high quality
|
||||||
========== ===========
|
========== ===========
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``auto``
|
``auto``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
nv_rc = auto
|
nv_rc = auto
|
||||||
@@ -891,7 +884,7 @@ Example
|
|||||||
nv_coder
|
nv_coder
|
||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
The entropy encoding to use.
|
The entropy encoding to use.
|
||||||
|
|
||||||
.. Note:: This option only applies when using nvenc `encoder`_.
|
.. Note:: This option only applies when using nvenc `encoder`_.
|
||||||
@@ -909,10 +902,10 @@ Description
|
|||||||
cavlc
|
cavlc
|
||||||
========== ===========
|
========== ===========
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``auto``
|
``auto``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
nv_coder = auto
|
nv_coder = auto
|
||||||
@@ -920,7 +913,7 @@ Example
|
|||||||
amd_quality
|
amd_quality
|
||||||
^^^^^^^^^^^
|
^^^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
The encoder preset to use.
|
The encoder preset to use.
|
||||||
|
|
||||||
.. Note:: This option only applies when using amdvce `encoder`_.
|
.. Note:: This option only applies when using amdvce `encoder`_.
|
||||||
@@ -938,10 +931,10 @@ Description
|
|||||||
balanced balance performance and speed
|
balanced balance performance and speed
|
||||||
========== ===========
|
========== ===========
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``balanced``
|
``balanced``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
amd_quality = balanced
|
amd_quality = balanced
|
||||||
@@ -949,7 +942,7 @@ Example
|
|||||||
amd_rc
|
amd_rc
|
||||||
^^^^^^
|
^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
The encoder rate control.
|
The encoder rate control.
|
||||||
|
|
||||||
.. Note:: This option only applies when using amdvce `encoder`_.
|
.. Note:: This option only applies when using amdvce `encoder`_.
|
||||||
@@ -971,10 +964,10 @@ Description
|
|||||||
vbr_peak variable bitrate, peak constrained
|
vbr_peak variable bitrate, peak constrained
|
||||||
=========== ===========
|
=========== ===========
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``auto``
|
``auto``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
amd_rc = auto
|
amd_rc = auto
|
||||||
@@ -982,7 +975,7 @@ Example
|
|||||||
amd_coder
|
amd_coder
|
||||||
^^^^^^^^^
|
^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
The entropy encoding to use.
|
The entropy encoding to use.
|
||||||
|
|
||||||
.. Note:: This option only applies when using nvenc `encoder`_.
|
.. Note:: This option only applies when using nvenc `encoder`_.
|
||||||
@@ -1000,10 +993,10 @@ Description
|
|||||||
cavlc
|
cavlc
|
||||||
========== ===========
|
========== ===========
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``auto``
|
``auto``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
amd_coder = auto
|
amd_coder = auto
|
||||||
@@ -1011,7 +1004,7 @@ Example
|
|||||||
vt_software
|
vt_software
|
||||||
^^^^^^^^^^^
|
^^^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
Force Video Toolbox to use software encoding.
|
Force Video Toolbox to use software encoding.
|
||||||
|
|
||||||
.. Note:: This option only applies when using macOS.
|
.. Note:: This option only applies when using macOS.
|
||||||
@@ -1030,10 +1023,10 @@ Description
|
|||||||
forced force software encoding
|
forced force software encoding
|
||||||
========== ===========
|
========== ===========
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``auto``
|
``auto``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
vt_software = auto
|
vt_software = auto
|
||||||
@@ -1041,17 +1034,17 @@ Example
|
|||||||
vt_realtime
|
vt_realtime
|
||||||
^^^^^^^^^^^
|
^^^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
Realtime encoding.
|
Realtime encoding.
|
||||||
|
|
||||||
.. Note:: This option only applies when using macOS.
|
.. Note:: This option only applies when using macOS.
|
||||||
|
|
||||||
.. Warning:: Disabling realtime encoding might result in a delayed frame encoding or frame drop.
|
.. Warning:: Disabling realtime encoding might result in a delayed frame encoding or frame drop.
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``enabled``
|
``enabled``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
vt_realtime = enabled
|
vt_realtime = enabled
|
||||||
@@ -1059,7 +1052,7 @@ Example
|
|||||||
vt_coder
|
vt_coder
|
||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
The entropy encoding to use.
|
The entropy encoding to use.
|
||||||
|
|
||||||
.. Note:: This option only applies when using macOS.
|
.. Note:: This option only applies when using macOS.
|
||||||
@@ -1077,10 +1070,10 @@ Description
|
|||||||
cavlc
|
cavlc
|
||||||
========== ===========
|
========== ===========
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``auto``
|
``auto``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
vt_coder = auto
|
vt_coder = auto
|
||||||
@@ -1091,14 +1084,14 @@ Advanced
|
|||||||
file_apps
|
file_apps
|
||||||
^^^^^^^^^
|
^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
The application configuration file path. The file contains a json formatted list of applications that can be started
|
The application configuration file path. The file contains a json formatted list of applications that can be started
|
||||||
by Moonlight.
|
by Moonlight.
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
OS and package dependent
|
OS and package dependent
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
file_apps = apps.json
|
file_apps = apps.json
|
||||||
@@ -1106,13 +1099,13 @@ Example
|
|||||||
file_state
|
file_state
|
||||||
^^^^^^^^^^
|
^^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
The file where current state of Sunshine is stored.
|
The file where current state of Sunshine is stored.
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``sunshine_state.json``
|
``sunshine_state.json``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
file_state = sunshine_state.json
|
file_state = sunshine_state.json
|
||||||
@@ -1120,13 +1113,13 @@ Example
|
|||||||
credentials_file
|
credentials_file
|
||||||
^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Description
|
**Description**
|
||||||
The file where user credentials for the UI are stored.
|
The file where user credentials for the UI are stored.
|
||||||
|
|
||||||
Default
|
**Default**
|
||||||
``sunshine_state.json``
|
``sunshine_state.json``
|
||||||
|
|
||||||
Example
|
**Example**
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
credentials_file = sunshine_state.json
|
credentials_file = sunshine_state.json
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/DOCKER_README.md
|
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/DOCKER_README.md
|
||||||
|
|
||||||
.. Todo:: This is a planned feature. Currently no Dockerfile or image exists for Sunshine.
|
|
||||||
|
|
||||||
.. mdinclude:: ../../../DOCKER_README.md
|
.. mdinclude:: ../../../DOCKER_README.md
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/about/installation.rst
|
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
============
|
============
|
||||||
The recommended method for running Sunshine is to use the `binaries`_ bundled with the `latest release`_.
|
The recommended method for running Sunshine is to use the `binaries`_ bundled with the `latest release`_.
|
||||||
@@ -17,8 +15,9 @@ Binaries can be found in the `latest release`_.
|
|||||||
|
|
||||||
Docker
|
Docker
|
||||||
------
|
------
|
||||||
.. Todo:: Docker images of Sunshine are planned to be included in the future.
|
Docker images are available on `Dockerhub.io`_ and `ghcr.io`_.
|
||||||
They will be available on `Dockerhub.io`_ and `ghcr.io`_.
|
|
||||||
|
See :ref:`Docker <about/docker:docker>` for additional information.
|
||||||
|
|
||||||
Linux
|
Linux
|
||||||
-----
|
-----
|
||||||
@@ -35,7 +34,7 @@ AppImage
|
|||||||
.. image:: https://img.shields.io/github/issues/lizardbyte/sunshine/pkg:appimage?logo=github&style=for-the-badge
|
.. image:: https://img.shields.io/github/issues/lizardbyte/sunshine/pkg:appimage?logo=github&style=for-the-badge
|
||||||
:alt: GitHub issues by-label
|
:alt: GitHub issues by-label
|
||||||
|
|
||||||
According to AppImageLint the AppImage can run on the following distros.
|
According to AppImageLint the supported distro matrix of the AppImage is below.
|
||||||
|
|
||||||
- [✖] Debian oldstable (buster)
|
- [✖] Debian oldstable (buster)
|
||||||
- [✔] Debian stable (bullseye)
|
- [✔] Debian stable (bullseye)
|
||||||
@@ -57,13 +56,11 @@ According to AppImageLint the AppImage can run on the following distros.
|
|||||||
./sunshine.AppImage --install
|
./sunshine.AppImage --install
|
||||||
|
|
||||||
Start:
|
Start:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
./sunshine.AppImage --install && ./sunshine.AppImage
|
./sunshine.AppImage --install && ./sunshine.AppImage
|
||||||
|
|
||||||
Uninstall:
|
Uninstall:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
./sunshine.AppImage --remove
|
./sunshine.AppImage --remove
|
||||||
@@ -79,7 +76,6 @@ AUR Package
|
|||||||
makepkg -fi
|
makepkg -fi
|
||||||
|
|
||||||
Uninstall:
|
Uninstall:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
pacman -R sunshine
|
pacman -R sunshine
|
||||||
@@ -98,7 +94,6 @@ Debian Package
|
|||||||
.. Tip:: You can double click the deb file to see details about the package and begin installation.
|
.. Tip:: You can double click the deb file to see details about the package and begin installation.
|
||||||
|
|
||||||
Uninstall:
|
Uninstall:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
sudo apt remove sunshine
|
sudo apt remove sunshine
|
||||||
@@ -122,13 +117,17 @@ Flatpak Package
|
|||||||
flatpak install --user sunshine.flatpak
|
flatpak install --user sunshine.flatpak
|
||||||
|
|
||||||
Start:
|
Start:
|
||||||
|
X11 and NVFBC capture (X11 Only)
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
flatpak run dev.lizardbyte.sunshine
|
flatpak run dev.lizardbyte.sunshine
|
||||||
|
|
||||||
Uninstall:
|
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
|
.. code-block:: bash
|
||||||
|
|
||||||
flatpak uninstall --delete-data sunshine.flatpak
|
flatpak uninstall --delete-data sunshine.flatpak
|
||||||
@@ -154,7 +153,6 @@ RPM Package
|
|||||||
.. Tip:: You can double click the rpm file to see details about the package and begin installation.
|
.. Tip:: You can double click the rpm file to see details about the package and begin installation.
|
||||||
|
|
||||||
Uninstall:
|
Uninstall:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
sudo dnf remove sunshine
|
sudo dnf remove sunshine
|
||||||
@@ -171,7 +169,6 @@ pkg
|
|||||||
#. Download the ``sunshine.pkg`` file and install it as normal.
|
#. Download the ``sunshine.pkg`` file and install it as normal.
|
||||||
|
|
||||||
Uninstall:
|
Uninstall:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
cd /etc/sunshine/assets
|
cd /etc/sunshine/assets
|
||||||
@@ -187,7 +184,6 @@ Portfile
|
|||||||
sudo nano /opt/local/etc/macports/sources.conf
|
sudo nano /opt/local/etc/macports/sources.conf
|
||||||
|
|
||||||
Add this line, replacing your username, below the line that starts with ``rsync``.
|
Add this line, replacing your username, below the line that starts with ``rsync``.
|
||||||
|
|
||||||
``file:///Users/<username>/ports``
|
``file:///Users/<username>/ports``
|
||||||
|
|
||||||
``Ctrl+x``, then ``Y`` to exit and save changes.
|
``Ctrl+x``, then ``Y`` to exit and save changes.
|
||||||
@@ -205,7 +201,6 @@ Portfile
|
|||||||
#. The first time you start Sunshine, you will be asked to grant access to screen recording and your microphone.
|
#. The first time you start Sunshine, you will be asked to grant access to screen recording and your microphone.
|
||||||
|
|
||||||
Uninstall:
|
Uninstall:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
sudo port uninstall sunshine
|
sudo port uninstall sunshine
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/about/third_party_packages.rst
|
|
||||||
|
|
||||||
Third Party Packages
|
Third Party Packages
|
||||||
====================
|
====================
|
||||||
|
|
||||||
@@ -15,6 +13,12 @@ Chocolatey
|
|||||||
.. image:: https://img.shields.io/chocolatey/dt/sunshine?style=for-the-badge&logo=chocolatey
|
.. image:: https://img.shields.io/chocolatey/dt/sunshine?style=for-the-badge&logo=chocolatey
|
||||||
:alt: Chocolatey
|
:alt: Chocolatey
|
||||||
|
|
||||||
|
nixpkgs
|
||||||
|
-------
|
||||||
|
.. image:: https://img.shields.io/badge/dynamic/xml?color=orange&label=nixpkgs&style=for-the-badge&prefix=v&query=%2F%2Ftr%5B%40id%3D%27nix_unstable%27%5D%2Ftd%5B3%5D%2Fspan%2Fa&url=https%3A%2F%2Frepology.org%2Fproject%2Fsunshine%2Fversions&logo=nixos
|
||||||
|
:alt: nixpgs Version
|
||||||
|
:target: https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/sunshine/default.nix
|
||||||
|
|
||||||
Scoop
|
Scoop
|
||||||
-----
|
-----
|
||||||
|
|
||||||
@@ -22,6 +26,12 @@ Scoop
|
|||||||
:alt: Scoop Version (extras bucket)
|
:alt: Scoop Version (extras bucket)
|
||||||
:target: https://scoop.sh/#/apps?s=0&d=1&o=true&q=sunshine
|
:target: https://scoop.sh/#/apps?s=0&d=1&o=true&q=sunshine
|
||||||
|
|
||||||
|
Solus
|
||||||
|
-----
|
||||||
|
.. image:: https://img.shields.io/badge/dynamic/xml?color=orange&label=Solus&style=for-the-badge&prefix=v&query=%2F%2Ftr%5B%40id%3D%27solus%27%5D%2Ftd%5B3%5D%2Fspan%2Fa&url=https%3A%2F%2Frepology.org%2Fproject%2Fsunshine%2Fversions&logo=solus
|
||||||
|
:alt: Solus Version
|
||||||
|
:target: https://dev.getsol.us/source/sunshine
|
||||||
|
|
||||||
Winget
|
Winget
|
||||||
------
|
------
|
||||||
.. image:: https://img.shields.io/badge/dynamic/xml?color=orange&label=Winget&style=for-the-badge&prefix=v&query=%2F%2Ftr%5B%40id%3D%27winget%27%5D%2Ftd%5B3%5D%2Fspan%2Fa&url=https%3A%2F%2Frepology.org%2Fproject%2Fsunshine%2Fversions&logo=microsoft
|
.. image:: https://img.shields.io/badge/dynamic/xml?color=orange&label=Winget&style=for-the-badge&prefix=v&query=%2F%2Ftr%5B%40id%3D%27winget%27%5D%2Ftd%5B3%5D%2Fspan%2Fa&url=https%3A%2F%2Frepology.org%2Fproject%2Fsunshine%2Fversions&logo=microsoft
|
||||||
|
|||||||
+16
-26
@@ -1,5 +1,3 @@
|
|||||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/about/usage.rst
|
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
=====
|
=====
|
||||||
#. See the `setup`_ section for your specific OS.
|
#. See the `setup`_ section for your specific OS.
|
||||||
@@ -12,6 +10,7 @@ Usage
|
|||||||
.. Tip:: If using the Linux AppImage, replace ``sunshine`` with ``./sunshine.AppImage``
|
.. Tip:: If using the Linux AppImage, replace ``sunshine`` with ``./sunshine.AppImage``
|
||||||
|
|
||||||
#. Configure Sunshine in the web ui
|
#. Configure Sunshine in the web ui
|
||||||
|
|
||||||
The web ui is available on `https://localhost:47990 <https://localhost:47990>`_ by default. You may replace
|
The web ui is available on `https://localhost:47990 <https://localhost:47990>`_ by default. You may replace
|
||||||
`localhost` with your internal ip address.
|
`localhost` with your internal ip address.
|
||||||
|
|
||||||
@@ -20,7 +19,7 @@ Usage
|
|||||||
.. Caution:: If running for the first time, make sure to note the username and password Sunshine showed to you,
|
.. Caution:: If running for the first time, make sure to note the username and password Sunshine showed to you,
|
||||||
since you cannot get back later!
|
since you cannot get back later!
|
||||||
|
|
||||||
Add games and applications.
|
**Add games and applications.**
|
||||||
This can be configured in the web ui.
|
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
|
.. Note:: Additionally, apps can be configured manually. `src_assets/<os>/config/apps.json` is an example of a
|
||||||
@@ -46,7 +45,6 @@ The Sunshine user interface will be available on port 47990 by default.
|
|||||||
Arguments
|
Arguments
|
||||||
---------
|
---------
|
||||||
To get a list of available arguments run the following:
|
To get a list of available arguments run the following:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
sunshine --help
|
sunshine --help
|
||||||
@@ -56,7 +54,7 @@ Setup
|
|||||||
|
|
||||||
Linux
|
Linux
|
||||||
^^^^^
|
^^^^^
|
||||||
The deb, rpm, and AppImage packages handle these steps automatically. The flatpak does not, third party packages
|
The `deb`, `rpm`, and `AppImage` packages handle these steps automatically. The flatpak does not, third party packages
|
||||||
also may not.
|
also may not.
|
||||||
|
|
||||||
Sunshine needs access to `uinput` to create mouse and gamepad events.
|
Sunshine needs access to `uinput` to create mouse and gamepad events.
|
||||||
@@ -67,25 +65,15 @@ Sunshine needs access to `uinput` to create mouse and gamepad events.
|
|||||||
sudo usermod -a -G input $USER
|
sudo usermod -a -G input $USER
|
||||||
|
|
||||||
#. Create `udev` rules.
|
#. Create `udev` rules.
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
sudo nano /etc/udev/rules.d/85-sunshine.rules
|
|
||||||
|
|
||||||
Input the following contents.
|
|
||||||
|
|
||||||
.. code-block::
|
.. code-block::
|
||||||
|
|
||||||
KERNEL=="uinput", GROUP="input", MODE="0660", OPTIONS+="static_node=uinput"
|
echo 'KERNEL=="uinput", GROUP="input", MODE="0660", OPTIONS+="static_node=uinput"' | \
|
||||||
|
sudo tee /etc/udev/rules.d/85-sunshine-input.rules
|
||||||
Save the file and exit:
|
|
||||||
|
|
||||||
#. ``CTRL+X`` to start exit.
|
|
||||||
#. ``Y`` to save modifications.
|
|
||||||
|
|
||||||
#. Optionally, configure autostart service
|
#. Optionally, configure autostart service
|
||||||
|
|
||||||
- filename: ``~/.config/systemd/user/sunshine.service``
|
- filename: ``~/.config/systemd/user/sunshine.service``
|
||||||
- contents:
|
- contents:
|
||||||
|
|
||||||
.. code-block::
|
.. code-block::
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
@@ -110,12 +98,12 @@ Sunshine needs access to `uinput` to create mouse and gamepad events.
|
|||||||
Flatpak flatpak run dev.lizardbyte.sunshine ✖
|
Flatpak flatpak run dev.lizardbyte.sunshine ✖
|
||||||
======== ============================================== ===============
|
======== ============================================== ===============
|
||||||
|
|
||||||
Start once
|
**Start once**
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
systemctl --user start sunshine
|
systemctl --user start sunshine
|
||||||
|
|
||||||
Start on boot
|
**Start on boot**
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
systemctl --user enable sunshine
|
systemctl --user enable sunshine
|
||||||
@@ -124,12 +112,12 @@ Sunshine needs access to `uinput` to create mouse and gamepad events.
|
|||||||
.. Note:: ``cap_sys_admin`` may as well be root, except you don't need to be root to run it. It is necessary to
|
.. 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.
|
allow Sunshine to use KMS.
|
||||||
|
|
||||||
Enable
|
**Enable**
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))
|
sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))
|
||||||
|
|
||||||
Disable
|
**Disable**
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
sudo setcap -r $(readlink -f $(which sunshine))
|
sudo setcap -r $(readlink -f $(which sunshine))
|
||||||
@@ -151,8 +139,7 @@ select their sink as audio device in `sunshine.conf`.
|
|||||||
.. Caution:: Gamepads are not currently supported.
|
.. Caution:: Gamepads are not currently supported.
|
||||||
|
|
||||||
Configure autostart service
|
Configure autostart service
|
||||||
|
**MacPorts**
|
||||||
MacPorts
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
sudo port load Sunshine
|
sudo port load Sunshine
|
||||||
@@ -163,7 +150,7 @@ For gamepad support, install `ViGEmBus <https://github.com/ViGEm/ViGEmBus/releas
|
|||||||
|
|
||||||
Shortcuts
|
Shortcuts
|
||||||
---------
|
---------
|
||||||
All shortcuts start with CTRL + ALT + SHIFT, just like Moonlight
|
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 + N`` - Hide/Unhide the cursor (This may be useful for Remote Desktop Mode for Moonlight)
|
||||||
- ``CTRL + ALT + SHIFT + F1/F13`` - Switch to different monitor for Streaming
|
- ``CTRL + ALT + SHIFT + F1/F13`` - Switch to different monitor for Streaming
|
||||||
@@ -179,7 +166,6 @@ Application List
|
|||||||
- ``"Variable name":"Variable value"``
|
- ``"Variable name":"Variable value"``
|
||||||
- ``apps`` - The list of applications
|
- ``apps`` - The list of applications
|
||||||
- Example application:
|
- Example application:
|
||||||
|
|
||||||
.. code-block:: json
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -220,6 +206,10 @@ Considerations
|
|||||||
--------------
|
--------------
|
||||||
- When an application is started, if there is an application already running, it will be terminated.
|
- 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.
|
- When the application has been shutdown, the stream shuts down as well.
|
||||||
|
|
||||||
|
- For example, if you attempt to run ``steam`` as a ``cmd`` instead of ``detached`` the stream will immediately fail.
|
||||||
|
This is due to the method in which the steam process is executed. Other applications may behave similarly.
|
||||||
|
|
||||||
- In addition to the apps listed, one app "Desktop" is hardcoded into Sunshine. It does not start an application,
|
- In addition to the apps listed, one app "Desktop" is hardcoded into Sunshine. It does not start an application,
|
||||||
instead it simply starts a stream.
|
instead it simply starts a stream.
|
||||||
- For the Linux flatpak you must prepend commands with ``flatpak-spawn --host``.
|
- For the Linux flatpak you must prepend commands with ``flatpak-spawn --host``.
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/building/build.rst
|
|
||||||
|
|
||||||
Build
|
Build
|
||||||
=====
|
=====
|
||||||
Sunshine binaries are built using `CMake <https://cmake.org/>`_. Cross compilation is not
|
Sunshine binaries are built using `CMake <https://cmake.org/>`_. Cross compilation is not
|
||||||
@@ -11,7 +9,6 @@ Building Locally
|
|||||||
Clone
|
Clone
|
||||||
^^^^^
|
^^^^^
|
||||||
Ensure `git <https://git-scm.com/>`_ is installed and run the following:
|
Ensure `git <https://git-scm.com/>`_ is installed and run the following:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
git clone https://github.com/lizardbyte/sunshine.git --recurse-submodules
|
git clone https://github.com/lizardbyte/sunshine.git --recurse-submodules
|
||||||
|
|||||||
@@ -1,12 +1,8 @@
|
|||||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/building/linux.rst
|
|
||||||
|
|
||||||
Linux
|
Linux
|
||||||
=====
|
=====
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
.. Danger:: Installing these dependencies may break your distribution. It is recommended to build in a virtual machine
|
|
||||||
or to use the `Dockerfile builds`_ located in the `./scripts` directory.
|
|
||||||
|
|
||||||
Debian Bullseye
|
Debian Bullseye
|
||||||
^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^
|
||||||
@@ -18,7 +14,6 @@ Install Requirements
|
|||||||
sudo apt update && sudo apt install \
|
sudo apt update && sudo apt install \
|
||||||
build-essential \
|
build-essential \
|
||||||
cmake \
|
cmake \
|
||||||
git \
|
|
||||||
libavdevice-dev \
|
libavdevice-dev \
|
||||||
libboost-filesystem-dev \
|
libboost-filesystem-dev \
|
||||||
libboost-log-dev \
|
libboost-log-dev \
|
||||||
@@ -97,7 +92,6 @@ Install Requirements
|
|||||||
build-essential \
|
build-essential \
|
||||||
cmake \
|
cmake \
|
||||||
gcc-10 \
|
gcc-10 \
|
||||||
git \
|
|
||||||
g++-10 \
|
g++-10 \
|
||||||
libavdevice-dev \
|
libavdevice-dev \
|
||||||
libboost-filesystem1.71-dev \
|
libboost-filesystem1.71-dev \
|
||||||
@@ -150,7 +144,6 @@ Install Requirements
|
|||||||
sudo apt update && sudo apt install \
|
sudo apt update && sudo apt install \
|
||||||
build-essential \
|
build-essential \
|
||||||
cmake \
|
cmake \
|
||||||
git \
|
|
||||||
g++-10 \
|
g++-10 \
|
||||||
libavdevice-dev \
|
libavdevice-dev \
|
||||||
libboost-filesystem-dev \
|
libboost-filesystem-dev \
|
||||||
@@ -183,9 +176,9 @@ Install CuDA
|
|||||||
wget https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux.run --progress=bar:force:noscroll -q --show-progress -O ./cuda.run && chmod a+x ./cuda.run
|
wget https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux.run --progress=bar:force:noscroll -q --show-progress -O ./cuda.run && chmod a+x ./cuda.run
|
||||||
./cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm && rm ./cuda.run
|
./cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm && rm ./cuda.run
|
||||||
|
|
||||||
Ubuntu 21.10
|
Ubuntu 22.04
|
||||||
^^^^^^^^^^^^
|
^^^^^^^^^^^^
|
||||||
End of Life: July 2022
|
End of Life: April 2027
|
||||||
|
|
||||||
Install Requirements
|
Install Requirements
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
@@ -193,7 +186,6 @@ Install Requirements
|
|||||||
sudo apt update && sudo apt install \
|
sudo apt update && sudo apt install \
|
||||||
build-essential \
|
build-essential \
|
||||||
cmake \
|
cmake \
|
||||||
git \
|
|
||||||
libavdevice-dev \
|
libavdevice-dev \
|
||||||
libboost-filesystem-dev \
|
libboost-filesystem-dev \
|
||||||
libboost-log-dev \
|
libboost-log-dev \
|
||||||
@@ -215,12 +207,6 @@ Install Requirements
|
|||||||
nvidia-cuda-dev \ # Cuda, NvFBC
|
nvidia-cuda-dev \ # Cuda, NvFBC
|
||||||
nvidia-cuda-toolkit \ # Cuda, NvFBC
|
nvidia-cuda-toolkit \ # Cuda, NvFBC
|
||||||
|
|
||||||
Ubuntu 22.04
|
|
||||||
^^^^^^^^^^^^
|
|
||||||
End of Life: April 2027
|
|
||||||
|
|
||||||
.. Todo:: Create Ubuntu 22.04 Dockerfile and complete this documentation.
|
|
||||||
|
|
||||||
Build
|
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.
|
||||||
@@ -230,7 +216,7 @@ Debian based OSes
|
|||||||
|
|
||||||
cmake -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 ..
|
cmake -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 ..
|
||||||
|
|
||||||
Red Hat based Oses
|
Red Hat based OSes
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ ..
|
cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ ..
|
||||||
@@ -241,62 +227,3 @@ Finally
|
|||||||
make -j ${nproc}
|
make -j ${nproc}
|
||||||
cpack -G DEB # optionally, create a deb package
|
cpack -G DEB # optionally, create a deb package
|
||||||
cpack -G RPM # optionally, create a rpm package
|
cpack -G RPM # optionally, create a rpm package
|
||||||
|
|
||||||
Dockerfile Builds
|
|
||||||
-----------------
|
|
||||||
You may wish to simply build sunshine from source, without bloating your OS with development files.
|
|
||||||
There are scripts located in the ``./scripts`` directory that will create docker images that have the necessary
|
|
||||||
packages. As a result, removing the development files after you're done is a single command away.
|
|
||||||
These scripts use docker under the hood, as such, they can only be used to compile the Linux version
|
|
||||||
|
|
||||||
.. Todo:: Publish the Dockerfiles to Dockerhub and ghcr.
|
|
||||||
|
|
||||||
Requirements
|
|
||||||
Install `Docker <https://docs.docker.com/engine/install/>`_
|
|
||||||
|
|
||||||
Instructions
|
|
||||||
#. :ref:`Clone <building/build:clone>`. Sunshine.
|
|
||||||
#. Select the desired Dockerfile from the ``./scripts`` directory.
|
|
||||||
|
|
||||||
Available Files:
|
|
||||||
.. code-block:: text
|
|
||||||
|
|
||||||
Dockerfile-debian
|
|
||||||
Dockerfile-fedora_33 # end of life
|
|
||||||
Dockerfile-fedora_35
|
|
||||||
Dockerfile-ubuntu_18_04
|
|
||||||
Dockerfile-ubuntu_20_04
|
|
||||||
Dockerfile-ubuntu_21_04 # end of life
|
|
||||||
Dockerfile-ubuntu_21_10
|
|
||||||
|
|
||||||
#. Execute
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
cd scripts # move to the scripts directory
|
|
||||||
./build-container.sh -f Dockerfile-<name> # create the container (replace the "<name>")
|
|
||||||
./build-sunshine.sh -p -s .. # compile and build sunshine
|
|
||||||
|
|
||||||
#. Updating
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
git pull # pull the latest changes from github
|
|
||||||
./build-sunshine.sh -p -s .. # compile and build sunshine
|
|
||||||
|
|
||||||
#. Optionally, delete the container
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
./build-container.sh -c delete
|
|
||||||
|
|
||||||
#. Install the resulting package
|
|
||||||
|
|
||||||
Debian
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
sudo apt install -f sunshine-build/sunshine.deb
|
|
||||||
|
|
||||||
Red Hat
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
sudo dnf install sunshine-build/sunshine.rpm
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/building/macos.rst
|
|
||||||
|
|
||||||
macOS
|
macOS
|
||||||
=====
|
=====
|
||||||
|
|
||||||
@@ -38,6 +36,5 @@ Build
|
|||||||
cpack -G DragNDrop # optionally, create a macOS dmg package
|
cpack -G DragNDrop # optionally, create a macOS dmg package
|
||||||
|
|
||||||
If cmake fails complaining to find Boost, try to set the path explicitly.
|
If cmake fails complaining to find Boost, try to set the path explicitly.
|
||||||
|
|
||||||
``cmake -DBOOST_ROOT=[boost path] ..``, e.g., ``cmake -DBOOST_ROOT=/opt/local/libexec/boost/1.76 ..``
|
``cmake -DBOOST_ROOT=[boost path] ..``, e.g., ``cmake -DBOOST_ROOT=/opt/local/libexec/boost/1.76 ..``
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/building/windows.rst
|
|
||||||
|
|
||||||
Windows
|
Windows
|
||||||
=======
|
=======
|
||||||
|
|
||||||
@@ -10,7 +8,9 @@ following packages using:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
pacman -S mingw-w64-x86_64-binutils mingw-w64-x86_64-openssl mingw-w64-x86_64-cmake mingw-w64-x86_64-toolchain mingw-w64-x86_64-opus mingw-w64-x86_64-x265 mingw-w64-x86_64-boost git mingw-w64-x86_64-make cmake make gcc
|
pacman -S mingw-w64-x86_64-binutils mingw-w64-x86_64-openssl mingw-w64-x86_64-cmake \
|
||||||
|
mingw-w64-x86_64-toolchain mingw-w64-x86_64-opus mingw-w64-x86_64-x265 mingw-w64-x86_64-boost \
|
||||||
|
git mingw-w64-x86_64-make cmake make gcc
|
||||||
|
|
||||||
Build
|
Build
|
||||||
-----
|
-----
|
||||||
|
|||||||
+3
-15
@@ -73,23 +73,11 @@ html_logo = os.path.join(root_dir, 'sunshine.png')
|
|||||||
|
|
||||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||||
# a list of builtin themes.
|
# a list of builtin themes.
|
||||||
html_theme = 'sphinx_rtd_theme'
|
html_theme = 'furo'
|
||||||
|
|
||||||
html_theme_options = {
|
html_theme_options = {
|
||||||
# 'analytics_id': 'G-XXXXXXXXXX', # Provided by Google in your dashboard
|
"top_of_page_button": "edit",
|
||||||
# 'analytics_anonymize_ip': False,
|
"source_edit_link": "https://github.com/lizardbyte/sunshine/tree/nightly/docs/source/{filename}",
|
||||||
'logo_only': False,
|
|
||||||
'display_version': False,
|
|
||||||
'prev_next_buttons_location': 'bottom',
|
|
||||||
'style_external_links': True,
|
|
||||||
'vcs_pageview_mode': 'blob',
|
|
||||||
'style_nav_header_background': '#151515',
|
|
||||||
# Toc options
|
|
||||||
'collapse_navigation': True,
|
|
||||||
'sticky_navigation': True,
|
|
||||||
'navigation_depth': 4,
|
|
||||||
'includehidden': True,
|
|
||||||
'titles_only': False,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# extension config options
|
# extension config options
|
||||||
|
|||||||
@@ -1,39 +1,5 @@
|
|||||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/contributing/contributing.rst
|
|
||||||
|
|
||||||
Contributing
|
Contributing
|
||||||
============
|
============
|
||||||
|
|
||||||
.. Tip:: If this is your first time contributing to an open source project, it is a good idea to read
|
Read our contribution guide in our organization level
|
||||||
MDN's `Basic etiquette for open source projects`_ first. There are a few best practices to adopt that will help
|
`docs <https://lizardbyte.readthedocs.io/en/latest/developers/contributing.html>`_.
|
||||||
ensure that you and the other project contributors feel valued and safe, and stay productive.
|
|
||||||
|
|
||||||
#. Fork the repo on GitHub
|
|
||||||
#. Create a new branch for the feature you are adding or the issue you are fixing
|
|
||||||
|
|
||||||
.. Tip:: Base the new branch off the `nightly` branch. It will make your life easier when you submit the PR!
|
|
||||||
|
|
||||||
#. Make changes, push commits, etc.
|
|
||||||
#. Files should contain an empty line at the end.
|
|
||||||
#. Document your code!
|
|
||||||
#. Test your code!
|
|
||||||
#. When ready create a PR to this repo on the `nightly` branch.
|
|
||||||
|
|
||||||
.. Hint:: If you accidentally make your PR against a different branch, a bot will comment letting you know it's on
|
|
||||||
the wrong branch. Don't worry. You can edit the PR to change the target branch. There is no reason to close the
|
|
||||||
PR!
|
|
||||||
|
|
||||||
.. Note:: Draft PRs are also welcome as you work through issues. The benefit of creating a draft PR is that an
|
|
||||||
automated build can run in a github runner.
|
|
||||||
|
|
||||||
.. Attention:: Do not expect partially complete PRs to be merged. These topics will be considered before merging.
|
|
||||||
|
|
||||||
- Does the code follows the style guidelines of this project?
|
|
||||||
|
|
||||||
.. Tip:: Look at examples of existing code in the project!
|
|
||||||
|
|
||||||
- Is the code well commented?
|
|
||||||
- Were documentation blocks updated for new or modified components?
|
|
||||||
|
|
||||||
.. Note:: Developers and maintainers will attempt to assist with challenging issues.
|
|
||||||
|
|
||||||
.. _Basic etiquette for open source projects: https://developer.mozilla.org/en-US/docs/MDN/Contribute/Open_source_etiquette
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/contributing/localization.rst
|
|
||||||
|
|
||||||
Localization
|
Localization
|
||||||
============
|
============
|
||||||
Sunshine is being localized into various languages. The default language is `en` (English) and is highlighted green.
|
Sunshine is being localized into various languages. The default language is `en` (English) and is highlighted green.
|
||||||
@@ -24,7 +22,7 @@ Only elements of the API are planned to be translated.
|
|||||||
|
|
||||||
.. Attention:: The rest API has not yet been implemented.
|
.. Attention:: The rest API has not yet been implemented.
|
||||||
|
|
||||||
Translations Basics
|
**Translations Basics**
|
||||||
- The brand names `LizardByte` and `Sunshine` should never be translated.
|
- The brand names `LizardByte` and `Sunshine` should never be translated.
|
||||||
- Other brand names should never be translated.
|
- Other brand names should never be translated.
|
||||||
Examples:
|
Examples:
|
||||||
@@ -32,7 +30,7 @@ Translations Basics
|
|||||||
- AMD
|
- AMD
|
||||||
- Nvidia
|
- Nvidia
|
||||||
|
|
||||||
CrowdIn Integration
|
**CrowdIn Integration**
|
||||||
How does it work?
|
How does it work?
|
||||||
|
|
||||||
When a change is made to sunshine source code, a workflow generates new translation templates
|
When a change is made to sunshine source code, a workflow generates new translation templates
|
||||||
@@ -48,7 +46,6 @@ There should be minimal cases where strings need to be extracted from source cod
|
|||||||
situations. For example if a system tray icon is added it should be localized as it is user interfacing.
|
situations. For example if a system tray icon is added it should be localized as it is user interfacing.
|
||||||
|
|
||||||
- Wrap the string to be extracted in a function as shown.
|
- Wrap the string to be extracted in a function as shown.
|
||||||
|
|
||||||
.. code-block:: cpp
|
.. code-block:: cpp
|
||||||
|
|
||||||
#include <boost/locale.hpp>
|
#include <boost/locale.hpp>
|
||||||
@@ -73,12 +70,12 @@ When testing locally it may be desirable to manually extract, initialize, update
|
|||||||
required for this, along with the python dependencies in the `./scripts/requirements.txt` file. Additionally,
|
required for this, along with the python dependencies in the `./scripts/requirements.txt` file. Additionally,
|
||||||
`xgettext <https://www.gnu.org/software/gettext/>`_ must be installed.
|
`xgettext <https://www.gnu.org/software/gettext/>`_ must be installed.
|
||||||
|
|
||||||
Extract, initialize, and update
|
**Extract, initialize, and update**
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
python ./scripts/_locale.py --extract --init --update
|
python ./scripts/_locale.py --extract --init --update
|
||||||
|
|
||||||
Compile
|
**Compile**
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
python ./scripts/_locale.py --compile
|
python ./scripts/_locale.py --compile
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
:github_url: https://github.com/RetroArcher/RetroArcher/tree/nightly/docs/source/contributing/testing.rst
|
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
=======
|
=======
|
||||||
|
|
||||||
Clang Format
|
Clang Format
|
||||||
------------
|
------------
|
||||||
Source code is tested against the `.clang-format` file for linting errors. The workflow file responsible for clang
|
Source code is tested against the `.clang-format` file for linting errors. The workflow file responsible for clang
|
||||||
format testing is `.github/workflows/clang.yml`.
|
format testing is `.github/workflows/cpp-clang-format-lint.yml`.
|
||||||
|
|
||||||
Test clang-format locally.
|
Test clang-format locally.
|
||||||
.. Todo:: This documentation needs to be improved.
|
.. Todo:: This documentation needs to be improved.
|
||||||
@@ -17,9 +15,9 @@ Test clang-format locally.
|
|||||||
|
|
||||||
Sphinx
|
Sphinx
|
||||||
------
|
------
|
||||||
Sunshine uses `Sphinx <https://www.sphinx-doc.org/en/master/>`_ for documentation building. Sphinx is included
|
Sunshine uses `Sphinx <https://www.sphinx-doc.org/en/master/>`_ for documentation building. Sphinx, along with other
|
||||||
in the `./scripts/requirements.txt` file. Python is required to build sphinx docs. Installation and setup of python
|
required documentation depencies are included in the `./docs/requirements.txt` file. Python is required to build
|
||||||
will not be covered here.
|
sphinx docs. Installation and setup of python will not be covered here.
|
||||||
|
|
||||||
The config file for Sphinx is `docs/source/conf.py`. This is already included in the repo and should not be modified.
|
The config file for Sphinx is `docs/source/conf.py`. This is already included in the repo and should not be modified.
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/troubleshooting/general.rst
|
|
||||||
|
|
||||||
General
|
General
|
||||||
=======
|
=======
|
||||||
If you forgot your credentials to the web UI, try this.
|
If you forgot your credentials to the web UI, try this.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
sunshine -creds <new username> <new password>
|
sunshine -creds <new username> <new password>
|
||||||
|
|
||||||
Can't access the web UI?
|
Can't access the web UI?
|
||||||
|
|
||||||
#. Check firefall rules.
|
#. Check firefall rules.
|
||||||
|
|
||||||
|
NvFBC, NvENC, or general issues with Nvidia graphics card.
|
||||||
|
- Consumer grade Nvidia cards are software limited to a specific number of encodes. See
|
||||||
|
`Video Encode and Decode GPU Support Matrix <https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new>`_
|
||||||
|
for more info.
|
||||||
|
- You can usually bypass the restriction with a driver patch. See Keylase's
|
||||||
|
`Linux <https://github.com/keylase/nvidia-patch>`_
|
||||||
|
or `Windows <https://github.com/keylase/nvidia-patch/blob/master/win>`_ patches for more guidance.
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/troubleshooting/linux.rst
|
|
||||||
|
|
||||||
Linux
|
Linux
|
||||||
=====
|
=====
|
||||||
If screencasting fails with KMS, you may need to run the following to force unprivileged screencasting.
|
If screencasting fails with KMS, you may need to run the following to force unprivileged screencasting.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
sudo setcap -r $(readlink -f $(which sunshine))
|
sudo setcap -r $(readlink -f $(which sunshine))
|
||||||
|
|||||||
@@ -1,29 +1,10 @@
|
|||||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/troubleshooting/macos.rst
|
|
||||||
|
|
||||||
macOS
|
macOS
|
||||||
=====
|
=====
|
||||||
If you get this error:
|
If you get this error:
|
||||||
|
`Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that
|
||||||
``Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that
|
org.freedesktop.dbus-session.plist is loaded!`
|
||||||
org.freedesktop.dbus-session.plist is loaded!``
|
|
||||||
|
|
||||||
Try this.
|
Try this.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
|
launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
|
||||||
|
|
||||||
Uninstall:
|
|
||||||
|
|
||||||
- pkg
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
sudo chmod +x /opt/local/etc/sunshine/assets/uninstall_pkg.sh
|
|
||||||
sudo /opt/local/etc/sunshine/assets/uninstall_pkg.sh
|
|
||||||
|
|
||||||
- Portfile
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
sudo port uninstall Sunshine
|
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/troubleshooting/windows.rst
|
|
||||||
|
|
||||||
Windows
|
Windows
|
||||||
=======
|
=======
|
||||||
No gamepad is detected.
|
No gamepad is detected.
|
||||||
|
|
||||||
#. Verify that you've installed `ViGEmBus <https://github.com/ViGEm/ViGEmBus/releases/latest>`_.
|
#. Verify that you've installed `ViGEmBus <https://github.com/ViGEm/ViGEmBus/releases/latest>`_.
|
||||||
|
|||||||
@@ -200,3 +200,11 @@ modules:
|
|||||||
url: '@GITHUB_CLONE_URL@'
|
url: '@GITHUB_CLONE_URL@'
|
||||||
branch: '@GITHUB_BRANCH@'
|
branch: '@GITHUB_BRANCH@'
|
||||||
commit: '@GITHUB_COMMIT@'
|
commit: '@GITHUB_COMMIT@'
|
||||||
|
post-install:
|
||||||
|
# use `sed` to update apps.json with prefixes required for flatpak
|
||||||
|
# -r (regex)
|
||||||
|
# -z (handle new lines) https://linuxhint.com/sed-replace-newline-with-space
|
||||||
|
# `/gm` global and multiline
|
||||||
|
- sed -r -z -i -e
|
||||||
|
's/("((do)|(undo)|(cmd)|(detached))"\s*:\s*\[?\n*\s*")(.*")/\1flatpak-spawn --host \7/gm'
|
||||||
|
/app/share/sunshine/apps.json
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
FROM debian:bullseye AS sunshine-debian
|
|
||||||
|
|
||||||
# Debian Bullseye end of life is TBD
|
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
|
||||||
ARG TZ="Europe/London"
|
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
||||||
RUN echo deb http://deb.debian.org/debian/ bullseye main contrib non-free | tee /etc/apt/sources.list.d/non-free.list
|
|
||||||
RUN apt-get update -y && \
|
|
||||||
apt-get install -y \
|
|
||||||
build-essential \
|
|
||||||
cmake \
|
|
||||||
git \
|
|
||||||
libavdevice-dev \
|
|
||||||
libboost-filesystem-dev \
|
|
||||||
libboost-log-dev \
|
|
||||||
libboost-thread-dev \
|
|
||||||
libcap-dev \
|
|
||||||
libdrm-dev \
|
|
||||||
libevdev-dev \
|
|
||||||
libpulse-dev \
|
|
||||||
libopus-dev \
|
|
||||||
libssl-dev \
|
|
||||||
libwayland-dev \
|
|
||||||
libx11-dev \
|
|
||||||
libxcb-shm0-dev \
|
|
||||||
libxcb-xfixes0-dev \
|
|
||||||
libxcb1-dev \
|
|
||||||
libxfixes-dev \
|
|
||||||
libxrandr-dev \
|
|
||||||
libxtst-dev \
|
|
||||||
nvidia-cuda-dev \
|
|
||||||
nvidia-cuda-toolkit \
|
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Entrypoint
|
|
||||||
COPY build-private.sh /root/build.sh
|
|
||||||
ENTRYPOINT ["/root/build.sh", "-deb"]
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
FROM fedora:33 AS sunshine-fedora_33
|
|
||||||
|
|
||||||
# Fedora 33 end of life is November 2021
|
|
||||||
# This file remains for reference only
|
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
||||||
RUN dnf -y update && \
|
|
||||||
dnf -y group install "Development Tools" && \
|
|
||||||
dnf -y 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 && \
|
|
||||||
dnf -y install \
|
|
||||||
boost-devel \
|
|
||||||
boost-static.x86_64 \
|
|
||||||
cmake \
|
|
||||||
ffmpeg-devel \
|
|
||||||
libevdev-devel \
|
|
||||||
libxcb-devel \
|
|
||||||
libX11-devel \
|
|
||||||
libXfixes-devel \
|
|
||||||
libXrandr-devel \
|
|
||||||
libXtst-devel \
|
|
||||||
openssl-devel \
|
|
||||||
opus-devel \
|
|
||||||
pulseaudio-libs-devel \
|
|
||||||
libcap-devel \
|
|
||||||
libdrm-devel \
|
|
||||||
rpm-build \
|
|
||||||
&& dnf clean all \
|
|
||||||
&& rm -rf /var/cache/yum
|
|
||||||
|
|
||||||
# Entrypoint
|
|
||||||
COPY build-private.sh /root/build.sh
|
|
||||||
ENTRYPOINT ["/root/build.sh", "-rpm"]
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
FROM fedora:35 AS sunshine-fedora_35
|
|
||||||
|
|
||||||
# Fedora 35 end of life is TBD
|
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
||||||
RUN dnf -y update && \
|
|
||||||
dnf -y group install "Development Tools" && \
|
|
||||||
dnf -y 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 && \
|
|
||||||
dnf -y install \
|
|
||||||
boost-devel \
|
|
||||||
boost-static.x86_64 \
|
|
||||||
cmake \
|
|
||||||
ffmpeg-devel \
|
|
||||||
gcc-c++ \
|
|
||||||
libevdev-devel \
|
|
||||||
libX11-devel \
|
|
||||||
libxcb-devel \
|
|
||||||
libXcursor-devel \
|
|
||||||
libXfixes-devel \
|
|
||||||
libXinerama-devel \
|
|
||||||
libXi-devel \
|
|
||||||
libXrandr-devel \
|
|
||||||
libXtst-devel \
|
|
||||||
mesa-libGL-devel \
|
|
||||||
openssl-devel \
|
|
||||||
opus-devel \
|
|
||||||
pulseaudio-libs-devel \
|
|
||||||
libcap-devel \
|
|
||||||
libdrm-devel \
|
|
||||||
rpm-build \
|
|
||||||
&& dnf clean all \
|
|
||||||
&& rm -rf /var/cache/yum
|
|
||||||
|
|
||||||
# Entrypoint
|
|
||||||
COPY build-private.sh /root/build.sh
|
|
||||||
ENTRYPOINT ["/root/build.sh", "-rpm"]
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
FROM ubuntu:18.04 AS sunshine-ubuntu_18_04
|
|
||||||
|
|
||||||
# Ubuntu 18.04 end of life is April 2028
|
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
|
||||||
ARG TZ="Europe/London"
|
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
||||||
RUN apt-get update -y && \
|
|
||||||
apt-get install -y \
|
|
||||||
software-properties-common \
|
|
||||||
&& add-apt-repository ppa:savoury1/graphics && \
|
|
||||||
add-apt-repository ppa:savoury1/multimedia && \
|
|
||||||
add-apt-repository ppa:savoury1/ffmpeg4 && \
|
|
||||||
add-apt-repository ppa:savoury1/boost-defaults-1.71 && \
|
|
||||||
add-apt-repository ppa:ubuntu-toolchain-r/test && \
|
|
||||||
apt-get update -y && \
|
|
||||||
apt-get install -y \
|
|
||||||
build-essential \
|
|
||||||
cmake \
|
|
||||||
gcc-10 \
|
|
||||||
git \
|
|
||||||
g++-10 \
|
|
||||||
libavdevice-dev \
|
|
||||||
libboost-filesystem1.71-dev \
|
|
||||||
libboost-log1.71-dev \
|
|
||||||
libboost-regex1.71-dev \
|
|
||||||
libboost-thread1.71-dev \
|
|
||||||
libcap-dev \
|
|
||||||
libdrm-dev \
|
|
||||||
libevdev-dev \
|
|
||||||
libpulse-dev \
|
|
||||||
libopus-dev \
|
|
||||||
libssl-dev \
|
|
||||||
libwayland-dev \
|
|
||||||
libx11-dev \
|
|
||||||
libxcb-shm0-dev \
|
|
||||||
libxcb-xfixes0-dev \
|
|
||||||
libxcb1-dev \
|
|
||||||
libxfixes-dev \
|
|
||||||
libxrandr-dev \
|
|
||||||
libxtst-dev \
|
|
||||||
wget \
|
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Update gcc alias
|
|
||||||
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
|
|
||||||
|
|
||||||
# Install CuDA
|
|
||||||
RUN wget https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux.run --progress=bar:force:noscroll -q --show-progress -O /root/cuda.run && chmod a+x /root/cuda.run
|
|
||||||
RUN /root/cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm && rm /root/cuda.run
|
|
||||||
|
|
||||||
# Install cmake
|
|
||||||
ADD https://cmake.org/files/v3.22/cmake-3.22.2-linux-x86_64.sh /cmake-3.22.2-linux-x86_64.sh
|
|
||||||
RUN mkdir /opt/cmake
|
|
||||||
RUN sh /cmake-3.22.2-linux-x86_64.sh --prefix=/opt/cmake --skip-license
|
|
||||||
RUN ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake
|
|
||||||
RUN cmake --version
|
|
||||||
|
|
||||||
# Entrypoint
|
|
||||||
COPY build-private.sh /root/build.sh
|
|
||||||
ENTRYPOINT ["/root/build.sh", "-deb"]
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
FROM ubuntu:20.04 AS sunshine-ubuntu_20_04
|
|
||||||
|
|
||||||
# Ubuntu 20.04 end of life is April 2030
|
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
|
||||||
ARG TZ="Europe/London"
|
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
||||||
RUN apt-get update -y && \
|
|
||||||
apt-get install -y \
|
|
||||||
build-essential \
|
|
||||||
cmake \
|
|
||||||
git \
|
|
||||||
g++-10 \
|
|
||||||
libavdevice-dev \
|
|
||||||
libboost-filesystem-dev \
|
|
||||||
libboost-log-dev \
|
|
||||||
libboost-thread-dev \
|
|
||||||
libcap-dev \
|
|
||||||
libdrm-dev \
|
|
||||||
libevdev-dev \
|
|
||||||
libpulse-dev \
|
|
||||||
libopus-dev \
|
|
||||||
libssl-dev \
|
|
||||||
libwayland-dev \
|
|
||||||
libx11-dev \
|
|
||||||
libxcb-shm0-dev \
|
|
||||||
libxcb-xfixes0-dev \
|
|
||||||
libxcb1-dev \
|
|
||||||
libxfixes-dev \
|
|
||||||
libxrandr-dev \
|
|
||||||
libxtst-dev \
|
|
||||||
wget \
|
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Update gcc alias
|
|
||||||
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
|
|
||||||
|
|
||||||
# Install CuDA
|
|
||||||
RUN wget https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux.run --progress=bar:force:noscroll -q --show-progress -O /root/cuda.run && chmod a+x /root/cuda.run
|
|
||||||
RUN /root/cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm && rm /root/cuda.run
|
|
||||||
|
|
||||||
# Entrypoint
|
|
||||||
COPY build-private.sh /root/build.sh
|
|
||||||
ENTRYPOINT ["/root/build.sh", "-deb"]
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
FROM ubuntu:21.04 AS sunshine-ubuntu_21_04
|
|
||||||
|
|
||||||
# Ubuntu 21.04 end of life is January 2022
|
|
||||||
# This file remains for reference only
|
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
|
||||||
ARG TZ="Europe/London"
|
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
||||||
RUN apt-get update -y && \
|
|
||||||
apt-get install -y \
|
|
||||||
build-essential \
|
|
||||||
cmake \
|
|
||||||
git \
|
|
||||||
libavdevice-dev \
|
|
||||||
libboost-thread-dev \
|
|
||||||
libboost-filesystem-dev \
|
|
||||||
libboost-log-dev \
|
|
||||||
libcap-dev \
|
|
||||||
libdrm-dev \
|
|
||||||
libevdev-dev \
|
|
||||||
libpulse-dev \
|
|
||||||
libopus-dev \
|
|
||||||
libssl-dev \
|
|
||||||
libwayland-dev \
|
|
||||||
libx11-dev \
|
|
||||||
libxcb-shm0-dev \
|
|
||||||
libxcb-xfixes0-dev \
|
|
||||||
libxcb1-dev \
|
|
||||||
libxfixes-dev \
|
|
||||||
libxrandr-dev \
|
|
||||||
libxtst-dev \
|
|
||||||
nvidia-cuda-dev \
|
|
||||||
nvidia-cuda-toolkit \
|
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Entrypoint
|
|
||||||
COPY build-private.sh /root/build.sh
|
|
||||||
ENTRYPOINT ["/root/build.sh", "-deb"]
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
FROM ubuntu:21.10 AS sunshine-ubuntu_21_10
|
|
||||||
|
|
||||||
# Ubuntu 21.10 end of life is July 2022
|
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
|
||||||
ARG TZ="Europe/London"
|
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
||||||
RUN apt-get update -y && \
|
|
||||||
apt-get install -y \
|
|
||||||
build-essential \
|
|
||||||
cmake \
|
|
||||||
git \
|
|
||||||
libavdevice-dev \
|
|
||||||
libboost-filesystem-dev \
|
|
||||||
libboost-log-dev \
|
|
||||||
libboost-thread-dev \
|
|
||||||
libcap-dev \
|
|
||||||
libdrm-dev \
|
|
||||||
libevdev-dev \
|
|
||||||
libpulse-dev \
|
|
||||||
libopus-dev \
|
|
||||||
libssl-dev \
|
|
||||||
libwayland-dev \
|
|
||||||
libx11-dev \
|
|
||||||
libxcb-shm0-dev \
|
|
||||||
libxcb-xfixes0-dev \
|
|
||||||
libxcb1-dev \
|
|
||||||
libxfixes-dev \
|
|
||||||
libxrandr-dev \
|
|
||||||
libxtst-dev \
|
|
||||||
nvidia-cuda-dev \
|
|
||||||
nvidia-cuda-toolkit \
|
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Entrypoint
|
|
||||||
COPY build-private.sh /root/build.sh
|
|
||||||
ENTRYPOINT ["/root/build.sh", "-deb"]
|
|
||||||
@@ -1,179 +0,0 @@
|
|||||||
#!/bin/bash -e
|
|
||||||
set -e
|
|
||||||
|
|
||||||
usage() {
|
|
||||||
echo "Usage: $0 [OPTIONS]"
|
|
||||||
echo " -c: command --> default [build]"
|
|
||||||
echo " | delete --> Delete the container, Dockerfile isn't mandatory"
|
|
||||||
echo " | build --> Build the container, Dockerfile is mandatory"
|
|
||||||
echo " | compile --> Builds the container, then compiles it. Dockerfile is mandatory"
|
|
||||||
echo ""
|
|
||||||
echo " -s: path: The path to the source for compilation"
|
|
||||||
echo " -n: name: Docker container name --> default [sunshine]"
|
|
||||||
echo " --> all: Build/Compile/Delete all available docker containers"
|
|
||||||
echo " -f: Dockerfile: The name of the docker file"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Attempt to turn relative paths into absolute paths
|
|
||||||
absolute_path() {
|
|
||||||
RELATIVE_PATH=$1
|
|
||||||
if which realpath >/dev/null 2>/dev/null
|
|
||||||
then
|
|
||||||
RELATIVE_PATH=$(realpath $RELATIVE_PATH)
|
|
||||||
else
|
|
||||||
echo "Warning: realpath is not installed on your system, ensure [$1] is absolute"
|
|
||||||
fi
|
|
||||||
|
|
||||||
RETURN=$RELATIVE_PATH
|
|
||||||
}
|
|
||||||
|
|
||||||
CONTAINER_NAME=sunshine
|
|
||||||
COMMAND=BUILD
|
|
||||||
|
|
||||||
build_container() {
|
|
||||||
CONTAINER_NAME=$1
|
|
||||||
DOCKER_FILE=$2
|
|
||||||
|
|
||||||
if [ ! -f "$DOCKER_FILE" ]
|
|
||||||
then
|
|
||||||
echo "Error: $DOCKER_FILE doesn't exist"
|
|
||||||
exit 7
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "docker build . -t $CONTAINER_NAME -f $DOCKER_FILE"
|
|
||||||
docker build . -t "$CONTAINER_NAME" -f "$DOCKER_FILE"
|
|
||||||
}
|
|
||||||
|
|
||||||
delete() {
|
|
||||||
CONTAINER_NAME_UPPER=$(echo "$CONTAINER_NAME" | tr '[:lower:]' '[:upper:]')
|
|
||||||
if [ "$CONTAINER_NAME_UPPER" = "ALL" ]
|
|
||||||
then
|
|
||||||
shopt -s nullglob
|
|
||||||
for file in $(find . -maxdepth 1 -iname "Dockerfile-*" -type f)
|
|
||||||
do
|
|
||||||
CURRENT_CONTAINER="sunshine-$(echo $file | cut -c 14-)"
|
|
||||||
|
|
||||||
if docker inspect "$CURRENT_CONTAINER" > /dev/null 2> /dev/null
|
|
||||||
then
|
|
||||||
echo "docker rmi $CURRENT_CONTAINER"
|
|
||||||
docker rmi "$CURRENT_CONTAINER"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
shopt -u nullglob #revert nullglob back to it's normal default state
|
|
||||||
else
|
|
||||||
if docker inspect "$CONTAINER_NAME" > /dev/null 2> /dev/null
|
|
||||||
then
|
|
||||||
echo "docker rmi $CONTAINER_NAME"
|
|
||||||
docker rmi $CONTAINER_NAME
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
build() {
|
|
||||||
CONTAINER_NAME_UPPER=$(echo "$CONTAINER_NAME" | tr '[:lower:]' '[:upper:]')
|
|
||||||
if [ "$CONTAINER_NAME_UPPER" = "ALL" ]
|
|
||||||
then
|
|
||||||
shopt -s nullglob
|
|
||||||
for file in $(find . -maxdepth 1 -iname "Dockerfile-*" -type f)
|
|
||||||
do
|
|
||||||
CURRENT_CONTAINER="sunshine-$(echo $file | cut -c 14-)"
|
|
||||||
build_container "$CURRENT_CONTAINER" "$file"
|
|
||||||
done
|
|
||||||
shopt -u nullglob #revert nullglob back to it's normal default state
|
|
||||||
else
|
|
||||||
if [[ -z "$DOCKER_FILE" ]]
|
|
||||||
then
|
|
||||||
echo "Error: if container name isn't equal to 'all', you need to specify the Dockerfile"
|
|
||||||
exit 6
|
|
||||||
fi
|
|
||||||
|
|
||||||
build_container "$CONTAINER_NAME" "$DOCKER_FILE"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
abort() {
|
|
||||||
echo "$1"
|
|
||||||
exit 10
|
|
||||||
}
|
|
||||||
|
|
||||||
compile() {
|
|
||||||
CONTAINER_NAME_UPPER=$(echo "$CONTAINER_NAME" | tr '[:lower:]' '[:upper:]')
|
|
||||||
if [ "$CONTAINER_NAME_UPPER" = "ALL" ]
|
|
||||||
then
|
|
||||||
shopt -s nullglob
|
|
||||||
|
|
||||||
# If any docker container doesn't exist, we cannot compile all of them
|
|
||||||
for file in $(find . -maxdepth 1 -iname "Dockerfile-*" -type f)
|
|
||||||
do
|
|
||||||
CURRENT_CONTAINER="sunshine-$(echo $file | cut -c 14-)"
|
|
||||||
|
|
||||||
# If container doesn't exist --> abort.
|
|
||||||
docker inspect "$CURRENT_CONTAINER" > /dev/null 2> /dev/null || abort "Error: container image [$CURRENT_CONTAINER] doesn't exist"
|
|
||||||
done
|
|
||||||
|
|
||||||
for file in $(find . -maxdepth 1 -iname "Dockerfile-*" -type f)
|
|
||||||
do
|
|
||||||
CURRENT_CONTAINER="sunshine-$(echo $file | cut -c 14-)"
|
|
||||||
|
|
||||||
echo "$PWD/build-sunshine.sh -p -n $CURRENT_CONTAINER $SUNSHINE_SOURCES"
|
|
||||||
"$PWD/build-sunshine.sh" -p -n "$CURRENT_CONTAINER" $SUNSHINE_SOURCES
|
|
||||||
done
|
|
||||||
shopt -u nullglob #revert nullglob back to it's normal default state
|
|
||||||
else
|
|
||||||
# If container exists
|
|
||||||
if docker inspect "$CONTAINER_NAME" > /dev/null 2> /dev/null
|
|
||||||
then
|
|
||||||
echo "$PWD/build-sunshine.sh -p -n $CONTAINER_NAME $SUNSHINE_SOURCES"
|
|
||||||
"$PWD/build-sunshine.sh" -p -n "$CONTAINER_NAME" $SUNSHINE_SOURCES
|
|
||||||
else
|
|
||||||
echo "Error: container image [$CONTAINER_NAME] doesn't exist"
|
|
||||||
exit 9
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
while getopts ":c:hn:f:s:" arg; do
|
|
||||||
case ${arg} in
|
|
||||||
s)
|
|
||||||
SUNSHINE_SOURCES="-s $OPTARG"
|
|
||||||
;;
|
|
||||||
c)
|
|
||||||
COMMAND=$(echo $OPTARG | tr '[:lower:]' '[:upper:]')
|
|
||||||
;;
|
|
||||||
n)
|
|
||||||
echo "Container name: $OPTARG"
|
|
||||||
CONTAINER_NAME="$OPTARG"
|
|
||||||
;;
|
|
||||||
f)
|
|
||||||
echo "Using Dockerfile [$OPTARG]"
|
|
||||||
DOCKER_FILE="$OPTARG"
|
|
||||||
;;
|
|
||||||
h)
|
|
||||||
usage
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "$0 set to $(echo $COMMAND | tr '[:upper:]' '[:lower:]')"
|
|
||||||
|
|
||||||
if [ "$COMMAND" = "BUILD" ]
|
|
||||||
then
|
|
||||||
echo "Start building..."
|
|
||||||
delete
|
|
||||||
build
|
|
||||||
echo "Done."
|
|
||||||
elif [ "$COMMAND" = "COMPILE" ]
|
|
||||||
then
|
|
||||||
echo "Start compiling..."
|
|
||||||
compile
|
|
||||||
echo "Done."
|
|
||||||
elif [ "$COMMAND" = "DELETE" ]
|
|
||||||
then
|
|
||||||
echo "Start deleting..."
|
|
||||||
delete
|
|
||||||
echo "Done."
|
|
||||||
else
|
|
||||||
echo "Unknown command [$(echo $COMMAND | tr '[:upper:]' '[:lower:]')]"
|
|
||||||
exit 4
|
|
||||||
fi
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
#!/bin/bash -e
|
|
||||||
set -e
|
|
||||||
|
|
||||||
CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:-Release}"
|
|
||||||
SUNSHINE_EXECUTABLE_PATH="${SUNSHINE_EXECUTABLE_PATH:-/usr/bin/sunshine}"
|
|
||||||
SUNSHINE_ASSETS_DIR="${SUNSHINE_ASSETS_DIR:-/etc/sunshine}"
|
|
||||||
|
|
||||||
|
|
||||||
SUNSHINE_ROOT="${SUNSHINE_ROOT:-/root/sunshine}"
|
|
||||||
SUNSHINE_TAG="${SUNSHINE_TAG:-master}"
|
|
||||||
SUNSHINE_GIT_URL="${SUNSHINE_GIT_URL:-https://github.com/lizardbyte/sunshine.git}"
|
|
||||||
|
|
||||||
|
|
||||||
SUNSHINE_ENABLE_WAYLAND=${SUNSHINE_ENABLE_WAYLAND:-ON}
|
|
||||||
SUNSHINE_ENABLE_X11=${SUNSHINE_ENABLE_X11:-ON}
|
|
||||||
SUNSHINE_ENABLE_DRM=${SUNSHINE_ENABLE_DRM:-ON}
|
|
||||||
SUNSHINE_ENABLE_CUDA=${SUNSHINE_ENABLE_CUDA:-ON}
|
|
||||||
|
|
||||||
# For debugging, it would be usefull to have the sources on the host.
|
|
||||||
if [[ ! -d "$SUNSHINE_ROOT" ]]
|
|
||||||
then
|
|
||||||
git clone --depth 1 --branch "$SUNSHINE_TAG" "$SUNSHINE_GIT_URL" --recurse-submodules "$SUNSHINE_ROOT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -d /root/sunshine-build ]]
|
|
||||||
then
|
|
||||||
mkdir -p /root/sunshine-build
|
|
||||||
fi
|
|
||||||
cd /root/sunshine-build
|
|
||||||
|
|
||||||
cmake "-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE" "-DSUNSHINE_EXECUTABLE_PATH=$SUNSHINE_EXECUTABLE_PATH" "-DSUNSHINE_ASSETS_DIR=$SUNSHINE_ASSETS_DIR" "-DSUNSHINE_ENABLE_WAYLAND=$SUNSHINE_ENABLE_WAYLAND" "-DSUNSHINE_ENABLE_X11=$SUNSHINE_ENABLE_X11" "-DSUNSHINE_ENABLE_DRM=$SUNSHINE_ENABLE_DRM" "-DSUNSHINE_ENABLE_CUDA=$SUNSHINE_ENABLE_CUDA" "$SUNSHINE_ROOT"
|
|
||||||
|
|
||||||
make -j ${nproc}
|
|
||||||
|
|
||||||
# Get preferred package format
|
|
||||||
if [ "$1" == "-rpm" ]
|
|
||||||
then
|
|
||||||
echo "Packaging in .rpm format."
|
|
||||||
./gen-rpm -d
|
|
||||||
elif [ "$1" == "-deb" ]
|
|
||||||
then
|
|
||||||
echo "Packaging in .deb format."
|
|
||||||
./gen-deb
|
|
||||||
else
|
|
||||||
echo "Preferred packaging not specified."
|
|
||||||
echo "Use -deb or -rpm to specify preferred package format."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
@@ -1,132 +0,0 @@
|
|||||||
#!/bin/bash -e
|
|
||||||
set -e
|
|
||||||
|
|
||||||
usage() {
|
|
||||||
echo "Usage: $0"
|
|
||||||
echo " -d: Generate a debug build"
|
|
||||||
echo " -p: Generate a linux package"
|
|
||||||
echo " -e: Extension of package... i.e. 'deb', 'rpm' --> default [deb]"
|
|
||||||
echo " -u: The input device is not a TTY"
|
|
||||||
echo " -n name: Docker container name --> default [sunshine]"
|
|
||||||
echo " -s path/to/sources/sunshine: Use local sources instead of a git repository"
|
|
||||||
echo " -c path/to/cmake/binary/dir: Store cmake output on host OS"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Attempt to turn relative paths into absolute paths
|
|
||||||
absolute_path() {
|
|
||||||
RELATIVE_PATH=$1
|
|
||||||
if which realpath >/dev/null 2>/dev/null
|
|
||||||
then
|
|
||||||
RELATIVE_PATH=$(realpath $RELATIVE_PATH)
|
|
||||||
else
|
|
||||||
echo "Warning: realpath is not installed on your system, ensure [$1] is absolute"
|
|
||||||
fi
|
|
||||||
|
|
||||||
RETURN=$RELATIVE_PATH
|
|
||||||
}
|
|
||||||
|
|
||||||
CMAKE_BUILD_TYPE="-e CMAKE_BUILD_TYPE=Release"
|
|
||||||
SUNSHINE_PACKAGE_BUILD=OFF
|
|
||||||
SUNSHINE_PACKAGE_EXTENSION=deb
|
|
||||||
SUNSHINE_GIT_URL=https://github.com/lizardbyte/sunshine.git
|
|
||||||
CONTAINER_NAME=sunshine
|
|
||||||
|
|
||||||
# Docker will fail if ctrl+c is passed through and the input is not a tty
|
|
||||||
DOCKER_INTERACTIVE=-ti
|
|
||||||
|
|
||||||
while getopts ":dpuhc:e:s:n:" arg; do
|
|
||||||
case ${arg} in
|
|
||||||
u)
|
|
||||||
echo "Input device is not a TTY"
|
|
||||||
USERNAME="$USER"
|
|
||||||
unset DOCKER_INTERACTIVE
|
|
||||||
;;
|
|
||||||
d)
|
|
||||||
echo "Creating debug build"
|
|
||||||
CMAKE_BUILD_TYPE="-e CMAKE_BUILD_TYPE=Debug"
|
|
||||||
;;
|
|
||||||
p)
|
|
||||||
echo "Creating package build"
|
|
||||||
SUNSHINE_PACKAGE_BUILD=ON
|
|
||||||
SUNSHINE_ASSETS_DIR="-e SUNSHINE_ASSETS_DIR=/etc/sunshine"
|
|
||||||
SUNSHINE_EXECUTABLE_PATH="-e SUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine"
|
|
||||||
;;
|
|
||||||
e)
|
|
||||||
echo "Defining package extension: $OPTARG"
|
|
||||||
if [ "$OPTARG" == "deb" ]
|
|
||||||
then
|
|
||||||
SUNSHINE_PACKAGE_EXTENSION=$OPTARG
|
|
||||||
echo "Package extension: deb"
|
|
||||||
elif [ "$OPTARG" == "rpm" ]
|
|
||||||
then
|
|
||||||
SUNSHINE_PACKAGE_EXTENSION=$OPTARG
|
|
||||||
echo "Package extension: rpm"
|
|
||||||
else
|
|
||||||
echo "Package extension not supported: $OPTARG"
|
|
||||||
echo "Falling back to default package extension: $SUNSHINE_PACKAGE_EXTENSION"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
s)
|
|
||||||
absolute_path "$OPTARG"
|
|
||||||
OPTARG="$RETURN"
|
|
||||||
echo "Using sources from $OPTARG"
|
|
||||||
SUNSHINE_ROOT="-v $OPTARG:/root/sunshine"
|
|
||||||
;;
|
|
||||||
c)
|
|
||||||
[ "$USERNAME" == "" ] && USERNAME=$(logname)
|
|
||||||
|
|
||||||
absolute_path "$OPTARG"
|
|
||||||
OPTARG="$RETURN"
|
|
||||||
|
|
||||||
echo "Using $OPTARG as cmake binary dir"
|
|
||||||
if [[ ! -d $OPTARG ]]
|
|
||||||
then
|
|
||||||
echo "cmake binary dir doesn't exist, a new one will be created."
|
|
||||||
mkdir -p "$OPTARG"
|
|
||||||
[ "$USERNAME" == "$USER"] || chown $USERNAME:$USERNAME "$OPTARG"
|
|
||||||
fi
|
|
||||||
|
|
||||||
CMAKE_ROOT="-v $OPTARG:/root/sunshine-build"
|
|
||||||
;;
|
|
||||||
n)
|
|
||||||
echo "Container name: $OPTARG"
|
|
||||||
CONTAINER_NAME=$OPTARG
|
|
||||||
;;
|
|
||||||
h)
|
|
||||||
usage
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
[ "$USERNAME" = "" ] && USERNAME=$(logname)
|
|
||||||
|
|
||||||
BUILD_DIR="$PWD/$CONTAINER_NAME-build"
|
|
||||||
[ "$SUNSHINE_ASSETS_DIR" = "" ] && SUNSHINE_ASSETS_DIR="-e SUNSHINE_ASSETS_DIR=$BUILD_DIR/assets"
|
|
||||||
[ "$SUNSHINE_EXECUTABLE_PATH" = "" ] && SUNSHINE_EXECUTABLE_PATH="-e SUNSHINE_EXECUTABLE_PATH=$BUILD_DIR/sunshine"
|
|
||||||
|
|
||||||
echo "docker run $DOCKER_INTERACTIVE --privileged $SUNSHINE_ROOT $CMAKE_ROOT $SUNSHINE_ASSETS_DIR $SUNSHINE_EXECUTABLE_PATH $CMAKE_BUILD_TYPE --name $CONTAINER_NAME $CONTAINER_NAME"
|
|
||||||
docker run $DOCKER_INTERACTIVE --privileged $SUNSHINE_ROOT $CMAKE_ROOT $SUNSHINE_ASSETS_DIR $SUNSHINE_EXECUTABLE_PATH $CMAKE_BUILD_TYPE --name $CONTAINER_NAME $CONTAINER_NAME
|
|
||||||
|
|
||||||
exit_code=$?
|
|
||||||
|
|
||||||
if [ $exit_code -eq 0 ]
|
|
||||||
then
|
|
||||||
mkdir -p $BUILD_DIR
|
|
||||||
case $SUNSHINE_PACKAGE_BUILD in
|
|
||||||
ON)
|
|
||||||
echo "Downloading package to: $BUILD_DIR/$CONTAINER_NAME.$SUNSHINE_PACKAGE_EXTENSION"
|
|
||||||
docker cp $CONTAINER_NAME:/root/sunshine-build/package-$SUNSHINE_PACKAGE_EXTENSION/sunshine.$SUNSHINE_PACKAGE_EXTENSION "$BUILD_DIR/$CONTAINER_NAME.$SUNSHINE_PACKAGE_EXTENSION"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Downloading binary and assets to: $BUILD_DIR"
|
|
||||||
docker cp $CONTAINER_NAME:/root/sunshine/assets "$BUILD_DIR"
|
|
||||||
docker cp $CONTAINER_NAME:/root/sunshine-build/sunshine "$BUILD_DIR"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
echo "chown --recursive $USERNAME:$USERNAME $BUILD_DIR"
|
|
||||||
chown --recursive $USERNAME:$USERNAME "$BUILD_DIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Removing docker container $CONTAINER_NAME"
|
|
||||||
docker rm $CONTAINER_NAME
|
|
||||||
@@ -1,5 +1 @@
|
|||||||
Babel==2.10.3
|
Babel==2.10.3
|
||||||
m2r2==0.3.2
|
|
||||||
Sphinx==5.3.0
|
|
||||||
sphinx-copybutton==0.5.0
|
|
||||||
sphinx-rtd-theme==1.0.0
|
|
||||||
|
|||||||
@@ -6,14 +6,18 @@
|
|||||||
{
|
{
|
||||||
"name": "Low Res Desktop",
|
"name": "Low Res Desktop",
|
||||||
"prep-cmd": [
|
"prep-cmd": [
|
||||||
{ "do":"xrandr --output HDMI-1 --mode 1920x1080", "undo":"xrandr --output HDMI-1 --mode 1920x1200" }
|
{
|
||||||
|
"do": "xrandr --output HDMI-1 --mode 1920x1080",
|
||||||
|
"undo": "xrandr --output HDMI-1 --mode 1920x1200"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Steam BigPicture",
|
"name": "Steam BigPicture",
|
||||||
|
|
||||||
"output": "steam.txt",
|
"output": "steam.txt",
|
||||||
"detached":["setsid steam steam://open/bigpicture"],
|
"detached": [
|
||||||
|
"setsid steam steam://open/bigpicture"
|
||||||
|
],
|
||||||
"image-path": "steam.png"
|
"image-path": "steam.png"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -5,9 +5,10 @@
|
|||||||
"apps": [
|
"apps": [
|
||||||
{
|
{
|
||||||
"name": "Steam BigPicture",
|
"name": "Steam BigPicture",
|
||||||
|
|
||||||
"output": "steam.txt",
|
"output": "steam.txt",
|
||||||
"detached":["steam steam://open/bigpicture"],
|
"detached": [
|
||||||
|
"steam steam://open/bigpicture"
|
||||||
|
],
|
||||||
"image-path": "steam.png"
|
"image-path": "steam.png"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user