Wire notification platform dependencies and event diagnostics
This commit is contained in:
1 parent
33c98a014f
commit
f2e35da1fe
3 files changed
+46
-2
No files matched your search
@@ -120,6 +120,14 @@ endif()
|
||||
# uTun core library (C, built from ../src/ and ../lib/)
|
||||
add_subdirectory(libutun)
|
||||
|
||||
add_library(chatgui_notifications STATIC src/message_notification.cpp src/user_activity_monitor.cpp)
|
||||
target_link_libraries(chatgui_notifications PUBLIC ${QT_PACKAGE}::Widgets PRIVATE utun)
|
||||
if(WIN32)
|
||||
target_link_libraries(chatgui_notifications PRIVATE user32)
|
||||
elseif(APPLE)
|
||||
target_link_libraries(chatgui_notifications PRIVATE "-framework ApplicationServices")
|
||||
endif()
|
||||
|
||||
# Голосовой стек звонка (SoundTouch + voice_jitter + call_audio + call_tones),
|
||||
# C++ внутри, C-интерфейс наружу (call_audio.h).
|
||||
set(LIB_DIR "${CMAKE_SOURCE_DIR}/../../lib")
|
||||
@@ -239,8 +247,33 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
target_compile_definitions(vibechat PRIVATE UTUN_PTT_PORTAL)
|
||||
target_link_libraries(vibechat PRIVATE ${QT_DBUS})
|
||||
target_include_directories(vibechat PRIVATE ${X11_INCLUDE_DIR})
|
||||
target_compile_definitions(chatgui_notifications PRIVATE UTUN_ACTIVITY_DBUS)
|
||||
target_link_libraries(chatgui_notifications PRIVATE ${QT_DBUS})
|
||||
if(Qt6_FOUND)
|
||||
find_package(KF6IdleTime QUIET)
|
||||
set(ACTIVITY_KIDLETIME_TARGET KF6::IdleTime)
|
||||
else()
|
||||
find_package(KF5IdleTime QUIET)
|
||||
set(ACTIVITY_KIDLETIME_TARGET KF5::IdleTime)
|
||||
endif()
|
||||
if(TARGET ${ACTIVITY_KIDLETIME_TARGET})
|
||||
target_compile_definitions(chatgui_notifications PRIVATE UTUN_ACTIVITY_KIDLETIME)
|
||||
target_link_libraries(chatgui_notifications PRIVATE ${ACTIVITY_KIDLETIME_TARGET})
|
||||
else()
|
||||
message(STATUS "KIdleTime not found: Wayland activity uses GNOME IdleMonitor or ChatGUI input")
|
||||
endif()
|
||||
elseif(UNIX AND NOT APPLE)
|
||||
find_package(X11 QUIET)
|
||||
endif()
|
||||
|
||||
if(TARGET X11::Xss)
|
||||
target_compile_definitions(chatgui_notifications PRIVATE UTUN_ACTIVITY_X11)
|
||||
target_link_libraries(chatgui_notifications PRIVATE X11::Xss)
|
||||
elseif(UNIX AND NOT APPLE)
|
||||
message(STATUS "X11 screen saver library not found: X11 activity uses ChatGUI input")
|
||||
endif()
|
||||
target_link_libraries(vibechat PRIVATE chatgui_notifications)
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(vibechat PRIVATE ${QT_LIBS} rlottie::rlottie ZLIB::ZLIB OpenSSL::Crypto ZXing::ZXing utun utun_voice pthread user32 ${FFMPEG_TARGET} ${FFMPEG_LIBRARIES})
|
||||
else()
|
||||
@@ -273,6 +306,11 @@ endif()
|
||||
|
||||
enable_testing()
|
||||
|
||||
add_executable(test_message_notification tests/test_message_notification.cpp)
|
||||
target_link_libraries(test_message_notification PRIVATE chatgui_notifications ${QT_TEST_LIB} pthread ${CMAKE_DL_LIBS})
|
||||
add_test(NAME test_message_notification COMMAND test_message_notification)
|
||||
set_tests_properties(test_message_notification PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen" TIMEOUT 60)
|
||||
|
||||
add_executable(test_file_drop tests/test_file_drop.cpp src/inputbar.cpp src/audiorecorder.cpp src/audio_device.cpp src/sound_manager.cpp
|
||||
src/voicemessageencoder.cpp src/emojipanel.cpp src/emojitabbar.cpp src/emoji.cpp src/animtimer.cpp src/lottieicon.cpp
|
||||
src/voice_audio_io.cpp transport/miniaudio_impl.c transport/audio_diagnostics.cpp)
|
||||
|
||||
@@ -2152,5 +2152,6 @@ Directories: %5</source>
|
||||
<message><source>Mute this member in radio</source><translation>Не слушать этого участника в рации</translation></message>
|
||||
<message><source>Listen to this member in radio</source><translation>Слушать этого участника в рации</translation></message>
|
||||
<message><source>Cannot change radio listening setting</source><translation>Не удалось изменить настройку прослушивания рации</translation></message>
|
||||
<message><source>New message from %1</source><translation>Новое сообщение от %1</translation></message>
|
||||
</context>
|
||||
</TS>
|
||||
Reference in new issue
Block a user