From 441413020e38e03c4e5b5e61a31094202021f98b Mon Sep 17 00:00:00 2001 From: Dale Glass Date: Sun, 2 Jul 2023 22:10:27 +0200 Subject: [PATCH] Move crash handler to networking library. Turns out dependencies just don't work out well otherwise. --- assignment-client/CMakeLists.txt | 2 +- domain-server/CMakeLists.txt | 2 +- interface/CMakeLists.txt | 2 +- libraries/monitoring/CMakeLists.txt | 10 ---------- libraries/networking/CMakeLists.txt | 4 +++- libraries/networking/src/Assignment.cpp | 2 +- .../src/crash-handler/CrashHandler.cpp | 0 .../src/crash-handler/CrashHandler.h | 0 .../src/crash-handler/CrashHandlerBackend.h | 0 .../src/crash-handler/CrashHandlerBackend_Breakpad.cpp | 0 .../src/crash-handler/CrashHandlerBackend_Crashpad.cpp | 5 +++-- .../src/crash-handler/CrashHandlerBackend_None.cpp | 0 12 files changed, 10 insertions(+), 17 deletions(-) delete mode 100644 libraries/monitoring/CMakeLists.txt rename libraries/{monitoring => networking}/src/crash-handler/CrashHandler.cpp (100%) rename libraries/{monitoring => networking}/src/crash-handler/CrashHandler.h (100%) rename libraries/{monitoring => networking}/src/crash-handler/CrashHandlerBackend.h (100%) rename libraries/{monitoring => networking}/src/crash-handler/CrashHandlerBackend_Breakpad.cpp (100%) rename libraries/{monitoring => networking}/src/crash-handler/CrashHandlerBackend_Crashpad.cpp (99%) rename libraries/{monitoring => networking}/src/crash-handler/CrashHandlerBackend_None.cpp (100%) diff --git a/assignment-client/CMakeLists.txt b/assignment-client/CMakeLists.txt index 88a6f9dc7f..c8e26f5f46 100644 --- a/assignment-client/CMakeLists.txt +++ b/assignment-client/CMakeLists.txt @@ -19,7 +19,7 @@ link_hifi_libraries( audio avatars octree gpu graphics shaders model-serializers hfm entities networking animation recording shared script-engine embedded-webserver controllers physics plugins midi image - material-networking model-networking ktx shaders monitoring + material-networking model-networking ktx shaders ) include_hifi_library_headers(procedural) diff --git a/domain-server/CMakeLists.txt b/domain-server/CMakeLists.txt index 2327762610..011fd115bd 100644 --- a/domain-server/CMakeLists.txt +++ b/domain-server/CMakeLists.txt @@ -30,7 +30,7 @@ symlink_or_copy_directory_beside_target(${_SHOULD_SYMLINK_RESOURCES} "${CMAKE_CU include_hifi_library_headers(gpu) include_hifi_library_headers(graphics) include_hifi_library_headers(script-engine) -link_hifi_libraries(embedded-webserver networking shared avatars octree monitoring) +link_hifi_libraries(embedded-webserver networking shared avatars octree) target_zlib() target_quazip() diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index ea98b9f4df..7262ff0005 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -230,7 +230,7 @@ link_hifi_libraries( ${PLATFORM_GL_BACKEND} # Plaform specific input & display plugin libraries ${PLATFORM_PLUGIN_LIBRARIES} - shaders monitoring + shaders ) include_hifi_library_headers(script-engine) diff --git a/libraries/monitoring/CMakeLists.txt b/libraries/monitoring/CMakeLists.txt deleted file mode 100644 index ee4077ae0e..0000000000 --- a/libraries/monitoring/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -set(TARGET_NAME monitoring) -setup_hifi_library() -link_hifi_libraries(shared) - -add_crashpad() -target_breakpad() - -if (WIN32) - add_compile_definitions(_USE_MATH_DEFINES) -endif() diff --git a/libraries/networking/CMakeLists.txt b/libraries/networking/CMakeLists.txt index 009eb6a34a..1d46236e6c 100644 --- a/libraries/networking/CMakeLists.txt +++ b/libraries/networking/CMakeLists.txt @@ -1,9 +1,11 @@ set(TARGET_NAME networking) setup_hifi_library(Network WebSockets) -link_hifi_libraries(shared platform monitoring) +link_hifi_libraries(shared platform) target_openssl() target_tbb() +add_crashpad() +target_breakpad() if (WIN32 OR (UNIX AND NOT APPLE)) target_webrtc() diff --git a/libraries/networking/src/Assignment.cpp b/libraries/networking/src/Assignment.cpp index 03a4a91295..2d1dedc003 100644 --- a/libraries/networking/src/Assignment.cpp +++ b/libraries/networking/src/Assignment.cpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include "crash-handler/CrashHandler.h" #include "udt/PacketHeaders.h" diff --git a/libraries/monitoring/src/crash-handler/CrashHandler.cpp b/libraries/networking/src/crash-handler/CrashHandler.cpp similarity index 100% rename from libraries/monitoring/src/crash-handler/CrashHandler.cpp rename to libraries/networking/src/crash-handler/CrashHandler.cpp diff --git a/libraries/monitoring/src/crash-handler/CrashHandler.h b/libraries/networking/src/crash-handler/CrashHandler.h similarity index 100% rename from libraries/monitoring/src/crash-handler/CrashHandler.h rename to libraries/networking/src/crash-handler/CrashHandler.h diff --git a/libraries/monitoring/src/crash-handler/CrashHandlerBackend.h b/libraries/networking/src/crash-handler/CrashHandlerBackend.h similarity index 100% rename from libraries/monitoring/src/crash-handler/CrashHandlerBackend.h rename to libraries/networking/src/crash-handler/CrashHandlerBackend.h diff --git a/libraries/monitoring/src/crash-handler/CrashHandlerBackend_Breakpad.cpp b/libraries/networking/src/crash-handler/CrashHandlerBackend_Breakpad.cpp similarity index 100% rename from libraries/monitoring/src/crash-handler/CrashHandlerBackend_Breakpad.cpp rename to libraries/networking/src/crash-handler/CrashHandlerBackend_Breakpad.cpp diff --git a/libraries/monitoring/src/crash-handler/CrashHandlerBackend_Crashpad.cpp b/libraries/networking/src/crash-handler/CrashHandlerBackend_Crashpad.cpp similarity index 99% rename from libraries/monitoring/src/crash-handler/CrashHandlerBackend_Crashpad.cpp rename to libraries/networking/src/crash-handler/CrashHandlerBackend_Crashpad.cpp index 298465b5d2..1b93ebecb4 100644 --- a/libraries/monitoring/src/crash-handler/CrashHandlerBackend_Crashpad.cpp +++ b/libraries/networking/src/crash-handler/CrashHandlerBackend_Crashpad.cpp @@ -41,9 +41,10 @@ Q_LOGGING_CATEGORY(crash_handler, "overte.crash_handler") #endif #include -#include +#include "../FingerprintUtils.h" +#include "../UserActivityLogger.h" #include -#include + static const std::string BACKTRACE_URL{ CMAKE_BACKTRACE_URL }; diff --git a/libraries/monitoring/src/crash-handler/CrashHandlerBackend_None.cpp b/libraries/networking/src/crash-handler/CrashHandlerBackend_None.cpp similarity index 100% rename from libraries/monitoring/src/crash-handler/CrashHandlerBackend_None.cpp rename to libraries/networking/src/crash-handler/CrashHandlerBackend_None.cpp