From 3e41770d44e9a8932c5f966c004167c8ba8b2dff Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Thu, 3 Apr 2025 13:32:46 -0400 Subject: [PATCH 1/6] fix(config): ensure logging config settings are properly loaded (#3777) --- src/config.cpp | 1 + src/config.h | 3 +++ src/main.cpp | 12 +++++++++--- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/config.cpp b/src/config.cpp index 2fbac75d..693f4f92 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -1049,6 +1049,7 @@ namespace config { for (auto &[name, val] : vars) { BOOST_LOG(info) << "config: '"sv << name << "' = "sv << val; + modified_config_settings[name] = val; } int_f(vars, "qp", video.qp); diff --git a/src/config.h b/src/config.h index 05cec9e8..474cbb5a 100644 --- a/src/config.h +++ b/src/config.h @@ -16,6 +16,9 @@ #include "nvenc/nvenc_config.h" namespace config { + // track modified config options + inline std::unordered_map modified_config_settings; + struct video_t { // ffmpeg params int qp; // higher == more compression and less quality diff --git a/src/main.cpp b/src/main.cpp index 555366ba..b91dedce 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -106,6 +106,11 @@ int main(int argc, char *argv[]) { mail::man = std::make_shared(); + // parse config file + if (config::parse(argc, argv)) { + return 0; + } + auto log_deinit_guard = logging::init(config::sunshine.min_log_level, config::sunshine.log_file); if (!log_deinit_guard) { BOOST_LOG(error) << "Logging failed to initialize"sv; @@ -119,10 +124,11 @@ int main(int argc, char *argv[]) { // Log publisher metadata log_publisher_data(); - // parse config file - if (config::parse(argc, argv)) { - return 0; + // Log modified_config_settings + for (auto &[name, val] : config::modified_config_settings) { + BOOST_LOG(info) << "config: '"sv << name << "' = "sv << val; } + config::modified_config_settings.clear(); if (!config::sunshine.cmd.name.empty()) { auto fn = cmd_to_func.find(config::sunshine.cmd.name); From 7d75e4b75fcfa510fcc6d1396a00ba72b82d57f6 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Thu, 3 Apr 2025 19:09:40 -0400 Subject: [PATCH 2/6] build(cmake): update policies (#3775) --- cmake/dependencies/Boost_Sunshine.cmake | 9 +++++++-- cmake/dependencies/nlohmann_json.cmake | 7 +++++++ tools/CMakeLists.txt | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/cmake/dependencies/Boost_Sunshine.cmake b/cmake/dependencies/Boost_Sunshine.cmake index 72ab5443..dc13bb0e 100644 --- a/cmake/dependencies/Boost_Sunshine.cmake +++ b/cmake/dependencies/Boost_Sunshine.cmake @@ -15,14 +15,19 @@ if(BOOST_USE_STATIC) set(Boost_USE_STATIC_LIBS ON) # cmake-lint: disable=C0103 endif() +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.30") + cmake_policy(SET CMP0167 NEW) # Get BoostConfig.cmake from upstream +endif() find_package(Boost CONFIG ${BOOST_VERSION} COMPONENTS ${BOOST_COMPONENTS}) if(NOT Boost_FOUND) message(STATUS "Boost v${BOOST_VERSION}.x package not found in the system. Falling back to FetchContent.") include(FetchContent) - # Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24: if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0") - cmake_policy(SET CMP0135 NEW) + cmake_policy(SET CMP0135 NEW) # Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24 + endif() + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.31.0") + cmake_policy(SET CMP0174 NEW) # Handle empty variables endif() # more components required for compiling boost targets diff --git a/cmake/dependencies/nlohmann_json.cmake b/cmake/dependencies/nlohmann_json.cmake index c0029b42..11000c8d 100644 --- a/cmake/dependencies/nlohmann_json.cmake +++ b/cmake/dependencies/nlohmann_json.cmake @@ -8,6 +8,13 @@ if(NOT nlohmann_json_FOUND) message(STATUS "nlohmann_json v3.11.x package not found in the system. Falling back to FetchContent.") include(FetchContent) + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0") + cmake_policy(SET CMP0135 NEW) # Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24 + endif() + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.31.0") + cmake_policy(SET CMP0174 NEW) # Handle empty variables + endif() + FetchContent_Declare( json URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index de67f0bc..8d4c08e3 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.20) project(sunshine_tools) From ccce4ed6f49242c88f82a66ad18c1036dc8f5d39 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Thu, 3 Apr 2025 20:34:23 -0400 Subject: [PATCH 3/6] docs(readme): update crowdin image url (#3774) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 94c0e79c..61369b3c 100644 --- a/README.md +++ b/README.md @@ -188,7 +188,7 @@ Thank you to all the contributors who have helped make Sunshine better!

- +

From 6c1407847f48399c939afca77939fe57f4566d3c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Apr 2025 08:21:07 -0400 Subject: [PATCH 4/6] build(deps): bump third-party/Simple-Web-Server from `4abe349` to `187f798` (#3781) build(deps): bump third-party/Simple-Web-Server Bumps [third-party/Simple-Web-Server](https://github.com/LizardByte-infrastructure/Simple-Web-Server) from `4abe349` to `187f798`. - [Commits](https://github.com/LizardByte-infrastructure/Simple-Web-Server/compare/4abe3491582b56c0b18fc35278aad33b2db29cdc...187f798d54a9c6cee742f2eb2c54e9ba26f5a385) --- updated-dependencies: - dependency-name: third-party/Simple-Web-Server dependency-version: 187f798d54a9c6cee742f2eb2c54e9ba26f5a385 dependency-type: direct:production ... 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 4abe3491..187f798d 160000 --- a/third-party/Simple-Web-Server +++ b/third-party/Simple-Web-Server @@ -1 +1 @@ -Subproject commit 4abe3491582b56c0b18fc35278aad33b2db29cdc +Subproject commit 187f798d54a9c6cee742f2eb2c54e9ba26f5a385 From 498e9cfa61677b51dd92e6aa6613ff3ba1a5b8ac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Apr 2025 13:13:04 -0400 Subject: [PATCH 5/6] build(deps): bump third-party/wlr-protocols from `ffb89ac` to `2ec67eb` (#3782) Bumps [third-party/wlr-protocols](https://github.com/LizardByte-infrastructure/wlr-protocols) from `ffb89ac` to `2ec67eb`. - [Commits](https://github.com/LizardByte-infrastructure/wlr-protocols/compare/ffb89ac790096f6e6272822c8d5df7d0cc6fcdfa...2ec67ebd26b73bada12f3fa6afdd51563b656722) --- updated-dependencies: - dependency-name: third-party/wlr-protocols dependency-version: 2ec67ebd26b73bada12f3fa6afdd51563b656722 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third-party/wlr-protocols | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third-party/wlr-protocols b/third-party/wlr-protocols index ffb89ac7..2ec67ebd 160000 --- a/third-party/wlr-protocols +++ b/third-party/wlr-protocols @@ -1 +1 @@ -Subproject commit ffb89ac790096f6e6272822c8d5df7d0cc6fcdfa +Subproject commit 2ec67ebd26b73bada12f3fa6afdd51563b656722 From d2fbe1c7b45a8326d1e89c4ace1d2b869045fae3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Apr 2025 08:20:33 -0400 Subject: [PATCH 6/6] build(deps): bump third-party/wayland-protocols from `c7b582c` to `4313a51` (#3788) build(deps): bump third-party/wayland-protocols Bumps [third-party/wayland-protocols](https://github.com/LizardByte-infrastructure/wayland-protocols) from `c7b582c` to `4313a51`. - [Commits](https://github.com/LizardByte-infrastructure/wayland-protocols/compare/c7b582cb71ec145026a547dcd8abb9dfeba40541...4313a51a170efffece8f60f7a5dfdad135e6befa) --- updated-dependencies: - dependency-name: third-party/wayland-protocols dependency-version: 4313a51a170efffece8f60f7a5dfdad135e6befa dependency-type: direct:production ... 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 c7b582cb..4313a51a 160000 --- a/third-party/wayland-protocols +++ b/third-party/wayland-protocols @@ -1 +1 @@ -Subproject commit c7b582cb71ec145026a547dcd8abb9dfeba40541 +Subproject commit 4313a51a170efffece8f60f7a5dfdad135e6befa