December 8, 2011

Enigma Enigma
Lab Rat
4 posts

Tutorial: Bundle Qt Runtime to Single Executable

 

Hi everyone,

I think it would be interesting to know about ability to merge Qt runtime dll dependences (like QtCore4.dll, QtGui4.dll and any others) to a single executable (for Windows only) + ability to compress these files to decrease the size of Qt application.

Link to tutorial is: http://www.softwareprotection.info/2011/12/application-virtualization-bundle-qt-runtime-to-single-executable-for-windows/

Both programs mentioned in the blog supports Windows x86 and x64.

Hope you find it useful.

8 replies

December 9, 2011

p-himik p-himik
Lab Rat
255 posts

If i recall correct LGPL forces you to give users of your application the ability to replace Qt libraries with newer versions. So you can’t bundle Qt libraries under this licence.
On the other hand there is commercial licence. And with it you can just compile Qt libraries statically with your application.
Please correct me if i’m wrong.

December 9, 2011

p-himik p-himik
Lab Rat
255 posts

And anyway thanks for the useful link!

December 9, 2011

Enigma Enigma
Lab Rat
4 posts

Hi p-himik,

Sorry if I did not understand your question right… but I did not mean to replace Qt libraries, just bundle the,.

Enigma Virtual Box (freeware) and Enigma Protector (commercial) allows to bundle dll dependences to a single exe file.

For example, when you compile your Qt application for Windows, it becomes to require Qt runtime libraries: QtCore4.dll, QtQui4.dll, QtSql4.dll, QtOPenGL4.dll etc etc, there are a lot of them. To distribute such application to end user, you will have to make an installer, that includes all these files. But, applying virtualization, as written in the post, you merge all these files into one single executable, and finally you will have to provide your end customer only this single executable that runs without installation and without Qt runtime.

Regarding of LGPL license, are the Qt runtime under such kind of license? Anyway, this does not prevent you bundling of dll files.

Please write me back if you have other questions, I would be glad to help.

December 9, 2011

p-himik p-himik
Lab Rat
255 posts

Sorry, i forgot that Qt goes not only under LGPL and commercial licence but also under GPL. So you can use Enigma either for opensource or for Qt commercial.

December 9, 2011

Enigma Enigma
Lab Rat
4 posts

just to avoid misunderstanding, can you please tell me (I’m not very aware of Qt development), Qt runtime libraries really can be statically compiled to the output executable?

I thought it can’t, that’s because we made such tutorial..

December 9, 2011

sierdzio sierdzio
Area 51 Engineer
2346 posts

Yes, they can – but again, you have to be careful about licensing. It has to be either fully GPL’ed or commercial.

 Signature 

(Z(:^

December 9, 2011

Enigma Enigma
Lab Rat
4 posts

Ok, understand, thanks for the clarification!

December 9, 2011

Volker Volker
Robot Herder
5428 posts

Additionally, using QtWebKit with statically compiled Qt is not supported.

 
  ‹‹ How to set license file for qt-x11-commercial-3.3.8.tgz build      Problem in playing the audio back from Microphone to Speaker ››

You must log in to post a reply. Not a member yet? Register here!