From 714370a1a27046c0bddc88dee8e2d4262222219e Mon Sep 17 00:00:00 2001 From: evgeny Date: Tue, 6 Oct 2026 15:53:03 +0200 Subject: [PATCH] Verify direct deployment after a failed Qt deployment tool --- tools/chatgui/build.sh | 7 +++---- tools/chatgui/tests/test_runtime_deploy.sh | 10 ++++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/tools/chatgui/build.sh b/tools/chatgui/build.sh index 7a57bace..74c6b926 100755 --- a/tools/chatgui/build.sh +++ b/tools/chatgui/build.sh @@ -97,12 +97,11 @@ done done if [ -x "$WINDEPLOYQT" ]; then log " Running $WINDEPLOYQT..." - "$WINDEPLOYQT" --no-translations --no-compiler-runtime "$BUILD_DIR/vibechat.exe" 2>&1 | tee -a "$LOG_FILE" - RC=${PIPESTATUS[0]} - if [ $RC -eq 0 ]; then + if "$WINDEPLOYQT" --no-translations --no-compiler-runtime "$BUILD_DIR/vibechat.exe" 2>&1 | tee -a "$LOG_FILE"; then log " OK: windeployqt completed" else - log " WARN: windeployqt failed (exit $RC)" + RC=${PIPESTATUS[0]} + log " WARN: windeployqt failed (exit $RC); verifying direct DLL deployment" fi else log " WARN: matching $QT_PACKAGE windeployqt not found; copying dependencies directly" diff --git a/tools/chatgui/tests/test_runtime_deploy.sh b/tools/chatgui/tests/test_runtime_deploy.sh index be16d8e4..1bd907f3 100644 --- a/tools/chatgui/tests/test_runtime_deploy.sh +++ b/tools/chatgui/tests/test_runtime_deploy.sh @@ -68,6 +68,16 @@ 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, matching platform/JPEG plugins and repeated dependency checks' +# Сбой подходящего инструмента не должен обходить обязательную проверку ручного комплекта. +cat > "$prefix/bin/windeployqt6.exe" <<'SH' +#!/bin/bash +if [ "$1" = --version ]; then echo 'windeployqt 6.10.0'; else exit 12; fi +SH +chmod +x "$prefix/bin/windeployqt6.exe" +run_case 6 +rg -q 'windeployqt failed \(exit 12\)' "$case_dir/output.log" +echo 'PASS: failed matching deploy tool falls back to verified direct deployment' + # Нет подходящего deploy tool: копирование DLL/плагинов всё равно должно работать. rm "$prefix/bin/windeployqt6.exe" cat > "$prefix/bin/windeployqt.exe" <<'SH'