当前位置:网站首页>QT program generates independent exe program (pit-avoiding version)

QT program generates independent exe program (pit-avoiding version)

2022-08-09 08:40:00 running little rabbit

http://blog.sina.com.cn/s/blog_96c6e6ef0102zx8y.html

1. Compile the existing project in QT Creater in release mode.
2. Go to the directory generated by the project, mine is in E:\QTFile\build-calc_20180508-Desktop_Qt_5_8_0_MinGW_32bit-Release.
3. Copy the .exe file generated in the release to a new folder, I copied it to d:\test\ here.
4. Find the QT5.8 for DeskTop tool in the QT installation menu and run it.
5. Enter the command: cd /d d:\test\, switch to the test directory.
Then use the windeployqt tool command: windeployqt calc_20180508.exe
6. After the execution, you can see the automatically copied plug-in files, dll files, qm files, etc. in the test folder, and the complete program release is obtained heregather.
7. Download the QT program packaging tool Enigma Virtual Box, and click Run after the installation is complete.

The first seven steps under the link are all right, but the packaging step of the last step is quite tricky. According to his steps, the final packaged EXE cannot beOperate independently.The correct steps are as follows:


Note that after adding the input and output paths, be sure to click Add to select Add Folder Recursive when selecting a file, and then select a folder. Remember not to directly drag the folder to be packaged to the software.Otherwise the generated exe cannot run independently.

原网站

版权声明
本文为[running little rabbit]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/221/202208090833523747.html