当前位置:网站首页>How to package QT and share exe

How to package QT and share exe

2022-07-04 14:13:00 InfoQ


When we write our own programs , When you want to share the fruits of your labor with others , Need to send an entire project to someone else , This not only reveals your own code ( Although a lot of the code is open source , But it was my own luck and hard work !), Too many restrictions are required when the other party opens , The other party needs software that can open the project , for example :QT creater  or  VS. But if your partner doesn't have these software , Then you can't use your program . therefore , We learn Qt pack , When the computer is available , You can use your program perfectly !!!

Prerequisite

win32: LIBS += -L$$PWD/lib/Release/ -llibprotobuf// Apply to release Pattern

notes : Be sure to remember to debug Of pro Comment out

1. First step ,  stay release Run the program again   take release Under the exe The files are picked up separately into a new folder

null
Put... In the folder exe Copy to a folder separately

  • The second step , In the start Directory   Find the corresponding console

null
( Be sure to and relese It runs on the same system   I should use the first  x64)

windeployqt C:\Users\jc-c\Desktop\ New folder \xxxxxx.exe

Enter this sentence ,exe The corresponding directory will load the required for packaging dll file

3. The third step , install Enigma virtual box Tools ( The installation process has been next Just go ) 
Installation and use reference
  Just follow him step by step , But there are some packaging errors , You can refer to my article and use it with his article .
explain
After packaging, a new exe file , We need to exe The files are placed in the same directory as the files generated under the above series of operations , Send the whole folder to your little friend , They can use the... In the folder exe Run directly . It is not difficult for him to get familiar with it , The hard part is the process of finding a way .

That's the end of today's study ! I hope you can correct me !
原网站

版权声明
本文为[InfoQ]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/185/202207041232515905.html

随机推荐