mirror of
https://github.com/thinkonmay/sunshine-sdk.git
synced 2025-12-27 23:48:53 +00:00
commit
6000b85b1a
@ -1,3 +1,7 @@
|
||||
# This file 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.
|
||||
|
||||
# Generated from CLion C/C++ Code Style settings
|
||||
BasedOnStyle: LLVM
|
||||
AccessModifierOffset: -2
|
||||
|
||||
6
.flake8
Normal file
6
.flake8
Normal file
@ -0,0 +1,6 @@
|
||||
[flake8]
|
||||
filename =
|
||||
*.py
|
||||
max-line-length = 120
|
||||
extend-exclude =
|
||||
venv/
|
||||
34
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
34
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
@ -1,3 +1,4 @@
|
||||
---
|
||||
name: Bug Report
|
||||
description: Create a bug report to help us improve.
|
||||
body:
|
||||
@ -5,7 +6,7 @@ body:
|
||||
attributes:
|
||||
value: >
|
||||
**THIS IS NOT THE PLACE TO ASK FOR SUPPORT!**
|
||||
Please use [Github Discussions](https://github.com/SunshineStream/Sunshine/discussions) for support issues.
|
||||
Please use [Discord](https://docs.lizardbyte.dev/en/latest/about/support.html#discord) for support issues.
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
@ -23,15 +24,25 @@ body:
|
||||
attributes:
|
||||
label: Additional Context
|
||||
description: Add any other context about the bug here.
|
||||
- type: input
|
||||
- type: dropdown
|
||||
id: os
|
||||
attributes:
|
||||
label: Sunshine Host Operating System and Version
|
||||
placeholder: eg. Windows 10, macOS 10.15, Ubuntu 20.04, etc.
|
||||
label: Host Operating System
|
||||
description: What version operating system are you running the software on?
|
||||
options:
|
||||
- Linux
|
||||
- macOS
|
||||
- Windows
|
||||
- other
|
||||
- type: input
|
||||
id: os-version
|
||||
attributes:
|
||||
label: Operating System Version
|
||||
description: Provide the version of the operating system. Additionally a build number would be helpful.
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: architecture
|
||||
id: os-architecture
|
||||
attributes:
|
||||
label: Architecture
|
||||
placeholder: e.g. 32 bit, 64 bit, arm
|
||||
@ -41,7 +52,7 @@ body:
|
||||
id: version
|
||||
attributes:
|
||||
label: Sunshine Version
|
||||
placeholder: eg. 0.11.1
|
||||
placeholder: eg. 0.14.0
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
@ -76,7 +87,16 @@ body:
|
||||
placeholder: e.g. PipeWire/KVM/X11
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Relevant log output
|
||||
description: |
|
||||
Please copy and paste any relevant log output. This will be automatically formatted into code,
|
||||
so no need for backticks.
|
||||
render: Shell
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Make sure to close your issue when it's solved! If you found the solution yourself please comment so that others benefit from it.
|
||||
Make sure to close your issue when it's solved! If you found the solution yourself please comment
|
||||
so that others benefit from it.
|
||||
|
||||
24
.github/ISSUE_TEMPLATE/config.yml
vendored
24
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -1,11 +1,19 @@
|
||||
---
|
||||
# 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.
|
||||
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: AUR Package Issue
|
||||
url: https://aur.archlinux.org/packages/sunshine
|
||||
about: AUR Package Issues should be discussed on the AUR
|
||||
- name: Github Discussions
|
||||
url: https://github.com/SunshineStream/Sunshine/discussions
|
||||
about: General discussion, support, feature requests and more!
|
||||
- name: Discord support
|
||||
url: https://discord.com/invite/CGg5JxN
|
||||
about: Ask question about Sunshine in Discord
|
||||
url: https://docs.lizardbyte.dev/about/support.html#discord
|
||||
about: Ask questions in Discord
|
||||
- name: Reddit support
|
||||
url: https://www.reddit.com/r/LizardByte
|
||||
about: Get community support on Reddit
|
||||
- name: Facebook support
|
||||
url: https://www.facebook.com/groups/lizardbyte
|
||||
about: Get community support on Facebook
|
||||
- name: Feature request
|
||||
url: https://feedback.lizardbyte.dev
|
||||
about: Share your suggestions or ideas to help us improve
|
||||
|
||||
29
.github/dependabot.yml
vendored
29
.github/dependabot.yml
vendored
@ -1,15 +1,30 @@
|
||||
---
|
||||
# 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.
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
target-branch: "nightly"
|
||||
open-pull-requests-limit: 20
|
||||
|
||||
- package-ecosystem: "pip"
|
||||
directory: "/scripts"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
time: "00:00"
|
||||
target-branch: "nightly"
|
||||
open-pull-requests-limit: 10
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
time: "00:00"
|
||||
target-branch: "nightly"
|
||||
open-pull-requests-limit: 10
|
||||
|
||||
- package-ecosystem: "pip"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
time: "00:00"
|
||||
target-branch: "nightly"
|
||||
open-pull-requests-limit: 10
|
||||
|
||||
11
.github/label-actions.yml
vendored
11
.github/label-actions.yml
vendored
@ -1,13 +1,16 @@
|
||||
---
|
||||
# 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.
|
||||
|
||||
# Configuration for Label Actions - https://github.com/dessant/label-actions
|
||||
|
||||
added:
|
||||
comment: >
|
||||
This feature has been added and will be available in the next release.
|
||||
|
||||
fixed:
|
||||
comment: >
|
||||
This issue has been fixed and will be available in the next release.
|
||||
|
||||
invalid:duplicate:
|
||||
comment: >
|
||||
:wave: @{issue-author}, this appears to be a duplicate of a pre-existing issue.
|
||||
@ -22,8 +25,8 @@ invalid:duplicate:
|
||||
invalid:support:
|
||||
comment: >
|
||||
:wave: @{issue-author}, we use the issue tracker exclusively for bug reports.
|
||||
However, this issue appears to be a support request. Please use our
|
||||
[Discord Server](https://discord.com/invite/CGg5JxN) to get help. Thanks.
|
||||
However, this issue appears to be a support request. Please use
|
||||
[Discord](https://docs.lizardbyte.dev/about/support.html#discord) for support issues. Thanks.
|
||||
close: true
|
||||
lock: true
|
||||
lock-reason: 'off-topic'
|
||||
|
||||
24
.github/pr_release_template.md
vendored
Normal file
24
.github/pr_release_template.md
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
## Description
|
||||
<!--- Please include a summary of the changes. --->
|
||||
This PR was created automatically.
|
||||
|
||||
|
||||
### Screenshot
|
||||
<!--- Include screenshots if the changes are UI-related. --->
|
||||
|
||||
|
||||
### Issues Fixed or Closed
|
||||
<!--- Close issue example: `- Closes #1` --->
|
||||
<!--- Fix bug issue example: `- Fixes #2` --->
|
||||
<!--- Resolve issue example: `- Resolves #3` --->
|
||||
|
||||
|
||||
## Type of Change
|
||||
- [ ] Bug fix (non-breaking change which fixes an issue)
|
||||
- [ ] New feature (non-breaking change which adds functionality)
|
||||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
||||
- [ ] Documentation update (changes to documentation)
|
||||
- [ ] Repository update (changes to repository files)
|
||||
|
||||
## Changelog Summary
|
||||
<!--- Summarize all the changes in a bulleted list. --->
|
||||
696
.github/workflows/CI.yml
vendored
696
.github/workflows/CI.yml
vendored
@ -1,3 +1,4 @@
|
||||
---
|
||||
name: CI
|
||||
|
||||
on:
|
||||
@ -9,6 +10,17 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
github_env:
|
||||
name: GitHub Env Debug
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Dump github context
|
||||
run: echo "$GITHUB_CONTEXT"
|
||||
shell: bash
|
||||
env:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
|
||||
check_changelog:
|
||||
name: Check Changelog
|
||||
runs-on: ubuntu-latest
|
||||
@ -20,7 +32,7 @@ jobs:
|
||||
id: verify_changelog
|
||||
if: ${{ github.ref == 'refs/heads/master' || github.base_ref == 'master' }}
|
||||
# base_ref for pull request check, ref for push
|
||||
uses: SunshineStream/actions/verify_changelog@master
|
||||
uses: LizardByte/.github/actions/verify_changelog@master
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
outputs:
|
||||
@ -41,7 +53,8 @@ jobs:
|
||||
|
||||
- name: Check CMakeLists.txt Version
|
||||
run: |
|
||||
version=$(grep -o -E '^project\(Sunshine VERSION [0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt | grep -o -E '[0-9]+\.[0-9]+\.[0-9]+')
|
||||
version=$(grep -o -E '^project\(Sunshine VERSION [0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt | \
|
||||
grep -o -E '[0-9]+\.[0-9]+\.[0-9]+')
|
||||
echo "cmakelists_version=${version}" >> $GITHUB_ENV
|
||||
|
||||
- name: Compare CMakeList.txt Version
|
||||
@ -49,9 +62,188 @@ jobs:
|
||||
run: |
|
||||
echo CMakeLists version: "$cmakelists_version"
|
||||
echo Changelog version: "${{ needs.check_changelog.outputs.next_version_bare }}"
|
||||
echo Within 'CMakeLists.txt' change "project(Sunshine [VERSION $cmakelists_version]" to "project(Sunshine [VERSION ${{ needs.check_changelog.outputs.next_version_bare }}]"
|
||||
echo Within 'CMakeLists.txt' change "project(Sunshine [VERSION $cmakelists_version]" to \
|
||||
"project(Sunshine [VERSION ${{ needs.check_changelog.outputs.next_version_bare }}]"
|
||||
exit 1
|
||||
|
||||
build_linux_aur:
|
||||
name: Linux AUR
|
||||
runs-on: ubuntu-latest
|
||||
needs: check_changelog
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Dependencies Linux AUR
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y \
|
||||
cmake
|
||||
|
||||
- name: Configure PKGBUILD files
|
||||
run: |
|
||||
# variables for manifest
|
||||
echo "aur_publish=false" >> $GITHUB_ENV
|
||||
aur_pkg=sunshine-dev
|
||||
sub_version=""
|
||||
conflicts="'sunshine'"
|
||||
provides="'sunshine'"
|
||||
|
||||
branch=${GITHUB_HEAD_REF}
|
||||
|
||||
# check the branch variable
|
||||
if [ -z "$branch" ]
|
||||
then
|
||||
echo "This is a PUSH event"
|
||||
commit=${{ github.sha }}
|
||||
clone_url=${{ github.event.repository.clone_url }}
|
||||
|
||||
if [[ ${{ github.ref == 'refs/heads/master' }} ]]; then
|
||||
aur_pkg=sunshine
|
||||
conflicts=""
|
||||
provides=""
|
||||
|
||||
echo "aur_publish=true" >> $GITHUB_ENV
|
||||
elif [[ ${{ github.ref == 'refs/heads/nightly' }} ]]; then
|
||||
aur_pkg=sunshine-git
|
||||
sub_version=".r${commit}"
|
||||
|
||||
echo "aur_publish=true" >> $GITHUB_ENV
|
||||
fi
|
||||
else
|
||||
echo "This is a PR event"
|
||||
commit=${{ github.event.pull_request.head.sha }}
|
||||
clone_url=${{ github.event.pull_request.head.repo.clone_url }}
|
||||
|
||||
sub_version=".r${commit}"
|
||||
fi
|
||||
echo "Commit: ${commit}"
|
||||
echo "Clone URL: ${clone_url}"
|
||||
|
||||
echo "aur_pkg=${aur_pkg}" >> $GITHUB_ENV
|
||||
|
||||
mkdir -p artifacts
|
||||
mkdir -p build
|
||||
|
||||
cd build
|
||||
cmake -DSUNSHINE_CONFIGURE_AUR=ON \
|
||||
-DSUNSHINE_AUR_PKG=${aur_pkg} \
|
||||
-DSUNSHINE_SUB_VERSION=${sub_version} \
|
||||
-DSUNSHINE_AUR_CONFLICTS=${conflicts} \
|
||||
-DSUNSHINE_AUR_PROVIDES=${provides} \
|
||||
-DGITHUB_CLONE_URL=${clone_url} \
|
||||
-DGITHUB_COMMIT=${commit} \
|
||||
-DSUNSHINE_CONFIGURE_ONLY=ON \
|
||||
..
|
||||
cd ..
|
||||
|
||||
mv ./build/PKGBUILD ./artifacts/
|
||||
|
||||
- name: Validate package
|
||||
uses: hapakaien/archlinux-package-action@v2.2.0
|
||||
with:
|
||||
path: artifacts
|
||||
flags: '--syncdeps --noconfirm'
|
||||
namcap: true
|
||||
srcinfo: true
|
||||
aur: true # workaround mirror problem
|
||||
|
||||
- name: Upload Artifacts
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: sunshine-linux-aur
|
||||
path: artifacts/
|
||||
|
||||
- name: Publish AUR package
|
||||
if: ${{ env.aur_publish == 'true' }}
|
||||
uses: KSXGitHub/github-actions-deploy-aur@v2.4.1
|
||||
with:
|
||||
pkgname: ${{ env.aur_pkg }}
|
||||
pkgbuild: ./artifacts/PKGBUILD
|
||||
assets: |
|
||||
./artifacts/*
|
||||
commit_username: ${{ secrets.AUR_USERNAME }}
|
||||
commit_email: ${{ secrets.AUR_EMAIL }}
|
||||
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
|
||||
commit_message: Automatic update from GitHub ${{ github.repository }} per ${{ github.ref }}
|
||||
allow_empty_commits: false
|
||||
|
||||
build_linux_flatpak:
|
||||
name: Linux Flatpak
|
||||
runs-on: ubuntu-latest
|
||||
needs: check_changelog
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Dependencies Linux Flatpak
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y \
|
||||
cmake \
|
||||
flatpak
|
||||
sudo su $(whoami) -c 'flatpak remote-add --user --if-not-exists flathub \
|
||||
https://flathub.org/repo/flathub.flatpakrepo'
|
||||
sudo su $(whoami) -c 'flatpak install --user flathub \
|
||||
org.flatpak.Builder org.freedesktop.Platform//21.08 org.freedesktop.Sdk//21.08 -y'
|
||||
|
||||
- name: Configure Flatpak Manifest
|
||||
run: |
|
||||
# variables for manifest
|
||||
branch=${GITHUB_HEAD_REF}
|
||||
|
||||
# check the branch variable
|
||||
if [ -z "$branch" ]
|
||||
then
|
||||
echo "This is a PUSH event"
|
||||
branch=${{ github.ref_name }}
|
||||
commit=${{ github.sha }}
|
||||
clone_url=${{ github.event.repository.clone_url }}
|
||||
else
|
||||
echo "This is a PR event"
|
||||
commit=${{ github.event.pull_request.head.sha }}
|
||||
clone_url=${{ github.event.pull_request.head.repo.clone_url }}
|
||||
fi
|
||||
echo "Branch: ${branch}"
|
||||
echo "Commit: ${commit}"
|
||||
echo "Clone URL: ${clone_url}"
|
||||
|
||||
mkdir -p build
|
||||
mkdir -p artifacts
|
||||
|
||||
cd build
|
||||
cmake -DGITHUB_CLONE_URL=${clone_url} \
|
||||
-DGITHUB_BRANCH=${branch} \
|
||||
-DGITHUB_COMMIT=${commit} \
|
||||
-DSUNSHINE_CONFIGURE_FLATPAK=ON \
|
||||
-DSUNSHINE_CONFIGURE_ONLY=ON \
|
||||
..
|
||||
|
||||
- name: Build Linux Flatpak
|
||||
working-directory: build
|
||||
run: |
|
||||
sudo su $(whoami) -c 'flatpak run org.flatpak.Builder --repo=repo --force-clean build-sunshine \
|
||||
dev.lizardbyte.sunshine.yml'
|
||||
sudo su $(whoami) -c 'flatpak build-bundle ./repo ../artifacts/sunshine.flatpak dev.lizardbyte.sunshine'
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: sunshine-linux-flatpak
|
||||
path: artifacts/
|
||||
|
||||
- name: Create Release
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
uses: LizardByte/.github/actions/create_release@master
|
||||
with:
|
||||
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 }}
|
||||
|
||||
build_linux:
|
||||
name: Linux
|
||||
runs-on: ubuntu-20.04
|
||||
@ -59,77 +251,83 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false # false to test all, true to fail entire job if any fail
|
||||
matrix:
|
||||
include: # package these differently
|
||||
include: # package these differently
|
||||
- type: cpack
|
||||
CMAKE_INSTALL_PREFIX: ''
|
||||
SUNSHINE_ASSETS_DIR: '/usr/local/sunshine/assets'
|
||||
SUNSHINE_CONFIG_DIR: '/usr/local/sunshine/config'
|
||||
CMAKE_INSTALL_PREFIX: '/usr'
|
||||
SUNSHINE_ASSETS_DIR: 'local/sunshine/assets'
|
||||
SUNSHINE_CONFIG_DIR: 'local/sunshine/config'
|
||||
EXTRA_ARGS: ''
|
||||
- type: appimage
|
||||
CMAKE_INSTALL_PREFIX: '/usr'
|
||||
SUNSHINE_ASSETS_DIR: 'sunshine.AppImage.config'
|
||||
SUNSHINE_CONFIG_DIR: 'sunshine.AppImage.home'
|
||||
EXTRA_ARGS: '-DSUNSHINE_CONFIGURE_APPIMAGE=ON'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup Dependencies Linux
|
||||
run: |
|
||||
sudo add-apt-repository ppa:savoury1/ffmpeg4 -y
|
||||
# sudo add-apt-repository ppa:savoury1/boost-defaults-1.71 -y
|
||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
|
||||
|
||||
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y \
|
||||
build-essential \
|
||||
cmake \
|
||||
gcc-10 \
|
||||
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
|
||||
build-essential \
|
||||
cmake \
|
||||
gcc-10 \
|
||||
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
|
||||
# # Ubuntu 20.04+ packages
|
||||
# libboost-filesystem-dev
|
||||
# libboost-log-dev
|
||||
# libboost-thread-dev
|
||||
|
||||
|
||||
# # Ubuntu 18.04 packages
|
||||
# libboost-filesystem1.71-dev \
|
||||
# libboost-log1.71-dev \
|
||||
# libboost-regex1.71-dev \
|
||||
# libboost-thread1.71-dev \
|
||||
|
||||
|
||||
# clean apt cache
|
||||
sudo apt-get clean
|
||||
sudo rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
# Update gcc alias
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
|
||||
|
||||
sudo update-alternatives --install \
|
||||
/usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
|
||||
|
||||
# Install CuDA
|
||||
sudo 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
|
||||
sudo 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
|
||||
sudo chmod a+x /root/cuda.run
|
||||
sudo /root/cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm
|
||||
sudo rm /root/cuda.run
|
||||
|
||||
|
||||
# # Install cmake (necessary for 18.04)
|
||||
# wget https://cmake.org/files/v3.22/cmake-3.22.2-linux-x86_64.sh
|
||||
# chmod +x cmake-3.22.2-linux-x86_64.sh
|
||||
@ -142,9 +340,19 @@ jobs:
|
||||
run: |
|
||||
mkdir -p build
|
||||
mkdir -p artifacts
|
||||
|
||||
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ matrix.CMAKE_INSTALL_PREFIX }} -DSUNSHINE_ASSETS_DIR=${{ matrix.SUNSHINE_ASSETS_DIR }} -DSUNSHINE_CONFIG_DIR=${{ matrix.SUNSHINE_CONFIG_DIR }} -DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine -DSUNSHINE_ENABLE_WAYLAND=ON -DSUNSHINE_ENABLE_X11=ON -DSUNSHINE_ENABLE_DRM=ON -DSUNSHINE_ENABLE_CUDA=ON ..
|
||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=${{ matrix.CMAKE_INSTALL_PREFIX }} \
|
||||
-DSUNSHINE_ASSETS_DIR=${{ matrix.SUNSHINE_ASSETS_DIR }} \
|
||||
-DSUNSHINE_CONFIG_DIR=${{ matrix.SUNSHINE_CONFIG_DIR }} \
|
||||
-DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
|
||||
-DSUNSHINE_ENABLE_WAYLAND=ON \
|
||||
-DSUNSHINE_ENABLE_X11=ON \
|
||||
-DSUNSHINE_ENABLE_DRM=ON \
|
||||
-DSUNSHINE_ENABLE_CUDA=ON \
|
||||
${{ matrix.EXTRA_ARGS }} \
|
||||
..
|
||||
make -j ${nproc}
|
||||
|
||||
- name: Package Linux - CPACK
|
||||
@ -160,7 +368,7 @@ jobs:
|
||||
mv ./cpack_artifacts/Sunshine.rpm ../artifacts/sunshine.rpm
|
||||
|
||||
- name: Set AppImage Version
|
||||
if: ${{ matrix.type == 'appimage' && ( needs.check_changelog.outputs.next_version_bare != needs.check_changelog.outputs.latest_version ) }}
|
||||
if: ${{ matrix.type == 'appimage' && ( needs.check_changelog.outputs.next_version_bare != needs.check_changelog.outputs.latest_version ) }} # yamllint disable-line rule:line-length
|
||||
run: |
|
||||
version=${{ needs.check_changelog.outputs.next_version_bare }}
|
||||
echo "VERSION=${version}" >> $GITHUB_ENV
|
||||
@ -171,43 +379,44 @@ jobs:
|
||||
run: |
|
||||
# install sunshine to the DESTDIR
|
||||
make install DESTDIR=AppDir
|
||||
|
||||
|
||||
# portable home and config
|
||||
# todo - this is ugly... we should use a custom AppRun script to take care of this
|
||||
mv ./AppDir${{ matrix.CMAKE_INSTALL_PREFIX }}/sunshine.AppImage.* ../artifacts/
|
||||
mkdir -p ../artifacts/${{ matrix.SUNSHINE_CONFIG_DIR }}/.config/sunshine/${{ matrix.SUNSHINE_CONFIG_DIR }}
|
||||
cp ../artifacts/${{ matrix.SUNSHINE_CONFIG_DIR }}/apps.json ../artifacts/${{ matrix.SUNSHINE_CONFIG_DIR }}/.config/sunshine/${{ matrix.SUNSHINE_CONFIG_DIR }}/
|
||||
|
||||
cp ../artifacts/${{ matrix.SUNSHINE_CONFIG_DIR }}/apps.json \
|
||||
../artifacts/${{ matrix.SUNSHINE_CONFIG_DIR }}/.config/sunshine/${{ matrix.SUNSHINE_CONFIG_DIR }}/
|
||||
|
||||
# variables
|
||||
DESKTOP_FILE="${DESKTOP_FILE:-sunshine.desktop}"
|
||||
ICON_FILE="${ICON_FILE:-sunshine.png}"
|
||||
|
||||
|
||||
# AppImage
|
||||
# https://docs.appimage.org/packaging-guide/index.html
|
||||
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
||||
chmod +x linuxdeploy-x86_64.AppImage
|
||||
|
||||
|
||||
# # https://github.com/linuxdeploy/linuxdeploy-plugin-gtk
|
||||
# sudo apt-get install libgtk-3-dev librsvg2-dev -y
|
||||
# wget https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh
|
||||
# chmod +x linuxdeploy-plugin-gtk.sh
|
||||
# export DEPLOY_GTK_VERSION=3
|
||||
|
||||
|
||||
./linuxdeploy-x86_64.AppImage \
|
||||
--appdir ./AppDir \
|
||||
--executable ./sunshine \
|
||||
--icon-file "../$ICON_FILE" \
|
||||
--desktop-file "./$DESKTOP_FILE" \
|
||||
--library /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0 \
|
||||
--library /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 \
|
||||
--library /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 \
|
||||
--output appimage
|
||||
--appdir ./AppDir \
|
||||
--executable ./sunshine \
|
||||
--icon-file "../$ICON_FILE" \
|
||||
--desktop-file "./$DESKTOP_FILE" \
|
||||
--library /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0 \
|
||||
--library /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 \
|
||||
--library /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 \
|
||||
--output appimage
|
||||
# # add this argument back if using gtk plugin
|
||||
# --plugin gtk \
|
||||
|
||||
# move
|
||||
mv Sunshine*.AppImage ../artifacts/sunshine.AppImage
|
||||
|
||||
|
||||
# permissions
|
||||
chmod +x ../artifacts/sunshine.AppImage
|
||||
|
||||
@ -216,9 +425,9 @@ jobs:
|
||||
run: |
|
||||
wget https://github.com/TheAssassin/appimagelint/releases/download/continuous/appimagelint-x86_64.AppImage
|
||||
chmod +x appimagelint-x86_64.AppImage
|
||||
|
||||
|
||||
# rm -rf ~/.cache/appimagelint/
|
||||
|
||||
|
||||
./appimagelint-x86_64.AppImage ./artifacts/sunshine.AppImage
|
||||
|
||||
- name: Archive AppImage
|
||||
@ -226,7 +435,7 @@ jobs:
|
||||
working-directory: artifacts
|
||||
run: |
|
||||
chmod +x ./sunshine.AppImage
|
||||
|
||||
|
||||
zip --recurse-paths --move --test ./sunshine-appimage.zip ./*
|
||||
|
||||
- name: Upload Artifacts
|
||||
@ -237,9 +446,9 @@ jobs:
|
||||
|
||||
- name: Create Release
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
uses: SunshineStream/actions/create_release@master
|
||||
uses: LizardByte/.github/actions/create_release@master
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_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 }}
|
||||
@ -255,13 +464,6 @@ jobs:
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
# this is for the macports job
|
||||
- name: Cache Artifacts
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: artifacts
|
||||
key: ${{ runner.os }}-artifacts
|
||||
|
||||
- name: Setup Dependencies MacOS
|
||||
run: |
|
||||
# install dependencies using homebrew
|
||||
@ -272,50 +474,30 @@ jobs:
|
||||
|
||||
- name: Build MacOS
|
||||
run: |
|
||||
# variables for Portfile
|
||||
owner=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]' )
|
||||
repo=$(echo ${GITHUB_REPOSITORY#*/} | tr '[:upper:]' '[:lower:]' )
|
||||
branch=${GITHUB_HEAD_REF}
|
||||
|
||||
# check the branch variable
|
||||
if [ -z "$branch" ]
|
||||
then
|
||||
echo "This is a PUSH event"
|
||||
branch=${GITHUB_BASE_REF}
|
||||
else
|
||||
echo "This is a PR event"
|
||||
fi
|
||||
echo "Owner: ${owner}"
|
||||
echo "Repo: ${repo}"
|
||||
echo "Branch: ${branch}"
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DSUNSHINE_ASSETS_DIR=/usr/local/sunshine/assets -DSUNSHINE_CONFIG_DIR=/usr/local/sunshine/config -DGITHUB_OWNER=${owner} -DGITHUB_REPO=${repo} -DGITHUB_BRANCH=${branch} ..
|
||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DSUNSHINE_ASSETS_DIR=local/sunshine/assets \
|
||||
-DSUNSHINE_CONFIG_DIR=local/sunshine/config \
|
||||
..
|
||||
make -j ${nproc}
|
||||
|
||||
- name: Package MacOS
|
||||
run: |
|
||||
# remove cached artifacts
|
||||
rm -r -f ./artifacts
|
||||
mkdir artifacts
|
||||
|
||||
mkdir -p artifacts
|
||||
cd build
|
||||
|
||||
# package
|
||||
cpack -G DragNDrop
|
||||
mv ./cpack_artifacts/Sunshine.dmg ../artifacts/sunshine-macos-experimental-dragndrop.dmg
|
||||
|
||||
|
||||
cpack -G Bundle
|
||||
mv ./cpack_artifacts/Sunshine.dmg ../artifacts/sunshine-macos-experimental-bundle.dmg
|
||||
|
||||
|
||||
cpack -G ZIP
|
||||
mv ./cpack_artifacts/Sunshine.zip ../artifacts/sunshine-macos-experimental-archive.zip
|
||||
|
||||
# move
|
||||
mv Portfile ../artifacts/Portfile
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
@ -331,113 +513,225 @@ jobs:
|
||||
rm -f ./sunshine-macos-experimental-bundle.dmg
|
||||
rm -f ./sunshine-macos-experimental-archive.zip
|
||||
|
||||
## no artifacts to release currently
|
||||
# - name: Create Release
|
||||
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
# uses: LizardByte/.github/actions/create_release@master
|
||||
# with:
|
||||
# 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 }}
|
||||
|
||||
build_mac_port:
|
||||
name: Macports
|
||||
needs: check_changelog
|
||||
runs-on: macos-11
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Checkout ports
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: macports/macports-ports
|
||||
fetch-depth: 64
|
||||
path: ports
|
||||
|
||||
- name: Checkout mpbb
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: macports/mpbb
|
||||
path: mpbb
|
||||
|
||||
- name: Setup Dependencies Macports
|
||||
run: |
|
||||
# install dependencies using homebrew
|
||||
brew install cmake
|
||||
|
||||
- name: Configure Portfile
|
||||
run: |
|
||||
# variables for Portfile
|
||||
branch=${GITHUB_HEAD_REF}
|
||||
|
||||
# check the branch variable
|
||||
if [ -z "$branch" ]
|
||||
then
|
||||
echo "This is a PUSH event"
|
||||
commit=${{ github.sha }}
|
||||
clone_url=${{ github.event.repository.clone_url }}
|
||||
else
|
||||
echo "This is a PR event"
|
||||
commit=${{ github.event.pull_request.head.sha }}
|
||||
clone_url=${{ github.event.pull_request.head.repo.clone_url }}
|
||||
fi
|
||||
echo "Commit: ${commit}"
|
||||
echo "Clone URL: ${clone_url}"
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DGITHUB_COMMIT=${commit} \
|
||||
-DGITHUB_CLONE_URL=${clone_url} \
|
||||
-DSUNSHINE_CONFIGURE_PORTFILE=ON \
|
||||
-DSUNSHINE_CONFIGURE_ONLY=ON \
|
||||
..
|
||||
cd ..
|
||||
|
||||
# copy Portfile to artifacts
|
||||
mkdir -p artifacts
|
||||
cp -f ./build/Portfile ./artifacts/
|
||||
|
||||
# copy Portfile to ports
|
||||
mkdir -p ./ports/multimedia/Sunshine
|
||||
cp -f ./build/Portfile ./ports/multimedia/Sunshine/Portfile
|
||||
|
||||
# testing
|
||||
cat ./artifacts/Portfile
|
||||
|
||||
- name: Bootstrap MacPorts
|
||||
run: |
|
||||
. ports/.github/workflows/bootstrap.sh
|
||||
|
||||
# Add getopt, mpbb and the MacPorts paths to $PATH for the subsequent steps.
|
||||
echo "/opt/mports/bin" >> $GITHUB_PATH
|
||||
echo "${PWD}/mpbb" >> $GITHUB_PATH
|
||||
echo "/opt/local/bin" >> $GITHUB_PATH
|
||||
echo "/opt/local/sbin" >> $GITHUB_PATH
|
||||
|
||||
- name: Determine list of subports
|
||||
id: subportlist
|
||||
run: |
|
||||
set -eu
|
||||
port=Sunshine
|
||||
subportlist=""
|
||||
|
||||
echo "Listing subports for Sunshine"
|
||||
new_subports=$(mpbb \
|
||||
--work-dir /tmp/mpbb \
|
||||
list-subports \
|
||||
--archive-site= \
|
||||
--archive-site-private= \
|
||||
--include-deps=no \
|
||||
"$port" \
|
||||
| tr '\n' ' ')
|
||||
for subport in $new_subports; do
|
||||
echo "$subport"
|
||||
subportlist="$subportlist $subport"
|
||||
done
|
||||
echo "::set-output name=subportlist::${subportlist}"
|
||||
|
||||
- name: Run port lint for all subports
|
||||
run: |
|
||||
set -eu
|
||||
fail=0
|
||||
for subport in $subportlist; do
|
||||
echo "::group::${subport}"
|
||||
path=$(port file "$subport")
|
||||
messagetype="warning"
|
||||
if ! messages=$(port -q lint "$subport" 2>&1); then
|
||||
messagetype="error"
|
||||
fail=1
|
||||
fi
|
||||
if [ -n "$messages" ]; then
|
||||
echo "$messages"
|
||||
# See https://github.com/actions/toolkit/issues/193#issuecomment-605394935
|
||||
encoded_messages="port lint ${subport}:%0A"
|
||||
encoded_messages+="$(echo "${messages}" | sed -E 's/$/%0A/g' | tr -d '\n')"
|
||||
echo "::${messagetype} file=${path#${PWD}/ports/},line=1,col=1::${encoded_messages}"
|
||||
fi
|
||||
echo "::endgroup::"
|
||||
done
|
||||
exit "$fail"
|
||||
env:
|
||||
subportlist: ${{ steps.subportlist.outputs.subportlist }}
|
||||
|
||||
- name: Build subports
|
||||
run: |
|
||||
set -eu
|
||||
fail=0
|
||||
for subport in $subportlist; do
|
||||
workdir="/tmp/mpbb/$subport"
|
||||
mkdir -p "$workdir/logs"
|
||||
touch "$workdir/logs/dependencies-progress.txt"
|
||||
echo "::group::Cleaning up between ports"
|
||||
sudo mpbb --work-dir "$workdir" cleanup
|
||||
echo "::endgroup::"
|
||||
echo "::group::Installing dependencies for ${subport}"
|
||||
sudo mpbb \
|
||||
--work-dir "$workdir" \
|
||||
install-dependencies \
|
||||
"$subport" >"$workdir/logs/install-dependencies.log" 2>&1 &
|
||||
deps_pid=$!
|
||||
tail -f "$workdir/logs/dependencies-progress.txt" 2>/dev/null &
|
||||
tail_pid=$!
|
||||
set +e
|
||||
wait "$deps_pid"
|
||||
deps_exit=$?
|
||||
set -e
|
||||
kill "$tail_pid" || true
|
||||
if [ "$deps_exit" -ne 0 ]; then
|
||||
echo "::endgroup::"
|
||||
echo "::error::Failed to install dependencies for ${subport}"
|
||||
fail=1
|
||||
continue
|
||||
fi
|
||||
echo "::endgroup::"
|
||||
echo "::group::Installing ${subport}"
|
||||
set +e
|
||||
sudo mpbb \
|
||||
--work-dir "$workdir" \
|
||||
install-port \
|
||||
--source \
|
||||
"$subport"
|
||||
install_exit=$?
|
||||
set -e
|
||||
if [ "$install_exit" -ne 0 ]; then
|
||||
echo "::endgroup::"
|
||||
echo "::error::Failed to install ${subport}"
|
||||
fail=1
|
||||
continue
|
||||
fi
|
||||
echo "::endgroup::"
|
||||
done
|
||||
exit "$fail"
|
||||
env:
|
||||
subportlist: ${{ steps.subportlist.outputs.subportlist }}
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
# create packages
|
||||
sudo port pkg sunshine
|
||||
sudo port dmg sunshine
|
||||
|
||||
work=$(port work sunshine)
|
||||
echo "Sunshine port work directory: ${work}"
|
||||
|
||||
# move components out of port work directory
|
||||
sudo mv ${work}/Sunshine*component.pkg /tmp/
|
||||
|
||||
# copy artifacts
|
||||
sudo mv ${work}/Sunshine*.pkg ./artifacts/sunshine.pkg
|
||||
sudo mv ${work}/Sunshine*.dmg ./artifacts/sunshine.dmg
|
||||
|
||||
# move components back
|
||||
# sudo mv /tmp/Sunshine*component.pkg ${work}/
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: sunshine-macports
|
||||
path: artifacts/
|
||||
|
||||
- name: Create Release
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
uses: SunshineStream/actions/create_release@master
|
||||
uses: LizardByte/.github/actions/create_release@master
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_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 }}
|
||||
|
||||
# build_mac_port:
|
||||
# name: Macports
|
||||
# runs-on: macos-11
|
||||
# needs: [check_changelog, build_mac]
|
||||
#
|
||||
# steps:
|
||||
# - name: Cache Artifacts
|
||||
# uses: actions/cache@v3
|
||||
# with:
|
||||
# path: artifacts
|
||||
# key: ${{ runner.os }}-artifacts
|
||||
#
|
||||
# - name: Setup Macports
|
||||
# run : |
|
||||
# # update paths for macports
|
||||
# echo "/opt/local/sbin" >> $GITHUB_PATH
|
||||
# echo "/opt/local/bin" >> $GITHUB_PATH
|
||||
#
|
||||
# # Set OpenSSL 1.1 as default
|
||||
# # rm -rf /usr/local/opt/openssl
|
||||
# # rm -rf /usr/local/bin/openssl
|
||||
# # ln -sf /usr/local/Cellar/openssl@1.1/1.1.1o/bin/openssl /usr/local/bin/openssl
|
||||
# # ln -sf /usr/local/Cellar/openssl@1.1/1.1.1o /usr/local/opt/openssl
|
||||
#
|
||||
# # download and extract macports
|
||||
# curl -O https://distfiles.macports.org/MacPorts/MacPorts-2.7.2.tar.bz2
|
||||
# tar xf MacPorts-2.7.2.tar.bz2
|
||||
#
|
||||
# # build macports
|
||||
# cd MacPorts-2.7.2
|
||||
# ./configure
|
||||
# make
|
||||
# sudo make install
|
||||
# cd ../
|
||||
# rm -rf MacPorts-2.7.2*
|
||||
#
|
||||
# - name: Configure Macports
|
||||
# run: |
|
||||
# # update sources
|
||||
# sudo port -v selfupdate
|
||||
#
|
||||
# # use custom sources
|
||||
# sudo chmod 777 /opt/local/etc/macports/sources.conf
|
||||
# echo file://$(echo ~)/ports > /opt/local/etc/macports/sources.conf
|
||||
# echo rsync://rsync.macports.org/macports/release/tarballs/ports.tar [default] >> /opt/local/etc/macports/sources.conf
|
||||
# sudo chmod 644 /opt/local/etc/macports/sources.conf
|
||||
#
|
||||
# # setup custom port
|
||||
# mkdir -p ~/ports/multimedia/sunshine
|
||||
#
|
||||
# # copy configured Portfile
|
||||
# mv ./artifacts/Portfile ~/ports/multimedia/sunshine/
|
||||
#
|
||||
# # remove remaining cached artifacts
|
||||
# rm -r -f ./artifacts
|
||||
# mkdir artifacts
|
||||
#
|
||||
# # index the ports
|
||||
# cd ~/ports
|
||||
# portindex
|
||||
#
|
||||
# - name: Build
|
||||
# run: |
|
||||
# # build port
|
||||
# sudo port install sunshine \
|
||||
# || cat /opt/local/var/macports/logs/_Users_runner_ports_multimedia_sunshine/Sunshine/main.log \
|
||||
# && exit 1
|
||||
#
|
||||
# # create packages
|
||||
# sudo port dmg sunshine
|
||||
# sudo port pkg sunshine
|
||||
#
|
||||
# # move
|
||||
# mv $(port work sunshine)/Sunshine*.dmg ./artifacts/sunshine.dmg
|
||||
# mv $(port work sunshine)/Sunshine*.ppkg ./artifacts/sunshine.pkg
|
||||
#
|
||||
# # testing only
|
||||
# # ls ~/ports/multimedia/sunshine
|
||||
# # cat ~/ports/multimedia/sunshine/Portfile
|
||||
# # cat /opt/local/etc/macports/sources.conf
|
||||
# # cat ~/ports/Portindex
|
||||
# # port search sunshine
|
||||
#
|
||||
# - name: Upload Artifacts
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: sunshine-macports
|
||||
# path: artifacts/
|
||||
#
|
||||
# - name: Create Release
|
||||
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
# uses: SunshineStream/actions/create_release@master
|
||||
# with:
|
||||
# token: ${{ secrets.GITHUB_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 }}
|
||||
|
||||
build_win:
|
||||
name: Windows
|
||||
runs-on: windows-2019
|
||||
@ -474,7 +768,11 @@ jobs:
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DSUNSHINE_ASSETS_DIR=assets -DSUNSHINE_CONFIG_DIR=config -G "MinGW Makefiles" ..
|
||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DSUNSHINE_ASSETS_DIR=assets \
|
||||
-DSUNSHINE_CONFIG_DIR=config \
|
||||
-G "MinGW Makefiles" \
|
||||
..
|
||||
mingw32-make -j2
|
||||
|
||||
- name: Package Windows
|
||||
@ -499,9 +797,9 @@ jobs:
|
||||
|
||||
- name: Create Release
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
uses: SunshineStream/actions/create_release@master
|
||||
uses: LizardByte/.github/actions/create_release@master
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_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 }}
|
||||
|
||||
31
.github/workflows/auto-create-pr.yml
vendored
Normal file
31
.github/workflows/auto-create-pr.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
---
|
||||
# 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: Auto create PR
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'nightly'
|
||||
|
||||
jobs:
|
||||
create_pr:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: repo-sync/pull-request@v2
|
||||
with:
|
||||
source_branch: "" # should be "nightly" as it's the triggering branch
|
||||
destination_branch: "master"
|
||||
pr_title: "Pulling ${{ github.ref_name }} into master"
|
||||
pr_template: ".github/pr_release_template.md"
|
||||
pr_assignee: "${{ secrets.GH_BOT_NAME }}"
|
||||
pr_draft: true
|
||||
pr_allow_empty: false
|
||||
github_token: ${{ secrets.GH_BOT_TOKEN }}
|
||||
59
.github/workflows/automerge.yml
vendored
Normal file
59
.github/workflows/automerge.yml
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
---
|
||||
# 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: Automerge PR
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
|
||||
jobs:
|
||||
autoapprove:
|
||||
if: >
|
||||
contains(fromJson('["LizardByte-bot"]'), github.event.pull_request.user.login) &&
|
||||
contains(fromJson('["LizardByte-bot"]'), github.actor)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Autoapproving
|
||||
uses: hmarr/auto-approve-action@v2
|
||||
with:
|
||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
- name: Label autoapproved
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{ secrets.GH_BOT_TOKEN }}
|
||||
script: |
|
||||
github.rest.issues.addLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels: ['autoapproved', 'autoupdate']
|
||||
})
|
||||
|
||||
automerge:
|
||||
needs: [autoapprove]
|
||||
runs-on: ubuntu-latest
|
||||
concurrency:
|
||||
group: automerge-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
steps:
|
||||
- name: Automerging
|
||||
uses: pascalgn/automerge-action@v0.15.3
|
||||
env:
|
||||
BASE_BRANCHES: nightly
|
||||
GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
|
||||
GITHUB_LOGIN: ${{ secrets.GH_BOT_NAME }}
|
||||
MERGE_LABELS: ""
|
||||
MERGE_METHOD: "squash"
|
||||
MERGE_COMMIT_MESSAGE: "{pullRequest.title} (#{pullRequest.number})"
|
||||
MERGE_DELETE_BRANCH: true
|
||||
MERGE_ERROR_FAIL: true
|
||||
MERGE_FILTER_AUTHOR: ${{ secrets.GH_BOT_NAME }}
|
||||
MERGE_RETRIES: "240" # 1 hour
|
||||
MERGE_RETRY_SLEEP: "15000" # 15 seconds
|
||||
32
.github/workflows/autoupdate.yml
vendored
Normal file
32
.github/workflows/autoupdate.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
---
|
||||
# This action is centrally managed in https://github.com/<organization>/.github/
|
||||
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
|
||||
# the above-mentioned repo.
|
||||
|
||||
# This workflow is designed to work with:
|
||||
# - automerge workflows
|
||||
|
||||
# It uses GitHub Action that auto-updates pull requests branches, when changes are pushed to their destination branch.
|
||||
# Auto-updating to the latest destination branch works only in the context of upstream repo and not forks.
|
||||
|
||||
name: autoupdate
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'nightly'
|
||||
|
||||
jobs:
|
||||
autoupdate-for-bot:
|
||||
name: Autoupdate autoapproved PR created in the upstream
|
||||
if: startsWith(github.repository, 'LizardByte/')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Update
|
||||
uses: docker://chinthakagodawita/autoupdate-action:v1
|
||||
env:
|
||||
GITHUB_TOKEN: '${{ secrets.GH_BOT_TOKEN }}'
|
||||
PR_FILTER: "labelled"
|
||||
PR_LABELS: "autoupdate"
|
||||
PR_READY_STATE: "ready_for_review"
|
||||
MERGE_CONFLICT_ACTION: "ignore"
|
||||
31
.github/workflows/clang.yml
vendored
31
.github/workflows/clang.yml
vendored
@ -1,31 +0,0 @@
|
||||
name: clang-format-lint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master, nightly]
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Clang Format Lint
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Clang format lint
|
||||
uses: DoozyX/clang-format-lint-action@v0.14
|
||||
with:
|
||||
source: './sunshine'
|
||||
extensions: 'cpp,h,m,mm'
|
||||
clangFormatVersion: 13
|
||||
style: file
|
||||
inplace: false
|
||||
|
||||
- name: Upload Artifacts
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: sunshine
|
||||
path: sunshine/
|
||||
60
.github/workflows/cpp-clang-format-lint.yml
vendored
Normal file
60
.github/workflows/cpp-clang-format-lint.yml
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
---
|
||||
# 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: Clang Format Lint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master, nightly]
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
jobs:
|
||||
check_src:
|
||||
name: Check src
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Check
|
||||
id: check
|
||||
run: |
|
||||
if [ -d "./src" ]
|
||||
then
|
||||
FOUND=true
|
||||
else
|
||||
FOUND=false
|
||||
fi
|
||||
|
||||
echo "::set-output name=src::${FOUND}"
|
||||
|
||||
outputs:
|
||||
src: ${{ steps.check.outputs.src }}
|
||||
|
||||
lint:
|
||||
name: Clang Format Lint
|
||||
needs: [check_src]
|
||||
if: ${{ needs.check_src.outputs.src == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Clang format lint
|
||||
uses: DoozyX/clang-format-lint-action@v0.14
|
||||
with:
|
||||
source: './src'
|
||||
extensions: 'cpp,h,m,mm'
|
||||
clangFormatVersion: 13
|
||||
style: file
|
||||
inplace: false
|
||||
|
||||
- name: Upload Artifacts
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: clang-format-fixes
|
||||
path: src/
|
||||
48
.github/workflows/issues-stale.yml
vendored
48
.github/workflows/issues-stale.yml
vendored
@ -1,3 +1,8 @@
|
||||
---
|
||||
# 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: Stale Issues / PRs
|
||||
|
||||
on:
|
||||
@ -6,43 +11,44 @@ on:
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
name: Check Issues / PRs
|
||||
name: Check Stale Issues / PRs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Stale
|
||||
uses: actions/stale@v5
|
||||
with:
|
||||
stale-issue-message: >
|
||||
This issue is stale because it has been open for 30 days with no activity.
|
||||
Remove the stale label or comment, otherwise this will be closed in 5 days.
|
||||
close-issue-message: >
|
||||
This issue was closed because it has been stalled for 5 days with no activity.
|
||||
stale-issue-label: 'stale'
|
||||
exempt-issue-labels: 'added,fixed,type:enhancement,status:awaiting-triage,status:in-progress'
|
||||
stale-pr-message: >
|
||||
This PR is stale because it has been open for 30 days with no activity.
|
||||
Remove the stale label or comment, otherwise this will be closed in 5 days.
|
||||
close-pr-message: >
|
||||
This PR was closed because it has been stalled for 5 days with no activity.
|
||||
stale-pr-label: 'stale'
|
||||
exempt-pr-labels: 'status:in-progress'
|
||||
days-before-stale: 60
|
||||
This PR was closed because it has been stalled for 10 days with no activity.
|
||||
days-before-stale: 90
|
||||
days-before-close: 10
|
||||
exempt-all-assignees: true
|
||||
exempt-issue-labels: 'added,fixed'
|
||||
exempt-pr-labels: 'dependencies,l10n'
|
||||
stale-issue-label: 'stale'
|
||||
stale-issue-message: >
|
||||
This issue is stale because it has been open for 30 days with no activity.
|
||||
Comment or remove the stale label, otherwise this will be closed in 5 days.
|
||||
stale-pr-label: 'stale'
|
||||
stale-pr-message: >
|
||||
This PR is stale because it has been open for 90 days with no activity.
|
||||
Comment or remove the stale label, otherwise this will be closed in 10 days.
|
||||
|
||||
- name: Invalid Template
|
||||
uses: actions/stale@v5
|
||||
with:
|
||||
stale-issue-message: >
|
||||
Invalid issues template.
|
||||
close-issue-message: >
|
||||
This issue was closed because the the template was not completed after 5 days.
|
||||
stale-issue-label: 'invalid:template-incomplete'
|
||||
stale-pr-message: >
|
||||
Invalid PR template.
|
||||
close-pr-message: >
|
||||
This PR was closed because the the template was not completed after 5 days.
|
||||
stale-pr-label: 'invalid:template-incomplete'
|
||||
exempt-pr-labels: 'status:in-progress'
|
||||
only-labels: 'invalid:template-incomplete'
|
||||
days-before-stale: 0
|
||||
days-before-close: 5
|
||||
exempt-pr-labels: 'dependencies,l10n'
|
||||
only-labels: 'invalid:template-incomplete'
|
||||
stale-issue-label: 'invalid:template-incomplete'
|
||||
stale-issue-message: >
|
||||
Invalid issues template.
|
||||
stale-pr-label: 'invalid:template-incomplete'
|
||||
stale-pr-message: >
|
||||
Invalid PR template.
|
||||
|
||||
9
.github/workflows/issues.yml
vendored
9
.github/workflows/issues.yml
vendored
@ -1,10 +1,15 @@
|
||||
name: Label Actions
|
||||
---
|
||||
# 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: Issues
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [labeled, unlabeled]
|
||||
discussion:
|
||||
types: [ labeled, unlabeled ]
|
||||
types: [labeled, unlabeled]
|
||||
|
||||
jobs:
|
||||
label:
|
||||
|
||||
128
.github/workflows/localize.yml
vendored
128
.github/workflows/localize.yml
vendored
@ -1,3 +1,4 @@
|
||||
---
|
||||
name: localize
|
||||
|
||||
on:
|
||||
@ -5,7 +6,7 @@ on:
|
||||
branches: [nightly]
|
||||
paths: # prevents workflow from running unless these files change
|
||||
- '.github/workflows/localize.yml'
|
||||
- 'sunshine/**'
|
||||
- 'src/**'
|
||||
- 'locale/sunshine.po'
|
||||
workflow_dispatch:
|
||||
|
||||
@ -18,76 +19,77 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Python 3.9
|
||||
uses: actions/setup-python@v4 # https://github.com/actions/setup-python
|
||||
with:
|
||||
python-version: '3.9'
|
||||
- name: Install Python 3.9
|
||||
uses: actions/setup-python@v4 # https://github.com/actions/setup-python
|
||||
with:
|
||||
python-version: '3.9'
|
||||
|
||||
- name: Set up Python 3.9 Dependencies
|
||||
run: |
|
||||
cd ./scripts
|
||||
python -m pip install --upgrade pip setuptools
|
||||
python -m pip install -r requirements.txt
|
||||
- name: Set up Python 3.9 Dependencies
|
||||
run: |
|
||||
cd ./scripts
|
||||
python -m pip install --upgrade pip setuptools
|
||||
python -m pip install -r requirements.txt
|
||||
|
||||
- name: Set up xgettext
|
||||
run: |
|
||||
sudo apt-get update -y && \
|
||||
sudo apt-get --reinstall install -y \
|
||||
gettext
|
||||
- name: Set up xgettext
|
||||
run: |
|
||||
sudo apt-get update -y && \
|
||||
sudo apt-get --reinstall install -y \
|
||||
gettext
|
||||
|
||||
- name: Update Strings
|
||||
run: |
|
||||
# first, try to remove existing file as xgettext does not remove unused translations
|
||||
if [ -f "${{ env.file }}" ];
|
||||
then
|
||||
rm ${{ env.file }}
|
||||
echo "new_file=false" >> $GITHUB_ENV
|
||||
else
|
||||
echo "new_file=true" >> $GITHUB_ENV
|
||||
fi
|
||||
- name: Update Strings
|
||||
run: |
|
||||
# first, try to remove existing file as xgettext does not remove unused translations
|
||||
if [ -f "${{ env.file }}" ];
|
||||
then
|
||||
rm ${{ env.file }}
|
||||
echo "new_file=false" >> $GITHUB_ENV
|
||||
else
|
||||
echo "new_file=true" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
# extract the new strings
|
||||
python ./scripts/_locale.py --extract
|
||||
# extract the new strings
|
||||
python ./scripts/_locale.py --extract
|
||||
|
||||
- name: git diff
|
||||
if: ${{ env.new_file == 'false' }}
|
||||
run: |
|
||||
# disable the pager
|
||||
git config --global pager.diff false
|
||||
- name: git diff
|
||||
if: ${{ env.new_file == 'false' }}
|
||||
run: |
|
||||
# disable the pager
|
||||
git config --global pager.diff false
|
||||
|
||||
# print the git diff
|
||||
git diff locale/sunshine.po
|
||||
# print the git diff
|
||||
git diff locale/sunshine.po
|
||||
|
||||
# set the variable with minimal output
|
||||
OUTPUT=$(git diff --numstat locale/sunshine.po)
|
||||
echo "git_diff=${OUTPUT}" >> $GITHUB_ENV
|
||||
# set the variable with minimal output
|
||||
OUTPUT=$(git diff --numstat locale/sunshine.po)
|
||||
echo "git_diff=${OUTPUT}" >> $GITHUB_ENV
|
||||
|
||||
- name: git reset
|
||||
# only run if a single line changed (date/time) and file already existed
|
||||
if: ${{ env.git_diff == '1 1 locale/sunshine.po' && env.new_file == 'false' }}
|
||||
run: |
|
||||
git reset --hard
|
||||
- name: git reset
|
||||
# only run if a single line changed (date/time) and file already existed
|
||||
# \t in next line is a tab character
|
||||
if: ${{ env.git_diff == '1\t1\tlocale/sunshine.po' && env.new_file == 'false' }}
|
||||
run: |
|
||||
git reset --hard
|
||||
|
||||
- name: Create/Update Pull Request
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
with:
|
||||
add-paths: |
|
||||
locale/*.po
|
||||
token: ${{ secrets.GH_PAT }} # must trigger PR tests
|
||||
commit-message: New localization template
|
||||
branch: localize/update
|
||||
delete-branch: true
|
||||
base: nightly
|
||||
title: New Babel Updates
|
||||
body: |
|
||||
Update report
|
||||
- Updated with *today's* date
|
||||
- Auto-generated by [create-pull-request][1]
|
||||
- name: Create/Update Pull Request
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
with:
|
||||
add-paths: |
|
||||
locale/*.po
|
||||
token: ${{ secrets.GH_BOT_TOKEN }} # must trigger PR tests
|
||||
commit-message: New localization template
|
||||
branch: localize/update
|
||||
delete-branch: true
|
||||
base: nightly
|
||||
title: New Babel Updates
|
||||
body: |
|
||||
Update report
|
||||
- Updated with *today's* date
|
||||
- Auto-generated by [create-pull-request][1]
|
||||
|
||||
[1]: https://github.com/peter-evans/create-pull-request
|
||||
labels: |
|
||||
babel
|
||||
l10n
|
||||
[1]: https://github.com/peter-evans/create-pull-request
|
||||
labels: |
|
||||
babel
|
||||
l10n
|
||||
|
||||
12
.github/workflows/pull-requests.yml
vendored
12
.github/workflows/pull-requests.yml
vendored
@ -1,3 +1,8 @@
|
||||
---
|
||||
# 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: Pull Requests
|
||||
|
||||
on:
|
||||
@ -14,8 +19,9 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
target: master
|
||||
exclude: nightly # Don't prevent going from nightly -> master
|
||||
exclude: nightly # Don't prevent going from nightly -> master
|
||||
change-to: nightly
|
||||
comment: |
|
||||
Your PR was set to `master`, PRs should be sent to `nightly`
|
||||
The base branch of this PR has been automatically changed to `nightly`, please check that there are no merge conflicts
|
||||
Your PR was set to `master`, PRs should be sent to `nightly`.
|
||||
The base branch of this PR has been automatically changed to `nightly`.
|
||||
Please check that there are no merge conflicts
|
||||
|
||||
31
.github/workflows/python-flake8.yml
vendored
Normal file
31
.github/workflows/python-flake8.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
---
|
||||
# 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: flake8
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master, nightly]
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
jobs:
|
||||
flake8:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4 # https://github.com/actions/setup-python
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip setuptools flake8
|
||||
|
||||
- name: Test with flake8
|
||||
run: |
|
||||
python -m flake8 --verbose
|
||||
81
.github/workflows/release-notifier.yml
vendored
Normal file
81
.github/workflows/release-notifier.yml
vendored
Normal file
@ -0,0 +1,81 @@
|
||||
---
|
||||
# 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: Release Notifications
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#onevent_nametypes
|
||||
|
||||
jobs:
|
||||
discord:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: discord
|
||||
uses: sarisia/actions-status-discord@v1 # https://github.com/sarisia/actions-status-discord
|
||||
with:
|
||||
webhook: ${{ secrets.DISCORD_RELEASE_WEBHOOK }}
|
||||
nodetail: true
|
||||
nofail: false
|
||||
username: ${{ secrets.DISCORD_USERNAME }}
|
||||
avatar_url: ${{ secrets.ORG_LOGO_URL }}
|
||||
title: ${{ github.event.repository.name }} ${{ github.ref_name }} Released
|
||||
description: ${{ github.event.release.body }}
|
||||
color: 0xFF4500
|
||||
|
||||
facebook_group:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: facebook-post-action
|
||||
uses: ReenigneArcher/facebook-post-action@v1 # https://github.com/ReenigneArcher/facebook-post-action
|
||||
with:
|
||||
page_id: ${{ secrets.FACEBOOK_GROUP_ID }}
|
||||
access_token: ${{ secrets.FACEBOOK_ACCESS_TOKEN }}
|
||||
message: |
|
||||
${{ github.event.repository.name }} ${{ github.ref_name }} Released
|
||||
${{ github.event.release.body }}
|
||||
url: ${{ github.event.release.html_url }}
|
||||
|
||||
facebook_page:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: facebook-post-action
|
||||
uses: ReenigneArcher/facebook-post-action@v1 # https://github.com/ReenigneArcher/facebook-post-action
|
||||
with:
|
||||
page_id: ${{ secrets.FACEBOOK_PAGE_ID }}
|
||||
access_token: ${{ secrets.FACEBOOK_ACCESS_TOKEN }}
|
||||
message: |
|
||||
${{ github.event.repository.name }} ${{ github.ref_name }} Released
|
||||
${{ github.event.release.body }}
|
||||
url: ${{ github.event.release.html_url }}
|
||||
|
||||
reddit:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: reddit
|
||||
uses: bluwy/release-for-reddit-action@v1 # https://github.com/bluwy/release-for-reddit-action
|
||||
with:
|
||||
username: ${{ secrets.REDDIT_USERNAME }}
|
||||
password: ${{ secrets.REDDIT_PASSWORD }}
|
||||
app-id: ${{ secrets.REDDIT_CLIENT_ID }}
|
||||
app-secret: ${{ secrets.REDDIT_CLIENT_SECRET }}
|
||||
subreddit: ${{ secrets.REDDIT_SUBREDDIT }}
|
||||
title: ${{ github.event.repository.name }} ${{ github.ref_name }} Released
|
||||
url: ${{ github.event.release.html_url }}
|
||||
flair-id: ${{ secrets.REDDIT_FLAIR_ID }} # https://www.reddit.com/r/<subreddit>>/api/link_flair.json
|
||||
comment: ${{ github.event.release.body }}
|
||||
|
||||
twitter:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: twitter
|
||||
uses: ethomson/send-tweet-action@v1 # https://github.com/ethomson/send-tweet-action
|
||||
with:
|
||||
consumer-key: ${{ secrets.TWITTER_API_KEY }}
|
||||
consumer-secret: ${{ secrets.TWITTER_API_SECRET }}
|
||||
access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
|
||||
access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
|
||||
status: ${{ github.event.release.html_url }}
|
||||
17
.github/workflows/winget.yml
vendored
Normal file
17
.github/workflows/winget.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
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 }}
|
||||
46
.github/workflows/yaml-lint.yml
vendored
Normal file
46
.github/workflows/yaml-lint.yml
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
---
|
||||
# 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: yaml lint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master, nightly]
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
jobs:
|
||||
yaml-lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: yaml lint
|
||||
id: yaml-lint
|
||||
uses: ibiqlik/action-yamllint@v3
|
||||
with:
|
||||
# https://yamllint.readthedocs.io/en/stable/configuration.html#default-configuration
|
||||
config_data: |
|
||||
extends: default
|
||||
rules:
|
||||
comments:
|
||||
level: error
|
||||
line-length:
|
||||
max: 120
|
||||
truthy:
|
||||
allowed-values: ['true', 'false', 'on'] # GitHub uses "on" for workflow event triggers
|
||||
check-keys: true
|
||||
level: error
|
||||
|
||||
- name: Log
|
||||
run: |
|
||||
echo ${{ steps.yaml-lint.outputs.logfile }}
|
||||
|
||||
- name: Upload logs
|
||||
uses: actions/upload-artifact@v2
|
||||
if: failure()
|
||||
with:
|
||||
name: yamllint-logfile
|
||||
path: ${{ steps.yaml-lint.outputs.logfile }}
|
||||
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -13,6 +13,6 @@
|
||||
[submodule "third-party/nv-codec-headers"]
|
||||
path = third-party/nv-codec-headers
|
||||
url = https://github.com/FFmpeg/nv-codec-headers
|
||||
[submodule "sunshine/platform/macos/TPCircularBuffer"]
|
||||
path = sunshine/platform/macos/TPCircularBuffer
|
||||
[submodule "third-party/TPCircularBuffer"]
|
||||
path = third-party/TPCircularBuffer
|
||||
url = https://github.com/michaeltyson/TPCircularBuffer
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
---
|
||||
# .readthedocs.yaml
|
||||
# Read the Docs configuration file
|
||||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
||||
@ -25,9 +26,9 @@ build:
|
||||
# - cmake .
|
||||
|
||||
## Include the submodules, required for cmake
|
||||
#submodules:
|
||||
# include: all
|
||||
# recursive: true
|
||||
# submodules:
|
||||
# include: all
|
||||
# recursive: true
|
||||
|
||||
# Build documentation in the docs/ directory with Sphinx
|
||||
sphinx:
|
||||
|
||||
13
CHANGELOG.md
13
CHANGELOG.md
@ -1,5 +1,18 @@
|
||||
# Changelog
|
||||
|
||||
## [0.14.1] - 2022-08-09
|
||||
### Added
|
||||
- (Linux) Flatpak package added
|
||||
- (Linux) AUR package automated updates
|
||||
- (Windows) Winget package automated updates
|
||||
### Changed
|
||||
- (General) Moved repo to @LizardByte GitHub org
|
||||
- (WebUI) Fixed button spacing on home page
|
||||
- (WebUI) Added Discord WidgetBot Crate
|
||||
### Fixed
|
||||
- (Linux/Mac) Default config and app files now copied to user home directory
|
||||
- (Windows) Default config and app files now copied to working directory
|
||||
|
||||
## [0.14.0] - 2022-06-15
|
||||
### Added
|
||||
- (Documentation) Added Sphinx documentation available at https://sunshinestream.readthedocs.io/en/latest/
|
||||
|
||||
302
CMakeLists.txt
302
CMakeLists.txt
@ -1,10 +1,35 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
project(Sunshine VERSION 0.14.0
|
||||
project(Sunshine VERSION 0.14.1
|
||||
DESCRIPTION "Sunshine is a Gamestream host for Moonlight."
|
||||
HOMEPAGE_URL "https://sunshinestream.github.io"
|
||||
HOMEPAGE_URL "https://app.lizardbyte.dev"
|
||||
)
|
||||
|
||||
set(PROJECT_LONG_DESCRIPTION "Sunshine is a self hosted, low latency, cloud gaming solution with support for AMD, \
|
||||
Intel, and Nvidia GPUs. It is an open source implementation of NVIDIA's GameStream, as used by the NVIDIA Shield. \
|
||||
Connect to Sunshine from any Moonlight client, available for nearly any device imaginable.")
|
||||
|
||||
option(SUNSHINE_CONFIGURE_APPIMAGE "Configure files required for AppImage." OFF)
|
||||
option(SUNSHINE_CONFIGURE_AUR "Configure files required for AUR." OFF)
|
||||
option(SUNSHINE_CONFIGURE_FLATPAK "Configure files required for Flatpak." OFF)
|
||||
option(SUNSHINE_CONFIGURE_PORTFILE "Configure macOS Portfile." OFF)
|
||||
option(SUNSHINE_CONFIGURE_ONLY "Configure special files only, then exit." OFF)
|
||||
|
||||
if(${SUNSHINE_CONFIGURE_APPIMAGE})
|
||||
configure_file(packaging/linux/sunshine.desktop sunshine.desktop @ONLY)
|
||||
elseif(${SUNSHINE_CONFIGURE_AUR})
|
||||
configure_file(packaging/linux/aur/PKGBUILD PKGBUILD @ONLY)
|
||||
elseif(${SUNSHINE_CONFIGURE_FLATPAK})
|
||||
configure_file(packaging/linux/flatpak/dev.lizardbyte.sunshine.yml dev.lizardbyte.sunshine.yml @ONLY)
|
||||
elseif(${SUNSHINE_CONFIGURE_PORTFILE})
|
||||
configure_file(packaging/macos/Portfile Portfile @ONLY)
|
||||
endif()
|
||||
|
||||
# return if configure only is set
|
||||
if(${SUNSHINE_CONFIGURE_ONLY})
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
set(SUNSHINE_SOURCE_ASSETS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src_assets")
|
||||
|
||||
@ -75,18 +100,18 @@ if(WIN32)
|
||||
if(NOT DEFINED SUNSHINE_ICON_PATH)
|
||||
set(SUNSHINE_ICON_PATH "${CMAKE_CURRENT_SOURCE_DIR}/sunshine.ico")
|
||||
endif()
|
||||
configure_file(sunshine/platform/windows/windows.rs.in windows.rc @ONLY)
|
||||
configure_file(src/platform/windows/windows.rs.in windows.rc @ONLY)
|
||||
set(PLATFORM_TARGET_FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/windows.rc"
|
||||
sunshine/platform/windows/publish.cpp
|
||||
sunshine/platform/windows/misc.h
|
||||
sunshine/platform/windows/misc.cpp
|
||||
sunshine/platform/windows/input.cpp
|
||||
sunshine/platform/windows/display.h
|
||||
sunshine/platform/windows/display_base.cpp
|
||||
sunshine/platform/windows/display_vram.cpp
|
||||
sunshine/platform/windows/display_ram.cpp
|
||||
sunshine/platform/windows/audio.cpp
|
||||
src/platform/windows/publish.cpp
|
||||
src/platform/windows/misc.h
|
||||
src/platform/windows/misc.cpp
|
||||
src/platform/windows/input.cpp
|
||||
src/platform/windows/display.h
|
||||
src/platform/windows/display_base.cpp
|
||||
src/platform/windows/display_vram.cpp
|
||||
src/platform/windows/display_ram.cpp
|
||||
src/platform/windows/audio.cpp
|
||||
third-party/ViGEmClient/src/ViGEmClient.cpp
|
||||
third-party/ViGEmClient/include/ViGEm/Client.h
|
||||
third-party/ViGEmClient/include/ViGEm/Common.h
|
||||
@ -129,6 +154,9 @@ if(WIN32)
|
||||
set_source_files_properties(third-party/ViGEmClient/src/ViGEmClient.cpp PROPERTIES COMPILE_FLAGS "-Wno-unknown-pragmas -Wno-misleading-indentation -Wno-class-memaccess")
|
||||
elseif(APPLE)
|
||||
add_compile_definitions(SUNSHINE_PLATFORM="macos")
|
||||
|
||||
option(SUNSHINE_MACOS_PACKAGE "Should only be used when creating a MACOS package/dmg." OFF)
|
||||
|
||||
link_directories(/opt/local/lib)
|
||||
link_directories(/usr/local/lib)
|
||||
ADD_DEFINITIONS(-DBOOST_LOG_DYN_LINK)
|
||||
@ -152,21 +180,21 @@ elseif(APPLE)
|
||||
set(APPLE_PLIST_FILE ${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/Info.plist)
|
||||
|
||||
set(PLATFORM_TARGET_FILES
|
||||
sunshine/platform/macos/av_audio.h
|
||||
sunshine/platform/macos/av_audio.m
|
||||
sunshine/platform/macos/av_img_t.h
|
||||
sunshine/platform/macos/av_video.h
|
||||
sunshine/platform/macos/av_video.m
|
||||
sunshine/platform/macos/display.mm
|
||||
sunshine/platform/macos/input.cpp
|
||||
sunshine/platform/macos/microphone.mm
|
||||
sunshine/platform/macos/misc.cpp
|
||||
sunshine/platform/macos/misc.h
|
||||
sunshine/platform/macos/nv12_zero_device.cpp
|
||||
sunshine/platform/macos/nv12_zero_device.h
|
||||
sunshine/platform/macos/publish.cpp
|
||||
sunshine/platform/macos/TPCircularBuffer/TPCircularBuffer.c
|
||||
sunshine/platform/macos/TPCircularBuffer/TPCircularBuffer.h
|
||||
src/platform/macos/av_audio.h
|
||||
src/platform/macos/av_audio.m
|
||||
src/platform/macos/av_img_t.h
|
||||
src/platform/macos/av_video.h
|
||||
src/platform/macos/av_video.m
|
||||
src/platform/macos/display.mm
|
||||
src/platform/macos/input.cpp
|
||||
src/platform/macos/microphone.mm
|
||||
src/platform/macos/misc.cpp
|
||||
src/platform/macos/misc.h
|
||||
src/platform/macos/nv12_zero_device.cpp
|
||||
src/platform/macos/nv12_zero_device.h
|
||||
src/platform/macos/publish.cpp
|
||||
third-party/TPCircularBuffer/TPCircularBuffer.c
|
||||
third-party/TPCircularBuffer/TPCircularBuffer.h
|
||||
${APPLE_PLIST_FILE})
|
||||
else()
|
||||
add_compile_definitions(SUNSHINE_PLATFORM="linux")
|
||||
@ -214,14 +242,14 @@ else()
|
||||
if(X11_FOUND)
|
||||
add_compile_definitions(SUNSHINE_BUILD_X11)
|
||||
include_directories(${X11_INCLUDE_DIR})
|
||||
list(APPEND PLATFORM_TARGET_FILES sunshine/platform/linux/x11grab.cpp)
|
||||
list(APPEND PLATFORM_TARGET_FILES src/platform/linux/x11grab.cpp)
|
||||
endif()
|
||||
|
||||
if(CUDA_FOUND)
|
||||
include_directories(third-party/nvfbc)
|
||||
list(APPEND PLATFORM_TARGET_FILES
|
||||
sunshine/platform/linux/cuda.cu
|
||||
sunshine/platform/linux/cuda.cpp
|
||||
src/platform/linux/cuda.cu
|
||||
src/platform/linux/cuda.cpp
|
||||
third-party/nvfbc/NvFBC.h)
|
||||
|
||||
add_compile_definitions(SUNSHINE_BUILD_CUDA)
|
||||
@ -231,7 +259,7 @@ else()
|
||||
add_compile_definitions(SUNSHINE_BUILD_DRM)
|
||||
include_directories(${LIBDRM_INCLUDE_DIRS} ${LIBCAP_INCLUDE_DIRS})
|
||||
list(APPEND PLATFORM_LIBRARIES ${LIBDRM_LIBRARIES} ${LIBCAP_LIBRARIES})
|
||||
list(APPEND PLATFORM_TARGET_FILES sunshine/platform/linux/kmsgrab.cpp)
|
||||
list(APPEND PLATFORM_TARGET_FILES src/platform/linux/kmsgrab.cpp)
|
||||
list(APPEND SUNSHINE_DEFINITIONS EGL_NO_X11=1)
|
||||
elseif(LIBDRM_FOUND)
|
||||
message(WARNING "Found libdrm, yet there is no libcap")
|
||||
@ -273,26 +301,26 @@ else()
|
||||
|
||||
list(APPEND PLATFORM_LIBRARIES ${WAYLAND_LIBRARIES})
|
||||
list(APPEND PLATFORM_TARGET_FILES
|
||||
sunshine/platform/linux/wlgrab.cpp
|
||||
sunshine/platform/linux/wayland.cpp)
|
||||
src/platform/linux/wlgrab.cpp
|
||||
src/platform/linux/wayland.cpp)
|
||||
endif()
|
||||
if(NOT ${X11_FOUND} AND NOT (${LIBDRM_FOUND} AND ${LIBCAP_FOUND}) AND NOT ${WAYLAND_FOUND} AND NOT ${})
|
||||
message(FATAL_ERROR "Couldn't find either x11, wayland, cuda or (libdrm and libcap)")
|
||||
endif()
|
||||
|
||||
list(APPEND PLATFORM_TARGET_FILES
|
||||
sunshine/platform/linux/publish.cpp
|
||||
sunshine/platform/linux/vaapi.h
|
||||
sunshine/platform/linux/vaapi.cpp
|
||||
sunshine/platform/linux/cuda.h
|
||||
sunshine/platform/linux/graphics.h
|
||||
sunshine/platform/linux/graphics.cpp
|
||||
sunshine/platform/linux/misc.h
|
||||
sunshine/platform/linux/misc.cpp
|
||||
sunshine/platform/linux/audio.cpp
|
||||
sunshine/platform/linux/input.cpp
|
||||
sunshine/platform/linux/x11grab.h
|
||||
sunshine/platform/linux/wayland.h
|
||||
src/platform/linux/publish.cpp
|
||||
src/platform/linux/vaapi.h
|
||||
src/platform/linux/vaapi.cpp
|
||||
src/platform/linux/cuda.h
|
||||
src/platform/linux/graphics.h
|
||||
src/platform/linux/graphics.cpp
|
||||
src/platform/linux/misc.h
|
||||
src/platform/linux/misc.cpp
|
||||
src/platform/linux/audio.cpp
|
||||
src/platform/linux/input.cpp
|
||||
src/platform/linux/x11grab.h
|
||||
src/platform/linux/wayland.h
|
||||
third-party/glad/src/egl.c
|
||||
third-party/glad/src/gl.c
|
||||
third-party/glad/include/EGL/eglplatform.h
|
||||
@ -328,47 +356,47 @@ set(SUNSHINE_TARGET_FILES
|
||||
third-party/moonlight-common-c/src/Rtsp.h
|
||||
third-party/moonlight-common-c/src/RtspParser.c
|
||||
third-party/moonlight-common-c/src/Video.h
|
||||
sunshine/upnp.cpp
|
||||
sunshine/upnp.h
|
||||
sunshine/cbs.cpp
|
||||
sunshine/utility.h
|
||||
sunshine/uuid.h
|
||||
sunshine/config.h
|
||||
sunshine/config.cpp
|
||||
sunshine/main.cpp
|
||||
sunshine/main.h
|
||||
sunshine/crypto.cpp
|
||||
sunshine/crypto.h
|
||||
sunshine/nvhttp.cpp
|
||||
sunshine/nvhttp.h
|
||||
sunshine/httpcommon.cpp
|
||||
sunshine/httpcommon.h
|
||||
sunshine/confighttp.cpp
|
||||
sunshine/confighttp.h
|
||||
sunshine/rtsp.cpp
|
||||
sunshine/rtsp.h
|
||||
sunshine/stream.cpp
|
||||
sunshine/stream.h
|
||||
sunshine/video.cpp
|
||||
sunshine/video.h
|
||||
sunshine/input.cpp
|
||||
sunshine/input.h
|
||||
sunshine/audio.cpp
|
||||
sunshine/audio.h
|
||||
sunshine/platform/common.h
|
||||
sunshine/process.cpp
|
||||
sunshine/process.h
|
||||
sunshine/network.cpp
|
||||
sunshine/network.h
|
||||
sunshine/move_by_copy.h
|
||||
sunshine/task_pool.h
|
||||
sunshine/thread_pool.h
|
||||
sunshine/thread_safe.h
|
||||
sunshine/sync.h
|
||||
sunshine/round_robin.h
|
||||
src/upnp.cpp
|
||||
src/upnp.h
|
||||
src/cbs.cpp
|
||||
src/utility.h
|
||||
src/uuid.h
|
||||
src/config.h
|
||||
src/config.cpp
|
||||
src/main.cpp
|
||||
src/main.h
|
||||
src/crypto.cpp
|
||||
src/crypto.h
|
||||
src/nvhttp.cpp
|
||||
src/nvhttp.h
|
||||
src/httpcommon.cpp
|
||||
src/httpcommon.h
|
||||
src/confighttp.cpp
|
||||
src/confighttp.h
|
||||
src/rtsp.cpp
|
||||
src/rtsp.h
|
||||
src/stream.cpp
|
||||
src/stream.h
|
||||
src/video.cpp
|
||||
src/video.h
|
||||
src/input.cpp
|
||||
src/input.h
|
||||
src/audio.cpp
|
||||
src/audio.h
|
||||
src/platform/common.h
|
||||
src/process.cpp
|
||||
src/process.h
|
||||
src/network.cpp
|
||||
src/network.h
|
||||
src/move_by_copy.h
|
||||
src/task_pool.h
|
||||
src/thread_pool.h
|
||||
src/thread_safe.h
|
||||
src/sync.h
|
||||
src/round_robin.h
|
||||
${PLATFORM_TARGET_FILES})
|
||||
|
||||
set_source_files_properties(sunshine/upnp.cpp PROPERTIES COMPILE_FLAGS -Wno-pedantic)
|
||||
set_source_files_properties(src/upnp.cpp PROPERTIES COMPILE_FLAGS -Wno-pedantic)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
@ -386,7 +414,7 @@ string(TOUPPER "x${CMAKE_BUILD_TYPE}" BUILD_TYPE)
|
||||
if("${BUILD_TYPE}" STREQUAL "XDEBUG")
|
||||
list(APPEND SUNSHINE_COMPILE_OPTIONS -O0 -ggdb3)
|
||||
if(WIN32)
|
||||
set_source_files_properties(sunshine/nvhttp.cpp PROPERTIES COMPILE_FLAGS -O2)
|
||||
set_source_files_properties(src/nvhttp.cpp PROPERTIES COMPILE_FLAGS -O2)
|
||||
endif()
|
||||
else()
|
||||
add_definitions(-DNDEBUG)
|
||||
@ -401,6 +429,11 @@ if(NOT SUNSHINE_CONFIG_DIR)
|
||||
set(SUNSHINE_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}/config")
|
||||
endif()
|
||||
|
||||
if(UNIX AND CMAKE_INSTALL_PREFIX AND NOT ${SUNSHINE_CONFIGURE_APPIMAGE})
|
||||
set(SUNSHINE_ASSETS_DIR "${CMAKE_INSTALL_PREFIX}/${SUNSHINE_ASSETS_DIR}")
|
||||
set(SUNSHINE_CONFIG_DIR "${CMAKE_INSTALL_PREFIX}/${SUNSHINE_CONFIG_DIR}")
|
||||
endif()
|
||||
|
||||
list(APPEND CBS_EXTERNAL_LIBRARIES
|
||||
cbs)
|
||||
|
||||
@ -415,7 +448,7 @@ list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
|
||||
${OPENSSL_LIBRARIES}
|
||||
${PLATFORM_LIBRARIES})
|
||||
|
||||
if (NOT WIN32)
|
||||
if(NOT WIN32)
|
||||
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES Boost::log)
|
||||
endif()
|
||||
|
||||
@ -447,11 +480,11 @@ target_compile_options(sunshine PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${SUNSHINE_COM
|
||||
# CPACK / Packaging
|
||||
|
||||
# Common options
|
||||
set(CPACK_PACKAGE_NAME "SunshineStream")
|
||||
set(CPACK_PACKAGE_VENDOR "SunshineStream")
|
||||
set(CPACK_PACKAGE_NAME "Sunshine")
|
||||
set(CPACK_PACKAGE_VENDOR "LizardByte")
|
||||
set(CPACK_PACKAGE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cpack_artifacts)
|
||||
set(CPACK_PACKAGE_CONTACT "https://github.com/SunshineStream/Sunshine")
|
||||
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "https://github.com/SunshineStream/Sunshine")
|
||||
set(CPACK_PACKAGE_CONTACT "https://app.lizardbyte.dev")
|
||||
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "https://github.com/LizardByte")
|
||||
set(CPACK_PACKAGE_DESCRIPTION ${CMAKE_PROJECT_DESCRIPTION})
|
||||
set(CPACK_PACKAGE_HOMEPAGE_URL ${CMAKE_PROJECT_HOMEPAGE_URL})
|
||||
set(CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/LICENSE)
|
||||
@ -533,63 +566,64 @@ if(WIN32) # see options at: https://cmake.org/cmake/help/latest/cpack_gen/nsis.h
|
||||
set(CPACK_COMPONENT_SUNSHINESVC_DESCRIPTION "CLI tool that allows you to enable/disable the Sunshine service.")
|
||||
set(CPACK_COMPONENT_SUNSHINESVC_GROUP "Tools")
|
||||
endif()
|
||||
if(UNIX)
|
||||
if(APPLE)
|
||||
# TODO: bundle doesn't produce a valid .app use cpack -G DragNDrop
|
||||
set(CPACK_BUNDLE_NAME "${CMAKE_PROJECT_NAME}")
|
||||
set(CPACK_BUNDLE_PLIST "${APPLE_PLIST_FILE}")
|
||||
set(CPACK_BUNDLE_ICON "${PROJECT_SOURCE_DIR}/sunshine.icns")
|
||||
# set(CPACK_BUNDLE_STARTUP_COMMAND "${INSTALL_RUNTIME_DIR}/sunshine")
|
||||
endif()
|
||||
if(APPLE AND SUNSHINE_MACOS_PACKAGE) # TODO
|
||||
set(prefix "${CMAKE_PROJECT_NAME}.app/Contents")
|
||||
set(INSTALL_RUNTIME_DIR "${prefix}/MacOS")
|
||||
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/" DESTINATION "${SUNSHINE_ASSETS_DIR}")
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/config/" DESTINATION "${SUNSHINE_CONFIG_DIR}")
|
||||
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/" DESTINATION "${SUNSHINE_ASSETS_DIR}")
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/config/" DESTINATION "${SUNSHINE_CONFIG_DIR}")
|
||||
|
||||
install(TARGETS sunshine
|
||||
BUNDLE DESTINATION . COMPONENT Runtime
|
||||
RUNTIME DESTINATION ${INSTALL_RUNTIME_DIR} COMPONENT Runtime)
|
||||
elseif(UNIX)
|
||||
# Installation destination dir
|
||||
set(CPACK_SET_DESTDIR true)
|
||||
if(NOT CMAKE_INSTALL_PREFIX)
|
||||
set(CMAKE_INSTALL_PREFIX "/usr/local/sunshine")
|
||||
endif()
|
||||
|
||||
install(TARGETS sunshine RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/" DESTINATION "${SUNSHINE_ASSETS_DIR}")
|
||||
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/config/" DESTINATION "${SUNSHINE_CONFIG_DIR}")
|
||||
endif()
|
||||
if(APPLE) # TODO: test
|
||||
|
||||
set(prefix "${CMAKE_PROJECT_NAME}.app/Contents")
|
||||
set(INSTALL_RUNTIME_DIR "${prefix}/MacOS")
|
||||
if(APPLE)
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/" DESTINATION "${SUNSHINE_ASSETS_DIR}")
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/config/" DESTINATION "${SUNSHINE_CONFIG_DIR}")
|
||||
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/" DESTINATION "${SUNSHINE_ASSETS_DIR}")
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/misc/uninstall_pkg.sh" DESTINATION "${SUNSHINE_ASSETS_DIR}")
|
||||
else()
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/assets/" DESTINATION "${SUNSHINE_ASSETS_DIR}")
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/config/" DESTINATION "${SUNSHINE_CONFIG_DIR}")
|
||||
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/config/" DESTINATION "${SUNSHINE_CONFIG_DIR}")
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/85-sunshine.rules" DESTINATION "${CMAKE_INSTALL_LIBDIR}/udev/rules.d")
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service" DESTINATION "${CMAKE_INSTALL_LIBDIR}/systemd/user")
|
||||
|
||||
install(TARGETS sunshine
|
||||
BUNDLE DESTINATION . COMPONENT Runtime
|
||||
RUNTIME DESTINATION ${INSTALL_RUNTIME_DIR} COMPONENT Runtime)
|
||||
# Pre and post install
|
||||
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
|
||||
"${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/preinst"
|
||||
"${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/postinst"
|
||||
"${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/conffiles")
|
||||
set(CPACK_RPM_PRE_INSTALL_SCRIPT_FILE "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/preinst")
|
||||
set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/postinst")
|
||||
|
||||
# TODO: bundle doesn't produce a valid .app use cpack -G DragNDrop
|
||||
set(CPACK_BUNDLE_NAME "${CMAKE_PROJECT_NAME}")
|
||||
set(CPACK_BUNDLE_PLIST "${APPLE_PLIST_FILE}")
|
||||
set(CPACK_BUNDLE_ICON "${PROJECT_SOURCE_DIR}/sunshine.icns")
|
||||
# set(CPACK_BUNDLE_STARTUP_COMMAND "${INSTALL_RUNTIME_DIR}/sunshine")
|
||||
|
||||
# Portfile
|
||||
configure_file(Portfile.in Portfile @ONLY)
|
||||
endif()
|
||||
if(UNIX AND NOT APPLE)
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/assets/" DESTINATION "${SUNSHINE_ASSETS_DIR}")
|
||||
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/config/" DESTINATION "${SUNSHINE_CONFIG_DIR}")
|
||||
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/85-sunshine-rules.rules" DESTINATION "/etc/udev/rules.d")
|
||||
|
||||
install(TARGETS sunshine RUNTIME DESTINATION "/usr/bin")
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service" DESTINATION "/usr/lib/systemd/user")
|
||||
|
||||
# Pre and post install
|
||||
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
|
||||
"${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/preinst;${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/postinst;${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/conffiles")
|
||||
set(CPACK_RPM_PRE_INSTALL_SCRIPT_FILE "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/preinst")
|
||||
set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/postinst")
|
||||
|
||||
# Dependencies
|
||||
set(CPACK_DEB_COMPONENT_INSTALL ON)
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "openssl, libavdevice58, libboost-thread1.67.0 | libboost-thread1.71.0 | libboost-thread1.74.0, libboost-filesystem1.67.0 | libboost-filesystem1.71.0 | libboost-filesystem1.74.0, libboost-log1.67.0 | libboost-log1.71.0 | libboost-log1.74.0, libpulse0, libopus0, libxcb-shm0, libxcb-xfixes0, libxtst6, libevdev2, libdrm2, libcap2")
|
||||
set(CPACK_RPM_PACKAGE_REQUIRES "openssl >= 1.1, libavdevice >= 4.3, boost-thread >= 1.67.0, boost-filesystem >= 1.67.0, boost-log >= 1.67.0, pulseaudio-libs >= 10.0, libopusenc >= 0.2.1, libxcb >= 1.13, libXtst >= 1.2.3, libevdev >= 1.5.6, libdrm >= 2.4.97, libcap >= 2.22")
|
||||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) # This should automatically figure out dependencies, doesn't work with the current config
|
||||
|
||||
# AppImage desktop file
|
||||
configure_file(sunshine.desktop.in sunshine.desktop @ONLY)
|
||||
# Dependencies
|
||||
set(CPACK_DEB_COMPONENT_INSTALL ON)
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "openssl, libavdevice58, libboost-thread1.67.0 | libboost-thread1.71.0 | libboost-thread1.74.0, libboost-filesystem1.67.0 | libboost-filesystem1.71.0 | libboost-filesystem1.74.0, libboost-log1.67.0 | libboost-log1.71.0 | libboost-log1.74.0, libpulse0, libopus0, libxcb-shm0, libxcb-xfixes0, libxtst6, libevdev2, libdrm2, libcap2")
|
||||
set(CPACK_RPM_PACKAGE_REQUIRES "openssl >= 1.1, libavdevice >= 4.3, boost-thread >= 1.67.0, boost-filesystem >= 1.67.0, boost-log >= 1.67.0, pulseaudio-libs >= 10.0, libopusenc >= 0.2.1, libxcb >= 1.13, libXtst >= 1.2.3, libevdev >= 1.5.6, libdrm >= 2.4.97, libcap >= 2.22")
|
||||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) # This should automatically figure out dependencies, doesn't work with the current config
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(CPack)
|
||||
|
||||
@ -11,16 +11,10 @@ docker run -d \
|
||||
-e PUID=<uid> \
|
||||
-e PGID=<gid> \
|
||||
-e TZ=<timezone> \
|
||||
-p 47990:47990 \
|
||||
-p 47984:47984 \
|
||||
-p 47989:47989 \
|
||||
-p 47984-47990:47984-47990/tcp \
|
||||
-p 48010:48010 \
|
||||
-p 47998:47998 \
|
||||
-p 47999:47999 \
|
||||
-p 48000:48000 \
|
||||
-p 48002:48002 \
|
||||
-p 48010:48010 \
|
||||
sunshinestream/sunshine
|
||||
-p 47998-48000:47998-48000/udp \
|
||||
lizardbyte/sunshine
|
||||
```
|
||||
|
||||
To update the container it must be removed and recreated:
|
||||
@ -31,7 +25,7 @@ docker stop sunshine
|
||||
# Remove the container
|
||||
docker rm sunshine
|
||||
# Pull the latest update
|
||||
docker pull sunshinestream/sunshine
|
||||
docker pull lizardbyte/sunshine
|
||||
# Run the container with the same parameters as before
|
||||
docker run -d ...
|
||||
```
|
||||
@ -44,25 +38,19 @@ Create a `docker-compose.yml` file with the following contents (substitute your
|
||||
version: '3'
|
||||
services:
|
||||
sunshine:
|
||||
image: sunshinestream/sunshine
|
||||
image: lizardbyte/sunshine
|
||||
container_name: sunshine
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- <path to data>:/config
|
||||
- <path to data>:/config
|
||||
environment:
|
||||
- PUID=<uid>
|
||||
- PGID=<gid>
|
||||
- TZ=<timezone>
|
||||
- PUID=<uid>
|
||||
- PGID=<gid>
|
||||
- TZ=<timezone>
|
||||
ports:
|
||||
- "47990:47990"
|
||||
- "47984:47984"
|
||||
- "47989:47989"
|
||||
- "48010:48010"
|
||||
- "47998:47998"
|
||||
- "47999:47999"
|
||||
- "48000:48000"
|
||||
- "48002:48002"
|
||||
- "48010:48010"
|
||||
- 47984-47990:47984-47990/tcp
|
||||
- 48010:48010
|
||||
- 47998-48000:47998-48000/udp
|
||||
```
|
||||
|
||||
Create and start the container (run the command from the same folder as your `docker-compose.yml` file):
|
||||
@ -88,7 +76,7 @@ container.
|
||||
**Example:** `-p external:internal` - This shows the port mapping from internal to external of the container.
|
||||
Therefore `-p 47990:47990` would expose port `47990` from inside the container to be accessible from the host's IP on
|
||||
port `47990` (e.g. `http://<host_ip>:47990`). The internal port must be `47990`, but the external port may be changed
|
||||
(e.g. `-p 8080:47990`).
|
||||
(e.g. `-p 8080:47990`). All the ports listed in the `docker run` and `docker-compose` examples are required.
|
||||
|
||||
|
||||
| Parameter | Function | Example Value | Required |
|
||||
|
||||
75
Portfile.in
75
Portfile.in
@ -1,75 +0,0 @@
|
||||
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
|
||||
|
||||
PortSystem 1.0
|
||||
PortGroup cmake 1.1
|
||||
PortGroup github 1.0
|
||||
PortGroup boost 1.0
|
||||
|
||||
# bump revision when changes are made to this file
|
||||
revision 1
|
||||
|
||||
github.setup @GITHUB_OWNER@ @GITHUB_REPO@ @GITHUB_BRANCH@
|
||||
name @PROJECT_NAME@
|
||||
version @PROJECT_VERSION@
|
||||
categories multimedia emulators games
|
||||
platforms darwin
|
||||
license GPL-3
|
||||
maintainers {@SunshineStream sunshinestream}
|
||||
description @PROJECT_DESCRIPTION@
|
||||
long_description {*}${description}
|
||||
homepage @PROJECT_HOMEPAGE_URL@
|
||||
master_sites https://github.com/@GITHUB_OWNER@/@GITHUB_REPO@/releases
|
||||
|
||||
fetch.type git
|
||||
post-fetch {
|
||||
system -W ${worksrcpath} "${git.cmd} submodule update --init --recursive"
|
||||
}
|
||||
|
||||
depends_lib port:avahi \
|
||||
port:ffmpeg \
|
||||
port:libopus
|
||||
|
||||
boost.version 1.76
|
||||
|
||||
configure.args -DBOOST_ROOT=[boost::install_area] \
|
||||
-DSUNSHINE_ASSETS_DIR=${prefix}/etc/sunshine/assets \
|
||||
-DSUNSHINE_CONFIG_DIR=${prefix}/etc/sunshine/config
|
||||
|
||||
cmake.out_of_source yes
|
||||
|
||||
startupitem.create yes
|
||||
startupitem.executable "${prefix}/bin/{$name}"
|
||||
startupitem.location LaunchDaemons
|
||||
startupitem.name ${name}
|
||||
startupitem.netchange yes
|
||||
|
||||
# is this actually necessary? this should all be handled by CMakeLists
|
||||
destroot {
|
||||
# install assets
|
||||
xinstall -d -m 755 ${destroot}${prefix}/etc/${name}/assets
|
||||
xinstall {*}[glob ${worksrcpath}/src_assets/common/assets/*.*] ${destroot}${prefix}/etc/${name}/assets
|
||||
xinstall {*}[glob ${worksrcpath}/src_assets/macos/assets/*.*] ${destroot}${prefix}/etc/${name}/assets
|
||||
|
||||
# install web assets
|
||||
xinstall -d -m 755 ${destroot}${prefix}/etc/${name}/assets/web/fonts/fontawesome-free-web/css
|
||||
xinstall -d -m 755 ${destroot}${prefix}/etc/${name}/assets/web/fonts/fontawesome-free-web/webfonts
|
||||
xinstall {*}[glob ${worksrcpath}/src_assets/common/assets/web/*.*] ${destroot}${prefix}/etc/${name}/assets/web
|
||||
xinstall {*}[glob ${worksrcpath}/src_assets/common/assets/web/fonts/fontawesome-free-web/*.*] ${destroot}${prefix}/etc/${name}/assets/web/fonts/fontawesome-free-web
|
||||
xinstall {*}[glob ${worksrcpath}/src_assets/common/assets/web/fonts/fontawesome-free-web/css/*.*] ${destroot}${prefix}/etc/${name}/assets/web/fonts/fontawesome-free-web/css
|
||||
xinstall {*}[glob ${worksrcpath}/src_assets/common/assets/web/fonts/fontawesome-free-web/webfonts/*.*] ${destroot}${prefix}/etc/${name}/assets/web/fonts/fontawesome-free-web/webfonts
|
||||
xinstall -d -m 755 ${destroot}${prefix}/etc/${name}/assets/web/images
|
||||
xinstall -d -m 755 ${destroot}${prefix}/etc/${name}/assets/web/third_party
|
||||
xinstall {*}[glob ${worksrcpath}/src_assets/common/assets/web/images/*.*] ${destroot}${prefix}/etc/${name}/assets/web/images
|
||||
xinstall {*}[glob ${worksrcpath}/src_assets/common/assets/web/third_party/*.*] ${destroot}${prefix}/etc/${name}/assets/web/third_party
|
||||
|
||||
xinstall -d -m 755 ${destroot}${prefix}/etc/${name}/config
|
||||
|
||||
# install sunshine.conf
|
||||
xinstall {*}[glob ${worksrcpath}/src_assets/common/config/*.*] ${destroot}${prefix}/etc/${name}/config
|
||||
|
||||
# install apps.json
|
||||
xinstall {*}[glob ${worksrcpath}/src_assets/macos/config/*.*] ${destroot}${prefix}/etc/${name}/config
|
||||
|
||||
# install the binary
|
||||
xinstall ${workpath}/build/${name} ${destroot}${prefix}/bin
|
||||
}
|
||||
46
README.rst
46
README.rst
@ -1,23 +1,27 @@
|
||||
:github_url: https://github.com/SunshineStream/Sunshine/tree/nightly/README.rst
|
||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/README.rst
|
||||
|
||||
Overview
|
||||
========
|
||||
LizardByte has the full documentation hosted on `Read the Docs <https://docs.lizardbyte.dev/projects/sunshine/>`_.
|
||||
|
||||
About
|
||||
-----
|
||||
Sunshine is a Game stream host for Moonlight. It is an open source version of GeForce Experience (GFE).
|
||||
Sunshine is a Game stream host for Moonlight.
|
||||
Sunshine is a self hosted, low latency, cloud gaming solution with support for AMD, Intel, and Nvidia gpus.
|
||||
It is an open source implementation of NVIDIA's GameStream, as used by the NVIDIA Shield.
|
||||
Connect to Sunshine from any Moonlight client, available for nearly any device imaginable.
|
||||
|
||||
These are the advantages of Sunshine over GFE.
|
||||
These are the advantages of Sunshine over GeForce Experience.
|
||||
|
||||
- FOSS (Free and Open Source Software)
|
||||
- Multi-platform
|
||||
|
||||
- Linux (deb, rpm, and AppImage packages)
|
||||
- MacOS (Portfile)
|
||||
- Windows (portable binary)
|
||||
- Linux
|
||||
- macOS
|
||||
- Windows
|
||||
|
||||
- Pair over web ui
|
||||
- Supports AMD and Nvidia GPUs for encoding
|
||||
- Supports AMD, Intel, and Nvidia GPUs for encoding
|
||||
- Supports software encoding
|
||||
- Supports streaming to multiple clients
|
||||
- Web UI for configuration
|
||||
@ -25,13 +29,13 @@ These are the advantages of Sunshine over GFE.
|
||||
Integrations
|
||||
------------
|
||||
|
||||
.. image:: https://img.shields.io/github/workflow/status/sunshinestream/sunshine/CI/master?label=CI%20build&logo=github&style=for-the-badge
|
||||
.. image:: https://img.shields.io/github/workflow/status/lizardbyte/sunshine/CI/master?label=CI%20build&logo=github&style=for-the-badge
|
||||
:alt: GitHub Workflow Status (CI)
|
||||
:target: https://github.com/SunshineStream/Sunshine/actions/workflows/CI.yml?query=branch%3Amaster
|
||||
:target: https://github.com/LizardByte/Sunshine/actions/workflows/CI.yml?query=branch%3Amaster
|
||||
|
||||
.. image:: https://img.shields.io/github/workflow/status/sunshinestream/sunshine/localize/nightly?label=localize%20build&logo=github&style=for-the-badge
|
||||
.. image:: https://img.shields.io/github/workflow/status/lizardbyte/sunshine/localize/nightly?label=localize%20build&logo=github&style=for-the-badge
|
||||
:alt: GitHub Workflow Status (localize)
|
||||
:target: https://github.com/SunshineStream/Sunshine/actions/workflows/localize.yml?query=branch%3Anightly
|
||||
:target: https://github.com/LizardByte/Sunshine/actions/workflows/localize.yml?query=branch%3Anightly
|
||||
|
||||
.. image:: https://img.shields.io/readthedocs/sunshinestream?label=Docs&style=for-the-badge&logo=readthedocs
|
||||
:alt: Read the Docs
|
||||
@ -44,22 +48,20 @@ Integrations
|
||||
Support
|
||||
---------
|
||||
|
||||
.. image:: https://img.shields.io/discord/938534566107418705?label=Discord&style=for-the-badge&color=blue&logo=discord
|
||||
:alt: Discord
|
||||
:target: https://sunshinestream.github.io/discord
|
||||
|
||||
.. image:: https://img.shields.io/github/discussions/sunshinestream/sunshine?logo=github&style=for-the-badge
|
||||
:alt: GitHub Discussions
|
||||
:target: https://github.com/SunshineStream/Sunshine/discussions
|
||||
Our support methods are listed in our `LizardByte Docs <https://docs.lizardbyte.dev/en/latest/about/support.html>`_.
|
||||
|
||||
Downloads
|
||||
---------
|
||||
|
||||
.. image:: https://img.shields.io/github/downloads/sunshinestream/sunshine/total?style=for-the-badge&logo=github
|
||||
.. image:: https://img.shields.io/github/downloads/lizardbyte/sunshine/total?style=for-the-badge&logo=github
|
||||
:alt: GitHub Releases
|
||||
:target: https://github.com/SunshineStream/Sunshine/releases/latest
|
||||
:target: https://github.com/LizardByte/Sunshine/releases/latest
|
||||
|
||||
.. 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
|
||||
:target: https://aur.archlinux.org/packages/sunshine
|
||||
|
||||
.. comment
|
||||
image:: https://img.shields.io/docker/pulls/sunshinestream/sunshine?style=for-the-badge&logo=docker
|
||||
image:: https://img.shields.io/docker/pulls/lizardbyte/sunshine?style=for-the-badge&logo=docker
|
||||
:alt: Docker
|
||||
:target: https://hub.docker.com/r/sunshinestream/sunshine
|
||||
:target: https://hub.docker.com/r/lizardbyte/sunshine
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
---
|
||||
"base_path": "."
|
||||
"base_url": "https://api.crowdin.com" # optional (for Crowdin Enterprise only)
|
||||
"preserve_hierarchy": false # flatten tree on crowdin
|
||||
@ -6,10 +7,10 @@
|
||||
"l10n"
|
||||
]
|
||||
|
||||
"files" : [
|
||||
"files": [
|
||||
{
|
||||
"source" : "/locale/*.po",
|
||||
"translation" : "/locale/%two_letters_code%/LC_MESSAGES/%original_file_name%",
|
||||
"source": "/locale/*.po",
|
||||
"translation": "/locale/%two_letters_code%/LC_MESSAGES/%original_file_name%",
|
||||
"languages_mapping": {
|
||||
"two_letters_code": {
|
||||
# map non-two letter codes here, left side is crowdin designation, right side is babel designation
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
:github_url: https://github.com/SunshineStream/Sunshine/tree/nightly/docs/source/about/advanced_usage.rst
|
||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/about/advanced_usage.rst
|
||||
|
||||
Advanced Usage
|
||||
==============
|
||||
@ -17,14 +17,16 @@ location by modifying the configuration file.
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
======= ===========
|
||||
Value Description
|
||||
======= ===========
|
||||
Docker /config/
|
||||
Linux /usr/local/sunshine/config/
|
||||
MacOS /usr/local/sunshine/config/
|
||||
Windows ./config/
|
||||
======= ===========
|
||||
========= ===========
|
||||
Value Description
|
||||
========= ===========
|
||||
Docker /config/
|
||||
Linux-aur /usr/share/sunshine/config/
|
||||
Linux-deb /usr/local/sunshine/config/
|
||||
Linux-rpm /usr/local/sunshine/config/
|
||||
macOS /usr/local/sunshine/config/
|
||||
Windows ./config/
|
||||
========= ===========
|
||||
|
||||
Example
|
||||
.. code-block:: bash
|
||||
@ -225,7 +227,7 @@ Description
|
||||
To be supported by Sunshine, it needs to have at the very minimum:
|
||||
``VAProfileH264High : VAEntrypointEncSlice``
|
||||
|
||||
.. Todo:: MacOS
|
||||
.. Todo:: macOS
|
||||
|
||||
Windows
|
||||
.. code-block:: batch
|
||||
@ -241,7 +243,7 @@ Examples
|
||||
|
||||
adapter_name = /dev/dri/renderD128
|
||||
|
||||
.. Todo:: MacOS
|
||||
.. Todo:: macOS
|
||||
|
||||
Windows
|
||||
.. code-block:: text
|
||||
@ -265,7 +267,7 @@ Description
|
||||
|
||||
You need to use the value before the colon in the output, e.g. ``0``.
|
||||
|
||||
.. Todo:: MacOS
|
||||
.. Todo:: macOS
|
||||
|
||||
Windows
|
||||
.. code-block:: batch
|
||||
@ -281,7 +283,7 @@ Examples
|
||||
|
||||
output_name = 0
|
||||
|
||||
.. Todo:: MacOS
|
||||
.. Todo:: macOS
|
||||
|
||||
Windows
|
||||
.. code-block:: text
|
||||
@ -376,8 +378,8 @@ Description
|
||||
# in some causes you'd need to use the `Sink` device, if `Source` doesn't work, so try:
|
||||
pactl info | grep Sink
|
||||
|
||||
MacOS
|
||||
Sunshine can only access microphones on MacOS due to system limitations. To stream system audio use
|
||||
macOS
|
||||
Sunshine can only access microphones on macOS due to system limitations. To stream system audio use
|
||||
`Soundflower <https://github.com/mattingalls/Soundflower>`_ or
|
||||
`BlackHole <https://github.com/ExistentialAudio/BlackHole>`_.
|
||||
|
||||
@ -395,7 +397,7 @@ Examples
|
||||
|
||||
audio_sink = alsa_output.pci-0000_09_00.3.analog-stereo
|
||||
|
||||
MacOS
|
||||
macOS
|
||||
.. code-block:: text
|
||||
|
||||
audio_sink = BlackHole 2ch
|
||||
@ -993,7 +995,7 @@ vt_software
|
||||
Description
|
||||
Force Video Toolbox to use software encoding.
|
||||
|
||||
.. Note:: This option only applies when using MacOS.
|
||||
.. Note:: This option only applies when using macOS.
|
||||
|
||||
**Choices**
|
||||
|
||||
@ -1023,7 +1025,7 @@ vt_realtime
|
||||
Description
|
||||
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.
|
||||
|
||||
@ -1041,7 +1043,7 @@ vt_coder
|
||||
Description
|
||||
The entropy encoding to use.
|
||||
|
||||
.. Note:: This option only applies when using MacOS.
|
||||
.. Note:: This option only applies when using macOS.
|
||||
|
||||
**Choices**
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
:github_url: https://github.com/SunshineStream/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.
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
:github_url: https://github.com/SunshineStream/Sunshine/tree/nightly/docs/source/about/installation.rst
|
||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/about/installation.rst
|
||||
|
||||
Installation
|
||||
============
|
||||
@ -9,8 +9,6 @@ Binaries
|
||||
Binaries of Sunshine are created for each release. They are available for Linux, and Windows.
|
||||
Binaries can be found in the `latest release`_.
|
||||
|
||||
.. Todo:: Create binary package(s) for MacOS. See `here <https://github.com/SunshineStream/Sunshine/issues/61>`_.
|
||||
|
||||
.. Tip:: Some third party packages also exist. See
|
||||
:ref:`Third Party Packages <about/third_party_packages:third party packages>`.
|
||||
|
||||
@ -25,10 +23,10 @@ Follow the instructions for your preferred package type below.
|
||||
|
||||
AppImage
|
||||
^^^^^^^^
|
||||
.. image:: https://img.shields.io/github/issues/sunshinestream/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
|
||||
|
||||
The current known compatibility of the AppImage is shown below.
|
||||
According to AppImageLint the AppImage can run on the following distros.
|
||||
|
||||
- [✖] Debian oldstable (buster)
|
||||
- [✔] Debian stable (bullseye)
|
||||
@ -42,11 +40,21 @@ The current known compatibility of the AppImage is shown below.
|
||||
- [✖] Ubuntu trusty
|
||||
- [✖] CentOS 7
|
||||
|
||||
#. Download and extract ``sunshine-appimage.zip`` to your home directory.
|
||||
#. Download ``sunshine-appimage.zip`` and extract the contents to your home directory.
|
||||
|
||||
Debian Packages
|
||||
^^^^^^^^^^^^^^^
|
||||
.. image:: https://img.shields.io/github/issues/sunshinestream/sunshine/os:linux:debian?logo=github&style=for-the-badge
|
||||
AUR Package
|
||||
^^^^^^^^^^^
|
||||
#. Open terminal and run the following code.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
git clone https://aur.archlinux.org/sunshine-git.git
|
||||
cd sunshine-git
|
||||
makepkg -fi
|
||||
|
||||
Debian Package
|
||||
^^^^^^^^^^^^^^
|
||||
.. image:: https://img.shields.io/github/issues/lizardbyte/sunshine/pkg:deb?logo=github&style=for-the-badge
|
||||
:alt: GitHub issues by-label
|
||||
|
||||
#. Download ``sunshine.deb`` and run the following code.
|
||||
@ -57,9 +65,29 @@ Debian Packages
|
||||
|
||||
.. Tip:: You can double click the deb file to see details about the package and begin installation.
|
||||
|
||||
Red Hat Packages
|
||||
^^^^^^^^^^^^^^^^
|
||||
.. image:: https://img.shields.io/github/issues/sunshinestream/sunshine/os:linux:fedora?logo=github&style=for-the-badge
|
||||
Flatpak Package
|
||||
^^^^^^^^^^^^^^^
|
||||
.. image:: https://img.shields.io/github/issues/lizardbyte/sunshine/pkg:flatpak?logo=github&style=for-the-badge
|
||||
:alt: GitHub issues by-label
|
||||
|
||||
.. Todo:: This package needs to have CUDA added.
|
||||
|
||||
#. Install `Flatpak <https://flatpak.org/setup/>`_ as required.
|
||||
#. Download ``sunshine.flatpak`` and run the following code.
|
||||
|
||||
System level (recommended)
|
||||
.. code-block:: bash
|
||||
|
||||
flatpak install --system sunshine.flatpak
|
||||
|
||||
User level
|
||||
.. code-block:: bash
|
||||
|
||||
flatpak install --user sunshine.flatpak
|
||||
|
||||
RPM Package
|
||||
^^^^^^^^^^^
|
||||
.. image:: https://img.shields.io/github/issues/lizardbyte/sunshine/pkg:rpm?logo=github&style=for-the-badge
|
||||
:alt: GitHub issues by-label
|
||||
|
||||
#. Add `rpmfusion` repositories by running the following code.
|
||||
@ -77,11 +105,16 @@ Red Hat Packages
|
||||
|
||||
.. Tip:: You can double click the rpm file to see details about the package and begin installation.
|
||||
|
||||
MacOS
|
||||
macOS
|
||||
-----
|
||||
.. image:: https://img.shields.io/github/issues/sunshinestream/sunshine/os:macos?logo=github&style=for-the-badge
|
||||
.. image:: https://img.shields.io/github/issues/lizardbyte/sunshine/os:macos?logo=github&style=for-the-badge
|
||||
:alt: GitHub issues by-label
|
||||
|
||||
pkg
|
||||
.. Warning:: The `pkg` does not include runtime dependencies and should be considered experimental.
|
||||
|
||||
#. Download the ``sunshine.pkg`` file and install it as normal.
|
||||
|
||||
Portfile
|
||||
#. Install `MacPorts <https://www.macports.org>`_
|
||||
#. Update the Macports sources.
|
||||
@ -110,10 +143,10 @@ Portfile
|
||||
|
||||
Windows
|
||||
-------
|
||||
.. image:: https://img.shields.io/github/issues/sunshinestream/sunshine/os:windows:10?logo=github&style=for-the-badge
|
||||
.. image:: https://img.shields.io/github/issues/lizardbyte/sunshine/os:windows:10?logo=github&style=for-the-badge
|
||||
:alt: GitHub issues by-label
|
||||
|
||||
.. image:: https://img.shields.io/github/issues/sunshinestream/sunshine/os:windows:11?logo=github&style=for-the-badge
|
||||
.. image:: https://img.shields.io/github/issues/lizardbyte/sunshine/os:windows:11?logo=github&style=for-the-badge
|
||||
:alt: GitHub issues by-label
|
||||
|
||||
Installed option:
|
||||
@ -122,6 +155,6 @@ Installed option:
|
||||
Standalone option:
|
||||
#. Download and extract ``sunshine-windows.zip``
|
||||
|
||||
.. _latest release: https://github.com/SunshineStream/Sunshine/releases/latest
|
||||
.. _Dockerhub.io: https://hub.docker.com/repository/docker/sunshinestream/sunshine
|
||||
.. _ghcr.io: https://github.com/orgs/SunshineStream/packages?repo_name=sunshine
|
||||
.. _latest release: https://github.com/LizardByte/Sunshine/releases/latest
|
||||
.. _Dockerhub.io: https://hub.docker.com/repository/docker/lizardbyte/sunshine
|
||||
.. _ghcr.io: https://github.com/orgs/LizardByte/packages?repo_name=sunshine
|
||||
|
||||
@ -1,25 +1,9 @@
|
||||
:github_url: https://github.com/SunshineStream/Sunshine/tree/nightly/docs/source/about/third_party_packages.rst
|
||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/about/third_party_packages.rst
|
||||
|
||||
Third Party Packages
|
||||
====================
|
||||
|
||||
.. Danger:: These packages are not maintained by SunshineStream. Use at your own risk.
|
||||
|
||||
AUR (Arch Linux User Repository)
|
||||
--------------------------------
|
||||
|
||||
.. image:: https://img.shields.io/aur/version/sunshine?style=for-the-badge&logo=archlinux
|
||||
:alt: AUR version
|
||||
:target: https://aur.archlinux.org/packages/sunshine
|
||||
|
||||
.. image:: https://img.shields.io/aur/last-modified/sunshine?style=for-the-badge&logo=archlinux
|
||||
:alt: AUR last modified
|
||||
|
||||
.. image:: https://img.shields.io/aur/votes/sunshine?style=for-the-badge&logo=archlinux
|
||||
:alt: AUR votes
|
||||
|
||||
.. image:: https://img.shields.io/aur/maintainer/sunshine?style=for-the-badge&logo=archlinux
|
||||
:alt: AUR maintainer
|
||||
.. Danger:: These packages are not maintained by LizardByte. Use at your own risk.
|
||||
|
||||
Chocolatey
|
||||
----------
|
||||
@ -38,6 +22,12 @@ Scoop
|
||||
:alt: Scoop Version (extras bucket)
|
||||
:target: https://scoop.sh/#/apps?s=0&d=1&o=true&q=sunshine
|
||||
|
||||
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
|
||||
:alt: Winget Version
|
||||
:target: https://github.com/microsoft/winget-pkgs/tree/master/manifests/l/LizardByte/Sunshine
|
||||
|
||||
Legacy GitHub Repo
|
||||
------------------
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
:github_url: https://github.com/SunshineStream/Sunshine/tree/nightly/docs/source/about/usage.rst
|
||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/about/usage.rst
|
||||
|
||||
Usage
|
||||
=====
|
||||
@ -27,13 +27,13 @@ Usage
|
||||
list of applications that are started just before running a stream. This is the directory within the GitHub
|
||||
repo.
|
||||
|
||||
.. Attention:: Application list is not fully supported on MacOS
|
||||
.. Attention:: Application list is not fully supported on macOS
|
||||
|
||||
#. In Moonlight, you may need to add the PC manually.
|
||||
#. When Moonlight request you insert the correct pin on sunshine:
|
||||
|
||||
- Login to the web ui
|
||||
- Go to "PIN" in the Header
|
||||
- Go to "PIN" in the Navbar
|
||||
- Type in your PIN and press Enter, you should get a Success Message
|
||||
- In Moonlight, select one of the Applications listed
|
||||
|
||||
@ -60,79 +60,85 @@ The deb and rpm packages handle these steps automatically. The AppImage does not
|
||||
|
||||
Sunshine needs access to `uinput` to create mouse and gamepad events.
|
||||
|
||||
Add user to group `input`, if this is the first time installing.
|
||||
.. code-block:: bash
|
||||
#. Add user to group `input`, if this is the first time installing.
|
||||
.. code-block:: bash
|
||||
|
||||
sudo usermod -a -G input $USER
|
||||
sudo reboot now
|
||||
sudo usermod -a -G input $USER
|
||||
|
||||
Create `udev` rules.
|
||||
.. code-block:: bash
|
||||
#. Create `udev` rules.
|
||||
.. code-block:: bash
|
||||
|
||||
sudo nano /etc/udev/rules.d/85-sunshine-input.rules
|
||||
sudo nano /etc/udev/rules.d/85-sunshine.rules
|
||||
|
||||
Input the following contents.
|
||||
|
||||
.. code-block::
|
||||
|
||||
KERNEL=="uinput", GROUP="input", MODE="0660", OPTIONS+="static_node=uinput"
|
||||
|
||||
Save the file and exit:
|
||||
|
||||
#. ``CTRL+X`` to start exit.
|
||||
#. ``Y`` to save modifications.
|
||||
|
||||
Configure autostart service
|
||||
- filename: ``~/.config/systemd/user/sunshine.service``
|
||||
- contents:
|
||||
Input the following contents.
|
||||
|
||||
.. code-block::
|
||||
|
||||
[Unit]
|
||||
Description=Sunshine Gamestream Server for Moonlight
|
||||
KERNEL=="uinput", GROUP="input", MODE="0660", OPTIONS+="static_node=uinput"
|
||||
|
||||
[Service]
|
||||
ExecStart=<see table>
|
||||
Save the file and exit:
|
||||
|
||||
[Install]
|
||||
WantedBy=graphical-session.target
|
||||
#. ``CTRL+X`` to start exit.
|
||||
#. ``Y`` to save modifications.
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
#. Optionally, configure autostart service
|
||||
- filename: ``~/.config/systemd/user/sunshine.service``
|
||||
- contents:
|
||||
|
||||
======== =================== ===============
|
||||
package ExecStart Auto Configured
|
||||
======== =================== ===============
|
||||
deb /usr/bin/sunshine ✔
|
||||
rpm /usr/bin/sunshine ✔
|
||||
AppImage ~/sunshine.AppImage ✖
|
||||
======== =================== ===============
|
||||
.. code-block::
|
||||
|
||||
Start once
|
||||
[Unit]
|
||||
Description=Sunshine Gamestream Server for Moonlight
|
||||
|
||||
[Service]
|
||||
ExecStart=<see table>
|
||||
|
||||
[Install]
|
||||
WantedBy=graphical-session.target
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
======== ============================================== ===============
|
||||
package ExecStart Auto Configured
|
||||
======== ============================================== ===============
|
||||
aur /usr/bin/sunshine ✔
|
||||
deb /usr/bin/sunshine ✔
|
||||
rpm /usr/bin/sunshine ✔
|
||||
AppImage ~/sunshine.AppImage ✖
|
||||
Flatpak flatpak run dev.lizardbyte.sunshine ✖
|
||||
======== ============================================== ===============
|
||||
|
||||
Start once
|
||||
.. code-block:: bash
|
||||
|
||||
systemctl --user start sunshine
|
||||
|
||||
Start on boot
|
||||
.. code-block:: bash
|
||||
|
||||
systemctl --user enable sunshine
|
||||
|
||||
#. Additional Setup for KMS
|
||||
.. Note:: ``cap_sys_admin`` may as well be root, except you don't need to be root to run it. It is necessary to
|
||||
allow Sunshine to use KMS.
|
||||
|
||||
Enable
|
||||
.. code-block:: bash
|
||||
|
||||
sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))
|
||||
|
||||
Disable
|
||||
.. code-block:: bash
|
||||
|
||||
sudo setcap -r $(readlink -f $(which sunshine))
|
||||
|
||||
#. Reboot
|
||||
.. code-block:: bash
|
||||
|
||||
systemctl --user start sunshine
|
||||
sudo reboot now
|
||||
|
||||
Start on boot
|
||||
.. code-block:: bash
|
||||
|
||||
systemctl --user enable sunshine
|
||||
|
||||
Additional Setup for KMS
|
||||
.. Note:: ``cap_sys_admin`` may as well be root, except you don't need to be root to run it. It is necessary to
|
||||
allow Sunshine to use KMS.
|
||||
|
||||
Enable
|
||||
.. code-block:: bash
|
||||
|
||||
sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))
|
||||
|
||||
Disable
|
||||
.. code-block:: bash
|
||||
|
||||
sudo setcap -r $(readlink -f $(which sunshine))
|
||||
|
||||
MacOS
|
||||
macOS
|
||||
^^^^^
|
||||
Sunshine can only access microphones on macOS due to system limitations. To stream system audio use
|
||||
`Soundflower <https://github.com/mattingalls/Soundflower>`_ or
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
:github_url: https://github.com/SunshineStream/Sunshine/tree/nightly/docs/source/building/build.rst
|
||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/building/build.rst
|
||||
|
||||
Build
|
||||
=====
|
||||
@ -14,7 +14,7 @@ Ensure `git <https://git-scm.com/>`_ is installed and run the following:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
git clone https://github.com/sunshinestream/sunshine.git --recurse-submodules
|
||||
git clone https://github.com/lizardbyte/sunshine.git --recurse-submodules
|
||||
cd sunshine && mkdir build && cd build
|
||||
|
||||
Compile
|
||||
@ -22,7 +22,7 @@ Compile
|
||||
See the section specific to your OS.
|
||||
|
||||
- :ref:`Linux <building/linux:linux>`
|
||||
- :ref:`MacOS <building/macos:macos>`
|
||||
- :ref:`macOS <building/macos:macos>`
|
||||
- :ref:`Windows <building/windows:windows>`
|
||||
|
||||
Remote Build
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
:github_url: https://github.com/SunshineStream/Sunshine/tree/nightly/docs/source/building/linux.rst
|
||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/building/linux.rst
|
||||
|
||||
Linux
|
||||
=====
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
:github_url: https://github.com/SunshineStream/Sunshine/tree/nightly/docs/source/building/macos.rst
|
||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/building/macos.rst
|
||||
|
||||
MacOS
|
||||
macOS
|
||||
=====
|
||||
|
||||
Requirements
|
||||
------------
|
||||
MacOS Big Sur and Xcode 12.5+
|
||||
macOS Big Sur and Xcode 12.5+
|
||||
|
||||
Use either `MacPorts <https://www.macports.org>`_ or `Homebrew <https://brew.sh>`_
|
||||
|
||||
@ -35,7 +35,7 @@ Build
|
||||
cmake ..
|
||||
make -j ${nproc}
|
||||
|
||||
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.
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
:github_url: https://github.com/SunshineStream/Sunshine/tree/nightly/docs/source/building/windows.rst
|
||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/building/windows.rst
|
||||
|
||||
Windows
|
||||
=======
|
||||
|
||||
@ -83,7 +83,7 @@ html_theme_options = {
|
||||
'prev_next_buttons_location': 'bottom',
|
||||
'style_external_links': True,
|
||||
'vcs_pageview_mode': 'blob',
|
||||
# 'style_nav_header_background': 'white',
|
||||
'style_nav_header_background': '#151515',
|
||||
# Toc options
|
||||
'collapse_navigation': True,
|
||||
'sticky_navigation': True,
|
||||
|
||||
@ -1,7 +1,12 @@
|
||||
:github_url: https://github.com/SunshineStream/Sunshine/tree/nightly/docs/source/contributing/contributing.rst
|
||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/contributing/contributing.rst
|
||||
|
||||
Contributing
|
||||
============
|
||||
|
||||
.. Tip:: If this is your first time contributing to an open source project, it is a good idea to read
|
||||
MDN's `Basic etiquette for open source projects`_ first. There are a few best practices to adopt that will help
|
||||
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
|
||||
|
||||
@ -30,3 +35,5 @@ Contributing
|
||||
- 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,4 +1,4 @@
|
||||
:github_url: https://github.com/SunshineStream/Sunshine/tree/nightly/docs/source/contributing/localization.rst
|
||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/contributing/localization.rst
|
||||
|
||||
Localization
|
||||
============
|
||||
@ -25,7 +25,7 @@ Only elements of the API are planned to be translated.
|
||||
.. Attention:: The rest API has not yet been implemented.
|
||||
|
||||
Translations Basics
|
||||
- The brand names `SunshineStream` and `Sunshine` should never be translated.
|
||||
- The brand names `LizardByte` and `Sunshine` should never be translated.
|
||||
- Other brand names should never be translated.
|
||||
Examples:
|
||||
|
||||
@ -67,7 +67,7 @@ any of the following paths are modified.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
- 'sunshine/**'
|
||||
- 'src/**'
|
||||
|
||||
When testing locally it may be desirable to manually extract, initialize, update, and compile strings. Python is
|
||||
required for this, along with the python dependencies in the `./scripts/requirements.txt` file. Additionally,
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
:github_url: https://github.com/SunshineStream/Sunshine/tree/nightly/docs/source/index.rst
|
||||
|
||||
SunshineStream has this documentation hosted on `Read the Docs <http://sunshinestream.readthedocs.io/>`_.
|
||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/index.rst
|
||||
|
||||
Table of Contents
|
||||
=================
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
:github_url: https://github.com/SunshineStream/Sunshine/tree/nightly/docs/source/troubleshooting/general.rst
|
||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/troubleshooting/general.rst
|
||||
|
||||
General
|
||||
=======
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
:github_url: https://github.com/SunshineStream/Sunshine/tree/nightly/docs/source/troubleshooting/linux.rst
|
||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/troubleshooting/linux.rst
|
||||
|
||||
Linux
|
||||
=====
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
:github_url: https://github.com/SunshineStream/Sunshine/tree/nightly/docs/source/troubleshooting/macos.rst
|
||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/troubleshooting/macos.rst
|
||||
|
||||
MacOS
|
||||
macOS
|
||||
=====
|
||||
If you get this error:
|
||||
|
||||
@ -12,3 +12,18 @@ If you get this error:
|
||||
.. code-block:: bash
|
||||
|
||||
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,4 +1,4 @@
|
||||
:github_url: https://github.com/SunshineStream/Sunshine/tree/nightly/docs/source/troubleshooting/windows.rst
|
||||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/troubleshooting/windows.rst
|
||||
|
||||
Windows
|
||||
=======
|
||||
|
||||
55
packaging/linux/aur/PKGBUILD
Normal file
55
packaging/linux/aur/PKGBUILD
Normal file
@ -0,0 +1,55 @@
|
||||
# Edit on github: https://github.com/LizardByte/Sunshine/tree/nightly/packaging/linux/aur/PKGBUILD
|
||||
# Reference: https://wiki.archlinux.org/title/PKGBUILD
|
||||
|
||||
pkgname=@SUNSHINE_AUR_PKG@
|
||||
pkgver=@PROJECT_VERSION@@SUNSHINE_SUB_VERSION@
|
||||
pkgrel=1
|
||||
pkgdesc="@PROJECT_DESCRIPTION@"
|
||||
arch=('x86_64' 'i686')
|
||||
url=@PROJECT_HOMEPAGE_URL@
|
||||
license=('GPL3')
|
||||
|
||||
depends=('avahi' 'boost-libs' 'ffmpeg4.4' 'libevdev' 'libpulse' 'libx11' 'libxcb' 'libxfixes' 'libxrandr' 'libxtst' 'openssl' 'opus' 'udev')
|
||||
makedepends=('boost' 'cmake' 'git' 'make')
|
||||
optdepends=('cuda' 'libcap' 'libdrm')
|
||||
|
||||
provides=(@SUNSHINE_AUR_PROVIDES@)
|
||||
conflicts=(@SUNSHINE_AUR_CONFLICTS@)
|
||||
|
||||
source=("$pkgname::git+@GITHUB_CLONE_URL@#commit=@GITHUB_COMMIT@")
|
||||
sha256sums=('SKIP')
|
||||
|
||||
prepare() {
|
||||
cd "$pkgname"
|
||||
git submodule update --recursive --init
|
||||
}
|
||||
|
||||
build() {
|
||||
export CFLAGS="${CFLAGS/-Werror=format-security/}"
|
||||
export CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
|
||||
|
||||
cmake \
|
||||
-S "$pkgname" \
|
||||
-B build \
|
||||
-Wno-dev \
|
||||
-D SUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
|
||||
-D CMAKE_INSTALL_PREFIX="/usr" \
|
||||
-D SUNSHINE_ASSETS_DIR="share/sunshine/assets" \
|
||||
-D SUNSHINE_CONFIG_DIR="share/sunshine/config" \
|
||||
-D LIBAVCODEC_INCLUDE_DIR=/usr/include/ffmpeg4.4 \
|
||||
-D LIBAVCODEC_LIBRARIES=/usr/lib/ffmpeg4.4/libavcodec.so \
|
||||
-D LIBAVDEVICE_INCLUDE_DIR=/usr/include/ffmpeg4.4 \
|
||||
-D LIBAVDEVICE_LIBRARIES=/usr/lib/ffmpeg4.4/libavdevice.so \
|
||||
-D LIBAVFORMAT_INCLUDE_DIR=/usr/include/ffmpeg4.4 \
|
||||
-D LIBAVFORMAT_LIBRARIES=/usr/lib/ffmpeg4.4/libavformat.so \
|
||||
-D LIBAVUTIL_INCLUDE_DIR=/usr/include/ffmpeg4.4 \
|
||||
-D LIBAVUTIL_LIBRARIES=/usr/lib/ffmpeg4.4/libavutil.so \
|
||||
-D LIBSWSCALE_INCLUDE_DIR=/usr/include/ffmpeg4.4 \
|
||||
-D LIBSWSCALE_LIBRARIES=/usr/lib/ffmpeg4.4/libswscale.so
|
||||
|
||||
make -C build
|
||||
}
|
||||
|
||||
package() {
|
||||
make -C build install DESTDIR="$pkgdir"
|
||||
}
|
||||
216
packaging/linux/flatpak/dev.lizardbyte.sunshine.yml
Normal file
216
packaging/linux/flatpak/dev.lizardbyte.sunshine.yml
Normal file
@ -0,0 +1,216 @@
|
||||
---
|
||||
app-id: dev.lizardbyte.sunshine
|
||||
runtime: org.freedesktop.Platform
|
||||
runtime-version: "21.08"
|
||||
sdk: org.freedesktop.Sdk
|
||||
command: sunshine
|
||||
separate-locales: false
|
||||
finish-args:
|
||||
- --device=all
|
||||
- --env=PULSE_PROP_media.category=Manager
|
||||
- --persist=.config/sunshine
|
||||
- --share=ipc
|
||||
- --share=network
|
||||
- --socket=pulseaudio
|
||||
- --socket=wayland
|
||||
- --socket=x11
|
||||
- --system-talk-name=org.freedesktop.Avahi
|
||||
- --talk-name=org.freedesktop.Flatpak
|
||||
|
||||
cleanup:
|
||||
- /include
|
||||
- /lib/cmake
|
||||
- /lib/pkgconfig
|
||||
- /lib/*.la
|
||||
- /lib/*.a
|
||||
- /share
|
||||
|
||||
modules:
|
||||
- name: cuda
|
||||
disabled: false
|
||||
buildsystem: simple
|
||||
only-arches:
|
||||
- x86_64
|
||||
- aarch64
|
||||
cleanup:
|
||||
- '*'
|
||||
build-commands:
|
||||
- chmod u+x ./cuda.run
|
||||
- ./cuda.run --silent --toolkit --toolkitpath=$FLATPAK_DEST/cuda --no-opengl-libs --no-man-page --no-drm --tmpdir=$FLATPAK_BUILDER_BUILDDIR # yamllint disable-line rule:line-length
|
||||
- rm -r $FLATPAK_DEST/cuda/nsight-systems-2021.3.2
|
||||
- rm ./cuda.run
|
||||
sources:
|
||||
- type: file
|
||||
only-arches:
|
||||
- x86_64
|
||||
url: https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux.run
|
||||
sha256: bbd87ca0e913f837454a796367473513cddef555082e4d86ed9a38659cc81f0a
|
||||
dest-filename: cuda.run
|
||||
- type: file
|
||||
only-arches:
|
||||
- aarch64
|
||||
url: https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux_sbsa.run # yamllint disable-line rule:line-length
|
||||
sha256: f2c4a52e06329606c8dfb7c5ea3f4cb4c0b28f9d3fdffeeb734fcc98daf580d8
|
||||
dest-filename: cuda.run
|
||||
|
||||
- name: boost
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
- ./bootstrap.sh --prefix=$FLATPAK_DEST --with-libraries=system,thread,log
|
||||
- ./b2 install variant=release link=static,shared runtime-link=shared cxxflags="$CXXFLAGS" linkflags="$LDFLAGS" -j $FLATPAK_BUILDER_N_JOBS # yamllint disable-line rule:line-length
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://boostorg.jfrog.io/artifactory/main/release/1.79.0/source/boost_1_79_0.tar.bz2
|
||||
sha256: 475d589d51a7f8b3ba2ba4eda022b170e562ca3b760ee922c146b6c65856ef39
|
||||
|
||||
- name: ffmpeg
|
||||
config-opts:
|
||||
- --enable-gpl
|
||||
- --disable-static
|
||||
- --enable-shared
|
||||
- --disable-doc
|
||||
- --disable-programs
|
||||
- --disable-decoders
|
||||
- --enable-libfontconfig
|
||||
- --enable-libfreetype
|
||||
- --enable-libopus
|
||||
- --enable-libvorbis
|
||||
- --enable-libvpx
|
||||
- --enable-libx264
|
||||
- --enable-libx265
|
||||
- --enable-nvenc
|
||||
- --enable-encoder=h264_v4l2m2m
|
||||
- --enable-encoder=hevc_v4l2m2m
|
||||
# - --enable-nonfree
|
||||
# - --enable-cuda-nvcc
|
||||
# - --enable-libnpp
|
||||
# - --extra-cflags=-I${FLATPAK_DEST}/cuda/include
|
||||
# - --extra-ldflags=-L${FLATPAK_DEST}/cuda/lib64
|
||||
# - --nvccflags="-gencode arch=compute_52,code=sm_52 -O2"
|
||||
cleanup:
|
||||
- /share/ffmpeg/examples
|
||||
sources:
|
||||
- type: archive
|
||||
url: http://archive.ubuntu.com/ubuntu/pool/universe/f/ffmpeg/ffmpeg_4.4.2.orig.tar.xz
|
||||
sha256: af419a7f88adbc56c758ab19b4c708afbcae15ef09606b82b855291f6a6faa93
|
||||
modules:
|
||||
- name: vmaf
|
||||
buildsystem: meson
|
||||
subdir: libvmaf
|
||||
cleanup:
|
||||
- /bin
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://github.com/Netflix/vmaf/archive/refs/tags/v2.3.1.tar.gz
|
||||
sha256: 8d60b1ddab043ada25ff11ced821da6e0c37fd7730dd81c24f1fc12be7293ef2
|
||||
- name: x264
|
||||
config-opts:
|
||||
- --disable-cli
|
||||
- --enable-shared
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://code.videolan.org/videolan/x264/-/archive/stable/x264-stable.tar.bz2
|
||||
sha256: 8fedb184045722d8cc39353099373a5b7350171d0964d01fff8eced21b959b29
|
||||
- name: x265
|
||||
buildsystem: cmake-ninja
|
||||
builddir: true
|
||||
subdir: source
|
||||
config-opts:
|
||||
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
- -DENABLE_CLI=OFF
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://bitbucket.org/multicoreware/x265_git/downloads/x265_3.5.tar.gz
|
||||
sha256: e70a3335cacacbba0b3a20ec6fecd6783932288ebc8163ad74bcc9606477cae8
|
||||
- name: ffnvcodec
|
||||
no-autogen: true
|
||||
make-install-args:
|
||||
- PREFIX=${FLATPAK_DEST}
|
||||
cleanup:
|
||||
- '*'
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://github.com/FFmpeg/nv-codec-headers/archive/refs/tags/n11.1.5.1.tar.gz
|
||||
sha256: d095fbd56aa93772471a323be0ebe65504a0f43f06c76a30b6d25da77b06ae9c
|
||||
|
||||
- name: avahi
|
||||
cleanup:
|
||||
- /bin
|
||||
- /lib/avahi
|
||||
- /share/applications/*.desktop
|
||||
- /share/avahi
|
||||
config-opts:
|
||||
- --with-distro=none
|
||||
- --disable-gobject
|
||||
- --disable-introspection
|
||||
- --disable-qt3
|
||||
- --disable-qt4
|
||||
- --disable-qt5
|
||||
- --disable-gtk
|
||||
- --disable-core-docs
|
||||
- --disable-manpages
|
||||
- --disable-libdaemon
|
||||
- --disable-python
|
||||
- --disable-pygobject
|
||||
- --disable-mono
|
||||
- --disable-monodoc
|
||||
- --disable-autoipd
|
||||
- --disable-doxygen-doc
|
||||
- --disable-doxygen-dot
|
||||
- --disable-doxygen-xml
|
||||
- --disable-doxygen-html
|
||||
- --disable-manpages
|
||||
- --disable-xmltoman
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://avahi.org/download/avahi-0.8.tar.gz
|
||||
sha256: 060309d7a333d38d951bc27598c677af1796934dbd98e1024e7ad8de798fedda
|
||||
modules:
|
||||
- name: libevent
|
||||
cleanup:
|
||||
- /bin
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz # yamllint disable-line rule:line-length
|
||||
sha256: 92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb
|
||||
|
||||
- name: libevdev
|
||||
buildsystem: meson
|
||||
cleanup:
|
||||
- /bin
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://www.freedesktop.org/software/libevdev/libevdev-1.12.1.tar.xz
|
||||
sha256: 1dbba41bc516d3ca7abc0da5b862efe3ea8a7018fa6e9b97ce9d39401b22426c
|
||||
modules:
|
||||
- name: libcheck
|
||||
buildsystem: cmake
|
||||
cleanup:
|
||||
- /bin
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://github.com/libcheck/check/archive/refs/tags/0.15.2.tar.gz
|
||||
sha256: 998d355294bb94072f40584272cf4424571c396c631620ce463f6ea97aa67d2e
|
||||
|
||||
- name: sunshine
|
||||
buildsystem: cmake
|
||||
no-make-install: false
|
||||
builddir: true
|
||||
build-options:
|
||||
cxxflags: -I${C_INCLUDE_PATH}/libevdev-1.0
|
||||
config-opts:
|
||||
- -DCMAKE_BUILD_TYPE=Release
|
||||
- -DCMAKE_INSTALL_PREFIX=/app
|
||||
- -DCMAKE_CUDA_COMPILER=/app/cuda/bin/nvcc
|
||||
- -DSUNSHINE_ASSETS_DIR=assets
|
||||
- -DSUNSHINE_CONFIG_DIR=config
|
||||
- -DSUNSHINE_EXECUTABLE_PATH=/app/bin/sunshine
|
||||
- -DSUNSHINE_ENABLE_WAYLAND=ON
|
||||
- -DSUNSHINE_ENABLE_X11=ON
|
||||
- -DSUNSHINE_ENABLE_DRM=ON
|
||||
- -DSUNSHINE_ENABLE_CUDA=ON
|
||||
sources:
|
||||
- type: git
|
||||
url: '@GITHUB_CLONE_URL@'
|
||||
branch: '@GITHUB_BRANCH@'
|
||||
commit: '@GITHUB_COMMIT@'
|
||||
84
packaging/macos/Portfile
Normal file
84
packaging/macos/Portfile
Normal file
@ -0,0 +1,84 @@
|
||||
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
|
||||
|
||||
# initial PR into macports: https://github.com/macports/macports-ports/pull/15143
|
||||
|
||||
PortSystem 1.0
|
||||
PortGroup cmake 1.1
|
||||
PortGroup github 1.0
|
||||
PortGroup boost 1.0
|
||||
|
||||
name @PROJECT_NAME@
|
||||
version @PROJECT_VERSION@
|
||||
revision 0
|
||||
categories multimedia emulators games
|
||||
platforms darwin
|
||||
license GPL-3
|
||||
maintainers @LizardByte
|
||||
description @PROJECT_DESCRIPTION@
|
||||
|
||||
# long_description will not be split into multiple lines as it's configured by CMakeLists
|
||||
long_description @PROJECT_LONG_DESCRIPTION@
|
||||
homepage @PROJECT_HOMEPAGE_URL@
|
||||
master_sites https://github.com/lizardbyte/sunshine/releases
|
||||
|
||||
compiler.cxx_standard 2017
|
||||
fetch.type git
|
||||
|
||||
git.url @GITHUB_CLONE_URL@
|
||||
git.branch @GITHUB_COMMIT@
|
||||
|
||||
post-fetch {
|
||||
system -W ${worksrcpath} "${git.cmd} submodule update --init --recursive"
|
||||
}
|
||||
|
||||
depends_lib port:avahi \
|
||||
port:ffmpeg \
|
||||
port:libopus
|
||||
|
||||
boost.version 1.76
|
||||
|
||||
configure.args -DCMAKE_INSTALL_PREFIX=${prefix} \
|
||||
-DSUNSHINE_ASSETS_DIR=etc/sunshine/assets \
|
||||
-DSUNSHINE_CONFIG_DIR=etc/sunshine/config
|
||||
|
||||
startupitem.create yes
|
||||
startupitem.executable "${prefix}/bin/{$name}"
|
||||
startupitem.location LaunchDaemons
|
||||
startupitem.name ${name}
|
||||
startupitem.netchange yes
|
||||
|
||||
platform darwin {
|
||||
if { ${os.major} < 20 } {
|
||||
# See: https://github.com/LizardByte/Sunshine/discussions/117#discussioncomment-2513494
|
||||
notes-append "Port is limited to software encoding, when used with macOS releases prior to Big Sur."
|
||||
}
|
||||
}
|
||||
|
||||
# destroot not required as cmake install directive handles moving files
|
||||
|
||||
# # Rename files in `destroot`
|
||||
# post-destroot {
|
||||
# file rename ${destroot}${prefix}/etc/${name}/config/sunshine.conf ${destroot}${prefix}/etc/${name}/config/sunshine.conf.sample
|
||||
# file rename ${destroot}${prefix}/etc/${name}/config/apps.json ${destroot}${prefix}/etc/${name}/config/apps.json.sample
|
||||
# }
|
||||
|
||||
# # Don't overwrite existing preference files
|
||||
# post-activate {
|
||||
# if {![file exists ${prefix}/etc/${name}/config/sunshine.conf]} {
|
||||
# file copy ${destroot}${prefix}/etc/${name}/config/sunshine.conf.sample \
|
||||
# ${prefix}/etc/${name}/config/sunshine.conf
|
||||
# }
|
||||
# if {![file exists ${prefix}/etc/${name}/config/apps.json]} {
|
||||
# file copy ${destroot}${prefix}/etc/${name}/config/apps.json.sample \
|
||||
# ${prefix}/etc/${name}/config/apps.json
|
||||
# }
|
||||
# }
|
||||
|
||||
# disabled not overwriting config files... these are the default config files required by Sunshine
|
||||
# this did not work with pkg created by macports
|
||||
# we should always install the default files and user should start sunshine like "sunshine <path to user config file>"
|
||||
# if the file doesn't exist sunshine will copy the default config to that location
|
||||
notes-append "Run @PROJECT_NAME@ by executing 'sunshine <path to user config>', e.g. 'sunshine ~/sunshine.conf' "
|
||||
notes-append "The config file will be created if it doesn't exist."
|
||||
notes-append "It is recommended to set a location for the apps file in the config."
|
||||
notes-append "See our documentation at 'https://docs.lizardbyte.dev/projects/sunshine/en/v@PROJECT_VERSION@/' for further info."
|
||||
@ -13,12 +13,12 @@ import os
|
||||
import subprocess
|
||||
|
||||
project_name = 'Sunshine'
|
||||
project_owner = 'SunshineStream'
|
||||
project_owner = 'LizardByte'
|
||||
|
||||
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
root_dir = os.path.dirname(script_dir)
|
||||
locale_dir = os.path.join(root_dir, 'locale')
|
||||
project_dir = os.path.join(root_dir, project_name.lower())
|
||||
project_dir = os.path.join(root_dir, 'src')
|
||||
|
||||
year = datetime.datetime.now().year
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ 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/sunshinestream/sunshine.git}"
|
||||
SUNSHINE_GIT_URL="${SUNSHINE_GIT_URL:-https://github.com/lizardbyte/sunshine.git}"
|
||||
|
||||
|
||||
SUNSHINE_ENABLE_WAYLAND=${SUNSHINE_ENABLE_WAYLAND:-ON}
|
||||
|
||||
@ -28,7 +28,7 @@ absolute_path() {
|
||||
CMAKE_BUILD_TYPE="-e CMAKE_BUILD_TYPE=Release"
|
||||
SUNSHINE_PACKAGE_BUILD=OFF
|
||||
SUNSHINE_PACKAGE_EXTENSION=deb
|
||||
SUNSHINE_GIT_URL=https://github.com/sunshinestream/sunshine.git
|
||||
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
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
Babel==2.9.1
|
||||
Babel==2.10.3
|
||||
m2r2==0.3.2
|
||||
Sphinx==4.5.0
|
||||
Sphinx==5.1.1
|
||||
sphinx-copybutton==0.5.0
|
||||
sphinx-rtd-theme==1.0.0
|
||||
|
||||
@ -20,7 +20,7 @@ using namespace std::literals;
|
||||
#define PRIVATE_KEY_FILE CA_DIR "/cakey.pem"
|
||||
#define CERTIFICATE_FILE CA_DIR "/cacert.pem"
|
||||
|
||||
#define APPS_JSON_PATH SUNSHINE_CONFIG_DIR "/apps.json"
|
||||
#define APPS_JSON_PATH platf::appdata().string() + "/apps.json"
|
||||
namespace config {
|
||||
|
||||
namespace nv {
|
||||
@ -286,14 +286,14 @@ input_t input {
|
||||
};
|
||||
|
||||
sunshine_t sunshine {
|
||||
2, // min_log_level
|
||||
0, // flags
|
||||
{}, // User file
|
||||
{}, // Username
|
||||
{}, // Password
|
||||
{}, // Password Salt
|
||||
SUNSHINE_CONFIG_DIR "/sunshine.conf", // config file
|
||||
{}, // cmd args
|
||||
2, // min_log_level
|
||||
0, // flags
|
||||
{}, // User file
|
||||
{}, // Username
|
||||
{}, // Password
|
||||
{}, // Password Salt
|
||||
platf::appdata().string() + "/sunshine.conf", // config file
|
||||
{}, // cmd args
|
||||
47989,
|
||||
};
|
||||
|
||||
@ -832,7 +832,7 @@ void start() {
|
||||
X509_NAME_oneline(X509_get_subject_name(x509), subject_name, sizeof(subject_name));
|
||||
|
||||
|
||||
BOOST_LOG(info) << subject_name << " -- "sv << (verified ? "verfied"sv : "denied"sv);
|
||||
BOOST_LOG(info) << subject_name << " -- "sv << (verified ? "verified"sv : "denied"sv);
|
||||
});
|
||||
|
||||
while(add_cert->peek()) {
|
||||
@ -11,8 +11,8 @@
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
|
||||
#include "sunshine/thread_safe.h"
|
||||
#include "sunshine/utility.h"
|
||||
#include "src/thread_safe.h"
|
||||
#include "src/utility.h"
|
||||
|
||||
struct sockaddr;
|
||||
struct AVFrame;
|
||||
@ -161,7 +161,7 @@ struct sink_t {
|
||||
// Play on host PC
|
||||
std::string host;
|
||||
|
||||
// On MacOS and Windows, it is not possible to create a virtual sink
|
||||
// On macOS and Windows, it is not possible to create a virtual sink
|
||||
// Therefore, it is optional
|
||||
struct null_t {
|
||||
std::string stereo;
|
||||
@ -10,11 +10,11 @@
|
||||
#include <pulse/pulseaudio.h>
|
||||
#include <pulse/simple.h>
|
||||
|
||||
#include "sunshine/platform/common.h"
|
||||
#include "src/platform/common.h"
|
||||
|
||||
#include "sunshine/config.h"
|
||||
#include "sunshine/main.h"
|
||||
#include "sunshine/thread_safe.h"
|
||||
#include "src/config.h"
|
||||
#include "src/main.h"
|
||||
#include "src/thread_safe.h"
|
||||
|
||||
namespace platf {
|
||||
using namespace std::literals;
|
||||
@ -11,8 +11,8 @@ extern "C" {
|
||||
|
||||
#include "cuda.h"
|
||||
#include "graphics.h"
|
||||
#include "sunshine/main.h"
|
||||
#include "sunshine/utility.h"
|
||||
#include "src/main.h"
|
||||
#include "src/utility.h"
|
||||
#include "wayland.h"
|
||||
|
||||
#define SUNSHINE_STRINGVIEW_HELPER(x) x##sv
|
||||
@ -1,5 +1,5 @@
|
||||
#include "graphics.h"
|
||||
#include "sunshine/video.h"
|
||||
#include "src/video.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
|
||||
@ -8,9 +8,9 @@
|
||||
#include <glad/gl.h>
|
||||
|
||||
#include "misc.h"
|
||||
#include "sunshine/main.h"
|
||||
#include "sunshine/platform/common.h"
|
||||
#include "sunshine/utility.h"
|
||||
#include "src/main.h"
|
||||
#include "src/platform/common.h"
|
||||
#include "src/utility.h"
|
||||
|
||||
#define SUNSHINE_STRINGIFY_HELPER(x) #x
|
||||
#define SUNSHINE_STRINGIFY(x) SUNSHINE_STRINGIFY_HELPER(x)
|
||||
@ -9,11 +9,11 @@
|
||||
#include <cstring>
|
||||
#include <filesystem>
|
||||
|
||||
#include "sunshine/main.h"
|
||||
#include "sunshine/platform/common.h"
|
||||
#include "sunshine/utility.h"
|
||||
#include "src/main.h"
|
||||
#include "src/platform/common.h"
|
||||
#include "src/utility.h"
|
||||
|
||||
#include "sunshine/platform/common.h"
|
||||
#include "src/platform/common.h"
|
||||
|
||||
// Support older versions
|
||||
#ifndef REL_HWHEEL_HI_RES
|
||||
@ -8,10 +8,10 @@
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
#include "sunshine/main.h"
|
||||
#include "sunshine/platform/common.h"
|
||||
#include "sunshine/round_robin.h"
|
||||
#include "sunshine/utility.h"
|
||||
#include "src/main.h"
|
||||
#include "src/platform/common.h"
|
||||
#include "src/round_robin.h"
|
||||
#include "src/utility.h"
|
||||
|
||||
// Cursor rendering support through x11
|
||||
#include "graphics.h"
|
||||
@ -11,8 +11,8 @@
|
||||
#include "misc.h"
|
||||
#include "vaapi.h"
|
||||
|
||||
#include "sunshine/main.h"
|
||||
#include "sunshine/platform/common.h"
|
||||
#include "src/main.h"
|
||||
#include "src/platform/common.h"
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define SUNSHINE_GNUC_EXTENSION __extension__
|
||||
@ -4,7 +4,7 @@
|
||||
#include <unistd.h>
|
||||
#include <vector>
|
||||
|
||||
#include "sunshine/utility.h"
|
||||
#include "src/utility.h"
|
||||
|
||||
KITTY_USING_MOVE_T(file_t, int, -1, {
|
||||
if(el >= 0) {
|
||||
@ -3,10 +3,10 @@
|
||||
#include <thread>
|
||||
|
||||
#include "misc.h"
|
||||
#include "sunshine/main.h"
|
||||
#include "sunshine/nvhttp.h"
|
||||
#include "sunshine/platform/common.h"
|
||||
#include "sunshine/utility.h"
|
||||
#include "src/main.h"
|
||||
#include "src/nvhttp.h"
|
||||
#include "src/platform/common.h"
|
||||
#include "src/utility.h"
|
||||
|
||||
using namespace std::literals;
|
||||
|
||||
@ -9,10 +9,10 @@ extern "C" {
|
||||
|
||||
#include "graphics.h"
|
||||
#include "misc.h"
|
||||
#include "sunshine/config.h"
|
||||
#include "sunshine/main.h"
|
||||
#include "sunshine/platform/common.h"
|
||||
#include "sunshine/utility.h"
|
||||
#include "src/config.h"
|
||||
#include "src/main.h"
|
||||
#include "src/platform/common.h"
|
||||
#include "src/utility.h"
|
||||
|
||||
using namespace std::literals;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#define SUNSHINE_VAAPI_H
|
||||
|
||||
#include "misc.h"
|
||||
#include "sunshine/platform/common.h"
|
||||
#include "src/platform/common.h"
|
||||
|
||||
namespace egl {
|
||||
struct surface_descriptor_t;
|
||||
@ -4,10 +4,10 @@
|
||||
#include <cstdlib>
|
||||
|
||||
#include "graphics.h"
|
||||
#include "sunshine/main.h"
|
||||
#include "sunshine/platform/common.h"
|
||||
#include "sunshine/round_robin.h"
|
||||
#include "sunshine/utility.h"
|
||||
#include "src/main.h"
|
||||
#include "src/platform/common.h"
|
||||
#include "src/round_robin.h"
|
||||
#include "src/utility.h"
|
||||
#include "wayland.h"
|
||||
|
||||
extern const wl_interface wl_output_interface;
|
||||
@ -1,6 +1,6 @@
|
||||
#include "sunshine/platform/common.h"
|
||||
#include "src/platform/common.h"
|
||||
|
||||
#include "sunshine/main.h"
|
||||
#include "src/main.h"
|
||||
#include "vaapi.h"
|
||||
#include "wayland.h"
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// Created by loki on 6/21/19.
|
||||
//
|
||||
|
||||
#include "sunshine/platform/common.h"
|
||||
#include "src/platform/common.h"
|
||||
|
||||
#include <fstream>
|
||||
|
||||
@ -16,9 +16,9 @@
|
||||
#include <xcb/shm.h>
|
||||
#include <xcb/xfixes.h>
|
||||
|
||||
#include "sunshine/config.h"
|
||||
#include "sunshine/main.h"
|
||||
#include "sunshine/task_pool.h"
|
||||
#include "src/config.h"
|
||||
#include "src/main.h"
|
||||
#include "src/task_pool.h"
|
||||
|
||||
#include "cuda.h"
|
||||
#include "graphics.h"
|
||||
@ -3,8 +3,8 @@
|
||||
|
||||
#include <optional>
|
||||
|
||||
#include "sunshine/platform/common.h"
|
||||
#include "sunshine/utility.h"
|
||||
#include "src/platform/common.h"
|
||||
#include "src/utility.h"
|
||||
|
||||
// X11 Display
|
||||
extern "C" struct _XDisplay;
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
|
||||
#include "sunshine/platform/macos/TPCircularBuffer/TPCircularBuffer.h"
|
||||
#include "third-party/TPCircularBuffer/TPCircularBuffer.h"
|
||||
|
||||
#define kBufferLength 2048
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#ifndef av_img_t_h
|
||||
#define av_img_t_h
|
||||
|
||||
#include "sunshine/platform/common.h"
|
||||
#include "src/platform/common.h"
|
||||
|
||||
#include <CoreMedia/CoreMedia.h>
|
||||
#include <CoreVideo/CoreVideo.h>
|
||||
@ -1,10 +1,10 @@
|
||||
#include "sunshine/platform/common.h"
|
||||
#include "sunshine/platform/macos/av_img_t.h"
|
||||
#include "sunshine/platform/macos/av_video.h"
|
||||
#include "sunshine/platform/macos/nv12_zero_device.h"
|
||||
#include "src/platform/common.h"
|
||||
#include "src/platform/macos/av_img_t.h"
|
||||
#include "src/platform/macos/av_video.h"
|
||||
#include "src/platform/macos/nv12_zero_device.h"
|
||||
|
||||
#include "sunshine/config.h"
|
||||
#include "sunshine/main.h"
|
||||
#include "src/config.h"
|
||||
#include "src/main.h"
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user