Browse Source

Inspect capture plugin dependencies and recognize XWayland sessions

master
evgeny 4 days ago
parent
commit
27f3726124
  1. 4
      tools/chatgui/build.sh
  2. 5
      tools/chatgui/src/stream_publish_engine.cpp
  3. 2
      tools/chatgui/tests/test_runtime_deploy.sh

4
tools/chatgui/build.sh

@ -167,7 +167,7 @@ done
log " Resolving non-Qt dependencies recursively..."
log " Windows system DLLs are provided by the OS and excluded from deployment"
# Проверяем также уже скопированные DLL: наличие файла не гарантирует наличие его зависимостей.
todo=("$BUILD_DIR/vibechat.exe" "$BUILD_DIR/"*.dll "$BUILD_DIR/platforms/"*.dll "$BUILD_DIR/imageformats/"*.dll)
todo=("$BUILD_DIR/vibechat.exe" "$BUILD_DIR/"*.dll "$BUILD_DIR/platforms/"*.dll "$BUILD_DIR/imageformats/"*.dll "$BUILD_DIR/multimedia/"*.dll)
declare -A scanned=()
MISSING=0
# Большой вывод objdump передаём через файл, чтобы не зависеть от here-string и pipe в MSYS2.
@ -208,6 +208,8 @@ done
wtsapi32.dll|mpr.dll|ntdll.dll|avicap32.dll|msimg32.dll|wldap32.dll|gdiplus.dll|usp10.dll|\
dwrite.dll|winspool.drv|api-ms-win-*)
continue ;;
mf.dll|mfplat.dll|mfreadwrite.dll|mfuuid.dll|dxva2.dll|mmdevapi.dll|propsys.dll|ksuser.dll|msdmo.dll)
continue ;;
esac
if [ ! -f "$BUILD_DIR/$dep" ]; then
dep_src=""

5
tools/chatgui/src/stream_publish_engine.cpp

@ -98,8 +98,9 @@ QList<StreamVideoSource> StreamPublishEngine::sources() {
QList<StreamVideoSource> sources;
#ifdef HAVE_STREAM_CAPTURE
for (const auto& camera : QMediaDevices::videoInputs()) sources.push_back({StreamVideoSource::Camera, camera.description(), camera.id(), {}});
if (QGuiApplication::platformName().contains("wayland")) {
sources.push_back({StreamVideoSource::Screen, text("Screen or window (system selection)"), "portal", {}});
if (QGuiApplication::platformName().contains("wayland") || qEnvironmentVariable("XDG_SESSION_TYPE") == "wayland"
|| qEnvironmentVariableIsSet("WAYLAND_DISPLAY")) {
sources.push_back({StreamVideoSource::Screen, text("Screen (system selection)"), "portal", {}});
} else {
for (auto* screen : QGuiApplication::screens()) sources.push_back({StreamVideoSource::Screen, screen->name(), screen->name().toUtf8(), {}});
for (const auto& window : QWindowCapture::capturableWindows())

2
tools/chatgui/tests/test_runtime_deploy.sh

@ -79,7 +79,7 @@ echo 'PASS: Qt6, Windows system DLLs (d3d9/SHCORE), matching platform/JPEG/WebP
mkdir -p "$prefix/share/qt6/plugins/multimedia"
printf 'DLL Name: Qt6Gui.dll\n' > "$prefix/bin/Qt6Multimedia.dll"
printf 'DLL Name: Qt6Multimedia.dll\n' > "$prefix/bin/Qt6MultimediaWidgets.dll"
printf 'DLL Name: Qt6Multimedia.dll\nDLL Name: capture-helper.dll\n' > "$prefix/share/qt6/plugins/multimedia/ffmpegmediaplugin.dll"
printf 'DLL Name: Qt6Multimedia.dll\nDLL Name: capture-helper.dll\nDLL Name: MFPlat.dll\n' > "$prefix/share/qt6/plugins/multimedia/ffmpegmediaplugin.dll"
printf 'DLL Name: KERNEL32.dll\n' > "$prefix/bin/capture-helper.dll"
run_case 6 1
for name in Qt6Multimedia.dll Qt6MultimediaWidgets.dll multimedia/ffmpegmediaplugin.dll capture-helper.dll; do

Loading…
Cancel
Save