QT version 5.7.1
1. Add Environment variables
In.. \qt5.7.0\5.7\msvc2013_64\bin (.. Omit the drive letter, for example my is D:\Qt\Qt5.7.0\5.7\msvc2013_64\bin) directory found Windeployqt.exe, enter the system Advanced settings-environment variable-path, Add the path where the Windeployqt.exe is located to the environment variable;
2. Find Dependent libraries
Copy the. exe file generated in release to a separate folder (at random), open cmd, go to the folder directory, run Windeployqt.exe, and the software will automatically generate the dependencies required for the executable file into a folder.
For example, I put the generated Training.exe into the C:\Users\shawn\Desktop\New folder directory, in Cmd,
Input: cd C:\Users\shawn\Desktop\New folder, go to folders,
Re-enter: Windeployqt Training.exe, find dependencies
The required dependencies are now generated under the C:\Users\shawn\Desktop\New folder
3, program Packaging
Use Inno Setup complier for packaging. (: http://www.jrsoftware.org/isdl.php#stable)
Click on the menu File-new-next, follow the prompts to configure the basic information needed to package the project. (software is English version, can not read more dictionary)
In the file to be packaged select here, the primary file path selects the. exe file that needs to be packaged, and the other files directly add the. exe's parent folder, the new folder.
Note: When the QT project is packaged, it is necessary to keep the folder directory hierarchy, not to add folders such as platforms, translations, and other. dll files directly, otherwise the resulting installation package cannot contact the. exe and dependencies to run an error.
Once the configuration is complete, you can generate a single installable file.
4. Testing
Put the packaged installation files on a computer that does not have a QT development environment installed and run without an environmental dependency error.
QT Engineering Package Release