From ff688d92358d68332e0bb016e6bfb442a8cc734b Mon Sep 17 00:00:00 2001 From: LizardByte-bot <108553330+LizardByte-bot@users.noreply.github.com> Date: Mon, 16 Oct 2023 09:11:27 -0400 Subject: [PATCH 001/197] ci: update release notifier (#1755) --- .github/workflows/release-notifier.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-notifier.yml b/.github/workflows/release-notifier.yml index 5161fc5f5d5..2827224b8bf 100644 --- a/.github/workflows/release-notifier.yml +++ b/.github/workflows/release-notifier.yml @@ -15,7 +15,7 @@ on: jobs: discord: if: >- - (github.repository, 'LizardByte/') and + startsWith(github.repository, 'LizardByte/') and not(github.event.release.prerelease) and not(github.event.release.draft) runs-on: ubuntu-latest @@ -34,7 +34,7 @@ jobs: facebook_group: if: >- - (github.repository, 'LizardByte/') and + startsWith(github.repository, 'LizardByte/') and not(github.event.release.prerelease) and not(github.event.release.draft) runs-on: ubuntu-latest @@ -51,7 +51,7 @@ jobs: facebook_page: if: >- - (github.repository, 'LizardByte/') and + startsWith(github.repository, 'LizardByte/') and not(github.event.release.prerelease) and not(github.event.release.draft) runs-on: ubuntu-latest @@ -68,7 +68,7 @@ jobs: reddit: if: >- - (github.repository, 'LizardByte/') and + startsWith(github.repository, 'LizardByte/') and not(github.event.release.prerelease) and not(github.event.release.draft) runs-on: ubuntu-latest @@ -88,7 +88,7 @@ jobs: twitter: if: >- - (github.repository, 'LizardByte/') and + startsWith(github.repository, 'LizardByte/') and not(github.event.release.prerelease) and not(github.event.release.draft) runs-on: ubuntu-latest From 82d0ff6699ccadc85a18b578421f8a44a4211f67 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 23:10:29 -0400 Subject: [PATCH 002/197] build(deps): bump third-party/wayland-protocols from `681c33c` to `d70af2e` (#1753) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third-party/wayland-protocols | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third-party/wayland-protocols b/third-party/wayland-protocols index 681c33c8547..d70af2ea1e9 160000 --- a/third-party/wayland-protocols +++ b/third-party/wayland-protocols @@ -1 +1 @@ -Subproject commit 681c33c8547d6aefe24455ba2bffe1c5ae11fee5 +Subproject commit d70af2ea1e9892f16ec5d25fd04e36826b7e3aef From e7fc2ed49af0a309ddeae4c82bc95bd7e993c7c9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Oct 2023 09:04:39 -0400 Subject: [PATCH 003/197] build(deps): bump third-party/nv-codec-headers from `9402b5a` to `22441b5` (#1725) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third-party/nv-codec-headers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third-party/nv-codec-headers b/third-party/nv-codec-headers index 9402b5a7693..22441b505d9 160000 --- a/third-party/nv-codec-headers +++ b/third-party/nv-codec-headers @@ -1 +1 @@ -Subproject commit 9402b5a7693e9841f8a4f4488cd2df21ac55c685 +Subproject commit 22441b505d9d9afc1e3002290820909846c24bdc From 48a6d2af6f6f29d79b8f0c10fa2b439afaa49590 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Oct 2023 09:52:13 -0400 Subject: [PATCH 004/197] Bump third-party/nanors from `395e5ad` to `e9e242e` (#1090) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third-party/nanors | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third-party/nanors b/third-party/nanors index 395e5ada44d..e9e242e98e2 160000 --- a/third-party/nanors +++ b/third-party/nanors @@ -1 +1 @@ -Subproject commit 395e5ada44dd8d5974eaf6bb6b17f23406e3ca72 +Subproject commit e9e242e98e27037830490b2a752895ca68f75f8b From 2617241d7bcbf2ed81245983ced9e14ac90eeb37 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Oct 2023 10:56:05 -0400 Subject: [PATCH 005/197] build(deps): bump third-party/Simple-Web-Server from `2f29926` to `27b41f5` (#1217) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third-party/Simple-Web-Server | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third-party/Simple-Web-Server b/third-party/Simple-Web-Server index 2f29926dbbc..27b41f5ee15 160000 --- a/third-party/Simple-Web-Server +++ b/third-party/Simple-Web-Server @@ -1 +1 @@ -Subproject commit 2f29926dbbcd8a0425064d98c24f37ac50bd0b5b +Subproject commit 27b41f5ee154cca0fce4fe2955dd886d04e3a4ed From f80251f1723fa67a20c7ba7e2379ddcc702f8619 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Oct 2023 11:31:15 -0400 Subject: [PATCH 006/197] build(deps): bump third-party/miniupnp from `e439318` to `fb5c328` (#1511) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third-party/miniupnp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third-party/miniupnp b/third-party/miniupnp index e439318cf78..fb5c328a5e8 160000 --- a/third-party/miniupnp +++ b/third-party/miniupnp @@ -1 +1 @@ -Subproject commit e439318cf782e30066d430f27a1365e013a5ab94 +Subproject commit fb5c328a5e8fd57a3ec0f5d33915377a5d3581f3 From 8096364a0a72f9799e0e6bead61f43d6c94a5599 Mon Sep 17 00:00:00 2001 From: LizardByte-bot <108553330+LizardByte-bot@users.noreply.github.com> Date: Tue, 17 Oct 2023 13:16:05 -0400 Subject: [PATCH 007/197] Bump ffmpeg (#1717) --- third-party/ffmpeg-linux-aarch64 | 2 +- third-party/ffmpeg-linux-powerpc64le | 2 +- third-party/ffmpeg-linux-x86_64 | 2 +- third-party/ffmpeg-macos-aarch64 | 2 +- third-party/ffmpeg-macos-x86_64 | 2 +- third-party/ffmpeg-windows-x86_64 | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/third-party/ffmpeg-linux-aarch64 b/third-party/ffmpeg-linux-aarch64 index 8b8848d40df..315b077e231 160000 --- a/third-party/ffmpeg-linux-aarch64 +++ b/third-party/ffmpeg-linux-aarch64 @@ -1 +1 @@ -Subproject commit 8b8848d40df336cb290e58b7e57c396009100595 +Subproject commit 315b077e23127a4c0bf3cff3bb6576e64497ff29 diff --git a/third-party/ffmpeg-linux-powerpc64le b/third-party/ffmpeg-linux-powerpc64le index 9dadebb470b..4074d524629 160000 --- a/third-party/ffmpeg-linux-powerpc64le +++ b/third-party/ffmpeg-linux-powerpc64le @@ -1 +1 @@ -Subproject commit 9dadebb470b99483ab7a5c9d5ac52f299bae42f7 +Subproject commit 4074d524629ca53f8df2365be30ec93abe5439e9 diff --git a/third-party/ffmpeg-linux-x86_64 b/third-party/ffmpeg-linux-x86_64 index e0169be4b69..c887d24822c 160000 --- a/third-party/ffmpeg-linux-x86_64 +++ b/third-party/ffmpeg-linux-x86_64 @@ -1 +1 @@ -Subproject commit e0169be4b6929ca8ed0068ea25db3d62baa1335d +Subproject commit c887d24822cccbf1dc01a0cfacc977db46e318db diff --git a/third-party/ffmpeg-macos-aarch64 b/third-party/ffmpeg-macos-aarch64 index 4537513b457..fe12a607ed8 160000 --- a/third-party/ffmpeg-macos-aarch64 +++ b/third-party/ffmpeg-macos-aarch64 @@ -1 +1 @@ -Subproject commit 4537513b457ec50926d5ef81c579504364d0fa21 +Subproject commit fe12a607ed8357611ec2dabc7e31a6cc1557b003 diff --git a/third-party/ffmpeg-macos-x86_64 b/third-party/ffmpeg-macos-x86_64 index 7057139d873..97ff12c2282 160000 --- a/third-party/ffmpeg-macos-x86_64 +++ b/third-party/ffmpeg-macos-x86_64 @@ -1 +1 @@ -Subproject commit 7057139d8731cfb577859f832ff59402137fdff2 +Subproject commit 97ff12c22822bf33553be7789b6c5e152b00221a diff --git a/third-party/ffmpeg-windows-x86_64 b/third-party/ffmpeg-windows-x86_64 index bbf911e6b2a..9bebfe2cfab 160000 --- a/third-party/ffmpeg-windows-x86_64 +++ b/third-party/ffmpeg-windows-x86_64 @@ -1 +1 @@ -Subproject commit bbf911e6b2a2f3c2c0ca1675a11ed3e1bdd36e9a +Subproject commit 9bebfe2cfab475549bc2b700449586a4a458fce5 From 5b052d7c2c059aa26fdf79cc87885af2f461f544 Mon Sep 17 00:00:00 2001 From: Ehab Ajmal <33014707+ehabajmal@users.noreply.github.com> Date: Thu, 19 Oct 2023 10:43:42 -0400 Subject: [PATCH 008/197] Add guide for setting custom res with nvidia on linux (#1767) Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> --- docs/source/about/guides/app_examples.rst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/source/about/guides/app_examples.rst b/docs/source/about/guides/app_examples.rst index 4cb45b7d5c1..e0bc543253a 100644 --- a/docs/source/about/guides/app_examples.rst +++ b/docs/source/about/guides/app_examples.rst @@ -197,6 +197,28 @@ Changing Resolution and Refresh Rate (Linux - KDE Plasma - Wayland and X11) | | Undo: ``kscreen-doctor output.HDMI-A-1.mode.3840x2160@120`` | +----------------------+----------------------------------------------------------------------------------------------------------------------------------+ +Changing Resolution (Linux - NVIDIA) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ++----------------------+------------------------------------------------------------------------------------------------------+ +| **Field** | **Value** | ++----------------------+------------------------------------------------------------------------------------------------------+ +| Command Preparations | Do: ``sh -c "${HOME}/scripts/set-custom-res.sh ${SUNSHINE_CLIENT_WIDTH} ${SUNSHINE_CLIENT_HEIGHT}"`` | +| +------------------------------------------------------------------------------------------------------+ +| | Undo: ``sh -c "${HOME}/scripts/set-custom-res.sh 3840 2160"`` | ++----------------------+------------------------------------------------------------------------------------------------------+ + +The ``set-custom-res.sh`` will have this content: + .. code-block:: bash + + #!/bin/bash + + # Get params and set any defaults + width=${1:-1920} + height=${2:-1080} + output=${3:-HDMI-1} + nvidia-settings -a CurrentMetaMode="${output}: nvidia-auto-select { ViewPortIn=${width}x${height}, ViewPortOut=${width}x${height}+0+0 }" + Flatpak ^^^^^^^ From 3212b036a1822c7225673c7c1eb742998700a03f Mon Sep 17 00:00:00 2001 From: Erick C Date: Sun, 22 Oct 2023 15:03:33 -0400 Subject: [PATCH 009/197] Manual DS4 mode: Allow Back/Select to trigger Touchpad click (#1772) Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> --- docs/source/about/advanced_usage.rst | 17 +++++++++++++++++ src/config.cpp | 2 ++ src/config.h | 1 + src/platform/windows/input.cpp | 5 ++++- src_assets/common/assets/web/config.html | 24 ++++++++++++++++++++++++ 5 files changed, 48 insertions(+), 1 deletion(-) diff --git a/docs/source/about/advanced_usage.rst b/docs/source/about/advanced_usage.rst index e9bba6781f1..c9d9ebae3b4 100644 --- a/docs/source/about/advanced_usage.rst +++ b/docs/source/about/advanced_usage.rst @@ -152,6 +152,23 @@ gamepad .. code-block:: text gamepad = auto + +ds4_back_as_touchpad_click +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**Description** + .. Hint:: Only applies when gamepad is set to ds4 manually. Unused in other gamepad modes. + + Allow Select/Back inputs to also trigger DS4 touchpad click. Useful for clients looking to emulate touchpad click + on Xinput devices. + +**Default** + ``enabled`` + +**Example** + .. code-block:: text + + ds4_back_as_touchpad_click = enabled back_button_timeout ^^^^^^^^^^^^^^^^^^^ diff --git a/src/config.cpp b/src/config.cpp index 726f67f8ca7..d5932d62cfe 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -418,6 +418,7 @@ namespace config { platf::supported_gamepads().front().data(), platf::supported_gamepads().front().size(), }, // Default gamepad + true, // back as touchpad click enabled (manual DS4 only) true, // keyboard enabled true, // mouse enabled @@ -1041,6 +1042,7 @@ namespace config { } string_restricted_f(vars, "gamepad"s, input.gamepad, platf::supported_gamepads()); + bool_f(vars, "ds4_back_as_touchpad_click", input.ds4_back_as_touchpad_click); bool_f(vars, "mouse", input.mouse); bool_f(vars, "keyboard", input.keyboard); diff --git a/src/config.h b/src/config.h index 090e6b6864d..749a8556d11 100644 --- a/src/config.h +++ b/src/config.h @@ -112,6 +112,7 @@ namespace config { std::chrono::duration key_repeat_period; std::string gamepad; + bool ds4_back_as_touchpad_click; bool keyboard; bool mouse; diff --git a/src/platform/windows/input.cpp b/src/platform/windows/input.cpp index ca9cfba7b93..29dd758acc1 100644 --- a/src/platform/windows/input.cpp +++ b/src/platform/windows/input.cpp @@ -1174,7 +1174,7 @@ namespace platf { BOOST_LOG(info) << "Gamepad " << id.globalIndex << " will be Xbox 360 controller (manual selection)"sv; selectedGamepadType = Xbox360Wired; } - else if (config::input.gamepad == "ps4"sv || config::input.gamepad == "ds4"sv) { + else if (config::input.gamepad == "ds4"sv) { BOOST_LOG(info) << "Gamepad " << id.globalIndex << " will be DualShock 4 controller (manual selection)"sv; selectedGamepadType = DualShock4Wired; } @@ -1334,6 +1334,9 @@ namespace platf { // Allow either PS4/PS5 clickpad button or Xbox Series X share button to activate DS4 clickpad if (gamepad_state.buttonFlags & (TOUCHPAD_BUTTON | MISC_BUTTON)) buttons |= DS4_SPECIAL_BUTTON_TOUCHPAD; + // Manual DS4 emulation: check if BACK button should also trigger DS4 touchpad click + if (config::input.gamepad == "ds4"sv && config::input.ds4_back_as_touchpad_click && (gamepad_state.buttonFlags & BACK)) buttons |= DS4_SPECIAL_BUTTON_TOUCHPAD; + return (DS4_SPECIAL_BUTTONS) buttons; } diff --git a/src_assets/common/assets/web/config.html b/src_assets/common/assets/web/config.html index 6f9e89de027..6e2b61b760c 100644 --- a/src_assets/common/assets/web/config.html +++ b/src_assets/common/assets/web/config.html @@ -105,6 +105,29 @@

Configuration

Choose which type of gamepad to emulate on the host
+
+
+

+ +

+
+
+
+ + +
When forcing DS4 emulation, map Back/Select to Touchpad Click
+
+
+
+
+
@@ -1136,6 +1159,7 @@

"capture": "", "controller": "enabled", "install_steam_audio_drivers": "enabled", + "ds4_back_as_touchpad_click": "enabled", "dwmflush": "enabled", "encoder": "", "fps": "[10,30,60,90,120]", From ab3ff2d355985a61d6d3420a3982333b6010000f Mon Sep 17 00:00:00 2001 From: detiam <44510779+detiam@users.noreply.github.com> Date: Thu, 26 Oct 2023 02:14:28 +0800 Subject: [PATCH 010/197] Update linux sunshine.desktop (#1768) --- cmake/packaging/linux.cmake | 7 ++++++- cmake/prep/special_package_configuration.cmake | 2 ++ packaging/linux/AppImage/sunshine.desktop | 3 ++- packaging/linux/flatpak/sunshine.desktop | 15 +++++++++++++-- packaging/linux/flatpak/sunshine_kms.desktop | 7 ++----- packaging/linux/sunshine.desktop | 12 +++++++++--- packaging/linux/sunshine_terminal.desktop | 6 ++++++ 7 files changed, 40 insertions(+), 12 deletions(-) create mode 100644 packaging/linux/sunshine_terminal.desktop diff --git a/cmake/packaging/linux.cmake b/cmake/packaging/linux.cmake index aee40cb7f1b..842277b9d27 100644 --- a/cmake/packaging/linux.cmake +++ b/cmake/packaging/linux.cmake @@ -88,7 +88,12 @@ endif() # desktop file # todo - validate desktop files with `desktop-file-validate` -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.desktop" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications") +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.desktop" + DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications") +if(NOT ${SUNSHINE_BUILD_APPIMAGE}) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine_terminal.desktop" + DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications") +endif() if(${SUNSHINE_BUILD_FLATPAK}) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine_kms.desktop" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications") diff --git a/cmake/prep/special_package_configuration.cmake b/cmake/prep/special_package_configuration.cmake index cd285a65acc..3094c2399a5 100644 --- a/cmake/prep/special_package_configuration.cmake +++ b/cmake/prep/special_package_configuration.cmake @@ -9,8 +9,10 @@ elseif (UNIX) elseif(${SUNSHINE_BUILD_FLATPAK}) configure_file(packaging/linux/flatpak/sunshine.desktop sunshine.desktop @ONLY) configure_file(packaging/linux/flatpak/sunshine_kms.desktop sunshine_kms.desktop @ONLY) + configure_file(packaging/linux/sunshine_terminal.desktop sunshine_terminal.desktop @ONLY) else() configure_file(packaging/linux/sunshine.desktop sunshine.desktop @ONLY) + configure_file(packaging/linux/sunshine_terminal.desktop sunshine_terminal.desktop @ONLY) endif() # configure metadata file diff --git a/packaging/linux/AppImage/sunshine.desktop b/packaging/linux/AppImage/sunshine.desktop index a345e5dc467..911735c8c2f 100644 --- a/packaging/linux/AppImage/sunshine.desktop +++ b/packaging/linux/AppImage/sunshine.desktop @@ -5,7 +5,8 @@ Exec=sunshine Version=1.0 Comment=@PROJECT_DESCRIPTION@ Icon=sunshine -Categories=Utility; +Keywords=gamestream;stream;moonlight;remote play; +Categories=AudioVideo;Network;RemoteAccess; Terminal=true X-AppImage-Name=sunshine X-AppImage-Version=@PROJECT_VERSION@ diff --git a/packaging/linux/flatpak/sunshine.desktop b/packaging/linux/flatpak/sunshine.desktop index acfced8d7a6..33124ab842f 100644 --- a/packaging/linux/flatpak/sunshine.desktop +++ b/packaging/linux/flatpak/sunshine.desktop @@ -5,5 +5,16 @@ Exec=flatpak run dev.lizardbyte.sunshine Version=1.0 Comment=@PROJECT_DESCRIPTION@ Icon=sunshine -Categories=Utility; -Terminal=true +Keywords=gamestream;stream;moonlight;remote play; +Categories=AudioVideo;Network;RemoteAccess; +Actions=RunInTerminal;KMS; + +[Desktop Action RunInTerminal] +Name=Run in Terminal +Icon=application-x-executable +Exec=gio launch @CMAKE_INSTALL_PREFIX@/share/applications/sunshine_terminal.desktop + +[Desktop Action KMS] +Name=Run in Terminal (KMS) +Icon=application-x-executable +Exec=gio launch @CMAKE_INSTALL_PREFIX@/share/applications/sunshine_kms.desktop diff --git a/packaging/linux/flatpak/sunshine_kms.desktop b/packaging/linux/flatpak/sunshine_kms.desktop index 139fd0c4cb7..521f4b936ae 100644 --- a/packaging/linux/flatpak/sunshine_kms.desktop +++ b/packaging/linux/flatpak/sunshine_kms.desktop @@ -1,9 +1,6 @@ [Desktop Entry] -Type=Application Name=@PROJECT_NAME@ (KMS) Exec=sudo -i PULSE_SERVER=unix:$(pactl info | awk '/Server String/{print$3}') flatpak run dev.lizardbyte.sunshine -Version=1.0 -Comment=@PROJECT_DESCRIPTION@ -Icon=sunshine -Categories=Utility; Terminal=true +Type=Application +NoDisplay=true diff --git a/packaging/linux/sunshine.desktop b/packaging/linux/sunshine.desktop index d5cf7c03f18..6bb8687fd1c 100644 --- a/packaging/linux/sunshine.desktop +++ b/packaging/linux/sunshine.desktop @@ -1,9 +1,15 @@ [Desktop Entry] Type=Application Name=@PROJECT_NAME@ -Exec=sunshine +Exec=/usr/bin/env systemctl start --u sunshine Version=1.0 Comment=@PROJECT_DESCRIPTION@ Icon=sunshine -Categories=Utility; -Terminal=true +Keywords=gamestream;stream;moonlight;remote play; +Categories=AudioVideo;Network;RemoteAccess; +Actions=RunInTerminal; + +[Desktop Action RunInTerminal] +Name=Run in Terminal +Icon=application-x-executable +Exec=gio launch @CMAKE_INSTALL_PREFIX@/share/applications/sunshine_terminal.desktop diff --git a/packaging/linux/sunshine_terminal.desktop b/packaging/linux/sunshine_terminal.desktop new file mode 100644 index 00000000000..c26889123cb --- /dev/null +++ b/packaging/linux/sunshine_terminal.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Name=@PROJECT_NAME@ +Exec=sunshine +Terminal=true +Type=Application +NoDisplay=true From 842a4cf7b2d318c470883e3e3995cdfbbfc87246 Mon Sep 17 00:00:00 2001 From: everything411 Date: Fri, 27 Oct 2023 21:28:29 +0800 Subject: [PATCH 011/197] fix(audio:windows): set cbSize correctly (#1787) --- src/platform/windows/audio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/windows/audio.cpp b/src/platform/windows/audio.cpp index c02f1626fd6..1311a694fd1 100644 --- a/src/platform/windows/audio.cpp +++ b/src/platform/windows/audio.cpp @@ -156,7 +156,7 @@ namespace platf::audio { wave_format.Format.wBitsPerSample = 16; wave_format.Format.nBlockAlign = wave_format.Format.nChannels * wave_format.Format.wBitsPerSample / 8; wave_format.Format.nAvgBytesPerSec = wave_format.Format.nSamplesPerSec * wave_format.Format.nBlockAlign; - wave_format.Format.cbSize = sizeof(wave_format); + wave_format.Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX); wave_format.Samples.wValidBitsPerSample = 16; wave_format.dwChannelMask = format.channel_mask; From df72135ea16f3d26f46cacdc3997b57cc65a4f53 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Oct 2023 22:29:04 -0400 Subject: [PATCH 012/197] build(deps): bump third-party/tray from `2664388` to `e08bdbe` (#1802) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third-party/tray | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third-party/tray b/third-party/tray index 2664388b0ed..e08bdbe5aa7 160000 --- a/third-party/tray +++ b/third-party/tray @@ -1 +1 @@ -Subproject commit 2664388b0ed88234674a37f8cd569747522247b4 +Subproject commit e08bdbe5aa7de0ad9c0ce36257016e07c7e6e2c0 From ca41c9d6f471386232e8e94a8f28bef2f09b154c Mon Sep 17 00:00:00 2001 From: Timo Gurr Date: Sun, 5 Nov 2023 01:48:52 +0100 Subject: [PATCH 013/197] config: add 2K resolution (WQHD - 16:9) (#1816) --- src/config.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/config.cpp b/src/config.cpp index d5932d62cfe..c08f5a9c4eb 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -395,6 +395,7 @@ namespace config { "1280x720"s, "1920x1080"s, "2560x1080"s, + "2560x1440"s, "3440x1440"s, "1920x1200"s, "3840x2160"s, From 0a563947eada3bbfa84c0bc1dc502689174b576d Mon Sep 17 00:00:00 2001 From: Justin Dhillon Date: Sat, 4 Nov 2023 21:47:22 -0700 Subject: [PATCH 014/197] docs: fix broken links (#1813) Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> --- .github/workflows/CI.yml | 2 +- cmake/packaging/windows.cmake | 2 +- docs/source/about/third_party_packages.rst | 7 ------- packaging/linux/Arch/PKGBUILD | 2 +- src/platform/windows/PolicyConfig.h | 2 +- 5 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 254a1940dd5..b802e2346a9 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -325,7 +325,7 @@ jobs: # install newer tar from focal... appimagelint fails on 18.04 without this echo "original tar version" tar --version - wget -O tar.deb http://security.ubuntu.com/ubuntu/pool/main/t/tar/tar_1.30+dfsg-7ubuntu0.20.04.2_amd64.deb + wget -O tar.deb http://security.ubuntu.com/ubuntu/pool/main/t/tar/tar_1.30+dfsg-7ubuntu0.20.04.3_amd64.deb sudo apt-get -y install -f ./tar.deb echo "new tar version" tar --version diff --git a/cmake/packaging/windows.cmake b/cmake/packaging/windows.cmake index 0d4f1dd9cce..3231d761f8c 100644 --- a/cmake/packaging/windows.cmake +++ b/cmake/packaging/windows.cmake @@ -103,7 +103,7 @@ set(CPACK_NSIS_DELETE_ICONS_EXTRA # Checking for previous installed versions set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL "ON") -set(CPACK_NSIS_HELP_LINK "https://sunshinestream.readthedocs.io/about/installation.html") +set(CPACK_NSIS_HELP_LINK "https://sunshinestream.readthedocs.io/en/latest/about/installation.html") set(CPACK_NSIS_URL_INFO_ABOUT "${CMAKE_PROJECT_HOMEPAGE_URL}") set(CPACK_NSIS_CONTACT "${CMAKE_PROJECT_HOMEPAGE_URL}/support") diff --git a/docs/source/about/third_party_packages.rst b/docs/source/about/third_party_packages.rst index 69204dc266e..d45188c4a0d 100644 --- a/docs/source/about/third_party_packages.rst +++ b/docs/source/about/third_party_packages.rst @@ -3,13 +3,6 @@ Third Party Packages .. Danger:: These packages are not maintained by LizardByte. Use at your own risk. -AOSC ----- - -.. image:: https://img.shields.io/badge/dynamic/xml.svg?color=orange&label=AOSC&style=for-the-badge&prefix=v&query=%2F%2Ftr%5B%40id%3D%27aosc%27%5D%2Ftd%5B3%5D%2Fspan%2Fa&url=https%3A%2F%2Frepology.org%2Fproject%2Fsunshine%2Fversions&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQEAAAEBCAMAAABPMuDPAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAMAUExURQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAP/AAABwwP/////LAMkAAI0AAIhnAP/CAP/JAP/IAMcAAMsAAAEAAMwAAAB3zMoAAAAIDsEAAMIAAP/MAABptP/GAMQAAAByxP/KAABxwsgAAABzxsYAAMMAAAB1yf/EAAgGAQwAAAgAAAUBAAB2ywB0x/m9AAECBCQAAC0AAFoAAB4WAL8AAKYAAKEAACoAAB8AABQPAJsAAAAKEvW6AK0AAGAAAPK4AGYAAFAAAIEAAMqaAI1rAJYAAL0AACkeAOCqAP/NAD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5AaA6RKG820lr8l0hAQW/VuSrjX/WlS3e/9LE4+umF4A6Eg/hqv4ReF8n/zSIWzfoInA8vUvvrVvxfLps6cAmjKE4S7xXbG+cs+bM2QqAgL8SHB3CgSYnt3wvrXkjk6pEgaB4d4MFYn2wvzigxMyMRjwRyDZj6EkAbgIwJoGHXIelTcCUW4M4zoE4OBdlULnUgI0ARAhACWn6xUodbg8EejUmaEq0d0IHuL42iN5cAeBHwLD/RjK0rMryXPID+48pFTqnE8g2JuhLvGdyJ5l6qoFG5QylvOKfBCI6c7wIH5hpM+zZ9WtF3QKqQMKPBDox/Aj3X3Jnym/tKphQ55CaacakToB90iGN3mc05PtOVh2p7zRIJMZdEYVfwQ8+jM8SqgHx8creHpN2c6aFxrVBoVMJpMaMjN1v2+gCiAogOFVAoJoPGX+ppln5ledXnD4tcoj5Rtu0QQQ58bwLJ3DqP5icnlBfgHF8R7rzvAunklyIFTpm8I4RUZ4CRRA1EjGSRIfJkgAIV0Y50n4OMHNP2EM41SJjhIYgF5ujJOlS5KPgObvlcK4QAKSBQMgJp5xiYyN7CuI+QeNYVwmETGu9w3GBXozrpQ+rtaIwT0ZF0v3AQkunH+PYYwAxC/JVeogaGh3RhgS/5iHC+afEOnNCEcinM4gIdyPEZZE9BvkzPc/Umjzvy9uT3Rz0vyjUrwZYYp3SrI779P36d3HkxGwjPbldzF0C4xlhC6dByTyFTN59B7jzXQIGfm4P/3V4JM4OJ7pOOI5OpAqhHGJkbFMRxPPkeFxdJxFr95DI5gOKm79R/lzUwoeyYF9/JgOLZ6xoSHJRPbB3SsucEQ882hI54GDfZO90BWDT7fhIUMD/JhHTPxGjgkfFebvNc5xVkXukRAVHDJ4WKw38+iKp1/s6BFDwwNHxQTHJXZqkuFxvYeEJEWmDIuOcP7U/w+C7XCu0wHHigAAAABJRU5ErkJggg== - :alt: AOSC Version - :target: https://packages.aosc.io/packages/sunshine - AUR --- diff --git a/packaging/linux/Arch/PKGBUILD b/packaging/linux/Arch/PKGBUILD index 11b699823b0..cfd760653df 100644 --- a/packaging/linux/Arch/PKGBUILD +++ b/packaging/linux/Arch/PKGBUILD @@ -1,4 +1,4 @@ -# Edit on github: https://github.com/LizardByte/Sunshine/tree/nightly/packaging/linux/aur/PKGBUILD +# Edit on github: https://github.com/LizardByte/Sunshine/blob/nightly/packaging/linux/Arch/PKGBUILD # Reference: https://wiki.archlinux.org/title/PKGBUILD pkgname='sunshine' diff --git a/src/platform/windows/PolicyConfig.h b/src/platform/windows/PolicyConfig.h index 21772227c19..087f85fa84f 100644 --- a/src/platform/windows/PolicyConfig.h +++ b/src/platform/windows/PolicyConfig.h @@ -3,7 +3,7 @@ * @brief Undocumented COM-interface IPolicyConfig. * @details Use for setting default audio render endpoint. * @author EreTIk - * @see http://eretik.omegahg.com/ + * @see https://kitere.github.io/ */ #pragma once From 29a1b1539fb2e0e82d02e521954b163c6d9d55d1 Mon Sep 17 00:00:00 2001 From: ns6089 <61738816+ns6089@users.noreply.github.com> Date: Fri, 17 Nov 2023 16:43:12 +0300 Subject: [PATCH 015/197] Fix incorrect portrait mode rotation center on Windows (#1851) --- .../windows/assets/shaders/directx/include/base_vs.hlsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src_assets/windows/assets/shaders/directx/include/base_vs.hlsl b/src_assets/windows/assets/shaders/directx/include/base_vs.hlsl index 5fc9226bd4f..c04fad39018 100644 --- a/src_assets/windows/assets/shaders/directx/include/base_vs.hlsl +++ b/src_assets/windows/assets/shaders/directx/include/base_vs.hlsl @@ -2,7 +2,7 @@ #if defined(LEFT_SUBSAMPLING) vertex_t generate_fullscreen_triangle_vertex(uint vertex_id, float subsample_offset, int rotate_texture_steps) -#elif defined (TOPLEFT_SUBSAMPLING) +#elif defined(TOPLEFT_SUBSAMPLING) vertex_t generate_fullscreen_triangle_vertex(uint vertex_id, float2 subsample_offset, int rotate_texture_steps) #else vertex_t generate_fullscreen_triangle_vertex(uint vertex_id, int rotate_texture_steps) @@ -29,7 +29,7 @@ vertex_t generate_fullscreen_triangle_vertex(uint vertex_id, int rotate_texture_ float2x2 rotation_matrix = { cos(rotation_radians), -sin(rotation_radians), sin(rotation_radians), cos(rotation_radians) }; float2 rotation_center = { 0.5, 0.5 }; - tex_coord = round(tex_coord + mul(rotation_matrix, tex_coord - rotation_center)); + tex_coord = round(rotation_center + mul(rotation_matrix, tex_coord - rotation_center)); } #if defined(LEFT_SUBSAMPLING) From 336062d467d5f48ba56d05a523c212f791421108 Mon Sep 17 00:00:00 2001 From: LizardByte-bot <108553330+LizardByte-bot@users.noreply.github.com> Date: Thu, 23 Nov 2023 23:28:07 -0500 Subject: [PATCH 016/197] ci: update global workflows (#1863) --- .github/workflows/automerge.yml | 2 +- .github/workflows/codeql.yml | 4 ++-- .github/workflows/issues.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 49ddebf4ec1..733b4de8521 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -31,7 +31,7 @@ jobs: github-token: "${{ secrets.GITHUB_TOKEN }}" - name: Label autoapproved - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: github-token: ${{ secrets.GH_BOT_TOKEN }} script: | diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 95349bbc477..358ff9c99f6 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -28,7 +28,7 @@ jobs: continue: ${{ steps.continue.outputs.result }} steps: - name: Get repo languages - uses: actions/github-script@v6 + uses: actions/github-script@v7 id: lang with: script: | @@ -70,7 +70,7 @@ jobs: return matrix - name: Continue - uses: actions/github-script@v6 + uses: actions/github-script@v7 id: continue with: script: | diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml index d7a1025cdce..aec6006c870 100644 --- a/.github/workflows/issues.yml +++ b/.github/workflows/issues.yml @@ -20,6 +20,6 @@ jobs: runs-on: ubuntu-latest steps: - name: Label Actions - uses: dessant/label-actions@v3 + uses: dessant/label-actions@v4 with: github-token: ${{ secrets.GH_BOT_TOKEN }} From 3b9e37e1ddc54eb5a6a320f5271e5e438ddab06f Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 30 Nov 2023 23:51:45 -0600 Subject: [PATCH 017/197] Don't hardcode the signature length to RSA-2048 (#1872) --- docs/source/about/advanced_usage.rst | 8 ++++++-- src/config.h | 4 ++-- src/crypto.cpp | 9 +++++---- src/crypto.h | 1 - src/nvhttp.cpp | 10 +++++++--- src_assets/common/assets/web/config.html | 10 ++++++---- 6 files changed, 26 insertions(+), 16 deletions(-) diff --git a/docs/source/about/advanced_usage.rst b/docs/source/about/advanced_usage.rst index c9d9ebae3b4..0b4a687b6fe 100644 --- a/docs/source/about/advanced_usage.rst +++ b/docs/source/about/advanced_usage.rst @@ -605,7 +605,9 @@ pkey ^^^^ **Description** - The private key. This must be 2048 bits. + The private key used for the web UI and Moonlight client pairing. For best compatibility, this should be an RSA-2048 private key. + + .. Warning:: Not all Moonlight clients support ECDSA keys or RSA key lengths other than 2048 bits. **Default** ``credentials/cakey.pem`` @@ -619,7 +621,9 @@ cert ^^^^ **Description** - The certificate. Must be signed with a 2048 bit key. + The certificate used for the web UI and Moonlight client pairing. For best compatibility, this should have an RSA-2048 public key. + + .. Warning:: Not all Moonlight clients support ECDSA keys or RSA key lengths other than 2048 bits. **Default** ``credentials/cacert.pem`` diff --git a/src/config.h b/src/config.h index 749a8556d11..6e481a1f641 100644 --- a/src/config.h +++ b/src/config.h @@ -92,8 +92,8 @@ namespace config { // pc|lan|wan std::string origin_web_ui_allowed; - std::string pkey; // must be 2048 bits - std::string cert; // must be signed with a key of 2048 bits + std::string pkey; + std::string cert; std::string sunshine_name; diff --git a/src/crypto.cpp b/src/crypto.cpp index 5dec0f8dd57..26af3e7df47 100644 --- a/src/crypto.cpp +++ b/src/crypto.cpp @@ -409,11 +409,12 @@ namespace crypto { return {}; } - std::size_t slen = digest_size; - - std::vector digest; - digest.resize(slen); + std::size_t slen; + if (EVP_DigestSignFinal(ctx.get(), nullptr, &slen) != 1) { + return {}; + } + std::vector digest(slen); if (EVP_DigestSignFinal(ctx.get(), digest.data(), &slen) != 1) { return {}; } diff --git a/src/crypto.h b/src/crypto.h index d8d0a35a607..b75d013ca1c 100644 --- a/src/crypto.h +++ b/src/crypto.h @@ -17,7 +17,6 @@ namespace crypto { std::string x509; std::string pkey; }; - constexpr std::size_t digest_size = 256; void md_ctx_destroy(EVP_MD_CTX *); diff --git a/src/nvhttp.cpp b/src/nvhttp.cpp index 5bde7b079bc..fa7847c3fde 100644 --- a/src/nvhttp.cpp +++ b/src/nvhttp.cpp @@ -380,11 +380,15 @@ namespace nvhttp { auto &client = sess.client; auto pairingsecret = util::from_hex_vec(get_arg(args, "clientpairingsecret"), true); + if (pairingsecret.size() <= 16) { + tree.put("root.paired", 0); + tree.put("root..status_code", 400); + tree.put("root..status_message", "Clientpairingsecret too short"); + return; + } std::string_view secret { pairingsecret.data(), 16 }; - std::string_view sign { pairingsecret.data() + secret.size(), crypto::digest_size }; - - assert((secret.size() + sign.size()) == pairingsecret.size()); + std::string_view sign { pairingsecret.data() + secret.size(), pairingsecret.size() - secret.size() }; auto x509 = crypto::x509(client.cert); auto x509_sign = crypto::signature(x509); diff --git a/src_assets/common/assets/web/config.html b/src_assets/common/assets/web/config.html index 6e2b61b760c..927ef945564 100644 --- a/src_assets/common/assets/web/config.html +++ b/src_assets/common/assets/web/config.html @@ -316,11 +316,13 @@

placeholder="/dir/pkey.pem" v-model="config.pkey" /> -
The private key must be 2048 bits
+
+ The private key used for the web UI and Moonlight client pairing. For best compatibility, this should be an RSA-2048 private key. +

- +
- + v-model="config.cert" />
- The certificate must be signed with a 2048 bit key + The certificate used for the web UI and Moonlight client pairing. For best compatibility, this should have an RSA-2048 public key.
From bd03ef974cb06faf13151976bdf5c19f599afe7b Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Sun, 3 Dec 2023 17:20:47 -0500 Subject: [PATCH 018/197] docs(windows): add drive permissions troubleshooting (#1883) --- docs/source/troubleshooting/windows.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/source/troubleshooting/windows.rst b/docs/source/troubleshooting/windows.rst index 9190fc300f7..313bef9a3ee 100644 --- a/docs/source/troubleshooting/windows.rst +++ b/docs/source/troubleshooting/windows.rst @@ -4,3 +4,11 @@ Windows No gamepad detected ------------------- #. Verify that you've installed `Nefarius Virtual Gamepad `__. + +Permission denied +----------------- +Since Sunshine runs as a service on Windows, it may not have the same level of access that your regular user account +has. You may get permission denied errors when attempting to launch a game or application from a non system drive. + +You will need to modify the security permissions on your disk. Ensure that user/principal SYSTEM has full +permissions on the disk. From 6dcc5e7c0fba408823ade3a3e6e460f448b9f0ee Mon Sep 17 00:00:00 2001 From: LizardByte-bot <108553330+LizardByte-bot@users.noreply.github.com> Date: Mon, 4 Dec 2023 18:12:14 -0500 Subject: [PATCH 019/197] ci: update release notifier (#1891) --- .github/workflows/release-notifier.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release-notifier.yml b/.github/workflows/release-notifier.yml index 2827224b8bf..5735465e4a0 100644 --- a/.github/workflows/release-notifier.yml +++ b/.github/workflows/release-notifier.yml @@ -15,8 +15,8 @@ on: jobs: discord: if: >- - startsWith(github.repository, 'LizardByte/') and - not(github.event.release.prerelease) and + startsWith(github.repository, 'LizardByte/') && + not(github.event.release.prerelease) && not(github.event.release.draft) runs-on: ubuntu-latest steps: @@ -34,8 +34,8 @@ jobs: facebook_group: if: >- - startsWith(github.repository, 'LizardByte/') and - not(github.event.release.prerelease) and + startsWith(github.repository, 'LizardByte/') && + not(github.event.release.prerelease) && not(github.event.release.draft) runs-on: ubuntu-latest steps: @@ -51,8 +51,8 @@ jobs: facebook_page: if: >- - startsWith(github.repository, 'LizardByte/') and - not(github.event.release.prerelease) and + startsWith(github.repository, 'LizardByte/') && + not(github.event.release.prerelease) && not(github.event.release.draft) runs-on: ubuntu-latest steps: @@ -68,8 +68,8 @@ jobs: reddit: if: >- - startsWith(github.repository, 'LizardByte/') and - not(github.event.release.prerelease) and + startsWith(github.repository, 'LizardByte/') && + not(github.event.release.prerelease) && not(github.event.release.draft) runs-on: ubuntu-latest steps: @@ -88,8 +88,8 @@ jobs: twitter: if: >- - startsWith(github.repository, 'LizardByte/') and - not(github.event.release.prerelease) and + startsWith(github.repository, 'LizardByte/') && + not(github.event.release.prerelease) && not(github.event.release.draft) runs-on: ubuntu-latest steps: From 4a2f7023ec687c3ecf928632cc58aa30ade3268a Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 3 Dec 2023 21:45:10 -0600 Subject: [PATCH 020/197] Fix discovery of Windows hosts by Apple devices --- src/platform/windows/publish.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/platform/windows/publish.cpp b/src/platform/windows/publish.cpp index 187868b6fa7..30aa30e24cb 100644 --- a/src/platform/windows/publish.cpp +++ b/src/platform/windows/publish.cpp @@ -119,6 +119,21 @@ namespace platf::publish { instance.wPort = map_port(nvhttp::PORT_HTTP); instance.pszHostName = host.data(); + // Setting these values ensures Windows mDNS answers comply with RFC 1035. + // If these are unset, Windows will send a TXT record that has zero strings, + // which is illegal. Setting them to a single empty value causes Windows to + // send a single empty string for the TXT record, which is the correct thing + // to do when advertising a service without any TXT strings. + // + // Most clients aren't strictly checking TXT record compliance with RFC 1035, + // but Apple's mDNS resolver does and rejects the entire answer if an invalid + // TXT record is present. + PWCHAR keys[] = { nullptr }; + PWCHAR values[] = { nullptr }; + instance.dwPropertyCount = 1; + instance.keys = keys; + instance.values = values; + DNS_SERVICE_REGISTER_REQUEST req {}; req.Version = DNS_QUERY_REQUEST_VERSION1; req.pQueryContext = alarm.get(); From 47b5fc1fc0266bbc8185649bc12ea822f8efcdfc Mon Sep 17 00:00:00 2001 From: LizardByte-bot <108553330+LizardByte-bot@users.noreply.github.com> Date: Thu, 7 Dec 2023 11:48:02 -0500 Subject: [PATCH 021/197] ci: update global python (#1896) --- .github/workflows/cpp-lint.yml | 2 +- .github/workflows/python-flake8.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cpp-lint.yml b/.github/workflows/cpp-lint.yml index 86a2b8d686b..b5d4ff7765e 100644 --- a/.github/workflows/cpp-lint.yml +++ b/.github/workflows/cpp-lint.yml @@ -79,7 +79,7 @@ jobs: uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.11' diff --git a/.github/workflows/python-flake8.yml b/.github/workflows/python-flake8.yml index 4b0d30810da..e08ab10fcac 100644 --- a/.github/workflows/python-flake8.yml +++ b/.github/workflows/python-flake8.yml @@ -24,7 +24,7 @@ jobs: uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 # https://github.com/actions/setup-python + uses: actions/setup-python@v5 # https://github.com/actions/setup-python with: python-version: '3.10' From a009d1314f76f983213efb5b4b60f23ead27e6de Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Dec 2023 09:07:08 -0500 Subject: [PATCH 022/197] build(deps): bump actions/setup-python from 4 to 5 (#1893) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/localize.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/localize.yml b/.github/workflows/localize.yml index eb7e77974a2..f9cd64859bb 100644 --- a/.github/workflows/localize.yml +++ b/.github/workflows/localize.yml @@ -23,7 +23,7 @@ jobs: uses: actions/checkout@v4 - name: Install Python 3.9 - uses: actions/setup-python@v4 # https://github.com/actions/setup-python + uses: actions/setup-python@v5 # https://github.com/actions/setup-python with: python-version: '3.9' From a851ef606879ee2dc3fdb74fce6fe49ecbd88926 Mon Sep 17 00:00:00 2001 From: zoeyjodon <76182954+zoeyjodon@users.noreply.github.com> Date: Sat, 9 Dec 2023 09:31:04 -0500 Subject: [PATCH 023/197] Extend session timeout (#1890) --- src/rtsp.cpp | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/rtsp.cpp b/src/rtsp.cpp index 5a12253de17..9aa3ea1c220 100644 --- a/src/rtsp.cpp +++ b/src/rtsp.cpp @@ -307,6 +307,19 @@ namespace rtsp_stream { _map_cmd_cb.emplace(type, std::move(cb)); } + /** + * @brief Launch a new streaming session. + * @note If the client does not begin streaming within the ping_timeout, + * the session will be discarded. + * @param launch_session Streaming session information. + * + * EXAMPLES: + * ```cpp + * launch_session_t launch_session; + * rtsp_server_t server {}; + * server.session_raise(launch_session); + * ``` + */ void session_raise(rtsp_stream::launch_session_t launch_session) { auto now = std::chrono::steady_clock::now(); @@ -315,7 +328,7 @@ namespace rtsp_stream { if (raised_timeout > now && launch_event.peek()) { return; } - raised_timeout = now + 10s; + raised_timeout = now + config::stream.ping_timeout; --_slot_count; launch_event.raise(launch_session); @@ -328,12 +341,22 @@ namespace rtsp_stream { safe::event_t launch_event; + /** + * @brief Clear launch sessions. + * @param all If true, clear all sessions. Otherwise, only clear timed out and stopped sessions. + * + * EXAMPLES: + * ```cpp + * clear(false); + * ``` + */ void clear(bool all = true) { // if a launch event timed out --> Remove it. if (raised_timeout < std::chrono::steady_clock::now()) { auto discarded = launch_event.pop(0s); if (discarded) { + BOOST_LOG(debug) << "Event timeout: "sv << discarded->unique_id; ++_slot_count; } } From a932f6bee8fd617ff6dc18ef0dfefd451d73b6e2 Mon Sep 17 00:00:00 2001 From: LizardByte-bot <108553330+LizardByte-bot@users.noreply.github.com> Date: Sat, 9 Dec 2023 14:38:22 -0500 Subject: [PATCH 024/197] ci: update global workflows (#1904) --- .github/workflows/issues-stale.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/issues-stale.yml b/.github/workflows/issues-stale.yml index aecc8243f34..deb3d74b961 100644 --- a/.github/workflows/issues-stale.yml +++ b/.github/workflows/issues-stale.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Stale - uses: actions/stale@v8 + uses: actions/stale@v9 with: close-issue-message: > This issue was closed because it has been stalled for 10 days with no activity. @@ -43,7 +43,7 @@ jobs: repo-token: ${{ secrets.GH_BOT_TOKEN }} - name: Invalid Template - uses: actions/stale@v8 + uses: actions/stale@v9 with: close-issue-message: > This issue was closed because the the template was not completed after 5 days. From 1dbfdbcf4fced78674a0ebe05e65019aac0743aa Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Sat, 9 Dec 2023 16:53:48 -0500 Subject: [PATCH 025/197] docs: fix failing images (#1903) --- docs/source/contributing/localization.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/contributing/localization.rst b/docs/source/contributing/localization.rst index ec6a43a5daf..ef2c811c4a9 100644 --- a/docs/source/contributing/localization.rst +++ b/docs/source/contributing/localization.rst @@ -3,7 +3,7 @@ Localization Sunshine and related LizardByte projects are being localized into various languages. The default language is `en` (English). - .. image:: https://badges.awesome-crowdin.com/translation-15178612-606145.png + .. image:: https://app.lizardbyte.dev/uno/crowdin/LizardByte_graph.svg CrowdIn ------- From 09ab49a869e60347b8ac140a5b9437eb8a83c15b Mon Sep 17 00:00:00 2001 From: LizardByte-bot <108553330+LizardByte-bot@users.noreply.github.com> Date: Sat, 9 Dec 2023 19:06:42 -0500 Subject: [PATCH 026/197] ci: update global workflows (#1906) --- .github/workflows/ci-qodana.yml | 292 ------------------------------- .github/workflows/dispatcher.yml | 69 -------- 2 files changed, 361 deletions(-) delete mode 100644 .github/workflows/ci-qodana.yml delete mode 100644 .github/workflows/dispatcher.yml diff --git a/.github/workflows/ci-qodana.yml b/.github/workflows/ci-qodana.yml deleted file mode 100644 index efc56349b30..00000000000 --- a/.github/workflows/ci-qodana.yml +++ /dev/null @@ -1,292 +0,0 @@ ---- -# This action is centrally managed in https://github.com//.github/ -# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in -# the above-mentioned repo. - -name: Qodana - -on: - pull_request: - branches: [master, nightly] - types: [opened, synchronize, reopened] - push: - branches: [master, nightly] - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - qodana_initial_check: - name: Qodana Initial Check - permissions: - actions: write # required to use workflow dispatch on fork PRs - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Prepare - id: prepare - run: | - # check the branch variable - if [ "${{ github.event_name }}" == "push" ] - then - echo "This is a PUSH event" - # use the branch name - destination=${{ github.ref_name }} - target=${{ github.ref_name }} - else - echo "This is a PR event" - # use the PR number - destination=${{ github.event.pull_request.number }} - target=${{ github.event.pull_request.base.ref }} - fi - - echo "checkout_repo=$checkout_repo" >> $GITHUB_OUTPUT - echo "checkout_ref=$checkout_ref" >> $GITHUB_OUTPUT - echo "destination=$destination" >> $GITHUB_OUTPUT - echo "target=$target" >> $GITHUB_OUTPUT - - # prepare urls - base=https://${{ github.repository_owner }}.github.io - report_url=${base}/qodana-reports/${{ github.event.repository.name }}/${destination} - echo "report_url=$report_url" >> $GITHUB_OUTPUT - - # build matrix - files=$(find . -type f -iname "qodana*.yaml") - - echo "files: ${files}" - - # do not quote to keep this as a single line - echo files=${files} >> $GITHUB_OUTPUT - - MATRIX_COMBINATIONS="" - REPORTS_MARKDOWN="" - for FILE in ${files}; do - # extract the language from file name after `qodana-` and before `.yaml` - language=$(echo $FILE | sed -r -z -e 's/(\.\/)*.*\/(qodana.yaml)/default/gm') - if [[ $language != "default" ]]; then - language=$(echo $FILE | sed -r -z -e 's/(\.\/)*.*qodana-(.*).yaml/\2/gm') - fi - MATRIX_COMBINATIONS="$MATRIX_COMBINATIONS {\"file\": \"$FILE\", \"language\": \"$language\"}," - REPORTS_MARKDOWN="$REPORTS_MARKDOWN
- [${language}](${report_url}/${language})" - done - - # removes the last character (i.e. comma) - MATRIX_COMBINATIONS=${MATRIX_COMBINATIONS::-1} - - # setup matrix for later jobs - matrix=$(( - echo "{ \"include\": [$MATRIX_COMBINATIONS] }" - ) | jq -c .) - - echo $matrix - echo $matrix | jq . - echo "matrix=$matrix" >> $GITHUB_OUTPUT - - echo "reports_markdown=$REPORTS_MARKDOWN" >> $GITHUB_OUTPUT - - - name: Setup initial notification inputs - id: inputs - if: >- - startsWith(github.event_name, 'pull_request') && - steps.prepare.outputs.files != '' - run: | - # workflow logs - workflow_url_a=https://github.com/${{ github.repository_owner }}/${{ github.event.repository.name }} - workflow_url=${workflow_url_a}/actions/runs/${{ github.run_id }} - - # multiline message - message=$(cat <<- EOF - :warning: **Qodana is checking this PR** :warning: - Live results available [here](${workflow_url}) - EOF - ) - - # escape json control characters - message=$(jq -n --arg message "$message" '$message' | sed -e 's/\\/\\\\/g' -e 's/"/\\"/g') - - secondary_inputs=$(echo '{ - "issue_message": "'"${message}"'", - "issue_message_id": "'"qodana"'", - "issue_number": "'"${{ github.event.number }}"'", - "issue_repo_owner": "'"${{ github.repository_owner }}"'", - "issue_repo_name": "'"${{ github.event.repository.name }}"'" - }' | jq -r .) - - #escape json control characters - secondary_inputs=$(jq -n --arg secondary_inputs "$secondary_inputs" '$secondary_inputs' \ - | sed -e 's/\\/\\\\/g' -e 's/"/\\"/g') - - echo $secondary_inputs - - # secondary input as string, not JSON - # todo - change dispatch_ref to master instead of nightly - primary_inputs=$(echo '{ - "dispatch_repository": "'"${{ github.repository_owner }}/.github"'", - "dispatch_workflow": "'"dispatch-issue-comment.yml"'", - "dispatch_ref": "'"nightly"'", - "dispatch_inputs": "'"${secondary_inputs}"'" - }' | jq -c .) - - echo $primary_inputs - echo $primary_inputs | jq . - echo "primary_inputs=$primary_inputs" >> $GITHUB_OUTPUT - - - name: Workflow Dispatch - if: >- - startsWith(github.event_name, 'pull_request') && - steps.prepare.outputs.files != '' - uses: benc-uk/workflow-dispatch@v1.2.2 - continue-on-error: true # this might error if the workflow is not found, but we still want to run the next job - with: - ref: ${{ github.base_ref || github.ref_name }} # base ref for PR and branch name for push - workflow: dispatcher.yml - inputs: ${{ steps.inputs.outputs.primary_inputs }} - token: ${{ github.token }} - - outputs: - destination: ${{ steps.prepare.outputs.destination }} - target: ${{ steps.prepare.outputs.target }} - files: ${{ steps.prepare.outputs.files }} - reports_markdown: ${{ steps.prepare.outputs.reports_markdown }} - matrix: ${{ steps.prepare.outputs.matrix }} - - qodana: - if: ${{ needs.qodana_initial_check.outputs.files != '' }} - needs: [qodana_initial_check] - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: ${{ fromJson(needs.qodana_initial_check.outputs.matrix) }} - name: Qodana-Scan-${{ matrix.language }} - continue-on-error: true - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Get baseline - id: baseline - run: | - # check if destination is not an integer - if ! [[ "${{ needs.qodana_initial_check.outputs.destination }}" =~ ^[0-9]+$ ]] - then - echo "Running for a branch update" - echo "baseline_args=" >> $GITHUB_OUTPUT - else - echo "Running for a PR" - - sarif_file=qodana.sarif.json - repo=${{ github.event.repository.name }} - target=${{ needs.qodana_initial_check.outputs.target }} - language=${{ matrix.language }} - - baseline_file="${repo}/${target}/${language}/results/${sarif_file}" - baseline_file_url="https://lizardbyte.github.io/qodana-reports/${baseline_file}" - - # don't fail if file does not exist - wget ${baseline_file_url} || true - - # check if file exists - if [ -f ${sarif_file} ] - then - echo "baseline exists" - echo "baseline_args=--baseline,${sarif_file}" >> $GITHUB_OUTPUT - else - echo "baseline does not exist" - echo "baseline_args=" >> $GITHUB_OUTPUT - fi - fi - - - name: Rename Qodana config file - id: rename - run: | - # rename the file - if [ "${{ matrix.file }}" != "./qodana.yaml" ] - then - mv -f ${{ matrix.file }} ./qodana.yaml - fi - - - name: Qodana - id: qodana - continue-on-error: true # ensure dispatch-qodana job is run - uses: JetBrains/qodana-action@v2023.2.6 - with: - additional-cache-hash: ${{ github.ref }}-${{ matrix.language }} - artifact-name: qodana-${{ matrix.language }} # yamllint disable-line rule:line-length - args: '--print-problems,${{ steps.baseline.outputs.baseline_args }}' - pr-mode: false - upload-result: true - use-caches: true - - - name: Set output status - id: status - run: | - # check if qodana failed - echo "qodana_status=${{ steps.qodana.outcome }}" >> $GITHUB_OUTPUT - - outputs: - qodana_status: ${{ steps.status.outputs.qodana_status }} - - dispatch-qodana: - # trigger qodana-reports to download artifacts from the matrix runs - needs: [qodana_initial_check, qodana] - runs-on: ubuntu-latest - name: Dispatch Qodana - permissions: - actions: write # required to use workflow dispatch on fork PRs - if: ${{ needs.qodana_initial_check.outputs.files != '' }} - steps: - - name: Setup qodana publish inputs - id: inputs - run: | - # get the artifacts - artifacts=${{ toJson(steps.artifacts.outputs.result) }} - artifacts=$(echo $artifacts | jq -c .) - - # get the target branch - target=${{ needs.qodana_initial_check.outputs.target }} - - # get the destination branch - destination=${{ needs.qodana_initial_check.outputs.destination }} - - # client payload - secondary_inputs=$(echo '{ - "destination": "'"${destination}"'", - "ref": "'"${{ github.ref }}"'", - "repo": "'"${{ github.repository }}"'", - "repo_name": "'"${{ github.event.repository.name }}"'", - "run_id": "'"${{ github.run_id }}"'", - "reports_markdown": "'"${{ needs.qodana_initial_check.outputs.reports_markdown }}"'", - "status": "'"${{ needs.qodana.outputs.qodana_status }}"'" - }' | jq -r .) - - #escape json control characters - secondary_inputs=$(jq -n --arg secondary_inputs "$secondary_inputs" '$secondary_inputs' \ - | sed -e 's/\\/\\\\/g' -e 's/"/\\"/g') - - echo $secondary_inputs - - primary_inputs=$(echo '{ - "dispatch_repository": "'"${{ github.repository_owner }}/qodana-reports"'", - "dispatch_workflow": "'"dispatch-qodana.yml"'", - "dispatch_ref": "'"master"'", - "dispatch_inputs": "'"$secondary_inputs"'" - }' | jq -c .) - - echo $primary_inputs - echo $primary_inputs | jq . - echo "primary_inputs=$primary_inputs" >> $GITHUB_OUTPUT - - - name: Workflow Dispatch - uses: benc-uk/workflow-dispatch@v1.2.2 - continue-on-error: true # this might error if the workflow is not found, but we don't want to fail the workflow - with: - ref: ${{ github.base_ref || github.ref_name }} # base ref for PR and branch name for push - workflow: dispatcher.yml - inputs: ${{ steps.inputs.outputs.primary_inputs }} - token: ${{ github.token }} diff --git a/.github/workflows/dispatcher.yml b/.github/workflows/dispatcher.yml deleted file mode 100644 index c83a233ecea..00000000000 --- a/.github/workflows/dispatcher.yml +++ /dev/null @@ -1,69 +0,0 @@ ---- -# This action is centrally managed in https://github.com//.github/ -# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in -# the above-mentioned repo. - -# This action receives a dispatch event and passes it through to another repo. This is a workaround to avoid issues -# where fork PRs do not have access to secrets. - -name: Dispatcher - -on: - workflow_dispatch: - inputs: - dispatch_repository: - description: 'Repository to dispatch to' - required: true - dispatch_workflow: - description: 'Workflow to dispatch to' - required: true - dispatch_ref: - description: 'Ref/branch to dispatch to' - required: true - dispatch_inputs: - description: 'Inputs to send' - required: true - -jobs: - dispatcher: - name: Repository Dispatch - runs-on: ubuntu-latest - steps: - - name: Unescape JSON control characters - id: inputs - run: | - # get the inputs - dispatch_inputs=${{ github.event.inputs.dispatch_inputs }} - echo "$dispatch_inputs" - - # temporarily replace newlines with a placeholder - dispatch_inputs=$(echo ${dispatch_inputs} | sed 's/\\\\n/_!new_line!_/g') - - # remove newline characters - dispatch_inputs=$(echo ${dispatch_inputs} | sed 's/\\n//g') - - # replace placeholder with newline - dispatch_inputs=$(echo ${dispatch_inputs} | sed 's/_!new_line!_/\\n/g') - - # replace escaped quotes with unescaped quotes - dispatch_inputs=$(echo ${dispatch_inputs} | sed 's/\\"//g') - - # debug echo - echo "$dispatch_inputs" - - # parse as JSON - dispatch_inputs=$(echo "$dispatch_inputs" | jq -c .) - - # debug echo - echo "$dispatch_inputs" - - echo "dispatch_inputs=$dispatch_inputs" >> $GITHUB_OUTPUT - - - name: Workflow Dispatch - uses: benc-uk/workflow-dispatch@v1.2.2 - with: - repo: ${{ github.event.inputs.dispatch_repository }} - ref: ${{ github.event.inputs.dispatch_ref || 'master' }} # default to master if not specified - workflow: ${{ github.event.inputs.dispatch_workflow }} - inputs: ${{ steps.inputs.outputs.dispatch_inputs }} - token: ${{ secrets.GH_BOT_TOKEN || github.token }} # fallback to default token if not specified From ef9ec405099454015e59db2ff809943eca7ad3d5 Mon Sep 17 00:00:00 2001 From: LizardByte-bot <108553330+LizardByte-bot@users.noreply.github.com> Date: Sun, 10 Dec 2023 10:01:58 -0500 Subject: [PATCH 027/197] ci: update global workflows (#1907) --- qodana-js.yaml | 21 --------------------- qodana-python.yaml | 29 ----------------------------- 2 files changed, 50 deletions(-) delete mode 100644 qodana-js.yaml delete mode 100644 qodana-python.yaml diff --git a/qodana-js.yaml b/qodana-js.yaml deleted file mode 100644 index d130951323f..00000000000 --- a/qodana-js.yaml +++ /dev/null @@ -1,21 +0,0 @@ ---- -version: "1.0" -linter: jetbrains/qodana-js:2023.1-eap - -bootstrap: | - # install npm dependencies - npm install - -exclude: - - name: All - paths: - - gh-pages - - third-party - -failThreshold: 100 - -include: - - name: CheckDependencyLicenses - -profile: - name: qodana.recommended diff --git a/qodana-python.yaml b/qodana-python.yaml deleted file mode 100644 index efbf876ee3d..00000000000 --- a/qodana-python.yaml +++ /dev/null @@ -1,29 +0,0 @@ ---- -version: "1.0" -linter: jetbrains/qodana-python:2023.1-eap - -bootstrap: | - # setup python - - python3 -m venv /data/cache/venv - source /data/cache/venv/bin/activate - python3 -m pip install -r /data/project/docs/requirements.txt - python3 -m pip install -r /data/project/scripts/requirements.txt - - # remove idea directory (No Python interpreter configured for the project) - # https://github.com/JetBrains/Qodana/discussions/134#discussioncomment-4329981 - rm -rf .idea - -exclude: - - name: All - paths: - - gh-pages - - third-party - -failThreshold: 100 - -include: - - name: CheckDependencyLicenses - -profile: - name: qodana.recommended From 88fc8f845b28c2554020ebc3ddd666bec979bcaf Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Mon, 11 Dec 2023 14:53:32 -0500 Subject: [PATCH 028/197] build(docker): add fedora 39 and drop fedora 37 (#1827) --- ...ora-37.dockerfile => fedora-39.dockerfile} | 56 ++++++++++--------- docs/source/about/installation.rst | 2 +- docs/source/building/linux.rst | 2 +- 3 files changed, 31 insertions(+), 29 deletions(-) rename docker/{fedora-37.dockerfile => fedora-39.dockerfile} (72%) diff --git a/docker/fedora-37.dockerfile b/docker/fedora-39.dockerfile similarity index 72% rename from docker/fedora-37.dockerfile rename to docker/fedora-39.dockerfile index c6aa0593a6b..6c6db891bbf 100644 --- a/docker/fedora-37.dockerfile +++ b/docker/fedora-39.dockerfile @@ -4,7 +4,7 @@ # platforms_pr: linux/amd64 # no-cache-filters: sunshine-base,artifacts,sunshine ARG BASE=fedora -ARG TAG=37 +ARG TAG=39 FROM ${BASE}:${TAG} AS sunshine-base FROM sunshine-base as sunshine-build @@ -30,10 +30,10 @@ set -e dnf -y update dnf -y group install "Development Tools" dnf -y install \ - boost-devel-1.78.* \ + boost-devel-1.81.0* \ cmake-3.27.* \ - gcc-12.2.* \ - gcc-c++-12.2.* \ + gcc-13.2.* \ + gcc-c++-13.2.* \ git \ libappindicator-gtk3-devel \ libcap-devel \ @@ -67,27 +67,28 @@ dnf clean all rm -rf /var/cache/yum _DEPS -# install cuda -WORKDIR /build/cuda -# versions: https://developer.nvidia.com/cuda-toolkit-archive -ENV CUDA_VERSION="12.0.0" -ENV CUDA_BUILD="525.60.13" -# hadolint ignore=SC3010 -RUN <<_INSTALL_CUDA -#!/bin/bash -set -e -cuda_prefix="https://developer.download.nvidia.com/compute/cuda/" -cuda_suffix="" -if [[ "${TARGETPLATFORM}" == 'linux/arm64' ]]; then - cuda_suffix="_sbsa" -fi -url="${cuda_prefix}${CUDA_VERSION}/local_installers/cuda_${CUDA_VERSION}_${CUDA_BUILD}_linux${cuda_suffix}.run" -echo "cuda url: ${url}" -wget "$url" --progress=bar:force:noscroll -q --show-progress -O ./cuda.run -chmod a+x ./cuda.run -./cuda.run --silent --toolkit --toolkitpath=/build/cuda --no-opengl-libs --no-man-page --no-drm -rm ./cuda.run -_INSTALL_CUDA +# todo - enable cuda once it's supported for gcc 13 and fedora 39 +## install cuda +#WORKDIR /build/cuda +## versions: https://developer.nvidia.com/cuda-toolkit-archive +#ENV CUDA_VERSION="12.0.0" +#ENV CUDA_BUILD="525.60.13" +## hadolint ignore=SC3010 +#RUN <<_INSTALL_CUDA +##!/bin/bash +#set -e +#cuda_prefix="https://developer.download.nvidia.com/compute/cuda/" +#cuda_suffix="" +#if [[ "${TARGETPLATFORM}" == 'linux/arm64' ]]; then +# cuda_suffix="_sbsa" +#fi +#url="${cuda_prefix}${CUDA_VERSION}/local_installers/cuda_${CUDA_VERSION}_${CUDA_BUILD}_linux${cuda_suffix}.run" +#echo "cuda url: ${url}" +#wget "$url" --progress=bar:force:noscroll -q --show-progress -O ./cuda.run +#chmod a+x ./cuda.run +#./cuda.run --silent --toolkit --toolkitpath=/build/cuda --no-opengl-libs --no-man-page --no-drm +#rm ./cuda.run +#_INSTALL_CUDA # copy repository WORKDIR /build/sunshine/ @@ -100,11 +101,12 @@ RUN npm install WORKDIR /build/sunshine/build # cmake and cpack +# todo - add cmake argument back in for cuda support "-DCMAKE_CUDA_COMPILER:PATH=/build/cuda/bin/nvcc \" +# todo - re-enable "DSUNSHINE_ENABLE_CUDA" RUN <<_MAKE #!/bin/bash set -e cmake \ - -DCMAKE_CUDA_COMPILER:PATH=/build/cuda/bin/nvcc \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ -DSUNSHINE_ASSETS_DIR=share/sunshine \ @@ -112,7 +114,7 @@ cmake \ -DSUNSHINE_ENABLE_WAYLAND=ON \ -DSUNSHINE_ENABLE_X11=ON \ -DSUNSHINE_ENABLE_DRM=ON \ - -DSUNSHINE_ENABLE_CUDA=ON \ + -DSUNSHINE_ENABLE_CUDA=OFF \ /build/sunshine make -j "$(nproc)" cpack -G RPM diff --git a/docs/source/about/installation.rst b/docs/source/about/installation.rst index 3d20a020b30..be7510ad7ec 100644 --- a/docs/source/about/installation.rst +++ b/docs/source/about/installation.rst @@ -41,8 +41,8 @@ CUDA is used for NVFBC capture. sunshine_{arch}.flatpak 12.0.0 525.60.13 50;52;60;61;62;70;75;80;86;90 sunshine-debian-bookworm-{arch}.deb 12.0.0 525.60.13 50;52;60;61;62;70;75;80;86;90 sunshine-debian-bullseye-{arch}.deb 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90 - sunshine-fedora-37-{arch}.rpm 12.0.0 525.60.13 50;52;60;61;62;70;75;80;86;90 sunshine-fedora-38-{arch}.rpm unavailable unavailable none + sunshine-fedora-39-{arch}.rpm unavailable unavailable none sunshine-ubuntu-20.04-{arch}.deb 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90 sunshine-ubuntu-22.04-{arch}.deb 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90 =========================================== ============== ============== ================================ diff --git a/docs/source/building/linux.rst b/docs/source/building/linux.rst index 82a3ed17462..0ac90079e39 100644 --- a/docs/source/building/linux.rst +++ b/docs/source/building/linux.rst @@ -46,7 +46,7 @@ Install Requirements nvidia-cuda-dev \ # Cuda, NvFBC nvidia-cuda-toolkit # Cuda, NvFBC -Fedora 37, 38 +Fedora 38, 39 ^^^^^^^^^^^^^ Install Requirements From 4c984cacb54c09ee954e8855b6341e699bbfd535 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Dec 2023 17:50:06 -0500 Subject: [PATCH 029/197] build(deps): bump actions/upload-artifact from 3 to 4 (#1915) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/CI.yml | 10 +++++----- .github/workflows/ci-docker.yml | 2 +- .github/workflows/cpp-lint.yml | 2 +- .github/workflows/update-pages.yml | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b802e2346a9..8eadad4140c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -251,7 +251,7 @@ jobs: ../artifacts/sunshine_debug_${{ matrix.arch }}.flatpak dev.lizardbyte.sunshine.Debug' - name: Upload Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: sunshine-linux-flatpak-${{ matrix.arch }} path: artifacts/ @@ -483,7 +483,7 @@ jobs: ./appimagelint-x86_64.AppImage ./artifacts/sunshine.AppImage - name: Upload Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: sunshine-linux-${{ matrix.type }}-${{ matrix.dist }} path: artifacts/ @@ -551,7 +551,7 @@ jobs: # mv ./cpack_artifacts/Sunshine.dmg ../artifacts/sunshine-bundle.dmg - name: Upload Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: sunshine-macos path: artifacts/ @@ -676,7 +676,7 @@ jobs: echo "::endgroup::" - name: Upload Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: sunshine-macports path: artifacts/ @@ -771,7 +771,7 @@ jobs: a "../artifacts/sunshine-debuginfo-win32.zip" "*.exe" - name: Upload Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: sunshine-windows path: artifacts/ diff --git a/.github/workflows/ci-docker.yml b/.github/workflows/ci-docker.yml index edeeb2bd9b7..70e940d68d9 100644 --- a/.github/workflows/ci-docker.yml +++ b/.github/workflows/ci-docker.yml @@ -395,7 +395,7 @@ jobs: - name: Upload Artifacts if: ${{ steps.prepare.outputs.artifacts == 'true' }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Docker${{ matrix.tag }} path: artifacts/ diff --git a/.github/workflows/cpp-lint.yml b/.github/workflows/cpp-lint.yml index b5d4ff7765e..921641c593e 100644 --- a/.github/workflows/cpp-lint.yml +++ b/.github/workflows/cpp-lint.yml @@ -65,7 +65,7 @@ jobs: - name: Upload Artifacts if: failure() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: clang-format-fixes path: ${{ steps.find_files.outputs.found_files }} diff --git a/.github/workflows/update-pages.yml b/.github/workflows/update-pages.yml index 5fbbf97f9f4..5fb435d1602 100644 --- a/.github/workflows/update-pages.yml +++ b/.github/workflows/update-pages.yml @@ -39,7 +39,7 @@ jobs: - name: Upload Artifacts if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: gh-pages if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` From 068c3fa303fe871555598bedbecd8ade302f1a32 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Sun, 17 Dec 2023 10:37:54 -0500 Subject: [PATCH 030/197] docs: use glob pattern to match source code docs (#1918) --- docs/source/source/src/platform.rst | 10 --- docs/source/source/src/platform/linux.rst | 12 ---- docs/source/source/src/platform/macos.rst | 11 ---- docs/source/source/src/platform/windows.rst | 9 --- .../src.rst => source_code/source_code.rst} | 65 ++++++++++--------- .../{source => source_code}/src/audio.rst | 0 .../{source => source_code}/src/cbs.rst | 0 .../{source => source_code}/src/config.rst | 0 .../src/confighttp.rst | 0 .../{source => source_code}/src/crypto.rst | 0 .../src/httpcommon.rst | 0 .../{source => source_code}/src/input.rst | 0 .../{source => source_code}/src/main.rst | 0 .../src/move_by_copy.rst | 0 .../{source => source_code}/src/network.rst | 0 .../{source => source_code}/src/nvhttp.rst | 0 .../src/platform/common.rst | 0 .../src/platform/linux/cuda.rst | 0 .../src/platform/linux/graphics.rst | 0 .../src/platform/linux/misc.rst | 0 .../src/platform/linux/vaapi.rst | 0 .../src/platform/linux/wayland.rst | 0 .../src/platform/linux/x11grab.rst | 0 .../src/platform/macos/av_audio.rst | 0 .../src/platform/macos/av_img_t.rst | 0 .../src/platform/macos/av_video.rst | 0 .../src/platform/macos/misc.rst | 0 .../src/platform/macos/nv12_zero_device.rst | 0 .../src/platform/windows/PolicyConfig.rst | 0 .../src/platform/windows/display.rst | 0 .../src/platform/windows/misc.rst | 0 .../{source => source_code}/src/process.rst | 0 .../src/round_robin.rst | 0 .../{source => source_code}/src/rtsp.rst | 0 .../{source => source_code}/src/stream.rst | 0 .../{source => source_code}/src/sync.rst | 0 .../src/system_tray.rst | 0 .../{source => source_code}/src/task_pool.rst | 0 .../src/thread_pool.rst | 0 .../src/thread_safe.rst | 0 .../{source => source_code}/src/upnp.rst | 0 .../{source => source_code}/src/utility.rst | 0 .../{source => source_code}/src/uuid.rst | 0 .../{source => source_code}/src/video.rst | 0 docs/source/toc.rst | 2 +- 45 files changed, 36 insertions(+), 73 deletions(-) delete mode 100644 docs/source/source/src/platform.rst delete mode 100644 docs/source/source/src/platform/linux.rst delete mode 100644 docs/source/source/src/platform/macos.rst delete mode 100644 docs/source/source/src/platform/windows.rst rename docs/source/{source/src.rst => source_code/source_code.rst} (73%) rename docs/source/{source => source_code}/src/audio.rst (100%) rename docs/source/{source => source_code}/src/cbs.rst (100%) rename docs/source/{source => source_code}/src/config.rst (100%) rename docs/source/{source => source_code}/src/confighttp.rst (100%) rename docs/source/{source => source_code}/src/crypto.rst (100%) rename docs/source/{source => source_code}/src/httpcommon.rst (100%) rename docs/source/{source => source_code}/src/input.rst (100%) rename docs/source/{source => source_code}/src/main.rst (100%) rename docs/source/{source => source_code}/src/move_by_copy.rst (100%) rename docs/source/{source => source_code}/src/network.rst (100%) rename docs/source/{source => source_code}/src/nvhttp.rst (100%) rename docs/source/{source => source_code}/src/platform/common.rst (100%) rename docs/source/{source => source_code}/src/platform/linux/cuda.rst (100%) rename docs/source/{source => source_code}/src/platform/linux/graphics.rst (100%) rename docs/source/{source => source_code}/src/platform/linux/misc.rst (100%) rename docs/source/{source => source_code}/src/platform/linux/vaapi.rst (100%) rename docs/source/{source => source_code}/src/platform/linux/wayland.rst (100%) rename docs/source/{source => source_code}/src/platform/linux/x11grab.rst (100%) rename docs/source/{source => source_code}/src/platform/macos/av_audio.rst (100%) rename docs/source/{source => source_code}/src/platform/macos/av_img_t.rst (100%) rename docs/source/{source => source_code}/src/platform/macos/av_video.rst (100%) rename docs/source/{source => source_code}/src/platform/macos/misc.rst (100%) rename docs/source/{source => source_code}/src/platform/macos/nv12_zero_device.rst (100%) rename docs/source/{source => source_code}/src/platform/windows/PolicyConfig.rst (100%) rename docs/source/{source => source_code}/src/platform/windows/display.rst (100%) rename docs/source/{source => source_code}/src/platform/windows/misc.rst (100%) rename docs/source/{source => source_code}/src/process.rst (100%) rename docs/source/{source => source_code}/src/round_robin.rst (100%) rename docs/source/{source => source_code}/src/rtsp.rst (100%) rename docs/source/{source => source_code}/src/stream.rst (100%) rename docs/source/{source => source_code}/src/sync.rst (100%) rename docs/source/{source => source_code}/src/system_tray.rst (100%) rename docs/source/{source => source_code}/src/task_pool.rst (100%) rename docs/source/{source => source_code}/src/thread_pool.rst (100%) rename docs/source/{source => source_code}/src/thread_safe.rst (100%) rename docs/source/{source => source_code}/src/upnp.rst (100%) rename docs/source/{source => source_code}/src/utility.rst (100%) rename docs/source/{source => source_code}/src/uuid.rst (100%) rename docs/source/{source => source_code}/src/video.rst (100%) diff --git a/docs/source/source/src/platform.rst b/docs/source/source/src/platform.rst deleted file mode 100644 index ca74092992e..00000000000 --- a/docs/source/source/src/platform.rst +++ /dev/null @@ -1,10 +0,0 @@ -platform -======== - -.. toctree:: - :maxdepth: 1 - - platform/common - platform/linux - platform/macos - platform/windows diff --git a/docs/source/source/src/platform/linux.rst b/docs/source/source/src/platform/linux.rst deleted file mode 100644 index f67235b6438..00000000000 --- a/docs/source/source/src/platform/linux.rst +++ /dev/null @@ -1,12 +0,0 @@ -linux -===== - -.. toctree:: - :maxdepth: 1 - - linux/cuda - linux/graphics - linux/misc - linux/vaapi - linux/wayland - linux/x11grab diff --git a/docs/source/source/src/platform/macos.rst b/docs/source/source/src/platform/macos.rst deleted file mode 100644 index 1031eb63551..00000000000 --- a/docs/source/source/src/platform/macos.rst +++ /dev/null @@ -1,11 +0,0 @@ -macos -===== - -.. toctree:: - :maxdepth: 1 - - macos/av_audio - macos/av_img_t - macos/av_video - macos/misc - macos/nv12_zero_device diff --git a/docs/source/source/src/platform/windows.rst b/docs/source/source/src/platform/windows.rst deleted file mode 100644 index 9bcece68c3a..00000000000 --- a/docs/source/source/src/platform/windows.rst +++ /dev/null @@ -1,9 +0,0 @@ -windows -======= - -.. toctree:: - :maxdepth: 1 - - windows/display - windows/misc - windows/PolicyConfig diff --git a/docs/source/source/src.rst b/docs/source/source_code/source_code.rst similarity index 73% rename from docs/source/source/src.rst rename to docs/source/source_code/source_code.rst index bdba0c359c4..fecc6801c92 100644 --- a/docs/source/source/src.rst +++ b/docs/source/source_code/source_code.rst @@ -1,5 +1,5 @@ -src -=== +Source Code +=========== We are in process of improving the source code documentation. Code should be documented using Doxygen syntax. Some examples exist in `main.h` and `main.cpp`. In order for documentation within the code to appear in the rendered docs, the definition of the object must be in a header file, although the documentation itself can (and @@ -52,35 +52,40 @@ Example Documentation Blocks // do stuff } -Code ----- +Source +------ .. toctree:: - :maxdepth: 2 :caption: src + :maxdepth: 1 + :glob: - src/main - src/audio - src/cbs - src/config - src/confighttp - src/crypto - src/httpcommon - src/input - src/move_by_copy - src/network - src/nvhttp - src/process - src/round_robin - src/rtsp - src/stream - src/sync - src/system_tray - src/task_pool - src/thread_pool - src/thread_safe - src/upnp - src/utility - src/uuid - src/video - src/platform + src/* + +.. toctree:: + :caption: src/platform + :maxdepth: 1 + :glob: + + src/platform/* + +.. toctree:: + :caption: src/platform/linux + :maxdepth: 1 + :glob: + + src/platform/linux/* + +.. toctree:: + :caption: src/platform/macos + :maxdepth: 1 + :glob: + + src/platform/macos/* + +.. toctree:: + :caption: src/platform/windows + :maxdepth: 1 + :glob: + + src/platform/windows/* diff --git a/docs/source/source/src/audio.rst b/docs/source/source_code/src/audio.rst similarity index 100% rename from docs/source/source/src/audio.rst rename to docs/source/source_code/src/audio.rst diff --git a/docs/source/source/src/cbs.rst b/docs/source/source_code/src/cbs.rst similarity index 100% rename from docs/source/source/src/cbs.rst rename to docs/source/source_code/src/cbs.rst diff --git a/docs/source/source/src/config.rst b/docs/source/source_code/src/config.rst similarity index 100% rename from docs/source/source/src/config.rst rename to docs/source/source_code/src/config.rst diff --git a/docs/source/source/src/confighttp.rst b/docs/source/source_code/src/confighttp.rst similarity index 100% rename from docs/source/source/src/confighttp.rst rename to docs/source/source_code/src/confighttp.rst diff --git a/docs/source/source/src/crypto.rst b/docs/source/source_code/src/crypto.rst similarity index 100% rename from docs/source/source/src/crypto.rst rename to docs/source/source_code/src/crypto.rst diff --git a/docs/source/source/src/httpcommon.rst b/docs/source/source_code/src/httpcommon.rst similarity index 100% rename from docs/source/source/src/httpcommon.rst rename to docs/source/source_code/src/httpcommon.rst diff --git a/docs/source/source/src/input.rst b/docs/source/source_code/src/input.rst similarity index 100% rename from docs/source/source/src/input.rst rename to docs/source/source_code/src/input.rst diff --git a/docs/source/source/src/main.rst b/docs/source/source_code/src/main.rst similarity index 100% rename from docs/source/source/src/main.rst rename to docs/source/source_code/src/main.rst diff --git a/docs/source/source/src/move_by_copy.rst b/docs/source/source_code/src/move_by_copy.rst similarity index 100% rename from docs/source/source/src/move_by_copy.rst rename to docs/source/source_code/src/move_by_copy.rst diff --git a/docs/source/source/src/network.rst b/docs/source/source_code/src/network.rst similarity index 100% rename from docs/source/source/src/network.rst rename to docs/source/source_code/src/network.rst diff --git a/docs/source/source/src/nvhttp.rst b/docs/source/source_code/src/nvhttp.rst similarity index 100% rename from docs/source/source/src/nvhttp.rst rename to docs/source/source_code/src/nvhttp.rst diff --git a/docs/source/source/src/platform/common.rst b/docs/source/source_code/src/platform/common.rst similarity index 100% rename from docs/source/source/src/platform/common.rst rename to docs/source/source_code/src/platform/common.rst diff --git a/docs/source/source/src/platform/linux/cuda.rst b/docs/source/source_code/src/platform/linux/cuda.rst similarity index 100% rename from docs/source/source/src/platform/linux/cuda.rst rename to docs/source/source_code/src/platform/linux/cuda.rst diff --git a/docs/source/source/src/platform/linux/graphics.rst b/docs/source/source_code/src/platform/linux/graphics.rst similarity index 100% rename from docs/source/source/src/platform/linux/graphics.rst rename to docs/source/source_code/src/platform/linux/graphics.rst diff --git a/docs/source/source/src/platform/linux/misc.rst b/docs/source/source_code/src/platform/linux/misc.rst similarity index 100% rename from docs/source/source/src/platform/linux/misc.rst rename to docs/source/source_code/src/platform/linux/misc.rst diff --git a/docs/source/source/src/platform/linux/vaapi.rst b/docs/source/source_code/src/platform/linux/vaapi.rst similarity index 100% rename from docs/source/source/src/platform/linux/vaapi.rst rename to docs/source/source_code/src/platform/linux/vaapi.rst diff --git a/docs/source/source/src/platform/linux/wayland.rst b/docs/source/source_code/src/platform/linux/wayland.rst similarity index 100% rename from docs/source/source/src/platform/linux/wayland.rst rename to docs/source/source_code/src/platform/linux/wayland.rst diff --git a/docs/source/source/src/platform/linux/x11grab.rst b/docs/source/source_code/src/platform/linux/x11grab.rst similarity index 100% rename from docs/source/source/src/platform/linux/x11grab.rst rename to docs/source/source_code/src/platform/linux/x11grab.rst diff --git a/docs/source/source/src/platform/macos/av_audio.rst b/docs/source/source_code/src/platform/macos/av_audio.rst similarity index 100% rename from docs/source/source/src/platform/macos/av_audio.rst rename to docs/source/source_code/src/platform/macos/av_audio.rst diff --git a/docs/source/source/src/platform/macos/av_img_t.rst b/docs/source/source_code/src/platform/macos/av_img_t.rst similarity index 100% rename from docs/source/source/src/platform/macos/av_img_t.rst rename to docs/source/source_code/src/platform/macos/av_img_t.rst diff --git a/docs/source/source/src/platform/macos/av_video.rst b/docs/source/source_code/src/platform/macos/av_video.rst similarity index 100% rename from docs/source/source/src/platform/macos/av_video.rst rename to docs/source/source_code/src/platform/macos/av_video.rst diff --git a/docs/source/source/src/platform/macos/misc.rst b/docs/source/source_code/src/platform/macos/misc.rst similarity index 100% rename from docs/source/source/src/platform/macos/misc.rst rename to docs/source/source_code/src/platform/macos/misc.rst diff --git a/docs/source/source/src/platform/macos/nv12_zero_device.rst b/docs/source/source_code/src/platform/macos/nv12_zero_device.rst similarity index 100% rename from docs/source/source/src/platform/macos/nv12_zero_device.rst rename to docs/source/source_code/src/platform/macos/nv12_zero_device.rst diff --git a/docs/source/source/src/platform/windows/PolicyConfig.rst b/docs/source/source_code/src/platform/windows/PolicyConfig.rst similarity index 100% rename from docs/source/source/src/platform/windows/PolicyConfig.rst rename to docs/source/source_code/src/platform/windows/PolicyConfig.rst diff --git a/docs/source/source/src/platform/windows/display.rst b/docs/source/source_code/src/platform/windows/display.rst similarity index 100% rename from docs/source/source/src/platform/windows/display.rst rename to docs/source/source_code/src/platform/windows/display.rst diff --git a/docs/source/source/src/platform/windows/misc.rst b/docs/source/source_code/src/platform/windows/misc.rst similarity index 100% rename from docs/source/source/src/platform/windows/misc.rst rename to docs/source/source_code/src/platform/windows/misc.rst diff --git a/docs/source/source/src/process.rst b/docs/source/source_code/src/process.rst similarity index 100% rename from docs/source/source/src/process.rst rename to docs/source/source_code/src/process.rst diff --git a/docs/source/source/src/round_robin.rst b/docs/source/source_code/src/round_robin.rst similarity index 100% rename from docs/source/source/src/round_robin.rst rename to docs/source/source_code/src/round_robin.rst diff --git a/docs/source/source/src/rtsp.rst b/docs/source/source_code/src/rtsp.rst similarity index 100% rename from docs/source/source/src/rtsp.rst rename to docs/source/source_code/src/rtsp.rst diff --git a/docs/source/source/src/stream.rst b/docs/source/source_code/src/stream.rst similarity index 100% rename from docs/source/source/src/stream.rst rename to docs/source/source_code/src/stream.rst diff --git a/docs/source/source/src/sync.rst b/docs/source/source_code/src/sync.rst similarity index 100% rename from docs/source/source/src/sync.rst rename to docs/source/source_code/src/sync.rst diff --git a/docs/source/source/src/system_tray.rst b/docs/source/source_code/src/system_tray.rst similarity index 100% rename from docs/source/source/src/system_tray.rst rename to docs/source/source_code/src/system_tray.rst diff --git a/docs/source/source/src/task_pool.rst b/docs/source/source_code/src/task_pool.rst similarity index 100% rename from docs/source/source/src/task_pool.rst rename to docs/source/source_code/src/task_pool.rst diff --git a/docs/source/source/src/thread_pool.rst b/docs/source/source_code/src/thread_pool.rst similarity index 100% rename from docs/source/source/src/thread_pool.rst rename to docs/source/source_code/src/thread_pool.rst diff --git a/docs/source/source/src/thread_safe.rst b/docs/source/source_code/src/thread_safe.rst similarity index 100% rename from docs/source/source/src/thread_safe.rst rename to docs/source/source_code/src/thread_safe.rst diff --git a/docs/source/source/src/upnp.rst b/docs/source/source_code/src/upnp.rst similarity index 100% rename from docs/source/source/src/upnp.rst rename to docs/source/source_code/src/upnp.rst diff --git a/docs/source/source/src/utility.rst b/docs/source/source_code/src/utility.rst similarity index 100% rename from docs/source/source/src/utility.rst rename to docs/source/source_code/src/utility.rst diff --git a/docs/source/source/src/uuid.rst b/docs/source/source_code/src/uuid.rst similarity index 100% rename from docs/source/source/src/uuid.rst rename to docs/source/source_code/src/uuid.rst diff --git a/docs/source/source/src/video.rst b/docs/source/source_code/src/video.rst similarity index 100% rename from docs/source/source/src/video.rst rename to docs/source/source_code/src/video.rst diff --git a/docs/source/toc.rst b/docs/source/toc.rst index 6121e4402e3..7b182a2c91d 100644 --- a/docs/source/toc.rst +++ b/docs/source/toc.rst @@ -53,4 +53,4 @@ :maxdepth: 2 :caption: source - source/src + source_code/source_code From 6b7b5996ccd040375b62d930e064abddcc533a72 Mon Sep 17 00:00:00 2001 From: LizardByte-bot <108553330+LizardByte-bot@users.noreply.github.com> Date: Tue, 19 Dec 2023 16:41:03 -0500 Subject: [PATCH 031/197] chore: update global workflows (#1921) --- .github/workflows/codeql.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 358ff9c99f6..ae5248763ec 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -116,7 +116,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -139,9 +139,9 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 with: category: "/language:${{matrix.language}}" From 5bdbda90b5458e25f8b2d8d6f394bc542c610517 Mon Sep 17 00:00:00 2001 From: TheElixZammuto Date: Thu, 28 Dec 2023 01:25:49 +0100 Subject: [PATCH 032/197] Web UI migration to Vite and Vue3 and improvements to the UX (#1673) Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> --- .github/workflows/CI.yml | 11 +- cmake/dependencies/common.cmake | 1 + cmake/packaging/common.cmake | 11 +- cmake/packaging/linux.cmake | 6 +- cmake/packaging/macos.cmake | 2 - cmake/packaging/unix.cmake | 3 - cmake/packaging/windows.cmake | 3 - cmake/targets/common.cmake | 6 + docker/debian-bookworm.dockerfile | 3 - docker/debian-bullseye.dockerfile | 21 +- docker/fedora-38.dockerfile | 5 +- docker/fedora-39.dockerfile | 5 +- docker/ubuntu-20.04.dockerfile | 21 +- docker/ubuntu-22.04.dockerfile | 22 +- docs/source/building/linux.rst | 7 - docs/source/building/macos.rst | 7 - docs/source/building/windows.rst | 13 +- docs/source/conf.py | 2 +- docs/source/contributing/contributing.rst | 20 + package.json | 10 +- packaging/linux/Arch/PKGBUILD | 4 - .../linux/flatpak/dev.lizardbyte.sunshine.yml | 3 - packaging/macos/Portfile | 4 - scripts/icons/convert_and_pack.sh | 6 +- src/confighttp.cpp | 32 +- src_assets/common/assets/web/Navbar.vue | 60 + src_assets/common/assets/web/ResourceCard.vue | 36 + src_assets/common/assets/web/apps.html | 812 ++++---- src_assets/common/assets/web/clients.html | 3 - src_assets/common/assets/web/config.html | 1828 +++++++---------- .../common/assets/web/header-no-nav.html | 14 - src_assets/common/assets/web/header.html | 83 - src_assets/common/assets/web/index.html | 147 +- src_assets/common/assets/web/password.html | 164 +- src_assets/common/assets/web/pin.html | 56 +- .../{ => public}/images/logo-sunshine-16.png | Bin .../{ => public}/images/logo-sunshine-45.png | Bin .../images/sunshine-locked-16.png | Bin .../images/sunshine-locked-45.png | Bin .../{ => public}/images/sunshine-locked.ico | Bin .../{ => public}/images/sunshine-locked.png | Bin .../{ => public}/images/sunshine-locked.svg | 0 .../images/sunshine-pausing-16.png | Bin .../images/sunshine-pausing-45.png | Bin .../{ => public}/images/sunshine-pausing.ico | Bin .../{ => public}/images/sunshine-pausing.png | Bin .../{ => public}/images/sunshine-pausing.svg | 0 .../images/sunshine-playing-16.png | Bin .../images/sunshine-playing-45.png | Bin .../{ => public}/images/sunshine-playing.ico | Bin .../{ => public}/images/sunshine-playing.png | Bin .../{ => public}/images/sunshine-playing.svg | 0 .../web/{ => public}/images/sunshine.ico | Bin .../common/assets/web/template_header.html | 9 + .../common/assets/web/troubleshooting.html | 353 ++-- src_assets/common/assets/web/welcome.html | 125 +- vite.config.js | 53 + 57 files changed, 1831 insertions(+), 2140 deletions(-) create mode 100644 src_assets/common/assets/web/Navbar.vue create mode 100644 src_assets/common/assets/web/ResourceCard.vue delete mode 100644 src_assets/common/assets/web/clients.html delete mode 100644 src_assets/common/assets/web/header-no-nav.html delete mode 100644 src_assets/common/assets/web/header.html rename src_assets/common/assets/web/{ => public}/images/logo-sunshine-16.png (100%) rename src_assets/common/assets/web/{ => public}/images/logo-sunshine-45.png (100%) rename src_assets/common/assets/web/{ => public}/images/sunshine-locked-16.png (100%) rename src_assets/common/assets/web/{ => public}/images/sunshine-locked-45.png (100%) rename src_assets/common/assets/web/{ => public}/images/sunshine-locked.ico (100%) rename src_assets/common/assets/web/{ => public}/images/sunshine-locked.png (100%) rename src_assets/common/assets/web/{ => public}/images/sunshine-locked.svg (100%) rename src_assets/common/assets/web/{ => public}/images/sunshine-pausing-16.png (100%) rename src_assets/common/assets/web/{ => public}/images/sunshine-pausing-45.png (100%) rename src_assets/common/assets/web/{ => public}/images/sunshine-pausing.ico (100%) rename src_assets/common/assets/web/{ => public}/images/sunshine-pausing.png (100%) rename src_assets/common/assets/web/{ => public}/images/sunshine-pausing.svg (100%) rename src_assets/common/assets/web/{ => public}/images/sunshine-playing-16.png (100%) rename src_assets/common/assets/web/{ => public}/images/sunshine-playing-45.png (100%) rename src_assets/common/assets/web/{ => public}/images/sunshine-playing.ico (100%) rename src_assets/common/assets/web/{ => public}/images/sunshine-playing.png (100%) rename src_assets/common/assets/web/{ => public}/images/sunshine-playing.svg (100%) rename src_assets/common/assets/web/{ => public}/images/sunshine.ico (100%) create mode 100644 src_assets/common/assets/web/template_header.html create mode 100644 vite.config.js diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8eadad4140c..38907881d2c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -398,8 +398,6 @@ jobs: mkdir -p build mkdir -p artifacts - npm install - cd build cmake -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ @@ -527,8 +525,6 @@ jobs: BUILD_VERSION: ${{ needs.check_changelog.outputs.next_version_bare }} COMMIT: ${{ github.event.pull_request.head.sha || github.sha }} run: | - npm install - mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release \ @@ -719,8 +715,9 @@ jobs: mingw-w64-x86_64-boost mingw-w64-x86_64-cmake mingw-w64-x86_64-curl - mingw-w64-x86_64-onevpl + mingw-w64-x86_64-nodejs mingw-w64-x86_64-nsis + mingw-w64-x86_64-onevpl mingw-w64-x86_64-openssl mingw-w64-x86_64-opus mingw-w64-x86_64-toolchain @@ -728,10 +725,6 @@ jobs: wget yasm - - name: Install npm packages - run: | - npm install - - name: Build Windows shell: msys2 {0} env: diff --git a/cmake/dependencies/common.cmake b/cmake/dependencies/common.cmake index 9bc7c56ceee..34ea09f7a3a 100644 --- a/cmake/dependencies/common.cmake +++ b/cmake/dependencies/common.cmake @@ -84,3 +84,4 @@ elseif(UNIX) include(${CMAKE_MODULE_PATH}/dependencies/linux.cmake) endif() endif() + diff --git a/cmake/packaging/common.cmake b/cmake/packaging/common.cmake index 0b41524f6cb..ad3f9bc0682 100644 --- a/cmake/packaging/common.cmake +++ b/cmake/packaging/common.cmake @@ -12,9 +12,14 @@ set(CPACK_PACKAGE_ICON ${PROJECT_SOURCE_DIR}/sunshine.png) set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}") set(CPACK_STRIP_FILES YES) -# install npm modules -install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/node_modules" - DESTINATION "${SUNSHINE_ASSETS_DIR}/web") +#install common assets +install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/" + DESTINATION "${SUNSHINE_ASSETS_DIR}" + PATTERN "web" EXCLUDE) + +# install built vite assets +install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/assets/web" + DESTINATION "${SUNSHINE_ASSETS_DIR}") # platform specific packaging if(WIN32) diff --git a/cmake/packaging/linux.cmake b/cmake/packaging/linux.cmake index 842277b9d27..8106345ffe8 100644 --- a/cmake/packaging/linux.cmake +++ b/cmake/packaging/linux.cmake @@ -70,11 +70,11 @@ if(${SUNSHINE_TRAY} STREQUAL 1) install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/status" RENAME "sunshine-tray.svg") - install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/images/sunshine-playing.svg" + install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-playing.svg" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/status") - install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/images/sunshine-pausing.svg" + install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-pausing.svg" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/status") - install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/images/sunshine-locked.svg" + install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-locked.svg" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/status") set(CPACK_DEBIAN_PACKAGE_DEPENDS "\ diff --git a/cmake/packaging/macos.cmake b/cmake/packaging/macos.cmake index 2b173393bbf..f7c3a518c97 100644 --- a/cmake/packaging/macos.cmake +++ b/cmake/packaging/macos.cmake @@ -10,8 +10,6 @@ if(SUNSHINE_PACKAGE_MACOS) # todo set(MAC_PREFIX "${CMAKE_PROJECT_NAME}.app/Contents") set(INSTALL_RUNTIME_DIR "${MAC_PREFIX}/MacOS") - install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/" - DESTINATION "${SUNSHINE_ASSETS_DIR}") install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/" DESTINATION "${SUNSHINE_ASSETS_DIR}") diff --git a/cmake/packaging/unix.cmake b/cmake/packaging/unix.cmake index 660811f3b33..bacbfc910de 100644 --- a/cmake/packaging/unix.cmake +++ b/cmake/packaging/unix.cmake @@ -13,6 +13,3 @@ if(NOT CMAKE_INSTALL_PREFIX) endif() install(TARGETS sunshine RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") - -install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/" - DESTINATION "${SUNSHINE_ASSETS_DIR}") diff --git a/cmake/packaging/windows.cmake b/cmake/packaging/windows.cmake index 3231d761f8c..dc2add19854 100644 --- a/cmake/packaging/windows.cmake +++ b/cmake/packaging/windows.cmake @@ -36,9 +36,6 @@ install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/gamepad/" COMPONENT gamepad) # Sunshine assets -install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/" - DESTINATION "${SUNSHINE_ASSETS_DIR}" - COMPONENT assets) install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/assets/" DESTINATION "${SUNSHINE_ASSETS_DIR}" COMPONENT assets) diff --git a/cmake/targets/common.cmake b/cmake/targets/common.cmake index 72f89bf5182..7c446e466df 100644 --- a/cmake/targets/common.cmake +++ b/cmake/targets/common.cmake @@ -33,3 +33,9 @@ foreach(flag IN LISTS SUNSHINE_COMPILE_OPTIONS) endforeach() target_compile_options(sunshine PRIVATE $<$:${SUNSHINE_COMPILE_OPTIONS}>;$<$:${SUNSHINE_COMPILE_OPTIONS_CUDA};-std=c++17>) # cmake-lint: disable=C0301 + +#WebUI build +add_custom_target(web-ui ALL + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT "Installing NPM Dependencies and Building the Web UI" + COMMAND bash -c \"npm install && SUNSHINE_SOURCE_ASSETS_DIR=${SUNSHINE_SOURCE_ASSETS_DIR} SUNSHINE_ASSETS_DIR=${CMAKE_BINARY_DIR} npm run build\") # cmake-lint: disable=C0301 diff --git a/docker/debian-bookworm.dockerfile b/docker/debian-bookworm.dockerfile index 1172d35a5e9..c9d4fccdede 100644 --- a/docker/debian-bookworm.dockerfile +++ b/docker/debian-bookworm.dockerfile @@ -95,9 +95,6 @@ _INSTALL_CUDA WORKDIR /build/sunshine/ COPY --link .. . -# setup npm dependencies -RUN npm install - # setup build directory WORKDIR /build/sunshine/build diff --git a/docker/debian-bullseye.dockerfile b/docker/debian-bullseye.dockerfile index 6d7ebdd30af..3e602105cb2 100644 --- a/docker/debian-bullseye.dockerfile +++ b/docker/debian-bullseye.dockerfile @@ -31,6 +31,7 @@ set -e apt-get update -y apt-get install -y --no-install-recommends \ build-essential \ + ca-certificates \ cmake=3.18.* \ git \ libavdevice-dev \ @@ -58,8 +59,6 @@ apt-get install -y --no-install-recommends \ libxfixes-dev \ libxrandr-dev \ libxtst-dev \ - nodejs \ - npm \ wget if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then apt-get install -y --no-install-recommends \ @@ -69,6 +68,17 @@ apt-get clean rm -rf /var/lib/apt/lists/* _DEPS +#Install Node +# hadolint ignore=SC1091 +RUN <<_INSTALL_NODE +#!/bin/bash +set -e +wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash +source "$HOME/.nvm/nvm.sh" +nvm install 20.9.0 +nvm use 20.9.0 +_INSTALL_NODE + # install cuda WORKDIR /build/cuda # versions: https://developer.nvidia.com/cuda-toolkit-archive @@ -95,16 +105,17 @@ _INSTALL_CUDA WORKDIR /build/sunshine/ COPY --link .. . -# setup npm dependencies -RUN npm install - # setup build directory WORKDIR /build/sunshine/build # cmake and cpack +# hadolint ignore=SC1091 RUN <<_MAKE #!/bin/bash set -e +#Set Node version +source "$HOME/.nvm/nvm.sh" +nvm use 20.9.0 cmake \ -DCMAKE_CUDA_COMPILER:PATH=/build/cuda/bin/nvcc \ -DCMAKE_BUILD_TYPE=Release \ diff --git a/docker/fedora-38.dockerfile b/docker/fedora-38.dockerfile index 2245ba9b9aa..9f836fb889a 100644 --- a/docker/fedora-38.dockerfile +++ b/docker/fedora-38.dockerfile @@ -52,7 +52,7 @@ dnf -y install \ libXrandr-devel \ libXtst-devel \ mesa-libGL-devel \ - nodejs-npm \ + nodejs \ numactl-devel \ openssl-devel \ opus-devel \ @@ -94,9 +94,6 @@ _DEPS WORKDIR /build/sunshine/ COPY --link .. . -# setup npm dependencies -RUN npm install - # setup build directory WORKDIR /build/sunshine/build diff --git a/docker/fedora-39.dockerfile b/docker/fedora-39.dockerfile index 6c6db891bbf..26b10f4b004 100644 --- a/docker/fedora-39.dockerfile +++ b/docker/fedora-39.dockerfile @@ -52,7 +52,7 @@ dnf -y install \ libXrandr-devel \ libXtst-devel \ mesa-libGL-devel \ - nodejs-npm \ + nodejs \ numactl-devel \ openssl-devel \ opus-devel \ @@ -94,9 +94,6 @@ _DEPS WORKDIR /build/sunshine/ COPY --link .. . -# setup npm dependencies -RUN npm install - # setup build directory WORKDIR /build/sunshine/build diff --git a/docker/ubuntu-20.04.dockerfile b/docker/ubuntu-20.04.dockerfile index 5634d48e0c0..bad8285d648 100644 --- a/docker/ubuntu-20.04.dockerfile +++ b/docker/ubuntu-20.04.dockerfile @@ -31,6 +31,7 @@ set -e apt-get update -y apt-get install -y --no-install-recommends \ build-essential \ + ca-certificates \ gcc-10=10.5.* \ g++-10=10.5.* \ git \ @@ -59,8 +60,6 @@ apt-get install -y --no-install-recommends \ libxfixes-dev \ libxrandr-dev \ libxtst-dev \ - nodejs \ - npm \ wget if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then apt-get install -y --no-install-recommends \ @@ -70,6 +69,17 @@ apt-get clean rm -rf /var/lib/apt/lists/* _DEPS +#Install Node +# hadolint ignore=SC1091 +RUN <<_INSTALL_NODE +#!/bin/bash +set -e +wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash +source "$HOME/.nvm/nvm.sh" +nvm install 20.9.0 +nvm use 20.9.0 +_INSTALL_NODE + # Update gcc alias # https://stackoverflow.com/a/70653945/11214013 RUN <<_GCC_ALIAS @@ -131,16 +141,17 @@ _INSTALL_CUDA WORKDIR /build/sunshine/ COPY --link .. . -# setup npm dependencies -RUN npm install - # setup build directory WORKDIR /build/sunshine/build # cmake and cpack +# hadolint ignore=SC1091 RUN <<_MAKE #!/bin/bash set -e +#Set Node version +source "$HOME/.nvm/nvm.sh" +nvm use 20.9.0 cmake \ -DCMAKE_CUDA_COMPILER:PATH=/build/cuda/bin/nvcc \ -DCMAKE_BUILD_TYPE=Release \ diff --git a/docker/ubuntu-22.04.dockerfile b/docker/ubuntu-22.04.dockerfile index c9c6b70db89..2f37a691bc7 100644 --- a/docker/ubuntu-22.04.dockerfile +++ b/docker/ubuntu-22.04.dockerfile @@ -32,6 +32,7 @@ apt-get update -y apt-get install -y --no-install-recommends \ build-essential \ cmake=3.22.* \ + ca-certificates \ git \ libayatana-appindicator3-dev \ libavdevice-dev \ @@ -58,8 +59,6 @@ apt-get install -y --no-install-recommends \ libxfixes-dev \ libxrandr-dev \ libxtst-dev \ - nodejs \ - npm \ wget if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then apt-get install -y --no-install-recommends \ @@ -69,6 +68,17 @@ apt-get clean rm -rf /var/lib/apt/lists/* _DEPS +#Install Node +# hadolint ignore=SC1091 +RUN <<_INSTALL_NODE +#!/bin/bash +set -e +wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash +source "$HOME/.nvm/nvm.sh" +nvm install 20.9.0 +nvm use 20.9.0 +_INSTALL_NODE + # install cuda WORKDIR /build/cuda # versions: https://developer.nvidia.com/cuda-toolkit-archive @@ -95,16 +105,18 @@ _INSTALL_CUDA WORKDIR /build/sunshine/ COPY --link .. . -# setup npm dependencies -RUN npm install - # setup build directory WORKDIR /build/sunshine/build # cmake and cpack +# hadolint ignore=SC1091 RUN <<_MAKE #!/bin/bash set -e +#Set Node version +source "$HOME/.nvm/nvm.sh" +nvm use 20.9.0 +#Actually build cmake \ -DCMAKE_CUDA_COMPILER:PATH=/build/cuda/bin/nvcc \ -DCMAKE_BUILD_TYPE=Release \ diff --git a/docs/source/building/linux.rst b/docs/source/building/linux.rst index 0ac90079e39..eab0aaab607 100644 --- a/docs/source/building/linux.rst +++ b/docs/source/building/linux.rst @@ -192,13 +192,6 @@ If the version of CUDA available from your distro is not adequate, manually inst ./cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm rm ./cuda.run -npm dependencies ----------------- -Install npm dependencies. - .. code-block:: bash - - npm install - Build ----- .. Attention:: Ensure you are in the build directory created during the clone step earlier before continuing. diff --git a/docs/source/building/macos.rst b/docs/source/building/macos.rst index 2d39ec17951..6bfa2c7061e 100644 --- a/docs/source/building/macos.rst +++ b/docs/source/building/macos.rst @@ -24,13 +24,6 @@ Install Requirements cd /usr/local/include ln -s ../opt/openssl/include/openssl . -npm dependencies ----------------- -Install npm dependencies. - .. code-block:: bash - - npm install - Build ----- .. Attention:: Ensure you are in the build directory created during the clone step earlier before continuing. diff --git a/docs/source/building/windows.rst b/docs/source/building/windows.rst index 623bd16a409..a8164d3cb20 100644 --- a/docs/source/building/windows.rst +++ b/docs/source/building/windows.rst @@ -16,17 +16,8 @@ Install dependencies: pacman -S base-devel cmake diffutils gcc git make mingw-w64-x86_64-binutils \ mingw-w64-x86_64-boost mingw-w64-x86_64-cmake mingw-w64-x86_64-curl \ - mingw-w64-x86_64-onevpl mingw-w64-x86_64-openssl mingw-w64-x86_64-opus \ - mingw-w64-x86_64-toolchain - -npm dependencies ----------------- -Install nodejs and npm. Downloads available `here `__. - -Install npm dependencies. - .. code-block:: bash - - npm install + mingw-w64-x86_64-nodejs mingw-w64-x86_64-onevpl mingw-w64-x86_64-openssl \ + mingw-w64-x86_64-opus mingw-w64-x86_64-toolchain Build ----- diff --git a/docs/source/conf.py b/docs/source/conf.py index 3c9e338bb07..c2b66a56635 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -69,7 +69,7 @@ # -- Options for HTML output ------------------------------------------------- # images -html_favicon = os.path.join(root_dir, 'src_assets', 'common', 'assets', 'web', 'images', 'sunshine.ico') +html_favicon = os.path.join(root_dir, 'src_assets', 'common', 'assets', 'web', 'public', 'images', 'sunshine.ico') html_logo = os.path.join(root_dir, 'sunshine.png') # Add any paths that contain custom static files (such as style sheets) here, diff --git a/docs/source/contributing/contributing.rst b/docs/source/contributing/contributing.rst index a50300d2327..ab85e13deee 100644 --- a/docs/source/contributing/contributing.rst +++ b/docs/source/contributing/contributing.rst @@ -3,3 +3,23 @@ Contributing Read our contribution guide in our organization level `docs `__. + +Web UI +------ +The Web UI uses `Vite `__ as its build system, to handle the integration of the NPM libraries. + +The HTML pages used by the Web UI are found in ``src_assets/common/assets/web``. + +`EJS `__ is used as a templating system for the pages (check ``template_header.html`` and ``template_header_main.html``). + +The Style System is provided by `Bootstrap `__. + +The JS framework used by the more interactive pages is `Vue `__. + +Building +^^^^^^^^ +Sunshine already builds the UI as part of its build process, but you can make faster changes by starting vite manually. + +.. code-block:: bash + + npm run dev \ No newline at end of file diff --git a/package.json b/package.json index f5152b6a54a..8ed5b32d933 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,15 @@ { + "scripts": { + "build": "vite build --debug", + "dev": "vite build --watch" + }, "dependencies": { "@fortawesome/fontawesome-free": "6.4.2", + "@popperjs/core": "2.11.8", + "@vitejs/plugin-vue": "4.3.4", "bootstrap": "5.3.2", - "vue": "2.6.12" + "vite": "4.4.9", + "vite-plugin-ejs": "1.6.4", + "vue": "3.2.25" } } diff --git a/packaging/linux/Arch/PKGBUILD b/packaging/linux/Arch/PKGBUILD index cfd760653df..68cbecb872b 100644 --- a/packaging/linux/Arch/PKGBUILD +++ b/packaging/linux/Arch/PKGBUILD @@ -70,10 +70,6 @@ prepare() { } build() { - pushd "$pkgname" - npm install - popd - export BRANCH="@GITHUB_BRANCH@" export BUILD_VERSION="@GITHUB_BUILD_VERSION@" export COMMIT="@GITHUB_COMMIT@" diff --git a/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml b/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml index be1ae8adbf2..d4f0c164753 100644 --- a/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml +++ b/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml @@ -312,9 +312,6 @@ modules: env: npm_config_nodedir: /usr/lib/sdk/node18 NPM_CONFIG_LOGLEVEL: info - build-commands: - # Install npm dependencies - - cd ${FLATPAK_BUILDER_BUILDDIR} && npm install config-opts: - -DCMAKE_BUILD_TYPE=Release - -DCMAKE_INSTALL_PREFIX=/app diff --git a/packaging/macos/Portfile b/packaging/macos/Portfile index c22c1cb9dca..73a775a1dc5 100644 --- a/packaging/macos/Portfile +++ b/packaging/macos/Portfile @@ -55,10 +55,6 @@ platform darwin { } } -pre-build { - system -W ${worksrcpath} "npm install" -} - notes-append "Run @PROJECT_NAME@ by executing 'sunshine ', e.g. 'sunshine ~/sunshine.conf' " notes-append "The config file will be created if it doesn't exist." notes-append "It is recommended to set a location for the apps file in the config." diff --git a/scripts/icons/convert_and_pack.sh b/scripts/icons/convert_and_pack.sh index dd1183b9992..950effc98d6 100644 --- a/scripts/icons/convert_and_pack.sh +++ b/scripts/icons/convert_and_pack.sh @@ -37,9 +37,9 @@ icon_sizes=${!icon_sizes_keys[@]} echo "using icon sizes:" echo ${icon_sizes[@]} -src_vectors=("../../src_assets/common/assets/web/images/sunshine-locked.svg" - "../../src_assets/common/assets/web/images/sunshine-pausing.svg" - "../../src_assets/common/assets/web/images/sunshine-playing.svg" +src_vectors=("../../src_assets/common/assets/web/public/images/sunshine-locked.svg" + "../../src_assets/common/assets/web/public/images/sunshine-pausing.svg" + "../../src_assets/common/assets/web/public/images/sunshine-playing.svg" "../../sunshine.svg") echo "using sources vectors:" diff --git a/src/confighttp.cpp b/src/confighttp.cpp index 0de9cfb90c6..50bd87d3df4 100644 --- a/src/confighttp.cpp +++ b/src/confighttp.cpp @@ -161,11 +161,10 @@ namespace confighttp { print_req(request); - std::string header = read_file(WEB_DIR "header.html"); std::string content = read_file(WEB_DIR "index.html"); SimpleWeb::CaseInsensitiveMultimap headers; headers.emplace("Content-Type", "text/html; charset=utf-8"); - response->write(header + content, headers); + response->write(content, headers); } void @@ -174,11 +173,10 @@ namespace confighttp { print_req(request); - std::string header = read_file(WEB_DIR "header.html"); std::string content = read_file(WEB_DIR "pin.html"); SimpleWeb::CaseInsensitiveMultimap headers; headers.emplace("Content-Type", "text/html; charset=utf-8"); - response->write(header + content, headers); + response->write(content, headers); } void @@ -187,12 +185,11 @@ namespace confighttp { print_req(request); - std::string header = read_file(WEB_DIR "header.html"); std::string content = read_file(WEB_DIR "apps.html"); SimpleWeb::CaseInsensitiveMultimap headers; headers.emplace("Content-Type", "text/html; charset=utf-8"); headers.emplace("Access-Control-Allow-Origin", "https://images.igdb.com/"); - response->write(header + content, headers); + response->write(content, headers); } void @@ -201,11 +198,10 @@ namespace confighttp { print_req(request); - std::string header = read_file(WEB_DIR "header.html"); std::string content = read_file(WEB_DIR "clients.html"); SimpleWeb::CaseInsensitiveMultimap headers; headers.emplace("Content-Type", "text/html; charset=utf-8"); - response->write(header + content, headers); + response->write(content, headers); } void @@ -214,11 +210,10 @@ namespace confighttp { print_req(request); - std::string header = read_file(WEB_DIR "header.html"); std::string content = read_file(WEB_DIR "config.html"); SimpleWeb::CaseInsensitiveMultimap headers; headers.emplace("Content-Type", "text/html; charset=utf-8"); - response->write(header + content, headers); + response->write(content, headers); } void @@ -227,11 +222,10 @@ namespace confighttp { print_req(request); - std::string header = read_file(WEB_DIR "header.html"); std::string content = read_file(WEB_DIR "password.html"); SimpleWeb::CaseInsensitiveMultimap headers; headers.emplace("Content-Type", "text/html; charset=utf-8"); - response->write(header + content, headers); + response->write(content, headers); } void @@ -241,11 +235,10 @@ namespace confighttp { send_redirect(response, request, "/"); return; } - std::string header = read_file(WEB_DIR "header-no-nav.html"); std::string content = read_file(WEB_DIR "welcome.html"); SimpleWeb::CaseInsensitiveMultimap headers; headers.emplace("Content-Type", "text/html; charset=utf-8"); - response->write(header + content, headers); + response->write(content, headers); } void @@ -254,11 +247,10 @@ namespace confighttp { print_req(request); - std::string header = read_file(WEB_DIR "header.html"); std::string content = read_file(WEB_DIR "troubleshooting.html"); SimpleWeb::CaseInsensitiveMultimap headers; headers.emplace("Content-Type", "text/html; charset=utf-8"); - response->write(header + content, headers); + response->write(content, headers); } void @@ -295,14 +287,14 @@ namespace confighttp { getNodeModules(resp_https_t response, req_https_t request) { print_req(request); fs::path webDirPath(WEB_DIR); - fs::path nodeModulesPath(webDirPath / "node_modules"); + fs::path nodeModulesPath(webDirPath / "assets"); // .relative_path is needed to shed any leading slash that might exist in the request path auto filePath = fs::weakly_canonical(webDirPath / fs::path(request->path).relative_path()); - // Don't do anything if file does not exist or is outside the node_modules directory + // Don't do anything if file does not exist or is outside the assets directory if (!isChildPath(filePath, nodeModulesPath)) { - BOOST_LOG(warning) << "Someone requested a path " << filePath << " that is outside the node_modules folder"; + BOOST_LOG(warning) << "Someone requested a path " << filePath << " that is outside the assets folder"; response->write(SimpleWeb::StatusCode::client_error_bad_request, "Bad Request"); } else if (!fs::exists(filePath)) { @@ -757,7 +749,7 @@ namespace confighttp { server.resource["^/api/covers/upload$"]["POST"] = uploadCover; server.resource["^/images/sunshine.ico$"]["GET"] = getFaviconImage; server.resource["^/images/logo-sunshine-45.png$"]["GET"] = getSunshineLogoImage; - server.resource["^/node_modules\\/.+$"]["GET"] = getNodeModules; + server.resource["^/assets\\/.+$"]["GET"] = getNodeModules; server.config.reuse_address = true; server.config.address = net::af_to_any_address_string(address_family); server.config.port = port_https; diff --git a/src_assets/common/assets/web/Navbar.vue b/src_assets/common/assets/web/Navbar.vue new file mode 100644 index 00000000000..948fb4d7244 --- /dev/null +++ b/src_assets/common/assets/web/Navbar.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/src_assets/common/assets/web/ResourceCard.vue b/src_assets/common/assets/web/ResourceCard.vue new file mode 100644 index 00000000000..8bdfb5f9311 --- /dev/null +++ b/src_assets/common/assets/web/ResourceCard.vue @@ -0,0 +1,36 @@ + diff --git a/src_assets/common/assets/web/apps.html b/src_assets/common/assets/web/apps.html index bd09051d669..c9131440340 100644 --- a/src_assets/common/assets/web/apps.html +++ b/src_assets/common/assets/web/apps.html @@ -1,370 +1,383 @@ -
-
-

Applications

-
Applications are refreshed only when Client is restarted
-
-
- - - - - - - - - - - - - -
NameActions
{{app.name}} - - -
-
-
-
- -
- - -
- Application Name, as shown on Moonlight -
-
- -
- - -
- The file where the output of the command is stored, if it is not - specified, the output is ignored -
-
- -
- - -
- Enable/Disable the execution of Global Prep Commands for this - application. -
-
-
- -
- A list of commands to be run before/after this application.
- If any of the prep-commands fail, starting the application is aborted. + + + + + <%- header %> + + + + + +
+
+

Applications

+
Applications are refreshed only when Client is restarted
+
+
+ + + + + + + + + + + + + +
NameActions
{{app.name}} + + +
+
+
+
+ +
+ + +
+ Application Name, as shown on Moonlight +
-
- + +
+ + +
+ The file where the output of the command is stored, if it is not + specified, the output is ignored +
- - - - - - - - - - - - - - - - - -
Do Command Undo Command - Run as Admin -
- - - - -
- - -
-
- - -
-
- -
- -
-
{{c}}
- + +
+ + +
+ Enable/Disable the execution of Global Prep Commands for this + application. +
-
- - +
+ +
+ A list of commands to be run before/after this application.
+ If any of the prep-commands fail, starting the application is aborted. +
+
+ +
+ + + + + + + + + + + + + + + + + +
Do Command Undo Command + Run as Admin +
+ + + + +
+ + +
+
+ + +
-
- A list of commands to be run and forgotten about + +
+ +
+ + +
+
+ +
+
+ A list of commands to be run and forgotten about +
-
- -
- - -
- The main application, if it is not specified, a process is started - that sleeps indefinitely + +
+ + +
+ The main application, if it is not specified, a process is started + that sleeps indefinitely +
-
- -
- - -
- The working directory that should be passed to the process. For - example, some applications use the working directory to search for - configuration files. If not set, Sunshine will default to the parent - directory of the command + +
+ + +
+ The working directory that should be passed to the process. For + example, some applications use the working directory to search for + configuration files. If not set, Sunshine will default to the parent + directory of the command +
-
- -
- - -
- This can be necessary for some applications that require administrator - permissions to run properly. + +
+ + +
+ This can be necessary for some applications that require administrator + permissions to run properly. +
-
- -
- - -
- This will attempt to automatically detect launcher-type apps that close - quickly after launching another program or instance of themselves. When - a launcher-type app is detected, it is treated as a detached app. + +
+ + +
+ This will attempt to automatically detect launcher-type apps that close + quickly after launching another program or instance of themselves. When + a launcher-type app is detected, it is treated as a detached app. +
-
- -
- -
- - -