0

I am trying to deploy a QML application using

C:\Qt59\5.10.1\msvc2015_64\bin\windeployqt.exe --dir e:\deptest --qmldir e:\ais e:\build-ais-Desktop_Qt_5_10_1_MSVC2015_64bit2-Release\release\ais.exe

This copies all the needed files to e:\deptest, however the exe file I am calling windeployqt on is not being copied. If I copy it to the target folder manually I can run it just fine.

Windeployqt finishes without error, however I am not quite sure whether this is expected behavior, or whether am doing something wrong here.

Do I have to copy the exe myself, or am I missing something?

cbuchart
  • 10,847
  • 9
  • 53
  • 93
Herr von Wurst
  • 2,571
  • 5
  • 32
  • 53

1 Answers1

1

From the tool's documentation:

The tool can be found in QTDIR/bin/windeployqt. It takes an .exe file or a directory that contains an .exe file as an argument, and scans the executable for dependencies. If a directory is passed with the --qmldir argument, windeployqt uses the qmlimportscanner tool to scan QML files inside the directory for QML import dependencies. Identified dependencies are then copied to the executable's directory. The hardcoded local paths in Qt5Core.dll are furthermore replaced with relative ones.

The normal mode of operation is that you copy your *.exe into a deployment directory and point windeployqt to the executable. It then copies all dependencies to this deployment folder.

Using the --dir option is - as far as I know - not the "usual" way of running it. I guess it is rather useful if you plan to set up e.g. an installer where the Qt files and your application are several "components" and can be updated individually (which would save bandwidth as your app would be updated more often then the Qt libraries). Using the --dir option allows you to have all required Qt dependencies in a dedicated directory which can be packaged individually.

Martin Höher
  • 715
  • 5
  • 9