LKBEN11558: How to distribute a Qt application or prepare for distribution on windows.


Symptom

You need to distribute your Qt program but some files or missing.

Cause

This is by design but there is a tool to do the work for you.

Solution

To prepare for distribution you can use the windeployqt.exe tool.

The tool can be used to collect all the needed platform information an copy it into the executable directory. This can be collected to generate a MSI project.

windeployqt.exe c:\Projects\your-release-build-directory\release

If you call the application without parameters, the help information will be presented.

Here the first part of the help:

Usage: windeployqt.exe [options] [files]
Qt Deploy Tool 6.2.2

The simplest way to use windeployqt is to add the bin directory of your Qt
installation (e.g. <QT_DIR\bin>) to the PATH variable and then run:
  windeployqt <path-to-app-binary>
If ICU, etc. are not in the bin directory, they need to be in the PATH
variable. If your application uses Qt Quick, run:
  windeployqt --qmldir <path-to-app-qml-files> <path-to-app-binary>

 

Have fun.

Disclaimer:

The information provided in this document is intended for your information only. Lubby makes no claims to the validity of this information. Use of this information is at own risk!

About the Author

Author: Wim Peeters - Keskon GmbH & Co. KG

Wim Peeters is electronics engineer with an additional master in IT and over 30 years of experience, including time spent in support, development, consulting, training and database administration. Wim has worked with SQL Server since version 6.5. He has developed in C/C++, Java and C# on Windows and Linux. He writes knowledge base articles to solve IT problems and publishes them on the Lubby Knowledge Platform.

Latest update: 28-04-2023 | Comment: