diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index e847ea362e2..ecc18a73d43 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -280,7 +280,7 @@ jobs: include: # package these differently - type: AppImage EXTRA_ARGS: '-DSUNSHINE_BUILD_APPIMAGE=ON' - dist: 20.04 + dist: 22.04 steps: - name: Maximize build space @@ -323,6 +323,9 @@ jobs: # allow newer gcc sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y + # allow libfuse2 for appimage on 22.04 + sudo add-apt-repository universe + sudo apt-get install -y \ build-essential \ cmake \ @@ -338,6 +341,7 @@ jobs: libcurl4-openssl-dev \ libdrm-dev \ libevdev-dev \ + libfuse2 \ libminiupnpc-dev \ libmfx-dev \ libnotify-dev \ diff --git a/cmake/targets/common.cmake b/cmake/targets/common.cmake index 094bbca7c20..ee79528c88f 100644 --- a/cmake/targets/common.cmake +++ b/cmake/targets/common.cmake @@ -36,7 +36,7 @@ endif() target_link_libraries(sunshine ${SUNSHINE_EXTERNAL_LIBRARIES} ${EXTRA_LIBS}) target_compile_definitions(sunshine PUBLIC ${SUNSHINE_DEFINITIONS}) -set_target_properties(sunshine PROPERTIES CXX_STANDARD 17 +set_target_properties(sunshine PROPERTIES CXX_STANDARD 20 VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR}) diff --git a/src/config.cpp b/src/config.cpp index 6a9e1cecb76..708169458fe 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include diff --git a/src/httpcommon.cpp b/src/httpcommon.cpp index aa92b3bd3d8..123e7e9393c 100644 --- a/src/httpcommon.cpp +++ b/src/httpcommon.cpp @@ -7,6 +7,7 @@ #include "process.h" #include +#include #include #include diff --git a/src/network.cpp b/src/network.cpp index 5c158ee6c52..2784afebc39 100644 --- a/src/network.cpp +++ b/src/network.cpp @@ -7,6 +7,7 @@ #include "logging.h" #include "utility.h" #include +#include using namespace std::literals; @@ -169,7 +170,9 @@ namespace net { addr_to_url_escaped_string(boost::asio::ip::address address) { address = normalize_address(address); if (address.is_v6()) { - return "["s + address.to_string() + ']'; + std::stringstream ss; + ss << '[' << address.to_string() << ']'; + return ss.str(); } else { return address.to_string(); diff --git a/src/network.h b/src/network.h index a4f74fb404d..5fe842e7c8b 100644 --- a/src/network.h +++ b/src/network.h @@ -5,6 +5,7 @@ #pragma once #include +#include #include diff --git a/src/nvhttp.cpp b/src/nvhttp.cpp index 695820f4b3a..70ca9bc79be 100644 --- a/src/nvhttp.cpp +++ b/src/nvhttp.cpp @@ -8,6 +8,7 @@ // standard includes #include +#include // lib includes #include diff --git a/src/platform/linux/cuda.cpp b/src/platform/linux/cuda.cpp index ee535d21d2a..129a23e6bd5 100644 --- a/src/platform/linux/cuda.cpp +++ b/src/platform/linux/cuda.cpp @@ -262,7 +262,7 @@ namespace cuda { fs::path sysfs_dir { sysfs_path }; for (auto &entry : fs::directory_iterator { sysfs_dir }) { auto file = entry.path().filename(); - auto filestring = file.generic_u8string(); + auto filestring = file.generic_string(); if (std::string_view { filestring }.substr(0, 4) != "card"sv) { continue; } @@ -1049,4 +1049,4 @@ namespace platf { return display_names; } -} // namespace platf \ No newline at end of file +} // namespace platf diff --git a/src/platform/linux/input.cpp b/src/platform/linux/input.cpp index 74d683048f8..14ee50fe70b 100644 --- a/src/platform/linux/input.cpp +++ b/src/platform/linux/input.cpp @@ -1510,7 +1510,7 @@ namespace platf { std::stringstream ss; ss << std::hex << std::setfill('0'); for (const auto &ch : str) { - ss << ch; + ss << static_cast(ch); } std::string hex_unicode(ss.str()); diff --git a/src/platform/linux/kmsgrab.cpp b/src/platform/linux/kmsgrab.cpp index 30a2470f2d3..ad97c9b07d3 100644 --- a/src/platform/linux/kmsgrab.cpp +++ b/src/platform/linux/kmsgrab.cpp @@ -614,7 +614,7 @@ namespace platf { for (auto &entry : fs::directory_iterator { card_dir }) { auto file = entry.path().filename(); - auto filestring = file.generic_u8string(); + auto filestring = file.generic_string(); if (filestring.size() < 4 || std::string_view { filestring }.substr(0, 4) != "card"sv) { continue; } @@ -1641,7 +1641,7 @@ namespace platf { for (auto &entry : fs::directory_iterator { card_dir }) { auto file = entry.path().filename(); - auto filestring = file.generic_u8string(); + auto filestring = file.generic_string(); if (std::string_view { filestring }.substr(0, 4) != "card"sv) { continue; } diff --git a/src/platform/windows/input.cpp b/src/platform/windows/input.cpp index 5056c2c7246..dfc9852f586 100644 --- a/src/platform/windows/input.cpp +++ b/src/platform/windows/input.cpp @@ -1411,7 +1411,7 @@ namespace platf { ds4_update_state(gamepad_context_t &gamepad, const gamepad_state_t &gamepad_state) { auto &report = gamepad.report.ds4.Report; - report.wButtons = ds4_buttons(gamepad_state) | ds4_dpad(gamepad_state); + report.wButtons = static_cast(ds4_buttons(gamepad_state)) | static_cast(ds4_dpad(gamepad_state)); report.bSpecial = ds4_special_buttons(gamepad_state); report.bTriggerL = gamepad_state.lt; diff --git a/src/platform/windows/misc.cpp b/src/platform/windows/misc.cpp index e7bb64e52b8..e136de66a70 100644 --- a/src/platform/windows/misc.cpp +++ b/src/platform/windows/misc.cpp @@ -1691,8 +1691,8 @@ namespace platf { } int64_t qpc_counter() { - LARGE_INTEGER performace_counter; - if (QueryPerformanceCounter(&performace_counter)) return performace_counter.QuadPart; + LARGE_INTEGER performance_counter; + if (QueryPerformanceCounter(&performance_counter)) return performance_counter.QuadPart; return 0; } diff --git a/src/rtsp.cpp b/src/rtsp.cpp index 0180fbee37a..99b9f0de8f8 100644 --- a/src/rtsp.cpp +++ b/src/rtsp.cpp @@ -11,6 +11,7 @@ extern "C" { #include #include +#include #include #include diff --git a/src/stream.h b/src/stream.h index 1e2dcd4ea54..565ae4ed56e 100644 --- a/src/stream.h +++ b/src/stream.h @@ -3,6 +3,7 @@ * @brief todo */ #pragma once +#include #include diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index e4583f9c6a5..02182241847 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -107,7 +107,7 @@ list(REMOVE_ITEM SUNSHINE_SOURCES ${CMAKE_SOURCE_DIR}/src/main.cpp) add_executable(${PROJECT_NAME} ${TEST_SOURCES} ${SUNSHINE_SOURCES}) -set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 17) +set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 20) target_link_libraries(${PROJECT_NAME} ${SUNSHINE_EXTERNAL_LIBRARIES} gtest diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index b7767bc6637..fb56b38b3c4 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -5,7 +5,7 @@ project(sunshine_tools) include_directories("${CMAKE_SOURCE_DIR}") add_executable(dxgi-info dxgi.cpp) -set_target_properties(dxgi-info PROPERTIES CXX_STANDARD 17) +set_target_properties(dxgi-info PROPERTIES CXX_STANDARD 20) target_link_libraries(dxgi-info ${CMAKE_THREAD_LIBS_INIT} dxgi @@ -13,7 +13,7 @@ target_link_libraries(dxgi-info target_compile_options(dxgi-info PRIVATE ${SUNSHINE_COMPILE_OPTIONS}) add_executable(audio-info audio.cpp) -set_target_properties(audio-info PROPERTIES CXX_STANDARD 17) +set_target_properties(audio-info PROPERTIES CXX_STANDARD 20) target_link_libraries(audio-info ${CMAKE_THREAD_LIBS_INIT} ksuser @@ -21,7 +21,7 @@ target_link_libraries(audio-info target_compile_options(audio-info PRIVATE ${SUNSHINE_COMPILE_OPTIONS}) add_executable(sunshinesvc sunshinesvc.cpp) -set_target_properties(sunshinesvc PROPERTIES CXX_STANDARD 17) +set_target_properties(sunshinesvc PROPERTIES CXX_STANDARD 20) target_link_libraries(sunshinesvc ${CMAKE_THREAD_LIBS_INIT} wtsapi32 @@ -29,7 +29,7 @@ target_link_libraries(sunshinesvc target_compile_options(sunshinesvc PRIVATE ${SUNSHINE_COMPILE_OPTIONS}) add_executable(ddprobe ddprobe.cpp) -set_target_properties(ddprobe PROPERTIES CXX_STANDARD 17) +set_target_properties(ddprobe PROPERTIES CXX_STANDARD 20) target_link_libraries(ddprobe ${CMAKE_THREAD_LIBS_INIT} dxgi