From c7ed7d94279082600eb75218ebe8b4cc6a3ab0d0 Mon Sep 17 00:00:00 2001 From: David Marcec Date: Fri, 19 Jun 2020 22:17:56 +1000 Subject: [PATCH 1/2] Fix compilation when not building with boxcat Fixes compilation when trying to build without boxcat enabled --- src/core/CMakeLists.txt | 4 ++-- src/yuzu/configuration/configure_service.cpp | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 47418006b2..cb9ced5c90 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -606,11 +606,11 @@ endif() create_target_directory_groups(core) target_link_libraries(core PUBLIC common PRIVATE audio_core video_core) -target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt::fmt nlohmann_json::nlohmann_json mbedtls Opus::Opus unicorn) +target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt::fmt nlohmann_json::nlohmann_json mbedtls Opus::Opus unicorn zip) if (YUZU_ENABLE_BOXCAT) target_compile_definitions(core PRIVATE -DYUZU_ENABLE_BOXCAT) - target_link_libraries(core PRIVATE httplib nlohmann_json::nlohmann_json zip) + target_link_libraries(core PRIVATE httplib nlohmann_json::nlohmann_json) endif() if (ENABLE_WEB_SERVICE) diff --git a/src/yuzu/configuration/configure_service.cpp b/src/yuzu/configuration/configure_service.cpp index 06566e981b..92a1737b34 100644 --- a/src/yuzu/configuration/configure_service.cpp +++ b/src/yuzu/configuration/configure_service.cpp @@ -68,6 +68,7 @@ void ConfigureService::SetConfiguration() { } std::pair ConfigureService::BCATDownloadEvents() { +#ifdef YUZU_ENABLE_BOXCAT std::optional global; std::map map; const auto res = Service::BCAT::Boxcat::GetStatus(global, map); @@ -106,6 +107,10 @@ std::pair ConfigureService::BCATDownloadEvents() { .arg(FormatEventStatusString(value)); } return {QStringLiteral("Current Boxcat Events"), std::move(out)}; +#else + return {QStringLiteral("Current Boxcat Events"), + tr("There are currently no events on boxcat.")}; +#endif } void ConfigureService::OnBCATImplChanged() { From a7fe6dc232ec20a5da2f41807e428e666748d9d8 Mon Sep 17 00:00:00 2001 From: David Marcec Date: Sat, 20 Jun 2020 11:57:51 +1000 Subject: [PATCH 2/2] Add translation of "Current Boxcat Events" --- src/yuzu/configuration/configure_service.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/yuzu/configuration/configure_service.cpp b/src/yuzu/configuration/configure_service.cpp index 92a1737b34..0de7a4f0bb 100644 --- a/src/yuzu/configuration/configure_service.cpp +++ b/src/yuzu/configuration/configure_service.cpp @@ -106,10 +106,9 @@ std::pair ConfigureService::BCATDownloadEvents() { .arg(QString::fromStdString(key)) .arg(FormatEventStatusString(value)); } - return {QStringLiteral("Current Boxcat Events"), std::move(out)}; + return {tr("Current Boxcat Events"), std::move(out)}; #else - return {QStringLiteral("Current Boxcat Events"), - tr("There are currently no events on boxcat.")}; + return {tr("Current Boxcat Events"), tr("There are currently no events on boxcat.")}; #endif }