Browse Source

Install capture dependencies and verify Multimedia plugin deployment

master
evgeny 5 days ago
parent
commit
945c75ea07
  1. 4
      tools/chatgui/build_nix.sh
  2. 16
      tools/chatgui/tests/test_runtime_deploy.sh

4
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
}

16
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

Loading…
Cancel
Save