From 495bd93ba888fee19f7f516368e8849f23c84c45 Mon Sep 17 00:00:00 2001 From: blocksmith314 Date: Sat, 21 Nov 2026 18:48:39 +0800 Subject: [PATCH 1/3] ci: switch Windows builds to MSYS2 UCRT64 MSYS2 no longer ships mingw-w64-x86_64-qt6-multimedia, so the MINGW64 setup fails before configuring. Use the UCRT64 environment and package prefix (/ucrt64), which still provides Qt6 Multimedia, and accept both runtime prefixes when collecting DLLs in bundle_windows.sh. --- .github/workflows/ci.yml | 18 +++++++++--------- .github/workflows/release.yml | 18 +++++++++--------- scripts/bundle_windows.sh | 4 ++-- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d025cc0..6270e67 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,22 +72,22 @@ jobs: - uses: msys2/setup-msys2@v2 with: - msystem: MINGW64 + msystem: UCRT64 update: true install: >- - mingw-w64-x86_64-cmake - mingw-w64-x86_64-gcc - mingw-w64-x86_64-ninja - mingw-w64-x86_64-pkgconf - mingw-w64-x86_64-qt6-base - mingw-w64-x86_64-qt6-multimedia - mingw-w64-x86_64-ffmpeg + mingw-w64-ucrt-x86_64-cmake + mingw-w64-ucrt-x86_64-gcc + mingw-w64-ucrt-x86_64-ninja + mingw-w64-ucrt-x86_64-pkgconf + mingw-w64-ucrt-x86_64-qt6-base + mingw-w64-ucrt-x86_64-qt6-multimedia + mingw-w64-ucrt-x86_64-ffmpeg git - name: Configure run: >- cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug - -DCMAKE_PREFIX_PATH=/mingw64 + -DCMAKE_PREFIX_PATH=/ucrt64 - name: Build run: cmake --build build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f5a81de..48d7829 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -75,20 +75,20 @@ jobs: - uses: msys2/setup-msys2@v2 with: - msystem: MINGW64 + msystem: UCRT64 update: true install: >- - mingw-w64-x86_64-cmake - mingw-w64-x86_64-gcc - mingw-w64-x86_64-ninja - mingw-w64-x86_64-pkgconf - mingw-w64-x86_64-qt6-base - mingw-w64-x86_64-qt6-multimedia - mingw-w64-x86_64-ffmpeg + mingw-w64-ucrt-x86_64-cmake + mingw-w64-ucrt-x86_64-gcc + mingw-w64-ucrt-x86_64-ninja + mingw-w64-ucrt-x86_64-pkgconf + mingw-w64-ucrt-x86_64-qt6-base + mingw-w64-ucrt-x86_64-qt6-multimedia + mingw-w64-ucrt-x86_64-ffmpeg zip - name: Configure - run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TEST=OFF -DCMAKE_PREFIX_PATH=/mingw64 + run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TEST=OFF -DCMAKE_PREFIX_PATH=/ucrt64 - name: Build run: cmake --build build diff --git a/scripts/bundle_windows.sh b/scripts/bundle_windows.sh index d6169c5..89a8160 100644 --- a/scripts/bundle_windows.sh +++ b/scripts/bundle_windows.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Collects the executable, the Qt runtime and the MinGW/FFmpeg DLLs into a -# self-contained folder (run inside an MSYS2 MINGW64 shell). +# self-contained folder (run inside an MSYS2 UCRT64 shell). set -euo pipefail EXE="${1:?usage: bundle_windows.sh }" @@ -23,7 +23,7 @@ copy_deps() { cp "$dll" "$DIST/" copy_deps "$DIST/$base" fi - done < <(ldd "$target" 2>/dev/null | awk '{print $3}' | grep -E '^/mingw64/bin/' | sort -u) + done < <(ldd "$target" 2>/dev/null | awk '{print $3}' | grep -E '^/(mingw64|ucrt64)/bin/' | sort -u) } copy_deps "$DIST/$BASE" From 68ccaec33f619f7d24461dfc0cdf59ab0715a242 Mon Sep 17 00:00:00 2001 From: blocksmith314 Date: Sat, 21 Nov 2026 18:53:57 +0800 Subject: [PATCH 2/3] test(ui): drive the cache hit test through the seek slider Synthetic key events do not reach the window shortcuts on the Windows offscreen platform; setting the slider exercises the same ShowFrameAt path. --- test/test_gui.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test_gui.cpp b/test/test_gui.cpp index ef9bad6..afbf65d 100644 --- a/test/test_gui.cpp +++ b/test/test_gui.cpp @@ -463,9 +463,11 @@ TEST(MainWindowTest, CacheServesRevisitedFrames) { window.LoadFile(QString::fromStdString(data_path("output.h264")))); QApplication::processEvents(); - QTest::keyClick(&window, Qt::Key_Right); + auto* slider = window.findChild(); + ASSERT_NE(slider, nullptr); + slider->setValue(1); QApplication::processEvents(); - QTest::keyClick(&window, Qt::Key_Left); + slider->setValue(0); QApplication::processEvents(); auto* log = window.findChild("perfLog"); From b45ddcf0c254e509869eb5b39bcdcb6ea4b9ee87 Mon Sep 17 00:00:00 2001 From: blocksmith314 Date: Sat, 21 Nov 2026 19:05:21 +0800 Subject: [PATCH 3/3] test(ui): enable the performance log action in the cache test QSettings defaults are not reliable in the offscreen test app on Windows; toggle the View action instead. --- test/test_gui.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/test/test_gui.cpp b/test/test_gui.cpp index afbf65d..d24e080 100644 --- a/test/test_gui.cpp +++ b/test/test_gui.cpp @@ -456,9 +456,24 @@ TEST(MainWindowTest, CacheServesRevisitedFrames) { } QSettings().setValue("progressMode", 0); - QSettings().setValue("perfLogVisible", true); MainWindow window; window.show(); + QApplication::processEvents(); + + // Enable the log through the UI action: QSettings defaults are not reliable + // in the offscreen test app on every platform. + for (QAction* menu_action : window.menuBar()->actions()) { + if (menu_action->menu() == nullptr) { + continue; + } + for (QAction* entry : menu_action->menu()->actions()) { + if (entry->text().contains("Performance log")) { + entry->setChecked(true); + } + } + } + QApplication::processEvents(); + ASSERT_TRUE( window.LoadFile(QString::fromStdString(data_path("output.h264")))); QApplication::processEvents();