Package and release of QT Software under the Win7 platform (deployment and installation)

Source: Internet
Author: User

After the software is written and debugged, the most important thing is to pack and publish, so that the software is good to spread.


A difficulty in packaging and releasing QT software is the identification of prerequisite DLL files. A lot of logs say with Dependencywalker, today I tried to find the DLL is not complete, such as identification can not Qwindows.dll (will error could not find or load the QT platform plugin windows). and also to manually add it is not very convenient. A search found that Qt built-in a ready-made DLL dependency tool WINDEPLOYQT very useful, the tool in the QT bin/directory.


Reference Official Document: Http://doc.qt.io/qt-5/windows-deployment.html#application-dependencies


The first step is to add the QT bin/directory into the system path variable. Very simple, set in System Properties, add D:\Qt\5.4\msvc2010_opengl\bin to the system PATH environment variable. (QT installation directory is different)


In the second part, create a new folder in any directory and copy the completed QT EXE executable program to the past. Enter the folder from the command-line mode and execute the statement windeployqt Xxxx.exe. The tool then parses the program dependencies and automatically adds the necessary DLL files to the directory. Run-time command-line prompts are as follows


D:\TVS\QT\LGTVSERIALCONTROL>WINDEPLOYQT Terminal.exe--released:\tvs\qt\lgtvserialcontrol\terminal.exe-bit, Release executableadding qt5svg for Qsvgicon.dlldirect dependencies:qt5core Qt5gui qt5serialport Qt5WidgetsAll Dependencies:qt5core Qt5gui qt5serialport qt5widgetsto be deployed:qt5core Qt5gui qt5serialport QT5SVG Qt5Widget Swarning:cannot Find Visual Studio installation directory, VCInstallDir is not set. Updating icuin53.dll.Updating icuuc53.dll.Updating icudt53.dll.Updating Qt5Core.dll.Updating Qt5Gui.dll.Updating Qt5SerialPort.dll.Updating Qt5Svg.dll.Updating Qt5Widgets.dll.Creating directory iconengines. Updating qsvgicon.dll.Creating directory imageformats. Updating qdds.dll.Updating qgif.dll.Updating qicns.dll.Updating qico.dll.Updating qjp2.dll.Updating Qjpeg.dll.Updating qmng.dll.Updating qsvg.dll.Updating qtga.dll.Updating qtiff.dll.Updating qwbmp.dll.Updating Qwebp.dll.Creating directory platforms. Updating qwindows.dll.Creating qt_ca.qm ... Creating QT_CS.QM... Creating qt_de.qm ... Creating qt_fi.qm ... Creating qt_hu.qm ... Creating qt_it.qm ... Creating qt_ja.qm ... Creating qt_ru.qm ... Creating qt_sk.qm ... Creating qt_uk.qm ... D:\tvs\qt\lgtvserialcontrol>

The necessary library files are automatically added.


The back is packaged to form the installation package. QT officially recommends 3 kinds of software (https://qt-project.org/wiki/BuildingQtInstallers+&cd=1&hl=en&ct=clnk&gl=us), Here is an example of a second software NSIs that explains how to use it.


Download the installation NSIs. The post-installation startup interface is as follows:



The simplest approach is to use the second option installer based on zip file (build the installation package from ZIP files)


Package the entire directory that you just used windeployqt into a zip file, load the zip file with NSIs, set the default installation directory, and generate can be packaged as an installation package.





Package and release of QT Software under the Win7 platform (deployment and installation)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.