From 945c75ea07f563202ea4f725136a2c3d64e5673a Mon Sep 17 00:00:00 2001 From: evgeny Date: Wed, 14 Oct 2026 11:26:50 +0200 Subject: [PATCH] Install capture dependencies and verify Multimedia plugin deployment --- tools/chatgui/build_nix.sh | 4 ++-- tools/chatgui/tests/test_runtime_deploy.sh | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/tools/chatgui/build_nix.sh b/tools/chatgui/build_nix.sh index 705de5f9..b0e826e5 100755 --- a/tools/chatgui/build_nix.sh +++ b/tools/chatgui/build_nix.sh @@ -55,10 +55,10 @@ install_deps() { echo "[deps] installing build dependencies..." if [ "$OS_ID" = linux ]; then sudo apt-get update - sudo apt-get install -y build-essential cmake qt6-base-dev qt6-image-formats-plugins qt6-tools-dev-tools qt6-translations-l10n librlottie-dev zlib1g-dev libssl-dev \ + sudo apt-get install -y build-essential cmake qt6-base-dev qt6-multimedia-dev qt6-image-formats-plugins qt6-tools-dev-tools qt6-translations-l10n librlottie-dev zlib1g-dev libssl-dev \ libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev else - sudo pkg install -y cmake qt6-base qt6-tools qt6-translations rlottie openssl ffmpeg + sudo pkg install -y cmake qt6-base qt6-multimedia qt6-tools qt6-translations rlottie openssl ffmpeg fi } diff --git a/tools/chatgui/tests/test_runtime_deploy.sh b/tools/chatgui/tests/test_runtime_deploy.sh index 48959e5b..93db0a43 100644 --- a/tools/chatgui/tests/test_runtime_deploy.sh +++ b/tools/chatgui/tests/test_runtime_deploy.sh @@ -18,6 +18,7 @@ else while [ "$1" != -B ]; do shift; done mkdir -p "$2" printf 'Qt%s\n' "$DEPLOY_MAJOR" > "$2/chatgui_qt_package.txt" + printf '%s\n' "${DEPLOY_CAPTURE:-0}" > "$2/chatgui_capture_enabled.txt" fi SH cat > "$fixture_root/commands/objdump" <<'SH' @@ -52,7 +53,7 @@ SH chmod +x "$prefix/bin/windeployqt$1.exe" } run_case() { - (cd "$case_dir"; PATH="$fixture_root/commands:$PATH" DEPLOY_MAJOR="$1" DEPLOY_TOOL_LOG="$case_dir/tool.log" \ + (cd "$case_dir"; PATH="$fixture_root/commands:$PATH" DEPLOY_MAJOR="$1" DEPLOY_CAPTURE="${2:-0}" DEPLOY_TOOL_LOG="$case_dir/tool.log" \ MSYSTEM= MSYSTEM_PREFIX="$prefix" bash build.sh) > "$case_dir/output.log" 2>&1 } assert_file() { [ -f "$1" ] || { echo "FAIL: missing deployed file $1"; exit 1; }; } @@ -74,6 +75,19 @@ rm "$case_dir/build/libpng.dll" "$case_dir/build/plugin-helper.dll" run_case 6; assert_file "$case_dir/build/libpng.dll"; assert_file "$case_dir/build/plugin-helper.dll" echo 'PASS: Qt6, Windows system DLLs (d3d9/SHCORE), matching platform/JPEG/WebP plugins and repeated dependency checks' +# Multimedia plugin динамический: импорт exe сам по себе не гарантирует его поставку. +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: 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 + assert_file "$case_dir/build/$name" +done +cmp "$case_dir/build/multimedia/ffmpegmediaplugin.dll" "$prefix/share/qt6/plugins/multimedia/ffmpegmediaplugin.dll" +echo 'PASS: capture-enabled Qt6 deploys Multimedia, Widgets, FFmpeg plugin and plugin dependencies' + # Сбой подходящего инструмента не должен обходить обязательную проверку ручного комплекта. cat > "$prefix/bin/windeployqt6.exe" <<'SH' #!/bin/bash