From 23554ac5dc17b5583dd1dea3b3973f85b56337c5 Mon Sep 17 00:00:00 2001 From: Ahmed Aredah <77444744+AhmedAredah@users.noreply.github.com> Date: Thu, 7 May 2026 10:00:19 -0500 Subject: [PATCH] Bundle Qt6Sql via windeployqt on Windows installer 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. --- installer/deploy/deploy_windows.cmake | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/installer/deploy/deploy_windows.cmake b/installer/deploy/deploy_windows.cmake index 15ce1a0..c52b771 100644 --- a/installer/deploy/deploy_windows.cmake +++ b/installer/deploy/deploy_windows.cmake @@ -1,6 +1,12 @@ # Windows deploy: run windeployqt against the installed binary so all required # Qt DLLs and plugins are copied into bin/. Also drop RabbitMQ-C and Container # DLLs next to the executable. +# +# windeployqt only follows the Qt imports of the binaries you point it at, so +# we feed it Container.dll alongside terminal_simulation.exe. Qt modules pulled +# in transitively via Container (e.g. Qt6Sql for the SQLite-backed container +# store) would otherwise be missed and the installed app would fail to start +# with STATUS_DLL_NOT_FOUND (0xC0000135). find_program(WINDEPLOYQT_BIN NAMES windeployqt windeployqt6 @@ -36,8 +42,17 @@ install(CODE " return() endif() + # Container.dll links Qt modules (e.g. Qt6Sql) that the main executable + # does not import directly. Pass it to windeployqt as an extra input so + # its Qt closure ends up in the bundle. + set(_extra_targets) + set(_container_installed \"\${_root}/bin/Container.dll\") + if(EXISTS \"\${_container_installed}\") + list(APPEND _extra_targets \"\${_container_installed}\") + endif() + if(NOT \"${WINDEPLOYQT_BIN}\" STREQUAL \"WINDEPLOYQT_BIN-NOTFOUND\") - message(STATUS \"Running windeployqt on \${_bin}\") + message(STATUS \"Running windeployqt on \${_bin} \${_extra_targets}\") execute_process( COMMAND \"${WINDEPLOYQT_BIN}\" --release @@ -46,6 +61,7 @@ install(CODE " --no-opengl-sw --compiler-runtime \"\${_bin}\" + \${_extra_targets} RESULT_VARIABLE _rc) if(NOT _rc EQUAL 0) message(WARNING \"windeployqt returned \${_rc}\")