Home > other >  Qt deploy not working on windows normally
Qt deploy not working on windows normally

Time:08-11

I am using Visual Studio Qt addon with Qt 5.15.2 x64 and set Run deployment tool to Yes. It seems like this deployment tool is poorly designed and broken. Never understand why Qt cannot make own runtime distibution for Windows like Microsoft did. After deployment when I am trying to open my release exe it just not open. Nothing happens. Yes, I can put it into qt bin folder that weights few gigabytes and it works, but it looks like deploy tool missed some libraries. How to deploy on windows without problems?

(Do not advice me to copy entire Qt bin and remove files one by one and find minimal combination of libraries, I want to make qt deploy automatically)

My errors on app launch:

qrc:/qml/main.qml:3:1: module "QtGraphicalEffects" is not installed
qrc:/qml/main.qml:2:1: module "QtQuick.Window" is not installed
qrc:/qml/main.qml:1:1: module "QtQuick" is not installed
qrc:/qml/main.qml:3:1: module "QtGraphicalEffects" is not installed
qrc:/qml/main.qml:2:1: module "QtQuick.Window" is not installed
qrc:/qml/main.qml:1:1: module "QtQuick" is not installed
qrc:/qml/main.qml:3:1: module "QtGraphicalEffects" is not installed
qrc:/qml/main.qml:2:1: module "QtQuick.Window" is not installed
qrc:/qml/main.qml:1:1: module "QtQuick" is not installed

CodePudding user response:

I usually run windeployqt manually, if it help you:

path\to\windeployqt.exe --release --compiler-runtime path\to\release\build

for example

C:\Qt\5.15.2\msvc2019_64\bin\windeployqt.exe --release --compiler-runtime .\release

Update: if you use QML frontend in your app, as you described in question update, then also specify --qmldir argiment, so that windeployqt could find dependencies not only in compiled .exe import table, but also in non-compiled QML text files. See approved solution https://stackoverflow.com/a/39717117/12691808.

CodePudding user response:

I found 3rd party Qt deploy toolkit for Windows. It just works fine out of box. I think the only way to solve problems with windeployqt is do not use it and switch to something else.

https://github.com/QuasarApp/CQtDeployer

  • Related