Windows 7, X64 Platform
The more cumbersome way is to run the Qt*.exe program, tips missing *.dll, will be missing *.dll copy to the directory, feeling more trouble and error prone! Most of the internet is such a document, think of QT should have to solve this stupid way tool (windeployqt),
Qt 5 program release on Windows organize all dependent libraries, run them in the directory, and pack! (Disadvantage: There are redundant libraries)
Use tools such as Process explore/depends22_x64 to get all dependent libraries (cons: Too Much trouble)
WINDEPLOYQT find dependencies and automatically copy to current directory
Find dependent libraries with the Qt "D:\Qt\Qt5.4.0\5.4\msvc2013_64\bin\windeployqt.exe" command
WINDEPLOYQT QtWebApp.exe
d:\qtcode\build-qtwebapp-desktop_qt_5_4_0_msvc2013_64bit-release\tmp\ qtwebapp.exe 64 bit, release executabledirect dependencies: qt5core Qt5network qt5sqlall dependencies : qt5core qt5network qt5sqlto be deployed : Qt5Core Qt5Network Qt5SqlWarning: Cannot find visual studio installation directory, vcinstalldir is not set. updating icuin53.dll.updating icuuc53.dll.updating icudt53.dll.updating Qt5core.dll.updating qt5network.dll.updating qt5sql.dll.creating directory bearer. Updating qgenericbearer.dll.updating qnativewifibearer.dll.creating directory sqldrivers. updating qsqlite.dll.updating qsqlmysql.dll.updating qsqloci.dll.updating Qsqlodbc.dll.updating qsqlpsql.dll.
The Qt library you rely on will be automatically copied to the recording!
Attention:
Warning:cannot Find Visual Studio installation directory, VCInstallDir is not s
Et
Directly with the "VS2013 developer Command prompt " command line, to perform just the windeployqt QtWebApp.exe, "Vcredist_x64.exe" (VC x64 Run Least environment) program into the current directory.
Recommendation: Set the path of the Library and development environment that you are using into the paths environment variable so that you can use WINDEPLOYQT to find the corresponding DLL. Of course, using the corresponding tool "command-line tool" is also possible!
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/5A/0D/wKioL1T1Ueey_wlqAAGtbUg5irY587.jpg "title=" QQ picture 20150303141202.png "alt=" Wkiol1t1ueey_wlqaagtbug5iry587.jpg "/>
QT Green version of the program so that the build is complete!
Software Packaging (NSIS)
NSIs Menu--Compiler--vnisedit (compiler Environment)
Picture below
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/5A/11/wKiom1T1UYjzn44aAAMNz83DKTg399.jpg "title=" QQ picture 20150303141503.png "alt=" Wkiom1t1uyjzn44aaamnz83dktg399.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/5A/0E/wKioL1T1UuGBxbzpAAGppYRYPAE261.jpg "title=" QQ picture 20150303141618.jpg "alt=" Wkiol1t1uugbxbzpaagppyrypae261.jpg "/>
FILE--New script--wizard--next--next to
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/5A/11/wKiom1T1Ul3BnBX5AAFw5cRttKc539.jpg "title=" QQ picture 20150303141819.png "alt=" Wkiom1t1ul3bnbx5aafw5crttkc539.jpg "/>
The authorization file will not toss!
Next
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/5A/11/wKiom1T1UtnAMUK9AAFdCnG0OW0592.jpg "title=" QQ picture 20150303142037.png "alt=" Wkiom1t1utnamuk9aafdcng0ow0592.jpg "/>
Option "C:\path\to\file\AppMainExe.exe", C:\path\to\file\Example.file are removed
Next, click on the "Tree" button above
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/5A/0E/wKioL1T1VI_hDwVxAAC-jxklMvo066.jpg "title=" QQ picture 20150303142324.png "alt=" Wkiol1t1vi_hdwvxaac-jxklmvo066.jpg "/>
Fill in the "Green" directory in "Selected directory", select "Include subdirectories", "add each file separately"--OK--Next
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/5A/0E/wKioL1T1VSvgwZUAAAHBdixSYqw844.jpg "title=" QQ picture 20150303142556.jpg "alt=" Wkiol1t1vsvgwzuaaahbdixsyqw844.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/5A/12/wKiom1T1VHPxOmc4AAEt8LLY7nE706.jpg "title=" QQ picture 20150303142716.jpg "alt=" Wkiom1t1vhpxomc4aaet8lly7ne706.jpg "/>
Complete, NSIS automatically compile, generate the packaged file!
Output information:
Processed 1 files, Write output: Add plug-in initialization function ... done! Process page ... done! Remove Unused resources ... complete! Build Language Table ... Complete! Build Uninstall program ... Finish it! output: "F:\program files\nsis\xxxx\setup.exe" installer:4 pages (256 bytes), 3 Segments (requires 2) (3144 bytes), 325 instruction (9100 bytes), 176 string (2509 bytes), 1 languages table (282 bytes). Uninstaller: 2 pages (128 bytes), 1 segments (1048 bytes), 69 instruction (1932 bytes), 93 strings (1561 bytes), 1 languages table (226 bytes). The Data Module Optimizer stores 14592 bytes (~0.0%). Use lzma compression. exe Head Size: 46592 / 34816 byte Installation code: 2852 / 15667 BYTE installation Data: 15898195 / 40645353 byte unload code + Data: 9689 / 15249 byte crc (0xd8bcb363): 4 / 4 Bytes Total size: 15957332 / 40711089 byte (39.1%)
This article is from the "Happy Hair" blog, please be sure to keep this source http://2678482.blog.51cto.com/2668482/1616826
Qt software Release and packaging