Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -2,44 +2,35 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
# update pacman
|
# update pacman
|
||||||
pacman --noconfirm -Suy
|
pacman --noconfirm -Syu
|
||||||
|
|
||||||
# install wget
|
|
||||||
pacman --noconfirm -S \
|
|
||||||
wget
|
|
||||||
|
|
||||||
# download working curl
|
|
||||||
wget https://repo.msys2.org/mingw/ucrt64/mingw-w64-ucrt-x86_64-curl-8.8.0-1-any.pkg.tar.zst
|
|
||||||
|
|
||||||
# install dependencies
|
# install dependencies
|
||||||
pacman -U --noconfirm mingw-w64-ucrt-x86_64-curl-8.8.0-1-any.pkg.tar.zst
|
dependencies=(
|
||||||
pacman -Syu --noconfirm --ignore=mingw-w64-ucrt-x86_64-curl \
|
"git"
|
||||||
base-devel \
|
"mingw-w64-ucrt-x86_64-boost"
|
||||||
diffutils \
|
"mingw-w64-ucrt-x86_64-cmake"
|
||||||
gcc \
|
"mingw-w64-ucrt-x86_64-cppwinrt"
|
||||||
git \
|
"mingw-w64-ucrt-x86_64-curl-winssl"
|
||||||
make \
|
"mingw-w64-ucrt-x86_64-miniupnpc"
|
||||||
mingw-w64-ucrt-x86_64-boost \
|
"mingw-w64-ucrt-x86_64-nlohmann-json"
|
||||||
mingw-w64-ucrt-x86_64-cmake \
|
"mingw-w64-ucrt-x86_64-nodejs"
|
||||||
mingw-w64-ucrt-x86_64-cppwinrt \
|
"mingw-w64-ucrt-x86_64-nsis"
|
||||||
mingw-w64-ucrt-x86_64-graphviz \
|
"mingw-w64-ucrt-x86_64-onevpl"
|
||||||
mingw-w64-ucrt-x86_64-miniupnpc \
|
"mingw-w64-ucrt-x86_64-openssl"
|
||||||
mingw-w64-ucrt-x86_64-nlohmann-json \
|
"mingw-w64-ucrt-x86_64-opus"
|
||||||
mingw-w64-ucrt-x86_64-nodejs \
|
"mingw-w64-ucrt-x86_64-toolchain"
|
||||||
mingw-w64-ucrt-x86_64-nsis \
|
)
|
||||||
mingw-w64-ucrt-x86_64-onevpl \
|
pacman -S --noconfirm "${dependencies[@]}"
|
||||||
mingw-w64-ucrt-x86_64-openssl \
|
|
||||||
mingw-w64-ucrt-x86_64-opus \
|
|
||||||
mingw-w64-ucrt-x86_64-rust \
|
|
||||||
mingw-w64-ucrt-x86_64-toolchain
|
|
||||||
|
|
||||||
# build
|
# build
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
cd build || exit 1
|
|
||||||
cmake \
|
cmake \
|
||||||
|
-B build \
|
||||||
|
-G Ninja \
|
||||||
|
-S . \
|
||||||
-DBUILD_DOCS=OFF \
|
-DBUILD_DOCS=OFF \
|
||||||
-G "MinGW Makefiles" ..
|
-DBUILD_WERROR=ON
|
||||||
mingw32-make -j"$(nproc)"
|
ninja -C build
|
||||||
|
|
||||||
# skip autobuild
|
# skip autobuild
|
||||||
echo "skip_autobuild=true" >> "$GITHUB_OUTPUT"
|
echo "skip_autobuild=true" >> "$GITHUB_OUTPUT"
|
||||||
|
|||||||
@@ -2,22 +2,28 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
# install dependencies
|
# install dependencies
|
||||||
brew install \
|
dependencies=(
|
||||||
boost \
|
"boost"
|
||||||
cmake \
|
"cmake"
|
||||||
miniupnpc \
|
"miniupnpc"
|
||||||
node \
|
"ninja"
|
||||||
opus \
|
"node"
|
||||||
pkg-config
|
"openssl@3"
|
||||||
|
"opus"
|
||||||
|
"pkg-config"
|
||||||
|
)
|
||||||
|
brew install "${dependencies[@]}"
|
||||||
|
|
||||||
# build
|
# build
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
cd build || exit 1
|
|
||||||
cmake \
|
cmake \
|
||||||
|
-B build \
|
||||||
|
-G Ninja \
|
||||||
|
-S . \
|
||||||
-DBOOST_USE_STATIC=OFF \
|
-DBOOST_USE_STATIC=OFF \
|
||||||
-DBUILD_DOCS=OFF \
|
-DBUILD_DOCS=OFF \
|
||||||
-G "Unix Makefiles" ..
|
-DBUILD_WERROR=ON
|
||||||
make -j"$(sysctl -n hw.logicalcpu)"
|
ninja -C build
|
||||||
|
|
||||||
# skip autobuild
|
# skip autobuild
|
||||||
echo "skip_autobuild=true" >> "$GITHUB_OUTPUT"
|
echo "skip_autobuild=true" >> "$GITHUB_OUTPUT"
|
||||||
|
|||||||
13
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
13
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
blank_issues_enabled: false
|
||||||
|
contact_links:
|
||||||
|
- name: Support Center
|
||||||
|
url: https://app.lizardbyte.dev/support
|
||||||
|
about: Official LizardByte support
|
||||||
|
- name: Discussions
|
||||||
|
url: https://github.com/orgs/LizardByte/discussions
|
||||||
|
about: Community discussions, questions, and feature requests
|
||||||
187
.github/workflows/update-flathub-repo.yml
vendored
Normal file
187
.github/workflows/update-flathub-repo.yml
vendored
Normal file
@@ -0,0 +1,187 @@
|
|||||||
|
---
|
||||||
|
# This action is a candidate to centrally manage in https://github.com/<organization>/.github/
|
||||||
|
# If more Flathub applications are developed, consider moving this action to the organization's .github repository,
|
||||||
|
# using the `flathub-pkg` repository label to identify repositories that should trigger this workflow.
|
||||||
|
|
||||||
|
# Update Flathub on release events.
|
||||||
|
|
||||||
|
name: Update flathub repo
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [released]
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: "${{ github.workflow }}-${{ github.event.release.tag_name }}"
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-flathub-repo:
|
||||||
|
env:
|
||||||
|
FLATHUB_PKG: dev.lizardbyte.app.${{ github.event.repository.name }}
|
||||||
|
if: >-
|
||||||
|
github.repository_owner == 'LizardByte'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check if flathub repo
|
||||||
|
env:
|
||||||
|
TOPIC: flathub-pkg
|
||||||
|
id: check-label
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const topic = process.env.TOPIC;
|
||||||
|
console.log(`Checking if repo has topic: ${topic}`);
|
||||||
|
|
||||||
|
const repoTopics = await github.rest.repos.getAllTopics({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo
|
||||||
|
});
|
||||||
|
console.log(`Repo topics: ${repoTopics.data.names}`);
|
||||||
|
|
||||||
|
const hasTopic = repoTopics.data.names.includes(topic);
|
||||||
|
console.log(`Has topic: ${hasTopic}`);
|
||||||
|
|
||||||
|
core.setOutput('hasTopic', hasTopic);
|
||||||
|
|
||||||
|
- name: Check if latest GitHub release
|
||||||
|
id: check-release
|
||||||
|
if: >-
|
||||||
|
steps.check-label.outputs.hasTopic == 'true'
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const latestRelease = await github.rest.repos.getLatestRelease({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo
|
||||||
|
});
|
||||||
|
|
||||||
|
core.setOutput('isLatestRelease', latestRelease.data.tag_name === context.payload.release.tag_name);
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
if: >-
|
||||||
|
steps.check-label.outputs.hasTopic == 'true' &&
|
||||||
|
steps.check-release.outputs.isLatestRelease == 'true'
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Checkout flathub-repo
|
||||||
|
if: >-
|
||||||
|
steps.check-label.outputs.hasTopic == 'true' &&
|
||||||
|
steps.check-release.outputs.isLatestRelease == 'true'
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: "flathub/${{ env.FLATHUB_PKG }}"
|
||||||
|
path: "flathub/${{ env.FLATHUB_PKG }}"
|
||||||
|
|
||||||
|
- name: Clean up legacy files
|
||||||
|
if: >-
|
||||||
|
steps.check-label.outputs.hasTopic == 'true' &&
|
||||||
|
steps.check-release.outputs.isLatestRelease == 'true'
|
||||||
|
working-directory: flathub/${{ env.FLATHUB_PKG }}
|
||||||
|
run: |
|
||||||
|
rm -rf ./*
|
||||||
|
|
||||||
|
- name: Copy github files
|
||||||
|
if: >-
|
||||||
|
steps.check-label.outputs.hasTopic == 'true' &&
|
||||||
|
steps.check-release.outputs.isLatestRelease == 'true'
|
||||||
|
working-directory: flathub/${{ env.FLATHUB_PKG }}
|
||||||
|
run: |
|
||||||
|
mkdir -p .github/ISSUE_TEMPLATE
|
||||||
|
|
||||||
|
# sponsors
|
||||||
|
curl -sSL https://github.com/LizardByte/.github/raw/refs/heads/master/.github/FUNDING.yml \
|
||||||
|
-o .github/FUNDING.yml
|
||||||
|
# pull request template
|
||||||
|
curl -sSL https://github.com/LizardByte/.github/raw/refs/heads/master/.github/pull_request_template.md \
|
||||||
|
-o .github/pull_request_template.md
|
||||||
|
# issue config
|
||||||
|
curl -sSL https://github.com/LizardByte/.github/raw/refs/heads/master/.github/ISSUE_TEMPLATE/config.yml \
|
||||||
|
-o .github/ISSUE_TEMPLATE/config.yml
|
||||||
|
|
||||||
|
- name: Download release asset
|
||||||
|
id: download
|
||||||
|
if: >-
|
||||||
|
steps.check-label.outputs.hasTopic == 'true' &&
|
||||||
|
steps.check-release.outputs.isLatestRelease == 'true'
|
||||||
|
uses: robinraju/release-downloader@v1.11
|
||||||
|
with:
|
||||||
|
repository: "${{ github.repository }}"
|
||||||
|
tag: "${{ github.event.release.tag_name }}"
|
||||||
|
fileName: "flathub.tar.gz"
|
||||||
|
tarBall: false
|
||||||
|
zipBall: false
|
||||||
|
out-file-path: "flathub/${{ env.FLATHUB_PKG }}"
|
||||||
|
extract: true
|
||||||
|
|
||||||
|
- name: Delete arhive
|
||||||
|
if: >-
|
||||||
|
steps.check-label.outputs.hasTopic == 'true' &&
|
||||||
|
steps.check-release.outputs.isLatestRelease == 'true'
|
||||||
|
run: |
|
||||||
|
rm -f flathub/${{ env.FLATHUB_PKG }}/flathub.tar.gz
|
||||||
|
|
||||||
|
- name: Update metainfo.xml
|
||||||
|
id: update_metainfo
|
||||||
|
if: >-
|
||||||
|
steps.check-label.outputs.hasTopic == 'true' &&
|
||||||
|
steps.check-release.outputs.isLatestRelease == 'true'
|
||||||
|
run: |
|
||||||
|
xml_file="flathub/${{ env.FLATHUB_PKG }}/${{ env.FLATHUB_PKG }}.metainfo.xml"
|
||||||
|
|
||||||
|
# Extract release information
|
||||||
|
version="${{ github.event.release.tag_name }}" && version="${version#v}"
|
||||||
|
date="${{ github.event.release.published_at }}" && date="${date%%T*}"
|
||||||
|
changelog="${{ github.event.release.body }}" && changelog="${changelog//&/&}" && \
|
||||||
|
changelog="${changelog//</<}" && changelog="${changelog//>/>}"
|
||||||
|
|
||||||
|
# Store the old release information into a temp file to be used for precise replacement
|
||||||
|
tmpfile=$(mktemp)
|
||||||
|
|
||||||
|
# Match the existing <release> block, replace it with the new data
|
||||||
|
awk -v version="$version" -v date="$date" -v changelog="$changelog" '
|
||||||
|
BEGIN { replaced = 0 }
|
||||||
|
/<release version=.*>/ {
|
||||||
|
if (!replaced) {
|
||||||
|
print "<release version=\"" version "\" date=\"" date "\">"
|
||||||
|
print "<description><p>" changelog "</p></description>"
|
||||||
|
print "</release>"
|
||||||
|
replaced = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
!/<release version=.*>/ && !/<\/release>/ { print $0 }
|
||||||
|
' "$xml_file" > "$tmpfile"
|
||||||
|
|
||||||
|
# Move the updated file back to the original location
|
||||||
|
mv "$tmpfile" "$xml_file"
|
||||||
|
|
||||||
|
- name: Update submodule
|
||||||
|
if: >-
|
||||||
|
steps.check-label.outputs.hasTopic == 'true' &&
|
||||||
|
steps.check-release.outputs.isLatestRelease == 'true'
|
||||||
|
run: |
|
||||||
|
# Get the current commit of the submodule in the main repository
|
||||||
|
git submodule update --init packaging/linux/flatpak/deps/shared-modules
|
||||||
|
cd ${{ github.workspace }}/packaging/linux/flatpak/deps/shared-modules
|
||||||
|
main_commit=$(git rev-parse HEAD)
|
||||||
|
|
||||||
|
# update submodules
|
||||||
|
cd ${{ github.workspace }}/flathub/${{ env.FLATHUB_PKG }}
|
||||||
|
git submodule update --init shared-modules
|
||||||
|
cd shared-modules
|
||||||
|
git checkout $main_commit
|
||||||
|
|
||||||
|
- name: Create/Update Pull Request
|
||||||
|
if: >-
|
||||||
|
steps.check-label.outputs.hasTopic == 'true' &&
|
||||||
|
steps.check-release.outputs.isLatestRelease == 'true' &&
|
||||||
|
fromJson(steps.download.outputs.downloaded_files)[0]
|
||||||
|
uses: peter-evans/create-pull-request@v7
|
||||||
|
with:
|
||||||
|
path: "flathub/${{ env.FLATHUB_PKG }}"
|
||||||
|
token: ${{ secrets.GH_BOT_TOKEN }}
|
||||||
|
commit-message: Update ${{ env.FLATHUB_PKG }} to ${{ github.event.release.tag_name }}
|
||||||
|
branch: bot/bump-${{ env.FLATHUB_PKG }}-${{ github.event.release.tag_name }}
|
||||||
|
delete-branch: true
|
||||||
|
title: "chore: Update ${{ env.FLATHUB_PKG }} to ${{ github.event.release.tag_name }}"
|
||||||
|
body: ${{ github.event.release.body }}
|
||||||
4
.gitmodules
vendored
4
.gitmodules
vendored
@@ -1,3 +1,7 @@
|
|||||||
|
[submodule "packaging/linux/flatpak/deps/flatpak-builder-tools"]
|
||||||
|
path = packaging/linux/flatpak/deps/flatpak-builder-tools
|
||||||
|
url = https://github.com/flatpak/flatpak-builder-tools.git
|
||||||
|
branch = master
|
||||||
[submodule "packaging/linux/flatpak/deps/shared-modules"]
|
[submodule "packaging/linux/flatpak/deps/shared-modules"]
|
||||||
path = packaging/linux/flatpak/deps/shared-modules
|
path = packaging/linux/flatpak/deps/shared-modules
|
||||||
url = https://github.com/flathub/shared-modules
|
url = https://github.com/flathub/shared-modules
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
cmake_minimum_required(VERSION 3.18)
|
cmake_minimum_required(VERSION 3.20)
|
||||||
# `CMAKE_CUDA_ARCHITECTURES` requires 3.18
|
# `CMAKE_CUDA_ARCHITECTURES` requires 3.18
|
||||||
# set_source_files_properties requires 3.18
|
# `set_source_files_properties` requires 3.18
|
||||||
|
# `cmake_path(CONVERT ... TO_NATIVE_PATH_LIST ...)` requires 3.20
|
||||||
# todo - set this conditionally
|
# todo - set this conditionally
|
||||||
|
|
||||||
project(Apollo VERSION 0.0.0
|
project(Apollo VERSION 0.0.0
|
||||||
|
|||||||
@@ -227,6 +227,14 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# AppImage and Flatpak
|
||||||
|
if (${SUNSHINE_BUILD_APPIMAGE})
|
||||||
|
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_BUILD_APPIMAGE=1)
|
||||||
|
endif ()
|
||||||
|
if (${SUNSHINE_BUILD_FLATPAK})
|
||||||
|
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_BUILD_FLATPAK=1)
|
||||||
|
endif ()
|
||||||
|
|
||||||
list(APPEND PLATFORM_TARGET_FILES
|
list(APPEND PLATFORM_TARGET_FILES
|
||||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/publish.cpp"
|
"${CMAKE_SOURCE_DIR}/src/platform/linux/publish.cpp"
|
||||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/graphics.h"
|
"${CMAKE_SOURCE_DIR}/src/platform/linux/graphics.h"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
include_guard(GLOBAL)
|
include_guard(GLOBAL)
|
||||||
|
|
||||||
set(BOOST_VERSION 1.85)
|
set(BOOST_VERSION 1.86)
|
||||||
set(BOOST_COMPONENTS
|
set(BOOST_COMPONENTS
|
||||||
filesystem
|
filesystem
|
||||||
locale
|
locale
|
||||||
@@ -15,7 +15,7 @@ if(BOOST_USE_STATIC)
|
|||||||
set(Boost_USE_STATIC_LIBS ON) # cmake-lint: disable=C0103
|
set(Boost_USE_STATIC_LIBS ON) # cmake-lint: disable=C0103
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(Boost ${BOOST_VERSION} COMPONENTS ${BOOST_COMPONENTS})
|
find_package(Boost CONFIG ${BOOST_VERSION} COMPONENTS ${BOOST_COMPONENTS})
|
||||||
if(NOT Boost_FOUND)
|
if(NOT Boost_FOUND)
|
||||||
message(STATUS "Boost v${BOOST_VERSION}.x package not found in the system. Falling back to FetchContent.")
|
message(STATUS "Boost v${BOOST_VERSION}.x package not found in the system. Falling back to FetchContent.")
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
@@ -39,9 +39,9 @@ if(NOT Boost_FOUND)
|
|||||||
set(BOOST_INCLUDE_LIBRARIES
|
set(BOOST_INCLUDE_LIBRARIES
|
||||||
${BOOST_COMPONENTS})
|
${BOOST_COMPONENTS})
|
||||||
set(BOOST_URL
|
set(BOOST_URL
|
||||||
"https://github.com/boostorg/boost/releases/download/boost-1.85.0/boost-1.85.0-cmake.tar.xz")
|
"https://github.com/boostorg/boost/releases/download/boost-1.86.0/boost-1.86.0-cmake.tar.xz")
|
||||||
set(BOOST_HASH
|
set(BOOST_HASH
|
||||||
"MD5=BADEA970931766604D4D5F8F4090B176")
|
"MD5=D02759931CEDC02ADED80402906C5EB6")
|
||||||
|
|
||||||
if(CMAKE_VERSION VERSION_LESS "3.24.0")
|
if(CMAKE_VERSION VERSION_LESS "3.24.0")
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
|
|||||||
@@ -50,8 +50,9 @@ file(COPY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/assets/"
|
|||||||
DESTINATION "${CMAKE_BINARY_DIR}/assets"
|
DESTINATION "${CMAKE_BINARY_DIR}/assets"
|
||||||
PATTERN "shaders" EXCLUDE)
|
PATTERN "shaders" EXCLUDE)
|
||||||
# use junction for shaders directory
|
# use junction for shaders directory
|
||||||
file(TO_NATIVE_PATH "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/assets/shaders" shaders_in_build_src_native)
|
cmake_path(CONVERT "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/assets/shaders"
|
||||||
file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/assets/shaders" shaders_in_build_dest_native)
|
TO_NATIVE_PATH_LIST shaders_in_build_src_native)
|
||||||
|
cmake_path(CONVERT "${CMAKE_BINARY_DIR}/assets/shaders" TO_NATIVE_PATH_LIST shaders_in_build_dest_native)
|
||||||
execute_process(COMMAND cmd.exe /c mklink /J "${shaders_in_build_dest_native}" "${shaders_in_build_src_native}")
|
execute_process(COMMAND cmd.exe /c mklink /J "${shaders_in_build_dest_native}" "${shaders_in_build_src_native}")
|
||||||
|
|
||||||
# set(CPACK_NSIS_MUI_HEADERIMAGE "") # TODO: image should be 150x57 bmp
|
# set(CPACK_NSIS_MUI_HEADERIMAGE "") # TODO: image should be 150x57 bmp
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ set(SUNSHINE_PUBLISHER_ISSUE_URL "https://github.com/ClassicOldSong/Apollo/issue
|
|||||||
|
|
||||||
option(BUILD_DOCS "Build documentation" ON)
|
option(BUILD_DOCS "Build documentation" ON)
|
||||||
option(BUILD_TESTS "Build tests" ON)
|
option(BUILD_TESTS "Build tests" ON)
|
||||||
|
option(NPM_OFFLINE "Use offline npm packages. You must ensure packages are in your npm cache." OFF)
|
||||||
option(TESTS_ENABLE_PYTHON_TESTS "Enable Python tests" ON)
|
option(TESTS_ENABLE_PYTHON_TESTS "Enable Python tests" ON)
|
||||||
|
|
||||||
# DirectX11 is not available in GitHub runners, so even software encoding fails
|
# DirectX11 is not available in GitHub runners, so even software encoding fails
|
||||||
|
|||||||
@@ -40,8 +40,12 @@ elseif(UNIX)
|
|||||||
# configure the flatpak manifest
|
# configure the flatpak manifest
|
||||||
if(${SUNSHINE_CONFIGURE_FLATPAK_MAN})
|
if(${SUNSHINE_CONFIGURE_FLATPAK_MAN})
|
||||||
configure_file(packaging/linux/flatpak/${PROJECT_FQDN}.yml ${PROJECT_FQDN}.yml @ONLY)
|
configure_file(packaging/linux/flatpak/${PROJECT_FQDN}.yml ${PROJECT_FQDN}.yml @ONLY)
|
||||||
|
configure_file(packaging/linux/flatpak/${PROJECT_FQDN}.metainfo.xml
|
||||||
|
${PROJECT_FQDN}.metainfo.xml @ONLY)
|
||||||
file(COPY packaging/linux/flatpak/deps/ DESTINATION ${CMAKE_BINARY_DIR})
|
file(COPY packaging/linux/flatpak/deps/ DESTINATION ${CMAKE_BINARY_DIR})
|
||||||
file(COPY packaging/linux/flatpak/modules DESTINATION ${CMAKE_BINARY_DIR})
|
file(COPY packaging/linux/flatpak/modules DESTINATION ${CMAKE_BINARY_DIR})
|
||||||
|
file(COPY generated-sources.json DESTINATION ${CMAKE_BINARY_DIR})
|
||||||
|
file(COPY package-lock.json DESTINATION ${CMAKE_BINARY_DIR})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -53,10 +53,17 @@ endif()
|
|||||||
|
|
||||||
#WebUI build
|
#WebUI build
|
||||||
find_program(NPM npm REQUIRED)
|
find_program(NPM npm REQUIRED)
|
||||||
|
|
||||||
|
if (NPM_OFFLINE)
|
||||||
|
set(NPM_INSTALL_FLAGS "--offline")
|
||||||
|
else()
|
||||||
|
set(NPM_INSTALL_FLAGS "")
|
||||||
|
endif()
|
||||||
|
|
||||||
add_custom_target(web-ui ALL
|
add_custom_target(web-ui ALL
|
||||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||||
COMMENT "Installing NPM Dependencies and Building the Web UI"
|
COMMENT "Installing NPM Dependencies and Building the Web UI"
|
||||||
COMMAND "$<$<BOOL:${WIN32}>:cmd;/C>" "${NPM}" install
|
COMMAND "$<$<BOOL:${WIN32}>:cmd;/C>" "${NPM}" install ${NPM_INSTALL_FLAGS}
|
||||||
COMMAND "${CMAKE_COMMAND}" -E env "SUNSHINE_BUILD_HOMEBREW=${NPM_BUILD_HOMEBREW}" "SUNSHINE_SOURCE_ASSETS_DIR=${NPM_SOURCE_ASSETS_DIR}" "SUNSHINE_ASSETS_DIR=${NPM_ASSETS_DIR}" "$<$<BOOL:${WIN32}>:cmd;/C>" "${NPM}" run build # cmake-lint: disable=C0301
|
COMMAND "${CMAKE_COMMAND}" -E env "SUNSHINE_BUILD_HOMEBREW=${NPM_BUILD_HOMEBREW}" "SUNSHINE_SOURCE_ASSETS_DIR=${NPM_SOURCE_ASSETS_DIR}" "SUNSHINE_ASSETS_DIR=${NPM_ASSETS_DIR}" "$<$<BOOL:${WIN32}>:cmd;/C>" "${NPM}" run build # cmake-lint: disable=C0301
|
||||||
COMMAND_EXPAND_LISTS
|
COMMAND_EXPAND_LISTS
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
|
|||||||
@@ -34,12 +34,13 @@ dependencies=(
|
|||||||
"graphviz" # Optional, for docs
|
"graphviz" # Optional, for docs
|
||||||
"icu4c" # Optional, if boost is not installed
|
"icu4c" # Optional, if boost is not installed
|
||||||
"miniupnpc"
|
"miniupnpc"
|
||||||
|
"ninja"
|
||||||
"node"
|
"node"
|
||||||
"openssl@3"
|
"openssl@3"
|
||||||
"opus"
|
"opus"
|
||||||
"pkg-config"
|
"pkg-config"
|
||||||
)
|
)
|
||||||
brew install ${dependencies[@]}
|
brew install "${dependencies[@]}"
|
||||||
```
|
```
|
||||||
|
|
||||||
If there are issues with an SSL header that is not found:
|
If there are issues with an SSL header that is not found:
|
||||||
@@ -63,10 +64,11 @@ dependencies=(
|
|||||||
"graphviz" # Optional, for docs
|
"graphviz" # Optional, for docs
|
||||||
"libopus"
|
"libopus"
|
||||||
"miniupnpc"
|
"miniupnpc"
|
||||||
|
"ninja"
|
||||||
"npm9"
|
"npm9"
|
||||||
"pkgconfig"
|
"pkgconfig"
|
||||||
)
|
)
|
||||||
sudo port install ${dependencies[@]}
|
sudo port install "${dependencies[@]}"
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Windows
|
#### Windows
|
||||||
@@ -86,7 +88,7 @@ dependencies=(
|
|||||||
"mingw-w64-ucrt-x86_64-boost" # Optional
|
"mingw-w64-ucrt-x86_64-boost" # Optional
|
||||||
"mingw-w64-ucrt-x86_64-cmake"
|
"mingw-w64-ucrt-x86_64-cmake"
|
||||||
"mingw-w64-ucrt-x86_64-cppwinrt"
|
"mingw-w64-ucrt-x86_64-cppwinrt"
|
||||||
"mingw-w64-ucrt-x86_64-curl"
|
"mingw-w64-ucrt-x86_64-curl-winssl"
|
||||||
"mingw-w64-ucrt-x86_64-graphviz" # Optional, for docs
|
"mingw-w64-ucrt-x86_64-graphviz" # Optional, for docs
|
||||||
"mingw-w64-ucrt-x86_64-miniupnpc"
|
"mingw-w64-ucrt-x86_64-miniupnpc"
|
||||||
"mingw-w64-ucrt-x86_64-nlohmann-json"
|
"mingw-w64-ucrt-x86_64-nlohmann-json"
|
||||||
@@ -97,7 +99,7 @@ dependencies=(
|
|||||||
"mingw-w64-ucrt-x86_64-opus"
|
"mingw-w64-ucrt-x86_64-opus"
|
||||||
"mingw-w64-ucrt-x86_64-toolchain"
|
"mingw-w64-ucrt-x86_64-toolchain"
|
||||||
)
|
)
|
||||||
pacman -S ${dependencies[@]}
|
pacman -S "${dependencies[@]}"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Clone
|
### Clone
|
||||||
|
|||||||
@@ -53,22 +53,24 @@ CUDA is used for NVFBC capture.
|
|||||||
<td>sunshine-ubuntu-24.04-{arch}.deb</td>
|
<td>sunshine-ubuntu-24.04-{arch}.deb</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td rowspan="2">12.0.0</td>
|
<td rowspan="1">12.0.0</td>
|
||||||
<td rowspan="4">525.60.13</td>
|
<td rowspan="3">525.60.13</td>
|
||||||
<td rowspan="4">50;52;60;61;62;70;72;75;80;86;87;89;90</td>
|
<td rowspan="4">50;52;60;61;62;70;72;75;80;86;87;89;90</td>
|
||||||
<td>sunshine_{arch}.flatpak</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>sunshine-debian-bookworm-{arch}.deb</td>
|
<td>sunshine-debian-bookworm-{arch}.deb</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>12.4.0</td>
|
<td rowspan="1">12.4.0</td>
|
||||||
<td>sunshine-fedora-39-{arch}.rpm</td>
|
<td>sunshine-fedora-39-{arch}.rpm</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>12.5.1</td>
|
<td rowspan="1">12.5.1</td>
|
||||||
<td>sunshine.pkg.tar.zst</td>
|
<td>sunshine.pkg.tar.zst</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td rowspan="1">12.6.2</td>
|
||||||
|
<td rowspan="1">560.35.03</td>
|
||||||
|
<td>sunshine_{arch}.flatpak</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>n/a</td>
|
<td>n/a</td>
|
||||||
<td>n/a</td>
|
<td>n/a</td>
|
||||||
@@ -188,21 +190,30 @@ sudo dnf remove sunshine
|
|||||||
#### Flatpak
|
#### Flatpak
|
||||||
@caution{Use distro-specific packages instead of the Flatpak if they are available.}
|
@caution{Use distro-specific packages instead of the Flatpak if they are available.}
|
||||||
|
|
||||||
@important{The instructions provided here are for the version supplied in the [latest release][latest-release],
|
|
||||||
which does not necessarily match the version in the Flathub repository!}
|
|
||||||
|
|
||||||
Using this package requires that you have [Flatpak](https://flatpak.org/setup) installed.
|
Using this package requires that you have [Flatpak](https://flatpak.org/setup) installed.
|
||||||
|
|
||||||
##### Download
|
##### Download (local option)
|
||||||
1. Download `sunshine_{arch}.flatpak` and run the following command.
|
1. Download `sunshine_{arch}.flatpak` and run the following command.
|
||||||
@note{Replace `{arch}` with your system architecture.}
|
@note{Replace `{arch}` with your system architecture.}
|
||||||
|
|
||||||
##### Install (system level)
|
##### Install (system level)
|
||||||
|
**Flathub**
|
||||||
|
```bash
|
||||||
|
flatpak install --system flathub dev.lizardbyte.app.Sunshine
|
||||||
|
```
|
||||||
|
|
||||||
|
**Local**
|
||||||
```bash
|
```bash
|
||||||
flatpak install --system ./sunshine_{arch}.flatpak
|
flatpak install --system ./sunshine_{arch}.flatpak
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Install (user level)
|
##### Install (user level)
|
||||||
|
**Flathub**
|
||||||
|
```bash
|
||||||
|
flatpak install --user flathub dev.lizardbyte.app.Sunshine
|
||||||
|
```
|
||||||
|
|
||||||
|
**Local**
|
||||||
```bash
|
```bash
|
||||||
flatpak install --user ./sunshine_{arch}.flatpak
|
flatpak install --user ./sunshine_{arch}.flatpak
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
## Chocolatey
|
## Chocolatey
|
||||||
[](https://community.chocolatey.org/packages/sunshine)
|
[](https://community.chocolatey.org/packages/sunshine)
|
||||||
|
|
||||||
## Flathub
|
|
||||||
[](https://flathub.org/apps/dev.lizardbyte.app.Sunshine)
|
|
||||||
|
|
||||||
## nixpkgs
|
## nixpkgs
|
||||||
[](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/servers/sunshine/default.nix)
|
[](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/servers/sunshine/default.nix)
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
{
|
{
|
||||||
|
"name": "sunshine",
|
||||||
|
"version": "0.0.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "vite build --debug",
|
"build": "vite build --debug",
|
||||||
"build-clean": "vite build --debug --emptyOutDir",
|
"build-clean": "vite build --debug --emptyOutDir",
|
||||||
"dev": "vite build --watch"
|
"dev": "vite build --watch",
|
||||||
|
"serve": "serve ./tests/fixtures/http --no-port-switching"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@lizardbyte/shared-web": "2024.901.195233",
|
"@lizardbyte/shared-web": "2024.901.195233",
|
||||||
@@ -11,6 +14,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vitejs/plugin-vue": "4.6.2",
|
"@vitejs/plugin-vue": "4.6.2",
|
||||||
|
"serve": "14.2.3",
|
||||||
"vite": "4.5.2",
|
"vite": "4.5.2",
|
||||||
"vite-plugin-ejs": "1.6.4"
|
"vite-plugin-ejs": "1.6.4"
|
||||||
}
|
}
|
||||||
|
|||||||
13
packaging/linux/flatpak/README.md
Normal file
13
packaging/linux/flatpak/README.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# Overview
|
||||||
|
|
||||||
|
[](https://flathub.org/apps/dev.lizardbyte.app.Sunshine)
|
||||||
|
[](https://flathub.org/apps/dev.lizardbyte.app.Sunshine)
|
||||||
|
|
||||||
|
LizardByte has the full documentation hosted on [Read the Docs](https://sunshinestream.readthedocs.io).
|
||||||
|
|
||||||
|
## About
|
||||||
|
|
||||||
|
Sunshine is a self-hosted game stream host for Moonlight.
|
||||||
|
|
||||||
|
This repo is synced from the upstream [Sunshine](https://github.com/LizardByte/Sunshine) repo.
|
||||||
|
Please report issues and contribute to the upstream repo.
|
||||||
Submodule packaging/linux/flatpak/deps/flatpak-builder-tools added at 9a48b5e30a
@@ -28,26 +28,15 @@
|
|||||||
@PROJECT_LONG_DESCRIPTION@
|
@PROJECT_LONG_DESCRIPTION@
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>NOTE: Allow Sunshine Virtual Input (Required)</p>
|
<p>NOTE: Sunshine requires additional installation steps.</p>
|
||||||
<p>sudo chown $USER /dev/uinput && echo 'KERNEL=="uinput", SUBSYSTEM=="misc",
|
<p>flatpak run --command=additional-install.sh @PROJECT_FQDN@</p>
|
||||||
OPTIONS+="static_node=uinput", TAG+="uaccess"' | sudo tee
|
<p>NOTE: Sunshine uses a self-signed certificate. The web browser will report it as not secure, but it is safe.</p>
|
||||||
/etc/udev/rules.d/60-sunshine-input.rules</p>
|
|
||||||
<p>NOTE: Sunshine uses a self-signed certificate. The web browser will report it as not secure,
|
|
||||||
but it is safe.</p>
|
|
||||||
<p>NOTE: KMS Grab (Optional)</p>
|
<p>NOTE: KMS Grab (Optional)</p>
|
||||||
<p>sudo -i PULSE_SERVER=unix:$(pactl info | awk '/Server String/{print$3}')
|
<p>sudo -i PULSE_SERVER=unix:$(pactl info | awk '/Server String/{print$3}') flatpak run @PROJECT_FQDN@</p>
|
||||||
flatpak run @PROJECT_FQDN@</p>
|
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<releases>
|
<releases>
|
||||||
<release version="0.23.1" date="2024-04-21"/>
|
<release version="@PROJECT_VERSION@" date="1970-01-01"></release>
|
||||||
<release version="0.23.0" date="2024-04-06"/>
|
|
||||||
<release version="0.22.2" date="2024-03-15"/>
|
|
||||||
<release version="0.22.1" date="2024-03-13"/>
|
|
||||||
<release version="0.22.0" date="2024-03-04"/>
|
|
||||||
<release version="0.21.0" date="2023-10-15"/>
|
|
||||||
<release version="0.20.0" date="2023-05-29"/>
|
|
||||||
<release version="0.19.1" date="2023-03-30"/>
|
|
||||||
</releases>
|
</releases>
|
||||||
|
|
||||||
<developer_name>LizardByte</developer_name>
|
<developer_name>LizardByte</developer_name>
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
---
|
---
|
||||||
app-id: "@PROJECT_FQDN@"
|
app-id: "@PROJECT_FQDN@"
|
||||||
runtime: org.freedesktop.Platform
|
runtime: org.freedesktop.Platform
|
||||||
runtime-version: "22.08"
|
runtime-version: "23.08" # requires CUDA >= 12.2
|
||||||
sdk: org.freedesktop.Sdk
|
sdk: org.freedesktop.Sdk
|
||||||
sdk-extensions:
|
sdk-extensions:
|
||||||
- org.freedesktop.Sdk.Extension.node18
|
- org.freedesktop.Sdk.Extension.node20
|
||||||
- org.freedesktop.Sdk.Extension.vala
|
|
||||||
command: sunshine
|
command: sunshine
|
||||||
separate-locales: false
|
separate-locales: false
|
||||||
finish-args:
|
finish-args:
|
||||||
@@ -29,10 +28,6 @@ cleanup:
|
|||||||
- /lib/*.a
|
- /lib/*.a
|
||||||
- /share/man
|
- /share/man
|
||||||
|
|
||||||
build-options:
|
|
||||||
append-path: /usr/lib/sdk/vala/bin
|
|
||||||
prepend-ld-library-path: /usr/lib/sdk/vala/lib
|
|
||||||
|
|
||||||
modules:
|
modules:
|
||||||
# Test dependencies
|
# Test dependencies
|
||||||
- "modules/xvfb/xvfb.json"
|
- "modules/xvfb/xvfb.json"
|
||||||
@@ -40,6 +35,7 @@ modules:
|
|||||||
# Runtime dependencies
|
# Runtime dependencies
|
||||||
- shared-modules/libappindicator/libappindicator-gtk3-12.10.json
|
- shared-modules/libappindicator/libappindicator-gtk3-12.10.json
|
||||||
- "modules/avahi.json"
|
- "modules/avahi.json"
|
||||||
|
- "modules/boost.json"
|
||||||
- "modules/libevdev.json"
|
- "modules/libevdev.json"
|
||||||
- "modules/libnotify.json"
|
- "modules/libnotify.json"
|
||||||
- "modules/miniupnpc.json"
|
- "modules/miniupnpc.json"
|
||||||
@@ -49,23 +45,21 @@ modules:
|
|||||||
- "modules/cuda.json"
|
- "modules/cuda.json"
|
||||||
|
|
||||||
- name: sunshine
|
- name: sunshine
|
||||||
disabled: false
|
|
||||||
buildsystem: cmake-ninja
|
|
||||||
no-make-install: false
|
|
||||||
builddir: true
|
builddir: true
|
||||||
build-options:
|
build-options:
|
||||||
append-path: /usr/lib/sdk/node18/bin
|
append-path: /usr/lib/sdk/node20/bin
|
||||||
build-args:
|
|
||||||
- --share=network
|
|
||||||
test-args:
|
|
||||||
- --share=network
|
|
||||||
env:
|
env:
|
||||||
BUILD_VERSION: "@BUILD_VERSION@"
|
BUILD_VERSION: "@BUILD_VERSION@"
|
||||||
BRANCH: "@GITHUB_BRANCH@"
|
BRANCH: "@GITHUB_BRANCH@"
|
||||||
COMMIT: "@GITHUB_COMMIT@"
|
COMMIT: "@GITHUB_COMMIT@"
|
||||||
npm_config_nodedir: /usr/lib/sdk/node18
|
XDG_CACHE_HOME: /run/build/sunshine/flatpak-node/cache
|
||||||
|
npm_config_cache: /run/build/sunshine/flatpak-node/npm-cache
|
||||||
|
npm_config_nodedir: /usr/lib/sdk/node20
|
||||||
|
npm_config_offline: 'true'
|
||||||
NPM_CONFIG_LOGLEVEL: info
|
NPM_CONFIG_LOGLEVEL: info
|
||||||
|
buildsystem: cmake-ninja
|
||||||
config-opts:
|
config-opts:
|
||||||
|
- -DBOOST_USE_STATIC=OFF
|
||||||
- -DBUILD_DOCS=OFF
|
- -DBUILD_DOCS=OFF
|
||||||
- -DBUILD_WERROR=ON
|
- -DBUILD_WERROR=ON
|
||||||
- -DCMAKE_BUILD_TYPE=Release
|
- -DCMAKE_BUILD_TYPE=Release
|
||||||
@@ -78,16 +72,20 @@ modules:
|
|||||||
- -DSUNSHINE_ENABLE_DRM=ON
|
- -DSUNSHINE_ENABLE_DRM=ON
|
||||||
- -DSUNSHINE_ENABLE_CUDA=ON
|
- -DSUNSHINE_ENABLE_CUDA=ON
|
||||||
- -DSUNSHINE_PUBLISHER_NAME='LizardByte'
|
- -DSUNSHINE_PUBLISHER_NAME='LizardByte'
|
||||||
-DSUNSHINE_PUBLISHER_WEBSITE='https://app.lizardbyte.dev'
|
- -DSUNSHINE_PUBLISHER_WEBSITE='https://app.lizardbyte.dev'
|
||||||
-DSUNSHINE_PUBLISHER_ISSUE_URL='https://app.lizardbyte.dev/support'
|
- -DSUNSHINE_PUBLISHER_ISSUE_URL='https://app.lizardbyte.dev/support'
|
||||||
sources:
|
no-make-install: false
|
||||||
- type: git
|
|
||||||
url: "@GITHUB_CLONE_URL@"
|
|
||||||
commit: "@GITHUB_COMMIT@"
|
|
||||||
post-install:
|
post-install:
|
||||||
- install -D $FLATPAK_BUILDER_BUILDDIR/packaging/linux/flatpak/scripts/* /app/bin
|
- install -D $FLATPAK_BUILDER_BUILDDIR/packaging/linux/flatpak/scripts/* /app/bin
|
||||||
- install -D $FLATPAK_BUILDER_BUILDDIR/packaging/linux/flatpak/apps.json /app/share/sunshine/apps.json
|
- install -D $FLATPAK_BUILDER_BUILDDIR/packaging/linux/flatpak/apps.json /app/share/sunshine/apps.json
|
||||||
run-tests: true
|
run-tests: true
|
||||||
test-rule: "" # empty to disable
|
test-rule: "" # empty to disable
|
||||||
test-commands:
|
test-commands:
|
||||||
- xvfb-run tests/test_sunshine --gtest_color=yes
|
- npm run serve & xvfb-run tests/test_sunshine --gtest_color=yes
|
||||||
|
sources:
|
||||||
|
- generated-sources.json
|
||||||
|
- type: git
|
||||||
|
url: "@GITHUB_CLONE_URL@"
|
||||||
|
commit: "@GITHUB_COMMIT@"
|
||||||
|
- type: file
|
||||||
|
path: package-lock.json
|
||||||
|
|||||||
3
packaging/linux/flatpak/flathub.json
Normal file
3
packaging/linux/flatpak/flathub.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"disable-external-data-checker": true
|
||||||
|
}
|
||||||
16
packaging/linux/flatpak/modules/boost.json
Normal file
16
packaging/linux/flatpak/modules/boost.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "boost",
|
||||||
|
"buildsystem": "simple",
|
||||||
|
"build-commands": [
|
||||||
|
"cd tools/build && bison -y -d -o src/engine/jamgram.cpp src/engine/jamgram.y",
|
||||||
|
"./bootstrap.sh --prefix=$FLATPAK_DEST --with-libraries=filesystem,locale,log,program_options,system",
|
||||||
|
"./b2 install variant=release link=shared runtime-link=shared cxxflags=\"$CXXFLAGS\""
|
||||||
|
],
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"type": "archive",
|
||||||
|
"url": "https://github.com/boostorg/boost/releases/download/boost-1.86.0/boost-1.86.0-cmake.tar.xz",
|
||||||
|
"sha256": "2c5ec5edcdff47ff55e27ed9560b0a0b94b07bd07ed9928b476150e16b0efc57"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -19,8 +19,8 @@
|
|||||||
"only-arches": [
|
"only-arches": [
|
||||||
"x86_64"
|
"x86_64"
|
||||||
],
|
],
|
||||||
"url": "https://developer.download.nvidia.com/compute/cuda/12.0.0/local_installers/cuda_12.0.0_525.60.13_linux.run",
|
"url": "https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda_12.6.2_560.35.03_linux.run",
|
||||||
"sha256": "905e9b9516900839fb76064719db752439f38b8cb730b49335d8bd53ddfad392",
|
"sha256": "3729a89cb58f7ca6a46719cff110d6292aec7577585a8d71340f0dbac54fb237",
|
||||||
"dest-filename": "cuda.run"
|
"dest-filename": "cuda.run"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -28,8 +28,8 @@
|
|||||||
"only-arches": [
|
"only-arches": [
|
||||||
"aarch64"
|
"aarch64"
|
||||||
],
|
],
|
||||||
"url": "https://developer.download.nvidia.com/compute/cuda/12.0.0/local_installers/cuda_12.0.0_525.60.13_linux_sbsa.run",
|
"url": "https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda_12.6.2_560.35.03_linux_sbsa.run",
|
||||||
"sha256": "cd13e9c65d4c8f895a968706f46064d536be09f9706bce081cc864b7e4fa4544",
|
"sha256": "2249408848b705c18b9eadfb5161b52e4e36fcc5753647329cce93db141e5466",
|
||||||
"dest-filename": "cuda.run"
|
"dest-filename": "cuda.run"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ function run_install() {
|
|||||||
add_ubuntu_deps
|
add_ubuntu_deps
|
||||||
elif [ "$distro" == "fedora" ]; then
|
elif [ "$distro" == "fedora" ]; then
|
||||||
add_fedora_deps
|
add_fedora_deps
|
||||||
dnf group install "Development Tools" -y
|
${sudo_cmd} dnf group install "Development Tools" -y
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install the dependencies
|
# Install the dependencies
|
||||||
|
|||||||
@@ -197,7 +197,12 @@ namespace http {
|
|||||||
bool
|
bool
|
||||||
download_file(const std::string &url, const std::string &file) {
|
download_file(const std::string &url, const std::string &file) {
|
||||||
CURL *curl = curl_easy_init();
|
CURL *curl = curl_easy_init();
|
||||||
if (!curl) {
|
if (curl) {
|
||||||
|
// sonar complains about weak ssl and tls versions
|
||||||
|
// ideally, the setopts should go after the early returns; however sonar cannot detect the fix
|
||||||
|
curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);
|
||||||
|
}
|
||||||
|
else {
|
||||||
BOOST_LOG(error) << "Couldn't create CURL instance";
|
BOOST_LOG(error) << "Couldn't create CURL instance";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -215,16 +220,16 @@ namespace http {
|
|||||||
curl_easy_cleanup(curl);
|
curl_easy_cleanup(curl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
|
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
|
curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
|
||||||
#ifdef _WIN32
|
|
||||||
curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS, CURLSSLOPT_NATIVE_CA);
|
|
||||||
#endif
|
|
||||||
CURLcode result = curl_easy_perform(curl);
|
CURLcode result = curl_easy_perform(curl);
|
||||||
if (result != CURLE_OK) {
|
if (result != CURLE_OK) {
|
||||||
BOOST_LOG(error) << "Couldn't download ["sv << url << ", code:" << result << ']';
|
BOOST_LOG(error) << "Couldn't download ["sv << url << ", code:" << result << ']';
|
||||||
}
|
}
|
||||||
|
|
||||||
curl_easy_cleanup(curl);
|
curl_easy_cleanup(curl);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
return result == CURLE_OK;
|
return result == CURLE_OK;
|
||||||
|
|||||||
@@ -47,13 +47,13 @@ namespace boost {
|
|||||||
namespace filesystem {
|
namespace filesystem {
|
||||||
class path;
|
class path;
|
||||||
}
|
}
|
||||||
namespace process {
|
namespace process::inline v1 {
|
||||||
class child;
|
class child;
|
||||||
class group;
|
class group;
|
||||||
template <typename Char>
|
template <typename Char>
|
||||||
class basic_environment;
|
class basic_environment;
|
||||||
typedef basic_environment<char> environment;
|
typedef basic_environment<char> environment;
|
||||||
} // namespace process
|
} // namespace process::inline v1
|
||||||
} // namespace boost
|
} // namespace boost
|
||||||
#endif
|
#endif
|
||||||
namespace video {
|
namespace video {
|
||||||
@@ -600,8 +600,8 @@ namespace platf {
|
|||||||
bool
|
bool
|
||||||
needs_encoder_reenumeration();
|
needs_encoder_reenumeration();
|
||||||
|
|
||||||
boost::process::child
|
boost::process::v1::child
|
||||||
run_command(bool elevated, bool interactive, const std::string &cmd, boost::filesystem::path &working_dir, const boost::process::environment &env, FILE *file, std::error_code &ec, boost::process::group *group);
|
run_command(bool elevated, bool interactive, const std::string &cmd, boost::filesystem::path &working_dir, const boost::process::v1::environment &env, FILE *file, std::error_code &ec, boost::process::v1::group *group);
|
||||||
|
|
||||||
enum class thread_priority_e : int {
|
enum class thread_priority_e : int {
|
||||||
low, ///< Low priority
|
low, ///< Low priority
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
// lib includes
|
// lib includes
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <boost/asio/ip/address.hpp>
|
#include <boost/asio/ip/address.hpp>
|
||||||
#include <boost/process.hpp>
|
#include <boost/process/v1.hpp>
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <ifaddrs.h>
|
#include <ifaddrs.h>
|
||||||
@@ -352,7 +352,7 @@ get_local_ip_for_gateway() {
|
|||||||
auto working_dir = boost::filesystem::path(std::getenv("HOME"));
|
auto working_dir = boost::filesystem::path(std::getenv("HOME"));
|
||||||
std::string cmd = R"(xdg-open ")" + url + R"(")";
|
std::string cmd = R"(xdg-open ")" + url + R"(")";
|
||||||
|
|
||||||
boost::process::environment _env = boost::this_process::environment();
|
boost::process::v1::environment _env = boost::this_process::environment();
|
||||||
std::error_code ec;
|
std::error_code ec;
|
||||||
auto child = run_command(false, false, cmd, working_dir, _env, nullptr, ec, nullptr);
|
auto child = run_command(false, false, cmd, working_dir, _env, nullptr, ec, nullptr);
|
||||||
if (ec) {
|
if (ec) {
|
||||||
|
|||||||
@@ -362,6 +362,9 @@ const KeyCodeMap kKeyCodesMap[] = {
|
|||||||
CGEventSetDoubleValueField(event, kCGMouseEventDeltaY, deltaY);
|
CGEventSetDoubleValueField(event, kCGMouseEventDeltaY, deltaY);
|
||||||
|
|
||||||
CGEventPost(kCGHIDEventTap, event);
|
CGEventPost(kCGHIDEventTap, event);
|
||||||
|
// For why this is here, see:
|
||||||
|
// https://stackoverflow.com/questions/15194409/simulated-mouseevent-not-working-properly-osx
|
||||||
|
CGWarpMouseCursorPosition(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline CGEventType
|
inline CGEventType
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
#include "src/platform/common.h"
|
#include "src/platform/common.h"
|
||||||
|
|
||||||
#include <boost/asio/ip/address.hpp>
|
#include <boost/asio/ip/address.hpp>
|
||||||
#include <boost/process.hpp>
|
#include <boost/process/v1.hpp>
|
||||||
|
|
||||||
using namespace std::literals;
|
using namespace std::literals;
|
||||||
namespace fs = std::filesystem;
|
namespace fs = std::filesystem;
|
||||||
@@ -203,7 +203,7 @@ namespace platf {
|
|||||||
boost::filesystem::path working_dir;
|
boost::filesystem::path working_dir;
|
||||||
std::string cmd = R"(open ")" + url + R"(")";
|
std::string cmd = R"(open ")" + url + R"(")";
|
||||||
|
|
||||||
boost::process::environment _env = boost::this_process::environment();
|
boost::process::v1::environment _env = boost::this_process::environment();
|
||||||
std::error_code ec;
|
std::error_code ec;
|
||||||
auto child = run_command(false, false, cmd, working_dir, _env, nullptr, ec, nullptr);
|
auto child = run_command(false, false, cmd, working_dir, _env, nullptr, ec, nullptr);
|
||||||
if (ec) {
|
if (ec) {
|
||||||
|
|||||||
@@ -7,9 +7,9 @@
|
|||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
#include <boost/algorithm/string/join.hpp>
|
#include <boost/algorithm/string/join.hpp>
|
||||||
#include <boost/process.hpp>
|
#include <boost/process/v1.hpp>
|
||||||
|
|
||||||
// We have to include boost/process.hpp before display.h due to WinSock.h,
|
// We have to include boost/process/v1.hpp before display.h due to WinSock.h,
|
||||||
// but that prevents the definition of NTSTATUS so we must define it ourself.
|
// but that prevents the definition of NTSTATUS so we must define it ourself.
|
||||||
typedef long NTSTATUS;
|
typedef long NTSTATUS;
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include <boost/algorithm/string.hpp>
|
#include <boost/algorithm/string.hpp>
|
||||||
#include <boost/asio/ip/address.hpp>
|
#include <boost/asio/ip/address.hpp>
|
||||||
#include <boost/process.hpp>
|
#include <boost/process/v1.hpp>
|
||||||
#include <boost/program_options/parsers.hpp>
|
#include <boost/program_options/parsers.hpp>
|
||||||
|
|
||||||
// prevent clang format from "optimizing" the header include order
|
// prevent clang format from "optimizing" the header include order
|
||||||
@@ -1121,7 +1121,7 @@ namespace platf {
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
open_url(const std::string &url) {
|
open_url(const std::string &url) {
|
||||||
boost::process::environment _env = boost::this_process::environment();
|
boost::process::v1::environment _env = boost::this_process::environment();
|
||||||
auto working_dir = boost::filesystem::path();
|
auto working_dir = boost::filesystem::path();
|
||||||
std::error_code ec;
|
std::error_code ec;
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ namespace proc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
terminate_process_group(boost::process::child &proc, boost::process::group &group, std::chrono::seconds exit_timeout) {
|
terminate_process_group(boost::process::v1::child &proc, boost::process::v1::group &group, std::chrono::seconds exit_timeout) {
|
||||||
if (group.valid() && platf::process_group_running((std::uintptr_t) group.native_handle())) {
|
if (group.valid() && platf::process_group_running((std::uintptr_t) group.native_handle())) {
|
||||||
if (exit_timeout.count() > 0) {
|
if (exit_timeout.count() > 0) {
|
||||||
// Request processes in the group to exit gracefully
|
// Request processes in the group to exit gracefully
|
||||||
@@ -121,7 +121,7 @@ namespace proc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
boost::filesystem::path
|
boost::filesystem::path
|
||||||
find_working_directory(const std::string &cmd, boost::process::environment &env) {
|
find_working_directory(const std::string &cmd, boost::process::v1::environment &env) {
|
||||||
// Parse the raw command string into parts to get the actual command portion
|
// Parse the raw command string into parts to get the actual command portion
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
auto parts = boost::program_options::split_winmain(cmd);
|
auto parts = boost::program_options::split_winmain(cmd);
|
||||||
@@ -143,7 +143,7 @@ namespace proc {
|
|||||||
// If the cmd path is not an absolute path, resolve it using our PATH variable
|
// If the cmd path is not an absolute path, resolve it using our PATH variable
|
||||||
boost::filesystem::path cmd_path(parts.at(0));
|
boost::filesystem::path cmd_path(parts.at(0));
|
||||||
if (!cmd_path.is_absolute()) {
|
if (!cmd_path.is_absolute()) {
|
||||||
cmd_path = boost::process::search_path(parts.at(0));
|
cmd_path = boost::process::v1::search_path(parts.at(0));
|
||||||
if (cmd_path.empty()) {
|
if (cmd_path.empty()) {
|
||||||
BOOST_LOG(error) << "Unable to find executable ["sv << parts.at(0) << "]. Is it in your PATH?"sv;
|
BOOST_LOG(error) << "Unable to find executable ["sv << parts.at(0) << "]. Is it in your PATH?"sv;
|
||||||
return boost::filesystem::path();
|
return boost::filesystem::path();
|
||||||
@@ -500,8 +500,8 @@ namespace proc {
|
|||||||
std::error_code ec;
|
std::error_code ec;
|
||||||
placebo = false;
|
placebo = false;
|
||||||
terminate_process_group(_process, _process_group, _app.exit_timeout);
|
terminate_process_group(_process, _process_group, _app.exit_timeout);
|
||||||
_process = boost::process::child();
|
_process = boost::process::v1::child();
|
||||||
_process_group = boost::process::group();
|
_process_group = boost::process::v1::group();
|
||||||
|
|
||||||
for (; _app_prep_it != _app_prep_begin; --_app_prep_it) {
|
for (; _app_prep_it != _app_prep_begin; --_app_prep_it) {
|
||||||
auto &cmd = *(_app_prep_it - 1);
|
auto &cmd = *(_app_prep_it - 1);
|
||||||
@@ -631,7 +631,7 @@ namespace proc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string
|
std::string
|
||||||
parse_env_val(boost::process::native_environment &env, const std::string_view &val_raw) {
|
parse_env_val(boost::process::v1::native_environment &env, const std::string_view &val_raw) {
|
||||||
auto pos = std::begin(val_raw);
|
auto pos = std::begin(val_raw);
|
||||||
auto dollar = std::find(pos, std::end(val_raw), '$');
|
auto dollar = std::find(pos, std::end(val_raw), '$');
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
#include <optional>
|
#include <optional>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
#include <boost/process.hpp>
|
#include <boost/process/v1.hpp>
|
||||||
#include <boost/property_tree/ptree.hpp>
|
#include <boost/property_tree/ptree.hpp>
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@@ -88,7 +88,7 @@ namespace proc {
|
|||||||
|
|
||||||
|
|
||||||
proc_t(
|
proc_t(
|
||||||
boost::process::environment &&env,
|
boost::process::v1::environment &&env,
|
||||||
std::vector<ctx_t> &&apps):
|
std::vector<ctx_t> &&apps):
|
||||||
_app_id(0),
|
_app_id(0),
|
||||||
_env(std::move(env)),
|
_env(std::move(env)),
|
||||||
@@ -120,7 +120,8 @@ namespace proc {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
int _app_id;
|
int _app_id;
|
||||||
boost::process::environment _env;
|
|
||||||
|
boost::process::v1::environment _env;
|
||||||
|
|
||||||
std::shared_ptr<rtsp_stream::launch_session_t> _launch_session;
|
std::shared_ptr<rtsp_stream::launch_session_t> _launch_session;
|
||||||
|
|
||||||
@@ -131,8 +132,8 @@ namespace proc {
|
|||||||
// If no command associated with _app_id, yet it's still running
|
// If no command associated with _app_id, yet it's still running
|
||||||
bool placebo {};
|
bool placebo {};
|
||||||
|
|
||||||
boost::process::child _process;
|
boost::process::v1::child _process;
|
||||||
boost::process::group _process_group;
|
boost::process::v1::group _process_group;
|
||||||
|
|
||||||
file_t _pipe;
|
file_t _pipe;
|
||||||
std::vector<cmd_t>::const_iterator _app_prep_it;
|
std::vector<cmd_t>::const_iterator _app_prep_it;
|
||||||
@@ -172,7 +173,7 @@ namespace proc {
|
|||||||
* @param exit_timeout The timeout to wait for the process group to gracefully exit.
|
* @param exit_timeout The timeout to wait for the process group to gracefully exit.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
terminate_process_group(boost::process::child &proc, boost::process::group &group, std::chrono::seconds exit_timeout);
|
terminate_process_group(boost::process::v1::child &proc, boost::process::v1::group &group, std::chrono::seconds exit_timeout);
|
||||||
|
|
||||||
extern proc_t proc;
|
extern proc_t proc;
|
||||||
} // namespace proc
|
} // namespace proc
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
// lib includes
|
// lib includes
|
||||||
#include "tray/src/tray.h"
|
#include "tray/src/tray.h"
|
||||||
#include <boost/filesystem.hpp>
|
#include <boost/filesystem.hpp>
|
||||||
#include <boost/process/environment.hpp>
|
#include <boost/process/v1/environment.hpp>
|
||||||
|
|
||||||
// local includes
|
// local includes
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|||||||
1
tests/fixtures/http/hello-redirect.txt
vendored
Normal file
1
tests/fixtures/http/hello-redirect.txt
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
hello-redirect.txt
|
||||||
1
tests/fixtures/http/hello.txt
vendored
Normal file
1
tests/fixtures/http/hello.txt
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
hello.txt
|
||||||
@@ -45,9 +45,18 @@ TEST_P(DownloadFileTest, Run) {
|
|||||||
ASSERT_TRUE(http::download_file(url, path));
|
ASSERT_TRUE(http::download_file(url, path));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SUNSHINE_BUILD_FLATPAK
|
||||||
|
// requires running `npm run serve` prior to running the tests
|
||||||
|
constexpr const char *URL_1 = "http://0.0.0.0:3000/hello.txt";
|
||||||
|
constexpr const char *URL_2 = "http://0.0.0.0:3000/hello-redirect.txt";
|
||||||
|
#else
|
||||||
|
constexpr const char *URL_1 = "https://httpbin.org/base64/aGVsbG8h";
|
||||||
|
constexpr const char *URL_2 = "https://httpbin.org/redirect-to?url=/base64/aGVsbG8h";
|
||||||
|
#endif
|
||||||
|
|
||||||
INSTANTIATE_TEST_SUITE_P(
|
INSTANTIATE_TEST_SUITE_P(
|
||||||
DownloadFileTests,
|
DownloadFileTests,
|
||||||
DownloadFileTest,
|
DownloadFileTest,
|
||||||
testing::Values(
|
testing::Values(
|
||||||
std::make_tuple("https://httpbin.org/base64/aGVsbG8h", "hello.txt"),
|
std::make_tuple(URL_1, "hello.txt"),
|
||||||
std::make_tuple("https://httpbin.org/redirect-to?url=/base64/aGVsbG8h", "hello-redirect.txt")));
|
std::make_tuple(URL_2, "hello-redirect.txt")));
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
# the name of the target operating system
|
|
||||||
SET(CMAKE_SYSTEM_NAME Windows)
|
|
||||||
|
|
||||||
# which compilers to use for C and C++
|
|
||||||
SET(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
|
|
||||||
SET(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
|
|
||||||
SET(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
|
|
||||||
|
|
||||||
# here is the target environment located
|
|
||||||
SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32)
|
|
||||||
#SET(CMAKE_SYSROOT ${CMAKE_FIND_ROOT_PATH})
|
|
||||||
#SET(CMAKE_EXE_LINKER_FLAGS "-static ${CMAKE_EXE_LINKER_FLAGS}")
|
|
||||||
|
|
||||||
# adjust the default behaviour of the FIND_XXX() commands:
|
|
||||||
# search headers and libraries in the target environment, search
|
|
||||||
# programs in the host environment
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
||||||
Reference in New Issue
Block a user