Bundle Qt6Sql via windeployqt on Windows installer#4
Merged
Conversation
windeployqt only scans the direct Qt imports of the binaries it is pointed at. terminal_simulation.exe imports Qt6Core and Qt6Network, while Qt6Sql arrives transitively through Container.dll (used for the SQLite-backed container store). The installed app therefore failed to start with STATUS_DLL_NOT_FOUND (0xC0000135) because Qt6Sql.dll and the sqldrivers/qsqlite.dll plugin were never copied into bin/. Pass the installed Container.dll as an extra positional input to windeployqt so its Qt closure is included in the bundle. No change to the Linux deploy script: it already enumerates Qt6::Sql explicitly and walks ldd transitively over every bundled .so.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Windows installer ships a
bin/folder that is missingQt6Sql.dll(and the matchingsqldrivers/qsqlite.dllplugin). Runningterminal_simulation.exefrom a freshly installed copy fails immediately with exit code-1073741515/0xC0000135(STATUS_DLL_NOT_FOUND).Root cause
installer/deploy/deploy_windows.cmakeinvokeswindeployqtagainstterminal_simulation.exeonly.windeployqtfollows the Qt imports of the binaries it is pointed at — nothing else. The main executable importsQt6CoreandQt6Network;Qt6Sqlis pulled in transitively byContainer.dll(SQLite-backed container store).windeployqtnever sees Container.dll, soQt6Sql.dlland itssqldrivers/plugin are never copied into the installer payload.Verified locally against a v0.1.x Windows installer:
Fix
Pass the installed
Container.dlltowindeployqtas a second positional input.windeployqt6.6+ accepts multiple binaries and emits the union of their Qt closures, which pulls inQt6Sql.dllplussqldrivers/qsqlite.dll.The
install(FILES ...)forContainer.dllalready runs before thisinstall(CODE ...)block, so the installed copy is on disk by the timewindeployqtis invoked.Why Linux/macOS are not changed
deploy_linux.cmake) already enumeratesQt6::Sqlexplicitly in its bundled-modules list, and the install-timelddclosure walk would catchlibContainer.so -> libQt6Sql.soregardless. The script's own comments cite this exact case.deploy_macos.cmake) runsmacdeployqtagainst the bundle root, which scans every binary already inside the bundle (including the relocatedContainerdylib) — the same transitive-resolution issue does not apply.Test plan
TerminalSim-*-windows-x64.exepayload containsbin/Qt6Sql.dllandbin/sqldrivers/qsqlite.dll.bin\terminal_simulation.exe— it should start and reach the RabbitMQ connect/wait state instead of exiting with0xC0000135.