mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-08-10 00:52:16 +00:00
Compare commits
32 Commits
dependabot
...
fix/packag
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c2d5f7161 | ||
|
|
f65bb842ff | ||
|
|
c4d991c8f7 | ||
|
|
f0d563ecbb | ||
|
|
2cd4b1b3ad | ||
|
|
937615c8e6 | ||
|
|
e6fbd24001 | ||
|
|
5da5293471 | ||
|
|
873939a7b2 | ||
|
|
7c8113ded8 | ||
|
|
310f5b8c1c | ||
|
|
0262a77c9a | ||
|
|
643fdee8d3 | ||
|
|
fe5812b008 | ||
|
|
791580954f | ||
|
|
6efd41d3f7 | ||
|
|
1fd5534541 | ||
|
|
a344e6cc69 | ||
|
|
ceea97479b | ||
|
|
bd359b21d6 | ||
|
|
67d649621c | ||
|
|
848558d80e | ||
|
|
7cda5fa925 | ||
|
|
fd9f10f730 | ||
|
|
a594b6434b | ||
|
|
f7190f53ff | ||
|
|
e3079da132 | ||
|
|
385471fb0a | ||
|
|
3c6374fa7a | ||
|
|
ecd0f9b5dc | ||
|
|
fa22227fca | ||
|
|
9aaa40c3ca |
@@ -1,6 +1,10 @@
|
||||
# install dependencies for C++ analysis
|
||||
set -e
|
||||
|
||||
# setup homebrew for x86_64
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
eval "$(/usr/local/bin/brew shellenv)"
|
||||
|
||||
# install dependencies
|
||||
dependencies=(
|
||||
"boost"
|
||||
|
||||
89
.github/workflows/CI.yml
vendored
89
.github/workflows/CI.yml
vendored
@@ -45,43 +45,22 @@ jobs:
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
setup_flatpak_matrix:
|
||||
name: Setup Flatpak Matrix
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set release details
|
||||
id: flatpak_matrix
|
||||
# https://www.cynkra.com/blog/2020-12-23-dynamic-gha
|
||||
run: |
|
||||
# determine which architectures to build
|
||||
if [[ "${{ github.event_name }}" == "push" ]]; then
|
||||
matrix=$((
|
||||
echo '{ "arch" : ["x86_64", "aarch64"] }'
|
||||
) | jq -c .)
|
||||
else
|
||||
matrix=$((
|
||||
echo '{ "arch" : ["x86_64"] }'
|
||||
) | jq -c .)
|
||||
fi
|
||||
|
||||
echo $matrix
|
||||
echo $matrix | jq .
|
||||
echo "matrix=$matrix" >> $GITHUB_OUTPUT
|
||||
|
||||
outputs:
|
||||
matrix: ${{ steps.flatpak_matrix.outputs.matrix }}
|
||||
|
||||
build_linux_flatpak:
|
||||
env:
|
||||
APP_ID: dev.lizardbyte.app.Sunshine
|
||||
NODE_VERSION: "20"
|
||||
PLATFORM_VERSION: "23.08"
|
||||
name: Linux Flatpak
|
||||
runs-on: ubuntu-22.04
|
||||
needs: [setup_release, setup_flatpak_matrix]
|
||||
needs: [setup_release]
|
||||
runs-on: ${{ matrix.runner }}
|
||||
strategy:
|
||||
fail-fast: false # false to test all, true to fail entire job if any fail
|
||||
matrix: ${{fromJson(needs.setup_flatpak_matrix.outputs.matrix)}}
|
||||
matrix:
|
||||
include:
|
||||
- arch: x86_64
|
||||
runner: ubuntu-22.04
|
||||
- arch: aarch64
|
||||
runner: ubuntu-22.04-arm
|
||||
|
||||
steps:
|
||||
- name: Maximize build space
|
||||
@@ -126,8 +105,7 @@ jobs:
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y \
|
||||
cmake \
|
||||
flatpak \
|
||||
qemu-user-static
|
||||
flatpak
|
||||
|
||||
sudo su $(whoami) -c "flatpak --user remote-add --if-not-exists flathub \
|
||||
https://flathub.org/repo/flathub.flatpakrepo"
|
||||
@@ -227,52 +205,23 @@ jobs:
|
||||
- name: Lint Flatpak
|
||||
working-directory: build
|
||||
run: |
|
||||
exceptions_file="${{ github.workspace }}/packaging/linux/flatpak/exceptions.json"
|
||||
|
||||
echo "Linting flatpak manifest"
|
||||
flatpak run --command=flatpak-builder-lint org.flatpak.Builder \
|
||||
manifest ${APP_ID}.yml > _flatpak-lint-exceptions_manifest.json || true
|
||||
--exceptions \
|
||||
--user-exceptions "${exceptions_file}" \
|
||||
manifest \
|
||||
${APP_ID}.yml
|
||||
|
||||
echo "Linting flatpak repo"
|
||||
# TODO: add arg
|
||||
# --mirror-screenshots-url=https://dl.flathub.org/media \
|
||||
flatpak run --command=flatpak-builder-lint org.flatpak.Builder \
|
||||
repo repo > _flatpak-lint-exceptions_repo.json || true
|
||||
|
||||
checks=(manifest repo)
|
||||
exit_code=0
|
||||
|
||||
# check if files are equal
|
||||
for check in "${checks[@]}"; do
|
||||
echo "Validating $check"
|
||||
|
||||
# load baseline and result files
|
||||
baseline="${{ github.workspace }}/packaging/linux/flatpak/flatpak-lint-baseline_${check}.json"
|
||||
result="_flatpak-lint-exceptions_${check}.json"
|
||||
|
||||
# Extract errors from both JSON files
|
||||
readarray -t result_errors < <(jq -r '.errors[]' "$result")
|
||||
readarray -t baseline_errors < <(jq -r '.errors[]' "$baseline")
|
||||
|
||||
# Loop through result errors and check against baseline errors
|
||||
for error in "${result_errors[@]}"; do
|
||||
if printf '%s\n' "${baseline_errors[@]}" | grep -q -F "$error"; then
|
||||
echo "::warning:: '$error'"
|
||||
else
|
||||
echo "::error:: '$error'"
|
||||
exit_code=1
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
# if exit code is not 0, print results
|
||||
if [ $exit_code -ne 0 ]; then
|
||||
echo "Manifest lint results:"
|
||||
cat _flatpak-lint-exceptions_manifest.json
|
||||
echo "Repo lint results:"
|
||||
cat _flatpak-lint-exceptions_repo.json
|
||||
fi
|
||||
|
||||
# exit with the correct code
|
||||
exit $exit_code
|
||||
--exceptions \
|
||||
--user-exceptions "${exceptions_file}" \
|
||||
repo \
|
||||
repo
|
||||
|
||||
- name: Package Flathub repo archive
|
||||
# copy files required to generate the Flathub repo
|
||||
|
||||
33
.github/workflows/codeql.yml
vendored
33
.github/workflows/codeql.yml
vendored
@@ -51,32 +51,39 @@ jobs:
|
||||
"include": []
|
||||
}
|
||||
|
||||
// Track languages we've already added to avoid duplicates
|
||||
const addedLanguages = new Set()
|
||||
|
||||
for (let [key, value] of Object.entries(response.data)) {
|
||||
// remap language
|
||||
if (remap_languages[key.toLowerCase()]) {
|
||||
console.log(`Remapping language: ${key} to ${remap_languages[key.toLowerCase()]}`)
|
||||
key = remap_languages[key.toLowerCase()]
|
||||
}
|
||||
if (supported_languages.includes(key.toLowerCase())) {
|
||||
console.log(`Found supported language: ${key}`)
|
||||
|
||||
const normalizedKey = key.toLowerCase()
|
||||
|
||||
if (supported_languages.includes(normalizedKey) && !addedLanguages.has(normalizedKey)) {
|
||||
// Mark this language as added
|
||||
addedLanguages.add(normalizedKey)
|
||||
|
||||
console.log(`Found supported language: ${normalizedKey}`)
|
||||
let osList = ['ubuntu-latest'];
|
||||
if (key.toLowerCase() === 'swift') {
|
||||
if (normalizedKey === 'swift') {
|
||||
osList = ['macos-latest'];
|
||||
} else if (key.toLowerCase() === 'cpp') {
|
||||
// TODO: update macos to latest after the below issue is resolved
|
||||
// https://github.com/github/codeql-action/issues/2266
|
||||
osList = ['macos-13', 'ubuntu-latest', 'windows-latest'];
|
||||
} else if (normalizedKey === 'cpp') {
|
||||
osList = ['macos-latest', 'ubuntu-latest', 'windows-latest'];
|
||||
}
|
||||
for (let os of osList) {
|
||||
// set name for matrix
|
||||
if (osList.length == 1) {
|
||||
name = key.toLowerCase()
|
||||
} else {
|
||||
name = `${key.toLowerCase()}, ${os}`
|
||||
}
|
||||
let name = osList.length === 1 ? normalizedKey : `${normalizedKey}, ${os}`
|
||||
|
||||
// add to matrix
|
||||
matrix['include'].push({"language": key.toLowerCase(), "os": os, "name": name})
|
||||
matrix['include'].push({
|
||||
"language": normalizedKey,
|
||||
"os": os,
|
||||
"name": name
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
2
.github/workflows/update-flathub-repo.yml
vendored
2
.github/workflows/update-flathub-repo.yml
vendored
@@ -104,7 +104,7 @@ jobs:
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true' &&
|
||||
steps.check-release.outputs.isLatestRelease == 'true'
|
||||
uses: robinraju/release-downloader@v1.11
|
||||
uses: robinraju/release-downloader@v1.12
|
||||
with:
|
||||
repository: "${{ github.repository }}"
|
||||
tag: "${{ github.event.release.tag_name }}"
|
||||
|
||||
@@ -46,7 +46,7 @@ jobs:
|
||||
id: download
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true'
|
||||
uses: robinraju/release-downloader@v1.11
|
||||
uses: robinraju/release-downloader@v1.12
|
||||
with:
|
||||
repository: "${{ github.repository }}"
|
||||
tag: "${{ github.event.release.tag_name }}"
|
||||
|
||||
2
.github/workflows/update-pacman-repo.yml
vendored
2
.github/workflows/update-pacman-repo.yml
vendored
@@ -77,7 +77,7 @@ jobs:
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true' &&
|
||||
steps.check-release.outputs.isLatestRelease == 'true'
|
||||
uses: robinraju/release-downloader@v1.11
|
||||
uses: robinraju/release-downloader@v1.12
|
||||
with:
|
||||
repository: "${{ github.repository }}"
|
||||
tag: "${{ github.event.release.tag_name }}"
|
||||
|
||||
2
.github/workflows/update-winget-release.yml
vendored
2
.github/workflows/update-winget-release.yml
vendored
@@ -46,7 +46,7 @@ jobs:
|
||||
id: download
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true'
|
||||
uses: robinraju/release-downloader@v1.11
|
||||
uses: robinraju/release-downloader@v1.12
|
||||
with:
|
||||
repository: "${{ github.repository }}"
|
||||
tag: "${{ github.event.release.tag_name }}"
|
||||
|
||||
6
.gitmodules
vendored
6
.gitmodules
vendored
@@ -44,7 +44,7 @@
|
||||
branch = sdk
|
||||
[submodule "third-party/Simple-Web-Server"]
|
||||
path = third-party/Simple-Web-Server
|
||||
url = https://gitlab.com/eidheim/Simple-Web-Server.git
|
||||
url = https://github.com/LizardByte-infrastructure/Simple-Web-Server.git
|
||||
branch = master
|
||||
[submodule "third-party/TPCircularBuffer"]
|
||||
path = third-party/TPCircularBuffer
|
||||
@@ -60,9 +60,9 @@
|
||||
branch = master
|
||||
[submodule "third-party/wayland-protocols"]
|
||||
path = third-party/wayland-protocols
|
||||
url = https://gitlab.freedesktop.org/wayland/wayland-protocols.git
|
||||
url = https://github.com/LizardByte-infrastructure/wayland-protocols.git
|
||||
branch = main
|
||||
[submodule "third-party/wlr-protocols"]
|
||||
path = third-party/wlr-protocols
|
||||
url = https://gitlab.freedesktop.org/wlroots/wlr-protocols.git
|
||||
url = https://github.com/LizardByte-infrastructure/wlr-protocols.git
|
||||
branch = master
|
||||
|
||||
76
README.md
76
README.md
@@ -5,42 +5,18 @@
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<a href="https://github.com/LizardByte/Sunshine">
|
||||
<img src="https://img.shields.io/github/stars/lizardbyte/sunshine.svg?logo=github&style=for-the-badge" alt="GitHub stars">
|
||||
</a>
|
||||
<a href="https://github.com/LizardByte/Sunshine/releases/latest">
|
||||
<img src="https://img.shields.io/github/downloads/lizardbyte/sunshine/total.svg?style=for-the-badge&logo=github" alt="GitHub Releases">
|
||||
</a>
|
||||
<a href="https://hub.docker.com/r/lizardbyte/sunshine">
|
||||
<img src="https://img.shields.io/docker/pulls/lizardbyte/sunshine.svg?style=for-the-badge&logo=docker" alt="Docker">
|
||||
</a>
|
||||
<a href="https://github.com/LizardByte/Sunshine/pkgs/container/sunshine">
|
||||
<img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fipitio.github.io%2Fbackage%2FLizardByte%2FSunshine%2Fsunshine.json&query=%24.downloads&label=ghcr%20pulls&style=for-the-badge&logo=github" alt="GHCR">
|
||||
</a>
|
||||
<a href="https://flathub.org/apps/dev.lizardbyte.app.Sunshine">
|
||||
<img src="https://img.shields.io/flathub/downloads/dev.lizardbyte.app.Sunshine?style=for-the-badge&logo=flathub" alt="Flathub installs">
|
||||
</a>
|
||||
<a href="https://flathub.org/apps/dev.lizardbyte.app.Sunshine">
|
||||
<img src="https://img.shields.io/flathub/v/dev.lizardbyte.app.Sunshine?style=for-the-badge&logo=flathub" alt="Flathub Version">
|
||||
</a>
|
||||
<a href="https://github.com/microsoft/winget-pkgs/tree/master/manifests/l/LizardByte/Sunshine">
|
||||
<img src="https://img.shields.io/winget/v/LizardByte.Sunshine?style=for-the-badge&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHuSURBVFhH7ZfNTtRQGIYZiMDwN/IrCAqIhMSNKxcmymVwG+5dcDVsWHgDrtxwCYQVl+BChzDEwSnPY+eQ0sxoOz1mQuBNnpyvTdvz9jun5/SrjfxnJUkyQbMEz2ELduF1l0YUA3QyTrMAa2AnPtyOXsELeAYNyKtV2EC3k3lYgTOwg09ghy/BTp7CKBRV844BOpmmMV2+ySb4BmInG7AKY7AHH+EYqqhZo9PPBG/BVDlOizAD/XQFmnoPXzxRQX8M/CCYS48L6RIc4ygGHK9WGg9HZSZMUNRPVwNJGg5Hg2Qgqh4N3FsDsb6EmgYm07iwwvUxstdxJTwgmILf4CfZ6bb5OHANX8GN5x20IVxnG8ge94pt2xpwU3GnCwayF4Q2G2vgFLzHndFzQdk4q77nNfCdwL28qNyMtmEf3A1/QV5FjDiPWo5jrwf8TWZChTlgJvL4F9QL50/A43qVidTvLcuoM2wDQ1+IkgefgUpLcYwMVBqCKNJA2b0gKNocOIITOIef8C/F/CdMbh/GklynsSawKLHS8d9/B1x2LUqsfFyy3TMsWj5A1cLkotDbYO4JjWWZlZEGv8EbOIR1CAVN2eG8W5oNKgxaeC6DmTJjZs7ixUxpznLPLT+v4sXpoMLcLI3mzFSonDXIEI/M3QCIO4YuimBJ/gAAAABJRU5ErkJggg==" alt="Winget Version">
|
||||
</a>
|
||||
<a href="https://gurubase.io/g/sunshine">
|
||||
<img src="https://img.shields.io/badge/Gurubase-Ask%20Guru-ef1a1b?style=for-the-badge&logo=data:image/jpeg;base64,/9j/2wCEAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDIBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIABgAGAMBIgACEQEDEQH/xAGiAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgsQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+gEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoLEQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2gAMAwEAAhEDEQA/AOLqSO3mlilljido4QGkYDIQEgAn05IH41seFo7aS+uRKlrJci2Y2cd2QImlyOGyQPu7sA8ZxXapAlvpThbPRkv7nTQWhDoIZZRc/XaSAOmcZGOnFfP06XMr3P17F5iqE+Tl1uuvf9Lde55dRW74pit4r61EcdtFdG2U3kVqQY0lyeBgkD5duQOASawqykuV2O6jV9rTU0rXLNjf3Om3QubSXy5QCudoYEEYIIOQR7GnahqV3qk6zXk3mOqhFAUKqqOyqAAByeAKqUUXdrFezhz89lfv1+8KKKKRZ//Z" alt="Gurubase">
|
||||
</a>
|
||||
<a href="https://github.com/LizardByte/Sunshine/actions/workflows/CI.yml?query=branch%3Amaster">
|
||||
<img src="https://img.shields.io/github/actions/workflow/status/lizardbyte/sunshine/CI.yml.svg?branch=master&label=CI%20build&logo=github&style=for-the-badge" alt="GitHub Workflow Status (CI)">
|
||||
</a>
|
||||
<a href="https://github.com/LizardByte/Sunshine/actions/workflows/localize.yml?query=branch%3Amaster">
|
||||
<img src="https://img.shields.io/github/actions/workflow/status/lizardbyte/sunshine/localize.yml.svg?branch=master&label=localize%20build&logo=github&style=for-the-badge" alt="GitHub Workflow Status (localize)">
|
||||
</a>
|
||||
<a href="https://docs.lizardbyte.dev/projects/sunshine">
|
||||
<img src="https://img.shields.io/readthedocs/sunshinestream.svg?label=Docs&style=for-the-badge&logo=readthedocs" alt="Read the Docs">
|
||||
</a>
|
||||
<a href="https://codecov.io/gh/LizardByte/Sunshine">
|
||||
<img src="https://img.shields.io/codecov/c/gh/LizardByte/Sunshine?token=SMGXQ5NVMJ&style=for-the-badge&logo=codecov&label=codecov" alt="Codecov">
|
||||
</a>
|
||||
<a href="https://github.com/LizardByte/Sunshine"><img src="https://img.shields.io/github/stars/lizardbyte/sunshine.svg?logo=github&style=for-the-badge" alt="GitHub stars"></a>
|
||||
<a href="https://github.com/LizardByte/Sunshine/releases/latest"><img src="https://img.shields.io/github/downloads/lizardbyte/sunshine/total.svg?style=for-the-badge&logo=github" alt="GitHub Releases"></a>
|
||||
<a href="https://hub.docker.com/r/lizardbyte/sunshine"><img src="https://img.shields.io/docker/pulls/lizardbyte/sunshine.svg?style=for-the-badge&logo=docker" alt="Docker"></a>
|
||||
<a href="https://github.com/LizardByte/Sunshine/pkgs/container/sunshine"><img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fipitio.github.io%2Fbackage%2FLizardByte%2FSunshine%2Fsunshine.json&query=%24.downloads&label=ghcr%20pulls&style=for-the-badge&logo=github" alt="GHCR"></a>
|
||||
<a href="https://flathub.org/apps/dev.lizardbyte.app.Sunshine"><img src="https://img.shields.io/flathub/downloads/dev.lizardbyte.app.Sunshine?style=for-the-badge&logo=flathub" alt="Flathub installs"></a>
|
||||
<a href="https://flathub.org/apps/dev.lizardbyte.app.Sunshine"><img src="https://img.shields.io/flathub/v/dev.lizardbyte.app.Sunshine?style=for-the-badge&logo=flathub" alt="Flathub Version"></a>
|
||||
<a href="https://github.com/microsoft/winget-pkgs/tree/master/manifests/l/LizardByte/Sunshine"><img src="https://img.shields.io/winget/v/LizardByte.Sunshine?style=for-the-badge&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHuSURBVFhH7ZfNTtRQGIYZiMDwN/IrCAqIhMSNKxcmymVwG+5dcDVsWHgDrtxwCYQVl+BChzDEwSnPY+eQ0sxoOz1mQuBNnpyvTdvz9jun5/SrjfxnJUkyQbMEz2ELduF1l0YUA3QyTrMAa2AnPtyOXsELeAYNyKtV2EC3k3lYgTOwg09ghy/BTp7CKBRV844BOpmmMV2+ySb4BmInG7AKY7AHH+EYqqhZo9PPBG/BVDlOizAD/XQFmnoPXzxRQX8M/CCYS48L6RIc4ygGHK9WGg9HZSZMUNRPVwNJGg5Hg2Qgqh4N3FsDsb6EmgYm07iwwvUxstdxJTwgmILf4CfZ6bb5OHANX8GN5x20IVxnG8ge94pt2xpwU3GnCwayF4Q2G2vgFLzHndFzQdk4q77nNfCdwL28qNyMtmEf3A1/QV5FjDiPWo5jrwf8TWZChTlgJvL4F9QL50/A43qVidTvLcuoM2wDQ1+IkgefgUpLcYwMVBqCKNJA2b0gKNocOIITOIef8C/F/CdMbh/GklynsSawKLHS8d9/B1x2LUqsfFyy3TMsWj5A1cLkotDbYO4JjWWZlZEGv8EbOIR1CAVN2eG8W5oNKgxaeC6DmTJjZs7ixUxpznLPLT+v4sXpoMLcLI3mzFSonDXIEI/M3QCIO4YuimBJ/gAAAABJRU5ErkJggg==" alt="Winget Version"></a>
|
||||
<a href="https://gurubase.io/g/sunshine"><img src="https://img.shields.io/badge/Gurubase-Ask%20Guru-ef1a1b?style=for-the-badge&logo=data:image/jpeg;base64,/9j/2wCEAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDIBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIABgAGAMBIgACEQEDEQH/xAGiAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgsQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+gEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoLEQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2gAMAwEAAhEDEQA/AOLqSO3mlilljido4QGkYDIQEgAn05IH41seFo7aS+uRKlrJci2Y2cd2QImlyOGyQPu7sA8ZxXapAlvpThbPRkv7nTQWhDoIZZRc/XaSAOmcZGOnFfP06XMr3P17F5iqE+Tl1uuvf9Lde55dRW74pit4r61EcdtFdG2U3kVqQY0lyeBgkD5duQOASawqykuV2O6jV9rTU0rXLNjf3Om3QubSXy5QCudoYEEYIIOQR7GnahqV3qk6zXk3mOqhFAUKqqOyqAAByeAKqUUXdrFezhz89lfv1+8KKKKRZ//Z" alt="Gurubase"></a>
|
||||
<a href="https://github.com/LizardByte/Sunshine/actions/workflows/CI.yml?query=branch%3Amaster"><img src="https://img.shields.io/github/actions/workflow/status/lizardbyte/sunshine/CI.yml.svg?branch=master&label=CI%20build&logo=github&style=for-the-badge" alt="GitHub Workflow Status (CI)"></a>
|
||||
<a href="https://github.com/LizardByte/Sunshine/actions/workflows/localize.yml?query=branch%3Amaster"><img src="https://img.shields.io/github/actions/workflow/status/lizardbyte/sunshine/localize.yml.svg?branch=master&label=localize%20build&logo=github&style=for-the-badge" alt="GitHub Workflow Status (localize)"></a>
|
||||
<a href="https://docs.lizardbyte.dev/projects/sunshine"><img src="https://img.shields.io/readthedocs/sunshinestream.svg?label=Docs&style=for-the-badge&logo=readthedocs" alt="Read the Docs"></a>
|
||||
<a href="https://codecov.io/gh/LizardByte/Sunshine"><img src="https://img.shields.io/codecov/c/gh/LizardByte/Sunshine?token=SMGXQ5NVMJ&style=for-the-badge&logo=codecov&label=codecov" alt="Codecov"></a>
|
||||
</div>
|
||||
|
||||
## ℹ️ About
|
||||
@@ -188,6 +164,34 @@ LizardByte has the full documentation hosted on [Read the Docs](https://docs.liz
|
||||
|
||||
Our support methods are listed in our [LizardByte Docs](https://docs.lizardbyte.dev/latest/about/support.html).
|
||||
|
||||
## 💲 Sponsors and Supporters
|
||||
|
||||
<p align="center">
|
||||
<a href="https://app.lizardbyte.dev" aria-label="Sponsor LizardByte">
|
||||
<img src='https://raw.githubusercontent.com/LizardByte/contributors/refs/heads/dist/sponsors.svg'/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
## 👥 Contributors
|
||||
|
||||
Thank you to all the contributors who have helped make Sunshine better!
|
||||
|
||||
### GitHub
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/LizardByte/Sunshine" aria-label="GitHub">
|
||||
<img src='https://raw.githubusercontent.com/LizardByte/contributors/refs/heads/dist/github.Sunshine.svg'/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
### CrowdIn
|
||||
|
||||
<p align="center">
|
||||
<a href="https://translate.lizardbyte.dev" aria-label="CrowdIn">
|
||||
<img src='https://raw.githubusercontent.com/LizardByte/contributors/refs/heads/dist/crowdin.svg'/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<div class="section_buttons">
|
||||
|
||||
| Previous | Next |
|
||||
|
||||
@@ -20,6 +20,9 @@ install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/service/"
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/migration/"
|
||||
DESTINATION "scripts"
|
||||
COMPONENT assets)
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/path/"
|
||||
DESTINATION "scripts"
|
||||
COMPONENT assets)
|
||||
|
||||
# Configurable options for the service
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/autostart/"
|
||||
@@ -64,6 +67,7 @@ SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
|
||||
IfSilent +2 0
|
||||
ExecShell 'open' 'https://docs.lizardbyte.dev/projects/sunshine'
|
||||
nsExec::ExecToLog 'icacls \\\"$INSTDIR\\\" /reset'
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\update-path.bat\\\" add'
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\migrate-config.bat\\\"'
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\add-firewall-rule.bat\\\"'
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\install-gamepad.bat\\\"'
|
||||
@@ -78,7 +82,7 @@ set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
|
||||
"${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\delete-firewall-rule.bat\\\"'
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\uninstall-service.bat\\\"'
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\sunshine.exe\\\" --restore-nvprefs-undo'
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\${CMAKE_PROJECT_NAME}.exe\\\" --restore-nvprefs-undo'
|
||||
MessageBox MB_YESNO|MB_ICONQUESTION \
|
||||
'Do you want to remove Virtual Gamepad?' \
|
||||
/SD IDNO IDNO NoGamepad
|
||||
@@ -88,16 +92,18 @@ set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
|
||||
'Do you want to remove $INSTDIR (this includes the configuration, cover images, and settings)?' \
|
||||
/SD IDNO IDNO NoDelete
|
||||
RMDir /r \\\"$INSTDIR\\\"; skipped if no
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\update-path.bat\\\" remove'
|
||||
NoDelete:
|
||||
")
|
||||
|
||||
# Adding an option for the start menu
|
||||
set(CPACK_NSIS_MODIFY_PATH "OFF")
|
||||
set(CPACK_NSIS_MODIFY_PATH OFF)
|
||||
set(CPACK_NSIS_EXECUTABLES_DIRECTORY ".")
|
||||
# This will be shown on the installed apps Windows settings
|
||||
set(CPACK_NSIS_INSTALLED_ICON_NAME "${CMAKE_PROJECT_NAME}.exe")
|
||||
set(CPACK_NSIS_CREATE_ICONS_EXTRA
|
||||
"${CPACK_NSIS_CREATE_ICONS_EXTRA}
|
||||
SetOutPath '\$INSTDIR'
|
||||
CreateShortCut '\$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\${CMAKE_PROJECT_NAME}.lnk' \
|
||||
'\$INSTDIR\\\\${CMAKE_PROJECT_NAME}.exe' '--shortcut'
|
||||
")
|
||||
|
||||
@@ -1156,14 +1156,15 @@ editing the `conf` file in a text editor. Use the examples as reference.
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
### dd_wa_hdr_toggle
|
||||
### dd_wa_hdr_toggle_delay
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td colspan="2">
|
||||
When using virtual display device as for streaming, it might display incorrect (high-contrast) color.
|
||||
With this option enabled, Sunshine will try to mitigate this issue.
|
||||
When using virtual display device (VDD) for streaming, it might incorrectly display HDR color. Sunshine can try to mitigate this issue, by turning HDR off and then on again.<br>
|
||||
If the value is set to 0, the workaround is disabled (default). If the value is between 0 and 3000 milliseconds, Sunshine will turn off HDR, wait for the specified amount of time and then turn HDR on again. The recommended delay time is around 500 milliseconds in most cases.<br>
|
||||
DO NOT use this workaround unless you actually have issues with HDR as it directly impacts stream start time!
|
||||
@note{This option works independently of [dd_hdr_option](#dd_hdr_option)}
|
||||
@note{Applies to Windows only.}
|
||||
</td>
|
||||
@@ -1171,13 +1172,13 @@ editing the `conf` file in a text editor. Use the examples as reference.
|
||||
<tr>
|
||||
<td>Default</td>
|
||||
<td colspan="2">@code{}
|
||||
disabled
|
||||
0
|
||||
@endcode</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Example</td>
|
||||
<td colspan="2">@code{}
|
||||
dd_wa_hdr_toggle = enabled
|
||||
dd_wa_hdr_toggle_delay = 500
|
||||
@endcode</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
Read our contribution guide in our organization level
|
||||
[docs](https://docs.lizardbyte.dev/latest/developers/contributing.html).
|
||||
|
||||
## Recommended Tools
|
||||
|
||||
| Tool | Description |
|
||||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| <a href="https://www.jetbrains.com/clion/"><img src="https://resources.jetbrains.com/storage/products/company/brand/logos/CLion_icon.svg" width="30" height="30"></a><br>CLion | Recommended IDE for C++ development. Free licenses available for open source developers through the [JetBrains Open Source Program](https://www.jetbrains.com/community/opensource/). |
|
||||
|
||||
## Project Patterns
|
||||
|
||||
### Web UI
|
||||
|
||||
@@ -335,8 +335,6 @@ recommended for most users. No support will be provided!}
|
||||
scripts/uninstall-service.bat
|
||||
```
|
||||
|
||||
To uninstall, delete the extracted directory which contains the `sunshine.exe` file.
|
||||
|
||||
## Initial Setup
|
||||
After installation, some initial setup is required.
|
||||
|
||||
|
||||
@@ -118,6 +118,16 @@ system. You may also want to enable decoders, however that is not required for S
|
||||
```
|
||||
}
|
||||
|
||||
### Input not working
|
||||
After installation, the `udev` rules need to be reloaded. Our post-install script tries to do this for you
|
||||
automatically, but if it fails you may need to restart your system.
|
||||
|
||||
If the input is still not working, you may need to add your user to the `input` group.
|
||||
|
||||
```bash
|
||||
sudo usermod -aG input $USER
|
||||
```
|
||||
|
||||
@note{Other build options are listed in the
|
||||
[meson options](https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/meson_options.txt) file.}
|
||||
|
||||
|
||||
25
gh-pages-template/.readthedocs.yaml
Normal file
25
gh-pages-template/.readthedocs.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
# Read the Docs configuration file
|
||||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
||||
|
||||
version: 2
|
||||
|
||||
build:
|
||||
os: ubuntu-24.04
|
||||
tools:
|
||||
ruby: "3.3"
|
||||
apt_packages:
|
||||
- 7zip
|
||||
- jq
|
||||
jobs:
|
||||
install:
|
||||
- |
|
||||
mkdir -p "./tmp"
|
||||
branch="master"
|
||||
base_url="https://raw.githubusercontent.com/LizardByte/LizardByte.github.io"
|
||||
url="${base_url}/refs/heads/${branch}/scripts/readthedocs_build.sh"
|
||||
curl -sSL -o "./tmp/readthedocs_build.sh" "${url}"
|
||||
chmod +x "./tmp/readthedocs_build.sh"
|
||||
build:
|
||||
html:
|
||||
- "./tmp/readthedocs_build.sh"
|
||||
@@ -538,11 +538,11 @@ ext-js:
|
||||
<div class="card-footer p-3 px-4">
|
||||
<a class="latest-button btn btn-outline-light me-3 mb-3 d-none" href="https://github.com/LizardByte/Sunshine/releases/latest" target="_blank">
|
||||
<i class="fa-fw fab fa-github"></i>
|
||||
Latest: <span id="latest-version"></span>
|
||||
Latest: <span id="latest-version" class="crowdin-ignore"></span>
|
||||
</a>
|
||||
<a class="beta-button btn btn-outline-light me-3 mb-3 d-none" href="#" target="_blank">
|
||||
<i class="fa-fw fas fa-flask"></i>
|
||||
Beta: <span id="beta-version"></span>
|
||||
Beta: <span id="beta-version" class="crowdin-ignore"></span>
|
||||
</a>
|
||||
<a class="btn btn-outline-light me-3 mb-3" href="https://github.com/LizardByte/pacman-repo" target="_blank">
|
||||
<i class="fa-fw fab fa-linux"></i>
|
||||
@@ -577,16 +577,21 @@ ext-js:
|
||||
// Filter the releases to get only the stable releases
|
||||
const stableReleases = data.filter(release => !release.prerelease);
|
||||
|
||||
const latestButton = document.querySelector('.latest-button');
|
||||
const latestVersion = document.querySelector('#latest-version');
|
||||
const betaButton = document.querySelector('.beta-button');
|
||||
const betaVersion = document.querySelector('#beta-version');
|
||||
|
||||
// If there are no stable releases, hide the latest download button
|
||||
if (stableReleases.length === 0) {
|
||||
document.querySelector('.latest-button').classList.add('d-none');
|
||||
latestButton.classList.add('d-none');
|
||||
} else {
|
||||
// Show the latest download button
|
||||
document.querySelector('.latest-button').classList.remove('d-none');
|
||||
latestButton.classList.remove('d-none');
|
||||
|
||||
// Get the latest stable release
|
||||
const latestStableRelease = stableReleases[0];
|
||||
document.querySelector('#latest-version').textContent = latestStableRelease.tag_name;
|
||||
latestVersion.textContent = latestStableRelease.tag_name;
|
||||
|
||||
// If there is a pre-release, update the href attribute of the anchor tag
|
||||
if (preReleases.length > 0) {
|
||||
@@ -598,16 +603,16 @@ ext-js:
|
||||
|
||||
// If the pre-release is newer, update the href attribute of the anchor tag
|
||||
if (preReleaseDate > stableReleaseDate) {
|
||||
document.querySelector('.beta-button').href = latestPreRelease.html_url;
|
||||
document.querySelector('#beta-version').textContent = latestPreRelease.tag_name;
|
||||
document.querySelector('.beta-button').classList.remove('d-none');
|
||||
betaButton.href = latestPreRelease.html_url;
|
||||
betaVersion.textContent = latestPreRelease.tag_name;
|
||||
betaButton.classList.remove('d-none');
|
||||
} else {
|
||||
// If the pre-release is older, hide the button
|
||||
document.querySelector('.beta-button').classList.add('d-none');
|
||||
betaButton.classList.add('d-none');
|
||||
}
|
||||
} else {
|
||||
// If there is no pre-release, hide the button
|
||||
document.querySelector('.beta-button').classList.add('d-none');
|
||||
betaButton.classList.add('d-none');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
"serve": "serve ./tests/fixtures/http --no-port-switching"
|
||||
},
|
||||
"dependencies": {
|
||||
"@lizardbyte/shared-web": "2024.921.191855",
|
||||
"@lizardbyte/shared-web": "2025.326.11214",
|
||||
"vue": "3.5.13",
|
||||
"vue-i18n": "11.1.1"
|
||||
"vue-i18n": "11.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "4.6.2",
|
||||
|
||||
@@ -1,13 +1,22 @@
|
||||
# Overview
|
||||
<div align="center">
|
||||
<img src="https://raw.githubusercontent.com/LizardByte/Sunshine/master/sunshine.png" />
|
||||
<h1 align="center">Sunshine</h1>
|
||||
<h4 align="center">Self-hosted game stream host for Moonlight.</h4>
|
||||
</div>
|
||||
|
||||
[](https://flathub.org/apps/dev.lizardbyte.app.Sunshine)
|
||||
[](https://flathub.org/apps/dev.lizardbyte.app.Sunshine)
|
||||
<div align="center">
|
||||
<a href="https://flathub.org/apps/dev.lizardbyte.app.Sunshine"><img src="https://img.shields.io/flathub/downloads/dev.lizardbyte.app.Sunshine?style=for-the-badge&logo=flathub" alt="Flathub installs"></a>
|
||||
<a href="https://flathub.org/apps/dev.lizardbyte.app.Sunshine"><img src="https://img.shields.io/flathub/v/dev.lizardbyte.app.Sunshine?style=for-the-badge&logo=flathub" alt="Flathub Version"></a>
|
||||
</div>
|
||||
|
||||
LizardByte has the full documentation hosted on [Read the Docs](https://docs.lizardbyte.dev/projects/sunshine).
|
||||
|
||||
## About
|
||||
## ℹ️ About
|
||||
|
||||
Sunshine is a self-hosted game stream host for Moonlight.
|
||||
|
||||
LizardByte has the full documentation hosted on [Read the Docs](https://docs.lizardbyte.dev/projects/sunshine)
|
||||
|
||||
* [Stable](https://docs.lizardbyte.dev/projects/sunshine/latest/)
|
||||
* [Beta](https://docs.lizardbyte.dev/projects/sunshine/master/)
|
||||
|
||||
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/shared-modules updated: 802d804161...a6c788b38f
8
packaging/linux/flatpak/exceptions.json
Normal file
8
packaging/linux/flatpak/exceptions.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"dev.lizardbyte.app.Sunshine": [
|
||||
"appstream-missing-screenshots",
|
||||
"appstream-screenshots-not-mirrored-in-ostree",
|
||||
"external-gitmodule-url-found",
|
||||
"finish-args-flatpak-spawn-access"
|
||||
]
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"errors": [
|
||||
"finish-args-flatpak-spawn-access"
|
||||
],
|
||||
"info": [
|
||||
"finish-args-flatpak-spawn-access: finish-args has a talk-name access for org.freedesktop.Flatpak"
|
||||
],
|
||||
"message": "Please consult the documentation at https://docs.flathub.org/docs/for-app-authors/linter"
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"errors": [
|
||||
"appstream-missing-screenshots",
|
||||
"finish-args-flatpak-spawn-access"
|
||||
],
|
||||
"info": [
|
||||
"appstream-missing-screenshots: Catalogue file has no screenshots. Please check if screenshot URLs are reachable",
|
||||
"finish-args-flatpak-spawn-access: finish-args has a talk-name access for org.freedesktop.Flatpak"
|
||||
],
|
||||
"message": "Please consult the documentation at https://docs.flathub.org/docs/for-app-authors/linter"
|
||||
}
|
||||
@@ -11,14 +11,15 @@
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://gitlab.freedesktop.org/xorg/xserver/-/archive/xorg-server-21.1.13/xserver-xorg-server-21.1.13.tar.bz2",
|
||||
"sha256": "ee2bf6d65f4b111ce86ca817c3327dc1e70d9c958aa16876f2820caf7bf7cffa",
|
||||
"type": "git",
|
||||
"url": "https://github.com/LizardByte-infrastructure/xserver.git",
|
||||
"tag": "xorg-server-21.1.13",
|
||||
"commit": "be2767845d6ed3c6dbd25a151051294d0908a995",
|
||||
"x-checker-data": {
|
||||
"type": "anitya",
|
||||
"project-id": 5250,
|
||||
"stable-only": true,
|
||||
"url-template": "https://gitlab.freedesktop.org/xorg/xserver/-/archive/xorg-server-$version/xserver-xorg-server-$version.tar.bz2"
|
||||
"tag-template": "xorg-server-$version"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -32,14 +33,15 @@
|
||||
"buildsystem": "meson",
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://gitlab.freedesktop.org/xorg/lib/libxcvt/-/archive/libxcvt-0.1.2/libxcvt-libxcvt-0.1.2.tar.bz2",
|
||||
"sha256": "590e5a6da87ace7aa7857026b207a2c4d378620035441e20ea97efedd15d6d4a",
|
||||
"type": "git",
|
||||
"url": "https://github.com/LizardByte-infrastructure/libxcvt.git",
|
||||
"tag": "libxcvt-0.1.2",
|
||||
"commit": "d9ca87eea9eecddaccc3a77227bcb3acf84e89df",
|
||||
"x-checker-data": {
|
||||
"type": "anitya",
|
||||
"project-id": 235147,
|
||||
"stable-only": true,
|
||||
"url-template": "https://gitlab.freedesktop.org/xorg/lib/libxcvt/-/archive/libxcvt-$version/libxcvt-libxcvt-$version.tar.bz2"
|
||||
"tag-template": "libxcvt-$version"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -48,14 +50,32 @@
|
||||
"name": "libXmu",
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://xorg.freedesktop.org/archive/individual/lib/libXmu-1.2.1.tar.gz",
|
||||
"sha256": "bf0902583dd1123856c11e0a5085bd3c6e9886fbbd44954464975fd7d52eb599",
|
||||
"type": "git",
|
||||
"url": "https://github.com/LizardByte-infrastructure/libxmu.git",
|
||||
"tag": "libXmu-1.2.1",
|
||||
"commit": "792f80402ee06ce69bca3a8f2a84295999c3a170",
|
||||
"x-checker-data": {
|
||||
"type": "anitya",
|
||||
"project-id": 1785,
|
||||
"stable-only": true,
|
||||
"url-template": "https://xorg.freedesktop.org/archive/individual/lib/libXmu-$version.tar.gz"
|
||||
"tag-template": "libXmu-$version"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "font-util",
|
||||
"sources": [
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://github.com/LizardByte-infrastructure/font-util.git",
|
||||
"tag": "font-util-1.4.1",
|
||||
"commit": "b5ca142f81a6f14eddb23be050291d1c25514777",
|
||||
"x-checker-data": {
|
||||
"type": "anitya",
|
||||
"project-id": 15055,
|
||||
"stable-only": true,
|
||||
"tag-template": "font-util-$version"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -64,14 +84,15 @@
|
||||
"name": "libfontenc",
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://xorg.freedesktop.org/archive/individual/lib/libfontenc-1.1.8.tar.xz",
|
||||
"sha256": "7b02c3d405236e0d86806b1de9d6868fe60c313628b38350b032914aa4fd14c6",
|
||||
"type": "git",
|
||||
"url": "https://github.com/LizardByte-infrastructure/libfontenc.git",
|
||||
"tag": "libfontenc-1.1.8",
|
||||
"commit": "92a85fda2acb4e14ec0b2f6d8fe3eaf2b687218c",
|
||||
"x-checker-data": {
|
||||
"type": "anitya",
|
||||
"project-id": 1613,
|
||||
"stable-only": true,
|
||||
"url-template": "https://xorg.freedesktop.org/archive/individual/lib/libfontenc-$version.tar.xz"
|
||||
"tag-template": "libfontenc-$version"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -95,34 +116,19 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "font-util",
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://xorg.freedesktop.org/archive/individual/font/font-util-1.4.1.tar.gz",
|
||||
"sha256": "f029ae80cdd75d89bee7f7af61c21e07982adfb9f72344a158b99f91f77ef5ed",
|
||||
"x-checker-data": {
|
||||
"type": "anitya",
|
||||
"project-id": 15055,
|
||||
"stable-only": true,
|
||||
"url-template": "https://xorg.freedesktop.org/archive/individual/font/font-util-$version.tar.gz"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "xvfb-libXfont2",
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://xorg.freedesktop.org/archive/individual/lib/libXfont2-2.0.6.tar.gz",
|
||||
"sha256": "a944df7b6837c8fa2067f6a5fc25d89b0acc4011cd0bc085106a03557fb502fc",
|
||||
"type": "git",
|
||||
"url": "https://github.com/LizardByte-infrastructure/libxfont.git",
|
||||
"tag": "libXfont2-2.0.6",
|
||||
"commit": "d54aaf2483df6a1f98fadc09004157e657b7f73e",
|
||||
"x-checker-data": {
|
||||
"type": "anitya",
|
||||
"project-id": 17165,
|
||||
"stable-only": true,
|
||||
"url-template": "https://xorg.freedesktop.org/archive/individual/lib/libXfont2-$version.tar.gz"
|
||||
"tag-template": "libXfont2-$version"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -131,14 +137,15 @@
|
||||
"name": "xvfb-xauth",
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://gitlab.freedesktop.org/xorg/app/xauth/-/archive/xauth-1.1.1/xauth-xauth-1.1.3.tar.bz2",
|
||||
"sha256": "3cee16ebe9de0e85c62513f6d6353710407c8ebb1f855b18d03807c27d38a215",
|
||||
"type": "git",
|
||||
"url": "https://github.com/LizardByte-infrastructure/xauth.git",
|
||||
"tag": "xauth-1.1.3",
|
||||
"commit": "c29eef23683f0e3575a3c60d9314de8156fbe2c2",
|
||||
"x-checker-data": {
|
||||
"type": "anitya",
|
||||
"project-id": 5253,
|
||||
"stable-only": true,
|
||||
"url-template": "https://gitlab.freedesktop.org/xorg/app/xauth/-/archive/xauth-1.1.1/xauth-xauth-$version.tar.bz2"
|
||||
"tag-template": "xauth-$version"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -2,12 +2,23 @@
|
||||
|
||||
# User Service
|
||||
mkdir -p ~/.config/systemd/user
|
||||
cp /app/share/sunshine/systemd/user/sunshine.service $HOME/.config/systemd/user/sunshine.service
|
||||
cp /app/share/sunshine/systemd/user/sunshine.service "${HOME}/.config/systemd/user/sunshine.service"
|
||||
echo Sunshine User Service has been installed.
|
||||
echo Use [systemctl --user enable sunshine] once to autostart Sunshine on login.
|
||||
|
||||
# Udev rule
|
||||
UDEV=$(cat /app/share/sunshine/udev/rules.d/60-sunshine.rules)
|
||||
echo Configuring mouse permission.
|
||||
echo Configuring input permissions.
|
||||
flatpak-spawn --host pkexec sh -c "echo '$UDEV' > /etc/udev/rules.d/60-sunshine.rules"
|
||||
echo Restart computer for mouse permission to take effect.
|
||||
|
||||
# Reload udev rules
|
||||
path_to_udevadm=$(flatpak-spawn --host which udevadm)
|
||||
if [ -x "$path_to_udevadm" ] ; then
|
||||
echo "Reloading udev rules."
|
||||
flatpak-spawn --host "$path_to_udevadm" control --reload-rules
|
||||
flatpak-spawn --host "$path_to_udevadm" trigger --property-match=DEVNAME=/dev/uinput
|
||||
flatpak-spawn --host "$path_to_udevadm" trigger --property-match=DEVNAME=/dev/uhid
|
||||
echo "Udev rules reloadeded successfully."
|
||||
else
|
||||
echo "error: udevadm not found or not executable."
|
||||
fi
|
||||
|
||||
@@ -2,10 +2,22 @@
|
||||
|
||||
# User Service
|
||||
systemctl --user stop sunshine
|
||||
rm $HOME/.config/systemd/user/sunshine.service
|
||||
rm "${HOME}/.config/systemd/user/sunshine.service"
|
||||
systemctl --user daemon-reload
|
||||
echo Sunshine User Service has been removed.
|
||||
|
||||
# Udev rule
|
||||
echo Removing input permissions.
|
||||
flatpak-spawn --host pkexec sh -c "rm /etc/udev/rules.d/60-sunshine.rules"
|
||||
echo Mouse permission removed. Restart computer to take effect.
|
||||
|
||||
# Reload udev rules
|
||||
path_to_udevadm=$(flatpak-spawn --host which udevadm)
|
||||
if [ -x "$path_to_udevadm" ] ; then
|
||||
echo "Reloading udev rules."
|
||||
flatpak-spawn --host "$path_to_udevadm" control --reload-rules
|
||||
flatpak-spawn --host "$path_to_udevadm" trigger --property-match=DEVNAME=/dev/uinput
|
||||
flatpak-spawn --host "$path_to_udevadm" trigger --property-match=DEVNAME=/dev/uhid
|
||||
echo "Udev rules reloadeded successfully."
|
||||
else
|
||||
echo "error: udevadm not found or not executable."
|
||||
fi
|
||||
|
||||
@@ -1136,7 +1136,11 @@ namespace config {
|
||||
}
|
||||
bool_f(vars, "dd_config_revert_on_disconnect", video.dd.config_revert_on_disconnect);
|
||||
generic_f(vars, "dd_mode_remapping", video.dd.mode_remapping, dd::mode_remapping_from_view);
|
||||
bool_f(vars, "dd_wa_hdr_toggle", video.dd.wa.hdr_toggle);
|
||||
{
|
||||
int value = 0;
|
||||
int_between_f(vars, "dd_wa_hdr_toggle_delay", value, {0, 3000});
|
||||
video.dd.wa.hdr_toggle_delay = std::chrono::milliseconds {value};
|
||||
}
|
||||
|
||||
int_between_f(vars, "min_fps_factor", video.min_fps_factor, {1, 3});
|
||||
int_f(vars, "max_bitrate", video.max_bitrate);
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace config {
|
||||
|
||||
struct dd_t {
|
||||
struct workarounds_t {
|
||||
bool hdr_toggle; ///< Specify whether to apply HDR high-contrast color workaround.
|
||||
std::chrono::milliseconds hdr_toggle_delay; ///< Specify whether to apply HDR high-contrast color workaround and what delay to use.
|
||||
};
|
||||
|
||||
enum class config_option_e {
|
||||
|
||||
@@ -621,7 +621,7 @@ namespace display_device {
|
||||
std::make_shared<FileSettingsPersistence>(persistence_filepath)
|
||||
),
|
||||
WinWorkarounds {
|
||||
.m_hdr_blank_delay = video_config.dd.wa.hdr_toggle ? std::make_optional(500ms) : std::nullopt
|
||||
.m_hdr_blank_delay = video_config.dd.wa.hdr_toggle_delay != std::chrono::milliseconds::zero() ? std::make_optional(video_config.dd.wa.hdr_toggle_delay) : std::nullopt
|
||||
}
|
||||
);
|
||||
#else
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace http {
|
||||
);
|
||||
|
||||
int reload_user_creds(const std::string &file);
|
||||
bool download_file(const std::string &url, const std::string &file, long ssl_version = CURL_SSLVERSION_TLSv1_3);
|
||||
bool download_file(const std::string &url, const std::string &file, long ssl_version = CURL_SSLVERSION_TLSv1_2);
|
||||
std::string url_escape(const std::string &url);
|
||||
std::string url_get_host(const std::string &url);
|
||||
|
||||
|
||||
@@ -106,6 +106,7 @@ namespace platf {
|
||||
rumble_triggers, ///< Rumble triggers
|
||||
set_motion_event_state, ///< Set motion event state
|
||||
set_rgb_led, ///< Set RGB LED
|
||||
set_adaptive_triggers, ///< Set adaptive triggers
|
||||
};
|
||||
|
||||
struct gamepad_feedback_msg_t {
|
||||
@@ -142,6 +143,14 @@ namespace platf {
|
||||
return msg;
|
||||
}
|
||||
|
||||
static gamepad_feedback_msg_t make_adaptive_triggers(std::uint16_t id, uint8_t event_flags, uint8_t type_left, uint8_t type_right, const std::array<uint8_t, 10> &left, const std::array<uint8_t, 10> &right) {
|
||||
gamepad_feedback_msg_t msg;
|
||||
msg.type = gamepad_feedback_e::set_adaptive_triggers;
|
||||
msg.id = id;
|
||||
msg.data.adaptive_triggers = {.event_flags = event_flags, .type_left = type_left, .type_right = type_right, .left = left, .right = right};
|
||||
return msg;
|
||||
}
|
||||
|
||||
gamepad_feedback_e type;
|
||||
std::uint16_t id;
|
||||
|
||||
@@ -166,6 +175,15 @@ namespace platf {
|
||||
std::uint8_t g;
|
||||
std::uint8_t b;
|
||||
} rgb_led;
|
||||
|
||||
struct {
|
||||
uint16_t controllerNumber;
|
||||
uint8_t event_flags;
|
||||
uint8_t type_left;
|
||||
uint8_t type_right;
|
||||
std::array<uint8_t, 10> left;
|
||||
std::array<uint8_t, 10> right;
|
||||
} adaptive_triggers;
|
||||
} data;
|
||||
};
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace platf::gamepad {
|
||||
}
|
||||
|
||||
auto create_ds5() {
|
||||
return inputtino::PS5Joypad::create({.name = "Sunshine DualSense (virtual) pad", .vendor_id = 0x054C, .product_id = 0x0CE6, .version = 0x8111});
|
||||
return inputtino::PS5Joypad::create({.name = "Sunshine PS5 (virtual) pad", .vendor_id = 0x054C, .product_id = 0x0CE6, .version = 0x8111});
|
||||
}
|
||||
|
||||
int alloc(input_raw_t *raw, const gamepad_id_t &id, const gamepad_arrival_t &metadata, feedback_queue_t feedback_queue) {
|
||||
@@ -152,6 +152,10 @@ namespace platf::gamepad {
|
||||
gamepad->last_rgb_led = msg;
|
||||
});
|
||||
|
||||
(*ds5).set_on_trigger_effect([feedback_queue, idx = id.clientRelativeIndex](const inputtino::PS5Joypad::TriggerEffect &trigger_effect) {
|
||||
feedback_queue->raise(gamepad_feedback_msg_t::make_adaptive_triggers(idx, trigger_effect.event_flags, trigger_effect.type_left, trigger_effect.type_right, trigger_effect.left, trigger_effect.right));
|
||||
});
|
||||
|
||||
// Activate the motion sensors
|
||||
feedback_queue->raise(gamepad_feedback_msg_t::make_motion_event_state(id.clientRelativeIndex, LI_MOTION_TYPE_ACCEL, 100));
|
||||
feedback_queue->raise(gamepad_feedback_msg_t::make_motion_event_state(id.clientRelativeIndex, LI_MOTION_TYPE_GYRO, 100));
|
||||
|
||||
@@ -48,6 +48,7 @@ extern "C" {
|
||||
#define IDX_RUMBLE_TRIGGER_DATA 12
|
||||
#define IDX_SET_MOTION_EVENT 13
|
||||
#define IDX_SET_RGB_LED 14
|
||||
#define IDX_SET_ADAPTIVE_TRIGGERS 15
|
||||
|
||||
static const short packetTypes[] = {
|
||||
0x0305, // Start A
|
||||
@@ -65,6 +66,7 @@ static const short packetTypes[] = {
|
||||
0x5500, // Rumble triggers (Sunshine protocol extension)
|
||||
0x5501, // Set motion event (Sunshine protocol extension)
|
||||
0x5502, // Set RGB LED (Sunshine protocol extension)
|
||||
0x5503, // Set Adaptive triggers (Sunshine protocol extension)
|
||||
};
|
||||
|
||||
namespace asio = boost::asio;
|
||||
@@ -186,6 +188,21 @@ namespace stream {
|
||||
std::uint8_t b;
|
||||
};
|
||||
|
||||
struct control_adaptive_triggers_t {
|
||||
control_header_v2 header;
|
||||
|
||||
std::uint16_t id;
|
||||
/**
|
||||
* 0x04 - Right trigger
|
||||
* 0x08 - Left trigger
|
||||
*/
|
||||
std::uint8_t event_flags;
|
||||
std::uint8_t type_left;
|
||||
std::uint8_t type_right;
|
||||
std::uint8_t left[DS_EFFECT_PAYLOAD_SIZE];
|
||||
std::uint8_t right[DS_EFFECT_PAYLOAD_SIZE];
|
||||
};
|
||||
|
||||
struct control_hdr_mode_t {
|
||||
control_header_v2 header;
|
||||
|
||||
@@ -833,6 +850,22 @@ namespace stream {
|
||||
plaintext.b = data.b;
|
||||
|
||||
BOOST_LOG(verbose) << "RGB: "sv << msg.id << " :: "sv << util::hex(data.r).to_string_view() << util::hex(data.g).to_string_view() << util::hex(data.b).to_string_view();
|
||||
std::array<std::uint8_t, sizeof(control_encrypted_t) + crypto::cipher::round_to_pkcs7_padded(sizeof(plaintext)) + crypto::cipher::tag_size>
|
||||
encrypted_payload;
|
||||
|
||||
payload = encode_control(session, util::view(plaintext), encrypted_payload);
|
||||
} else if (msg.type == platf::gamepad_feedback_e::set_adaptive_triggers) {
|
||||
control_adaptive_triggers_t plaintext;
|
||||
plaintext.header.type = packetTypes[IDX_SET_ADAPTIVE_TRIGGERS];
|
||||
plaintext.header.payloadLength = sizeof(plaintext) - sizeof(control_header_v2);
|
||||
|
||||
plaintext.id = util::endian::little(msg.id);
|
||||
plaintext.event_flags = msg.data.adaptive_triggers.event_flags;
|
||||
plaintext.type_left = msg.data.adaptive_triggers.type_left;
|
||||
std::ranges::copy(msg.data.adaptive_triggers.left, plaintext.left);
|
||||
plaintext.type_right = msg.data.adaptive_triggers.type_right;
|
||||
std::ranges::copy(msg.data.adaptive_triggers.right, plaintext.right);
|
||||
|
||||
std::array<std::uint8_t, sizeof(control_encrypted_t) + crypto::cipher::round_to_pkcs7_padded(sizeof(plaintext)) + crypto::cipher::tag_size>
|
||||
encrypted_payload;
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
"dd_config_revert_delay": 3000,
|
||||
"dd_config_revert_on_disconnect": "disabled",
|
||||
"dd_mode_remapping": {"mixed": [], "resolution_only": [], "refresh_rate_only": []},
|
||||
"dd_wa_hdr_toggle": "disabled",
|
||||
"dd_wa_hdr_toggle_delay": 0,
|
||||
"min_fps_factor": 1,
|
||||
"max_bitrate": 0,
|
||||
},
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import PlatformLayout from '../../../PlatformLayout.vue'
|
||||
import Checkbox from "../../../Checkbox.vue";
|
||||
|
||||
const props = defineProps({
|
||||
platform: String,
|
||||
@@ -132,11 +131,18 @@ function addRemappingEntry() {
|
||||
<option value="auto">{{ $t('config.dd_hdr_option_auto') }}</option>
|
||||
</select>
|
||||
<!-- HDR toggle -->
|
||||
<Checkbox id="dd_wa_hdr_toggle"
|
||||
locale-prefix="config"
|
||||
v-model="config.dd_wa_hdr_toggle"
|
||||
default="false"
|
||||
></Checkbox>
|
||||
<label for="dd_wa_hdr_toggle_delay" class="form-label">
|
||||
{{ $t('config.dd_wa_hdr_toggle_delay') }}
|
||||
</label>
|
||||
<input type="number" class="form-control" id="dd_wa_hdr_toggle_delay" placeholder="0" min="0" max="3000"
|
||||
v-model="config.dd_wa_hdr_toggle_delay" />
|
||||
<div class="form-text">
|
||||
{{ $t('config.dd_wa_hdr_toggle_delay_desc_1') }}
|
||||
<br>
|
||||
{{ $t('config.dd_wa_hdr_toggle_delay_desc_2') }}
|
||||
<br>
|
||||
{{ $t('config.dd_wa_hdr_toggle_delay_desc_3') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Config revert delay -->
|
||||
|
||||
@@ -189,8 +189,10 @@
|
||||
"dd_resolution_option_manual": "Use manually entered resolution",
|
||||
"dd_resolution_option_manual_desc": "Enter the resolution to be used",
|
||||
"dd_resolution_option_ogs_desc": "\"Optimize game settings\" option must be enabled on the Moonlight client for this to work.",
|
||||
"dd_wa_hdr_toggle_desc": "When using virtual display device as for streaming, it might display incorrect HDR color. With this option enabled, Sunshine will try to mitigate this issue.",
|
||||
"dd_wa_hdr_toggle": "Enable high-contrast workaround for HDR",
|
||||
"dd_wa_hdr_toggle_delay_desc_1": "When using virtual display device (VDD) for streaming, it might incorrectly display HDR color. Sunshine can try to mitigate this issue, by turning HDR off and then on again.",
|
||||
"dd_wa_hdr_toggle_delay_desc_2": "If the value is set to 0, the workaround is disabled (default). If the value is between 0 and 3000 milliseconds, Sunshine will turn off HDR, wait for the specified amount of time and then turn HDR on again. The recommended delay time is around 500 milliseconds in most cases.",
|
||||
"dd_wa_hdr_toggle_delay_desc_3": "DO NOT use this workaround unless you actually have issues with HDR as it directly impacts stream start time!",
|
||||
"dd_wa_hdr_toggle_delay": "High-contrast workaround for HDR",
|
||||
"ds4_back_as_touchpad_click": "Map Back/Select to Touchpad Click",
|
||||
"ds4_back_as_touchpad_click_desc": "When forcing DS4 emulation, map Back/Select to Touchpad Click",
|
||||
"encoder": "Force a Specific Encoder",
|
||||
|
||||
@@ -1,2 +1,11 @@
|
||||
# Allows Sunshine to acces /dev/uinput
|
||||
KERNEL=="uinput", SUBSYSTEM=="misc", OPTIONS+="static_node=uinput", TAG+="uaccess"
|
||||
|
||||
# Allows Sunshine to access /dev/uhid
|
||||
KERNEL=="uhid", TAG+="uaccess"
|
||||
|
||||
# Joypads
|
||||
KERNEL=="hidraw*" ATTRS{name}=="Sunshine PS5 (virtual) pad" MODE="0660", TAG+="uaccess"
|
||||
SUBSYSTEMS=="input", ATTRS{name}=="Sunshine X-Box One (virtual) pad", MODE="0660", TAG+="uaccess"
|
||||
SUBSYSTEMS=="input", ATTRS{name}=="Sunshine gamepad (virtual) motion sensors", MODE="0660", TAG+="uaccess"
|
||||
SUBSYSTEMS=="input", ATTRS{name}=="Sunshine Nintendo (virtual) pad", MODE="0660", TAG+="uaccess"
|
||||
|
||||
111
src_assets/windows/misc/path/update-path.bat
Normal file
111
src_assets/windows/misc/path/update-path.bat
Normal file
@@ -0,0 +1,111 @@
|
||||
@echo off
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
rem Check if parameter is provided
|
||||
if "%~1"=="" (
|
||||
echo Usage: %0 [add^|remove]
|
||||
echo add - Adds Sunshine directories to system PATH
|
||||
echo remove - Removes Sunshine directories from system PATH
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
rem Get sunshine root directory
|
||||
for %%I in ("%~dp0\..") do set "ROOT_DIR=%%~fI"
|
||||
echo Sunshine root directory: !ROOT_DIR!
|
||||
|
||||
rem Define directories to add to path
|
||||
set "PATHS_TO_MANAGE[0]=!ROOT_DIR!"
|
||||
set "PATHS_TO_MANAGE[1]=!ROOT_DIR!\tools"
|
||||
|
||||
rem System path registry location
|
||||
set "KEY_NAME=HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
|
||||
set "VALUE_NAME=Path"
|
||||
|
||||
rem Get the current path
|
||||
for /f "tokens=2*" %%A in ('reg query "%KEY_NAME%" /v "%VALUE_NAME%"') do set "CURRENT_PATH=%%B"
|
||||
echo Current path: !CURRENT_PATH!
|
||||
|
||||
rem Check if adding to path
|
||||
if /i "%~1"=="add" (
|
||||
set "NEW_PATH=!CURRENT_PATH!"
|
||||
|
||||
rem Process each directory to add
|
||||
for /L %%i in (0,1,1) do (
|
||||
set "DIR_TO_ADD=!PATHS_TO_MANAGE[%%i]!"
|
||||
|
||||
rem Check if path already contains this directory
|
||||
echo "!CURRENT_PATH!" | findstr /i /c:"!DIR_TO_ADD!" > nul
|
||||
if !ERRORLEVEL!==0 (
|
||||
echo !DIR_TO_ADD! already in path
|
||||
) else (
|
||||
echo Adding to path: !DIR_TO_ADD!
|
||||
set "NEW_PATH=!NEW_PATH!;!DIR_TO_ADD!"
|
||||
)
|
||||
)
|
||||
|
||||
rem Only update if path was changed
|
||||
if "!NEW_PATH!" neq "!CURRENT_PATH!" (
|
||||
rem Set the new path in the registry
|
||||
reg add "%KEY_NAME%" /v "%VALUE_NAME%" /t REG_EXPAND_SZ /d "!NEW_PATH!" /f
|
||||
if !ERRORLEVEL!==0 (
|
||||
echo Successfully added Sunshine directories to PATH
|
||||
) else (
|
||||
echo Failed to add Sunshine directories to PATH
|
||||
)
|
||||
) else (
|
||||
echo No changes needed to PATH
|
||||
)
|
||||
exit /b !ERRORLEVEL!
|
||||
)
|
||||
|
||||
rem Check if removing from path
|
||||
if /i "%~1"=="remove" (
|
||||
set "CHANGES_MADE=0"
|
||||
|
||||
rem Process each directory to remove
|
||||
for /L %%i in (0,1,1) do (
|
||||
set "DIR_TO_REMOVE=!PATHS_TO_MANAGE[%%i]!"
|
||||
|
||||
rem Check if path contains this directory
|
||||
echo "!CURRENT_PATH!" | findstr /i /c:"!DIR_TO_REMOVE!" > nul
|
||||
if !ERRORLEVEL!==0 (
|
||||
echo Removing from path: !DIR_TO_REMOVE!
|
||||
|
||||
rem Build a new path by parsing and filtering the current path
|
||||
set "NEW_PATH="
|
||||
for %%p in ("!CURRENT_PATH:;=" "!") do (
|
||||
set "PART=%%~p"
|
||||
if /i "!PART!" NEQ "!DIR_TO_REMOVE!" (
|
||||
if defined NEW_PATH (
|
||||
set "NEW_PATH=!NEW_PATH!;!PART!"
|
||||
) else (
|
||||
set "NEW_PATH=!PART!"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
set "CURRENT_PATH=!NEW_PATH!"
|
||||
set "CHANGES_MADE=1"
|
||||
) else (
|
||||
echo !DIR_TO_REMOVE! not found in path
|
||||
)
|
||||
)
|
||||
|
||||
rem Only update if path was changed
|
||||
if "!CHANGES_MADE!"=="1" (
|
||||
rem Set the new path in the registry
|
||||
reg add "%KEY_NAME%" /v "%VALUE_NAME%" /t REG_EXPAND_SZ /d "!CURRENT_PATH!" /f
|
||||
if !ERRORLEVEL!==0 (
|
||||
echo Successfully removed Sunshine directories from PATH
|
||||
) else (
|
||||
echo Failed to remove Sunshine directories from PATH
|
||||
)
|
||||
) else (
|
||||
echo No changes needed to PATH
|
||||
)
|
||||
exit /b !ERRORLEVEL!
|
||||
)
|
||||
|
||||
echo Unknown parameter: %~1
|
||||
echo Usage: %0 [add^|remove]
|
||||
exit /b 1
|
||||
2
third-party/build-deps
vendored
2
third-party/build-deps
vendored
Submodule third-party/build-deps updated: 249a313844...b567d3c479
2
third-party/inputtino
vendored
2
third-party/inputtino
vendored
Submodule third-party/inputtino updated: 311fd2deea...fd136cfe49
2
third-party/moonlight-common-c
vendored
2
third-party/moonlight-common-c
vendored
Submodule third-party/moonlight-common-c updated: d3d3e6cf01...e95feaf495
2
third-party/nvapi-open-source-sdk
vendored
2
third-party/nvapi-open-source-sdk
vendored
Submodule third-party/nvapi-open-source-sdk updated: c873858214...cce4e90b62
Reference in New Issue
Block a user