mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-01-30 21:32:52 +00:00
Merge pull request #6 from ReenigneArcher/add-build-checks
Automated PR tests and releases
This commit is contained in:
commit
d1a41ad8fe
232
.github/workflows/create_package.yml
vendored
Normal file
232
.github/workflows/create_package.yml
vendored
Normal file
@ -0,0 +1,232 @@
|
||||
name: Create Package
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master, nightly]
|
||||
types: [opened, synchronize, edited, reopened]
|
||||
push:
|
||||
branches: [master]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
check_changelog:
|
||||
name: Check Changelog
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Verify Changelog
|
||||
id: verify_changelog
|
||||
if: ${{ github.ref == 'refs/heads/master' || github.base_ref == 'master' }}
|
||||
# base_ref for pull request check, ref for push
|
||||
uses: SunshineStream/actions/verify_changelog@v0
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
outputs:
|
||||
next_version: ${{ steps.verify_changelog.outputs.changelog_parser_version }}
|
||||
last_version: ${{ steps.verify_changelog.outputs.latest_release_tag_name }}
|
||||
release_body: ${{ steps.verify_changelog.outputs.changelog_parser_description }}
|
||||
|
||||
build_appimage:
|
||||
name: AppImage
|
||||
runs-on: ubuntu-20.04
|
||||
needs: check_changelog
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup Dependencies AppImage
|
||||
run: |
|
||||
mkdir -p artifacts
|
||||
|
||||
sudo apt-get update -y && \
|
||||
sudo apt-get --reinstall install -y \
|
||||
git wget gcc-10 g++-10 build-essential cmake libssl-dev libavdevice-dev libboost-thread-dev libboost-filesystem-dev libboost-log-dev libpulse-dev libopus-dev libxtst-dev libx11-dev libxrandr-dev libxfixes-dev libevdev-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev libdrm-dev libcap-dev libwayland-dev
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
|
||||
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
|
||||
sudo add-apt-repository ppa:savoury1/graphics -y
|
||||
sudo add-apt-repository ppa:savoury1/multimedia -y
|
||||
sudo add-apt-repository ppa:savoury1/ffmpeg4 -y
|
||||
sudo apt-get update -y
|
||||
sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y
|
||||
sudo apt-get install ffmpeg -y
|
||||
- name: Build AppImage
|
||||
run: |
|
||||
CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:-Release}"
|
||||
SUNSHINE_EXECUTABLE_PATH="${SUNSHINE_EXECUTABLE_PATH:-/usr/bin/sunshine}"
|
||||
SUNSHINE_ASSETS_DIR="${SUNSHINE_ASSETS_DIR:-sunshine.AppImage.config}"
|
||||
|
||||
SUNSHINE_ENABLE_WAYLAND=${SUNSHINE_ENABLE_WAYLAND:-ON}
|
||||
SUNSHINE_ENABLE_X11=${SUNSHINE_ENABLE_X11:-ON}
|
||||
SUNSHINE_ENABLE_DRM=${SUNSHINE_ENABLE_DRM:-ON}
|
||||
SUNSHINE_ENABLE_CUDA=${SUNSHINE_ENABLE_CUDA:-ON}
|
||||
|
||||
mkdir -p appimage-build && cd appimage-build
|
||||
|
||||
cmake "-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE" "-DSUNSHINE_EXECUTABLE_PATH=$SUNSHINE_EXECUTABLE_PATH" "-DSUNSHINE_ASSETS_DIR=$SUNSHINE_ASSETS_DIR" "-DSUNSHINE_ENABLE_WAYLAND=$SUNSHINE_ENABLE_WAYLAND" "-DSUNSHINE_ENABLE_X11=$SUNSHINE_ENABLE_X11" "-DSUNSHINE_ENABLE_DRM=$SUNSHINE_ENABLE_DRM" "-DSUNSHINE_ENABLE_CUDA=$SUNSHINE_ENABLE_CUDA" "../" -DCMAKE_INSTALL_PREFIX=/usr
|
||||
|
||||
make -j ${nproc} DESTDIR=AppDir
|
||||
- name: Package AppImage
|
||||
# https://docs.appimage.org/packaging-guide/index.html
|
||||
run: |
|
||||
mkdir -p appimage_temp && cd appimage_temp
|
||||
|
||||
DESKTOP_FILE="${DESKTOP_FILE:-sunshine.desktop}"
|
||||
ICON_FILE="${ICON_FILE:-sunshine.png}"
|
||||
CONFIG_DIR="${CONFIG_DIR:-sunshine/sunshine.AppImage.config/}"
|
||||
HOME_DIR="${HOME_DIR:-sunshine/sunshine.AppImage.home/}"
|
||||
|
||||
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && chmod +x linuxdeploy-x86_64.AppImage
|
||||
|
||||
./linuxdeploy-x86_64.AppImage --appdir ../AppDir -e ../appimage-build/sunshine -i "../$ICON_FILE" -d "../$DESKTOP_FILE" --output appimage
|
||||
|
||||
mv sunshine*.AppImage sunshine.AppImage
|
||||
mkdir sunshine && mv sunshine.AppImage sunshine/
|
||||
./sunshine/sunshine.AppImage --appimage-portable-config
|
||||
./sunshine/sunshine.AppImage --appimage-portable-home
|
||||
cp -r ../assets/* "$CONFIG_DIR"
|
||||
rm -f "$CONFIG_DIR"/apps_windows.json
|
||||
mkdir -p ./"$HOME_DIR"/.config/"$CONFIG_DIR"
|
||||
cp ./"$CONFIG_DIR"/apps_linux.json ./"$HOME_DIR"/.config/"$CONFIG_DIR"
|
||||
zip -r ./sunshine_linux.zip ./sunshine/*
|
||||
|
||||
mv sunshine_linux.zip ../artifacts/
|
||||
- name: Verify AppImage
|
||||
run: |
|
||||
cd appimage_temp
|
||||
wget https://github.com/TheAssassin/appimagelint/releases/download/continuous/appimagelint-x86_64.AppImage && chmod +x appimagelint-x86_64.AppImage && ./appimagelint-x86_64.AppImage ./sunshine/sunshine.AppImage
|
||||
- name: Upload Artifacts
|
||||
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: sunshine-AppImage
|
||||
path: artifacts/
|
||||
- name: Create Release
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
uses: SunshineStream/actions/create_release@v0
|
||||
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_linux:
|
||||
name: Linux
|
||||
runs-on: ubuntu-20.04
|
||||
needs: check_changelog
|
||||
strategy:
|
||||
fail-fast: true # false to test all, true to fail entire job if any fail
|
||||
matrix:
|
||||
distro: [ debian, ubuntu_20_04, ubuntu_21_04, ubuntu_21_10 ] # removed ubuntu_18_04 for now
|
||||
package: [ -p ]
|
||||
include: # don't package these
|
||||
- distro: fedora_33
|
||||
package: ''
|
||||
- distro: fedora_35
|
||||
package: ''
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup Container
|
||||
run: |
|
||||
mkdir -p artifacts
|
||||
|
||||
cd scripts
|
||||
sudo ./build-container.sh -c build -f Dockerfile-${{ matrix.distro }} -n sunshine-${{ matrix.distro }}
|
||||
- name: Build Linux
|
||||
run: |
|
||||
cd scripts
|
||||
sudo ./build-sunshine.sh ${{ matrix.package }} -u -n sunshine-${{ matrix.distro }} -s ..
|
||||
- name: Package Linux
|
||||
if: ${{ matrix.package == '-p' }}
|
||||
run: |
|
||||
cd scripts
|
||||
sudo mv ./sunshine-${{ matrix.distro }}-build/sunshine-${{ matrix.distro }}.deb ../artifacts/
|
||||
- name: Upload Artifacts
|
||||
if: ${{ matrix.package == '-p' && ( github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' ) }}
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: sunshine-${{ matrix.distro }}
|
||||
path: artifacts/
|
||||
- name: Create Release
|
||||
if: ${{ matrix.package == '-p' && github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
uses: SunshineStream/actions/create_release@v0
|
||||
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
|
||||
needs: check_changelog
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: MSYS2 Setup
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
update: true
|
||||
install: >-
|
||||
base-devel
|
||||
git
|
||||
mingw-w64-x86_64-binutils
|
||||
mingw-w64-x86_64-openssl
|
||||
mingw-w64-x86_64-cmake
|
||||
mingw-w64-x86_64-toolchain
|
||||
mingw-w64-x86_64-opus
|
||||
mingw-w64-x86_64-x265
|
||||
mingw-w64-x86_64-boost
|
||||
git
|
||||
yasm
|
||||
nasm
|
||||
diffutils
|
||||
make
|
||||
- name: Build Windows
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
mkdir sunshine-windows-build && cd sunshine-windows-build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DSUNSHINE_ASSETS_DIR=assets -G "MinGW Makefiles" ..
|
||||
mingw32-make -j2
|
||||
- name: Package Windows
|
||||
run: |
|
||||
cd sunshine-windows-build
|
||||
del ..\assets\apps_linux.json
|
||||
7z a Sunshine-Windows.zip ..\assets
|
||||
7z a Sunshine-Windows.zip sunshine.exe
|
||||
7z a Sunshine-Windows.zip tools\dxgi-info.exe
|
||||
7z a Sunshine-Windows.zip tools\audio-info.exe
|
||||
7z a Sunshine-Windows.zip tools\sunshinesvc.exe
|
||||
7z a Sunshine-Windows.zip ..\tools\install-service.bat
|
||||
7z a Sunshine-Windows.zip ..\tools\uninstall-service.bat
|
||||
cd ..
|
||||
mkdir artifacts
|
||||
move "sunshine-windows-build\Sunshine-Windows.zip" "artifacts"
|
||||
- name: Upload Artifacts
|
||||
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: sunshine-${{ runner.os }}
|
||||
path: artifacts/
|
||||
- name: Create Release
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
uses: SunshineStream/actions/create_release@v0
|
||||
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 }}
|
7
CHANGELOG.md
Normal file
7
CHANGELOG.md
Normal file
@ -0,0 +1,7 @@
|
||||
# Changelog
|
||||
|
||||
## [Unreleased] - 2022-01-10
|
||||
### Added
|
||||
-Added something
|
||||
### Changed
|
||||
-Fixed something
|
@ -4,9 +4,9 @@ services:
|
||||
environment:
|
||||
matrix:
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
|
||||
DOCKERFILE: Dockerfile-2004
|
||||
DOCKERFILE: Dockerfile-ubuntu_20_04
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
|
||||
DOCKERFILE: Dockerfile-2104
|
||||
DOCKERFILE: Dockerfile-ubuntu_21_04
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
|
||||
DOCKERFILE: Dockerfile-debian
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||
|
@ -1,18 +0,0 @@
|
||||
FROM ubuntu:20.04 AS sunshine-2004
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG TZ="Europe/London"
|
||||
|
||||
RUN apt-get update -y && \
|
||||
apt-get install -y \
|
||||
git wget gcc-10 g++-10 build-essential cmake libssl-dev libavdevice-dev libboost-thread-dev libboost-filesystem-dev libboost-log-dev libpulse-dev libopus-dev libxtst-dev libx11-dev libxrandr-dev libxfixes-dev libevdev-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev libdrm-dev libcap-dev libwayland-dev
|
||||
|
||||
RUN cp /usr/bin/gcc-10 /usr/bin/gcc && cp /usr/bin/g++-10 /usr/bin/gcc-10
|
||||
|
||||
RUN wget https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux.run --progress=bar:force:noscroll -q --show-progress -O /root/cuda.run && chmod a+x /root/cuda.run
|
||||
RUN /root/cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm && rm /root/cuda.run
|
||||
|
||||
COPY build-private.sh /root/build.sh
|
||||
|
||||
|
||||
ENTRYPOINT ["/root/build.sh"]
|
@ -1,13 +0,0 @@
|
||||
FROM ubuntu:21.04 AS sunshine-2104
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG TZ="Europe/London"
|
||||
|
||||
RUN apt-get update -y && \
|
||||
apt-get install -y \
|
||||
git build-essential cmake libssl-dev libavdevice-dev libboost-thread-dev libboost-filesystem-dev libboost-log-dev libpulse-dev libopus-dev libxtst-dev libx11-dev libxrandr-dev libxfixes-dev libevdev-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev libdrm-dev libcap-dev libwayland-dev nvidia-cuda-dev nvidia-cuda-toolkit
|
||||
|
||||
COPY build-private.sh /root/build.sh
|
||||
|
||||
|
||||
ENTRYPOINT ["/root/build.sh"]
|
@ -3,10 +3,35 @@ FROM debian:bullseye AS sunshine-debian
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG TZ="Europe/London"
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
RUN echo deb http://deb.debian.org/debian/ bullseye main contrib non-free | tee /etc/apt/sources.list.d/non-free.list
|
||||
RUN apt-get update -y && \
|
||||
apt-get install -y \
|
||||
git build-essential cmake libssl-dev libavdevice-dev libboost-thread-dev libboost-filesystem-dev libboost-log-dev libpulse-dev libopus-dev libxtst-dev libx11-dev libxrandr-dev libxfixes-dev libevdev-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev libdrm-dev libcap-dev libwayland-dev nvidia-cuda-dev nvidia-cuda-toolkit
|
||||
build-essential \
|
||||
cmake \
|
||||
git \
|
||||
libavdevice-dev \
|
||||
libboost-thread-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-log-dev \
|
||||
libcap-dev \
|
||||
libdrm-dev \
|
||||
libevdev-dev \
|
||||
libpulse-dev \
|
||||
libopus-dev \
|
||||
libssl-dev \
|
||||
libwayland-dev \
|
||||
libx11-dev \
|
||||
libxcb-shm0-dev \
|
||||
libxcb-xfixes0-dev \
|
||||
libxcb1-dev \
|
||||
libxfixes-dev \
|
||||
libxrandr-dev \
|
||||
libxtst-dev \
|
||||
nvidia-cuda-dev \
|
||||
nvidia-cuda-toolkit \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY build-private.sh /root/build.sh
|
||||
|
||||
|
27
scripts/Dockerfile-fedora_33
Normal file
27
scripts/Dockerfile-fedora_33
Normal file
@ -0,0 +1,27 @@
|
||||
FROM fedora:33 AS sunshine-fedora_33
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
RUN dnf -y update && \
|
||||
dnf -y group install "Development Tools" && \
|
||||
dnf -y install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm && \
|
||||
dnf -y install \
|
||||
boost-devel \
|
||||
boost-static.x86_64 \
|
||||
cmake \
|
||||
ffmpeg-devel \
|
||||
libevdev-devel \
|
||||
libxcb-devel \
|
||||
libX11-devel \
|
||||
libXfixes-devel \
|
||||
libXrandr-devel \
|
||||
libXtst-devel \
|
||||
openssl-devel \
|
||||
opus-devel \
|
||||
pulseaudio-libs-devel \
|
||||
&& dnf clean all \
|
||||
&& rm -rf /var/cache/yum
|
||||
|
||||
COPY build-private.sh /root/build.sh
|
||||
|
||||
|
||||
ENTRYPOINT ["/root/build.sh"]
|
32
scripts/Dockerfile-fedora_35
Normal file
32
scripts/Dockerfile-fedora_35
Normal file
@ -0,0 +1,32 @@
|
||||
FROM fedora:35 AS sunshine-fedora_35
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
RUN dnf -y update && \
|
||||
dnf -y group install "Development Tools" && \
|
||||
dnf -y install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm && \
|
||||
dnf -y install \
|
||||
boost-devel \
|
||||
boost-static.x86_64 \
|
||||
cmake \
|
||||
ffmpeg-devel \
|
||||
gcc-c++ \
|
||||
libevdev-devel \
|
||||
libxcb-devel \
|
||||
libX11-devel \
|
||||
libXcursor-devel \
|
||||
libXfixes-devel \
|
||||
libXinerama-devel \
|
||||
libXi-devel \
|
||||
libXrandr-devel \
|
||||
libXtst-devel \
|
||||
mesa-libGL-devel \
|
||||
openssl-devel \
|
||||
opus-devel \
|
||||
pulseaudio-libs-devel \
|
||||
&& dnf clean all \
|
||||
&& rm -rf /var/cache/yum
|
||||
|
||||
COPY build-private.sh /root/build.sh
|
||||
|
||||
|
||||
ENTRYPOINT ["/root/build.sh"]
|
58
scripts/Dockerfile-ubuntu_18_04
Normal file
58
scripts/Dockerfile-ubuntu_18_04
Normal file
@ -0,0 +1,58 @@
|
||||
FROM ubuntu:18.04 AS sunshine-ubuntu_18_04
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG TZ="Europe/London"
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
RUN apt-get update -y && \
|
||||
apt-get install -y \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
gnupg \
|
||||
software-properties-common \
|
||||
wget \
|
||||
&& wget -qO - https://apt.kitware.com/keys/kitware-archive-latest.asc | apt-key add - && \
|
||||
add-apt-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' && \
|
||||
add-apt-repository ppa:ubuntu-toolchain-r/test && \
|
||||
add-apt-repository ppa:savoury1/graphics && \
|
||||
add-apt-repository ppa:savoury1/multimedia && \
|
||||
add-apt-repository ppa:savoury1/ffmpeg4 && \
|
||||
apt-get update -y && \
|
||||
apt-get install -y \
|
||||
build-essential \
|
||||
cmake \
|
||||
ffmpeg \
|
||||
gcc-10 \
|
||||
git \
|
||||
g++-10 \
|
||||
libavdevice-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-log-dev \
|
||||
libboost-regex-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 \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
|
||||
|
||||
RUN wget https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux.run --progress=bar:force:noscroll -q --show-progress -O /root/cuda.run && chmod a+x /root/cuda.run
|
||||
RUN /root/cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm && rm /root/cuda.run
|
||||
|
||||
COPY build-private.sh /root/build.sh
|
||||
|
||||
|
||||
ENTRYPOINT ["/root/build.sh"]
|
42
scripts/Dockerfile-ubuntu_20_04
Normal file
42
scripts/Dockerfile-ubuntu_20_04
Normal file
@ -0,0 +1,42 @@
|
||||
FROM ubuntu:20.04 AS sunshine-ubuntu_20_04
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG TZ="Europe/London"
|
||||
|
||||
RUN apt-get update -y && \
|
||||
apt-get install -y \
|
||||
build-essential \
|
||||
cmake \
|
||||
git \
|
||||
g++-10 \
|
||||
libavdevice-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-log-dev \
|
||||
libboost-thread-dev \
|
||||
libcap-dev \
|
||||
libdrm-dev \
|
||||
libevdev-dev \
|
||||
libpulse-dev \
|
||||
libopus-dev \
|
||||
libssl-dev \
|
||||
libwayland-dev \
|
||||
libx11-dev \
|
||||
libxcb-shm0-dev \
|
||||
libxcb-xfixes0-dev \
|
||||
libxcb1-dev \
|
||||
libxfixes-dev \
|
||||
libxrandr-dev \
|
||||
libxtst-dev \
|
||||
wget \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
|
||||
|
||||
RUN wget https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux.run --progress=bar:force:noscroll -q --show-progress -O /root/cuda.run && chmod a+x /root/cuda.run
|
||||
RUN /root/cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm && rm /root/cuda.run
|
||||
|
||||
COPY build-private.sh /root/build.sh
|
||||
|
||||
|
||||
ENTRYPOINT ["/root/build.sh"]
|
37
scripts/Dockerfile-ubuntu_21_04
Normal file
37
scripts/Dockerfile-ubuntu_21_04
Normal file
@ -0,0 +1,37 @@
|
||||
FROM ubuntu:21.04 AS sunshine-ubuntu_21_04
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG TZ="Europe/London"
|
||||
|
||||
RUN apt-get update -y && \
|
||||
apt-get install -y \
|
||||
build-essential \
|
||||
cmake \
|
||||
git \
|
||||
libavdevice-dev \
|
||||
libboost-thread-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-log-dev \
|
||||
libcap-dev \
|
||||
libdrm-dev \
|
||||
libevdev-dev \
|
||||
libpulse-dev \
|
||||
libopus-dev \
|
||||
libssl-dev \
|
||||
libwayland-dev \
|
||||
libx11-dev \
|
||||
libxcb-shm0-dev \
|
||||
libxcb-xfixes0-dev \
|
||||
libxcb1-dev \
|
||||
libxfixes-dev \
|
||||
libxrandr-dev \
|
||||
libxtst-dev \
|
||||
nvidia-cuda-dev \
|
||||
nvidia-cuda-toolkit \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY build-private.sh /root/build.sh
|
||||
|
||||
|
||||
ENTRYPOINT ["/root/build.sh"]
|
37
scripts/Dockerfile-ubuntu_21_10
Normal file
37
scripts/Dockerfile-ubuntu_21_10
Normal file
@ -0,0 +1,37 @@
|
||||
FROM ubuntu:21.10 AS sunshine-ubuntu_21_10
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG TZ="Europe/London"
|
||||
|
||||
RUN apt-get update -y && \
|
||||
apt-get install -y \
|
||||
build-essential \
|
||||
cmake \
|
||||
git \
|
||||
libavdevice-dev \
|
||||
libboost-thread-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-log-dev \
|
||||
libcap-dev \
|
||||
libdrm-dev \
|
||||
libevdev-dev \
|
||||
libpulse-dev \
|
||||
libopus-dev \
|
||||
libssl-dev \
|
||||
libwayland-dev \
|
||||
libx11-dev \
|
||||
libxcb-shm0-dev \
|
||||
libxcb-xfixes0-dev \
|
||||
libxcb1-dev \
|
||||
libxfixes-dev \
|
||||
libxrandr-dev \
|
||||
libxtst-dev \
|
||||
nvidia-cuda-dev \
|
||||
nvidia-cuda-toolkit \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY build-private.sh /root/build.sh
|
||||
|
||||
|
||||
ENTRYPOINT ["/root/build.sh"]
|
@ -32,13 +32,13 @@ cd scripts
|
||||
|
||||
Then, the sources will be compiled and the debian package generated:
|
||||
```
|
||||
./build-sunshine -p -s ..
|
||||
./build-sunshine.sh -p -s ..
|
||||
```
|
||||
You can run `build-sunshine -p -s ..` again as long as the docker container exists.
|
||||
|
||||
```
|
||||
git pull
|
||||
./build-sunshine -p -s ..
|
||||
./build-sunshine.sh -p -s ..
|
||||
```
|
||||
|
||||
Optionally, the docker container can be removed after you're finished:
|
||||
|
@ -1,4 +1,5 @@
|
||||
#/bin/bash -e
|
||||
#!/bin/bash -e
|
||||
set -e
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 [OPTIONS]"
|
||||
|
@ -1,4 +1,5 @@
|
||||
#!/bin/bash -e
|
||||
set -e
|
||||
|
||||
CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:-Release}"
|
||||
SUNSHINE_EXECUTABLE_PATH="${SUNSHINE_EXECUTABLE_PATH:-/usr/bin/sunshine}"
|
||||
|
@ -1,4 +1,5 @@
|
||||
#/bin/bash -e
|
||||
#!/bin/bash -e
|
||||
set -e
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0"
|
||||
|
12
sunshine.desktop
Normal file
12
sunshine.desktop
Normal file
@ -0,0 +1,12 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=sunshine
|
||||
Exec=sunshine
|
||||
Version=1.0
|
||||
Comment=Host for Moonlight Streaming Client
|
||||
Icon=sunshine
|
||||
Categories=Utility;
|
||||
Terminal=true
|
||||
X-AppImage-Name=sunshine
|
||||
X-AppImage-Version=1.0
|
||||
X-AppImage-Arch=x86_64
|
BIN
sunshine.png
Normal file
BIN
sunshine.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
@ -25,15 +25,18 @@ using namespace std::literals;
|
||||
#define SV(quote) __SV(quote)
|
||||
|
||||
extern "C" {
|
||||
#ifndef __MINGW32__
|
||||
constexpr auto DNS_REQUEST_PENDING = 9506L;
|
||||
constexpr auto DNS_QUERY_REQUEST_VERSION1 = 0x1;
|
||||
constexpr auto DNS_QUERY_RESULTS_VERSION1 = 0x1;
|
||||
#endif
|
||||
|
||||
#define SERVICE_DOMAIN "local"
|
||||
|
||||
constexpr auto SERVICE_INSTANCE_NAME = SV(SERVICE_NAME "." SERVICE_TYPE "." SERVICE_DOMAIN);
|
||||
constexpr auto SERVICE_TYPE_DOMAIN = SV(SERVICE_TYPE "." SERVICE_DOMAIN);
|
||||
|
||||
#ifndef __MINGW32__
|
||||
typedef struct _DNS_SERVICE_INSTANCE {
|
||||
LPWSTR pszInstanceName;
|
||||
LPWSTR pszHostName;
|
||||
@ -53,6 +56,7 @@ typedef struct _DNS_SERVICE_INSTANCE {
|
||||
|
||||
DWORD dwInterfaceIndex;
|
||||
} DNS_SERVICE_INSTANCE, *PDNS_SERVICE_INSTANCE;
|
||||
#endif
|
||||
|
||||
typedef VOID WINAPI DNS_SERVICE_REGISTER_COMPLETE(
|
||||
_In_ DWORD Status,
|
||||
@ -61,6 +65,7 @@ typedef VOID WINAPI DNS_SERVICE_REGISTER_COMPLETE(
|
||||
|
||||
typedef DNS_SERVICE_REGISTER_COMPLETE *PDNS_SERVICE_REGISTER_COMPLETE;
|
||||
|
||||
#ifndef __MINGW32__
|
||||
typedef struct _DNS_SERVICE_CANCEL {
|
||||
PVOID reserved;
|
||||
} DNS_SERVICE_CANCEL, *PDNS_SERVICE_CANCEL;
|
||||
@ -74,6 +79,7 @@ typedef struct _DNS_SERVICE_REGISTER_REQUEST {
|
||||
HANDLE hCredentials;
|
||||
BOOL unicastEnabled;
|
||||
} DNS_SERVICE_REGISTER_REQUEST, *PDNS_SERVICE_REGISTER_REQUEST;
|
||||
#endif
|
||||
|
||||
_FN(_DnsServiceFreeInstance, VOID, (_In_ PDNS_SERVICE_INSTANCE pInstance));
|
||||
_FN(_DnsServiceDeRegister, DWORD, (_In_ PDNS_SERVICE_REGISTER_REQUEST pRequest, _Inout_opt_ PDNS_SERVICE_CANCEL pCancel));
|
||||
|
Loading…
x
Reference in New Issue
Block a user