@@ -202,23 +202,35 @@ jobs:
202202 # windeployqt is the official Qt tool for bundling DLLs + plugins.
203203 # It replaces the previous hand-rolled ntldd/find/cp loop, which
204204 # was fragile to Qt/MSYS2 updates (DLL name suffixes kept drifting).
205+ #
206+ # MSYS2 ships the Qt5 variant as windeployqt-qt5.exe so Qt5 and Qt6
207+ # can coexist. Probe for that name first, fall back to the plain name
208+ # for any future layout that reverts, and fail loudly if neither exists.
209+ WDQT="$(command -v windeployqt-qt5 || command -v windeployqt || true)"
210+ if [ -z "$WDQT" ]; then
211+ echo "ERROR: no windeployqt found on PATH"
212+ ls /mingw64/bin/*deployqt* 2>/dev/null || true
213+ exit 1
214+ fi
215+ echo "Using windeployqt: $WDQT"
216+
205217 if [ ! -f build/OpenCryptUI.exe ]; then
206218 echo "ERROR: build/OpenCryptUI.exe not found"
207219 ls -la build/
208220 exit 1
209221 fi
210- /mingw64/bin/windeployqt.exe --release --no-translations --no-system-d3d-compiler \
222+ "$WDQT" --release --no-translations --no-system-d3d-compiler \
211223 --no-opengl-sw --compiler-runtime build/OpenCryptUI.exe
212224
213225 # Also deploy the test executable — it links Qt5::Test and would
214226 # otherwise fail to start silently (exit 1, no stderr) because
215227 # Qt5Test.dll isn't a dep of OpenCryptUI.exe.
216228 if [ -f build/OpenCryptUITest.exe ]; then
217- /mingw64/bin/windeployqt.exe --release --no-translations --no-system-d3d-compiler \
229+ "$WDQT" --release --no-translations --no-system-d3d-compiler \
218230 --no-opengl-sw build/OpenCryptUITest.exe
219231 fi
220232 if [ -f build/TestRoundtrip.exe ]; then
221- /mingw64/bin/windeployqt.exe --release --no-translations --no-system-d3d-compiler \
233+ "$WDQT" --release --no-translations --no-system-d3d-compiler \
222234 --no-opengl-sw build/TestRoundtrip.exe
223235 fi
224236
0 commit comments