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.



  • 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.



  • And anyway thanks for the useful link!



  • 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.



  • 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.



  • 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..


  • Moderators

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



  • Ok, understand, thanks for the clarification!



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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.