Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lightweight release of a very simple Qt program

To enable others to run a simple Qt4 program, you needed to ship 12 MB worth of DLLs. I recently upgraded to Qt5, and am shocked to see that it grew to over 41 MB.

This means, to release a simple GUI program, even just a "Hello World", and still remain under LGPL, it will be over 40 MB.

This is very inconvenient if I would like to make a simple but useful tool to (freely) distribute on the Internet, as it can't compete with other similar programs written with much harder-to-develop-in tools such as MS MFC or even winapi, which manage to be under 100 kB.

Is there any possibility to make a lightweight, minimalistic release of a simple Qt GUI application?

like image 888
vsz Avatar asked Aug 29 '13 12:08

vsz


2 Answers

You won't get too far when you don't compile your Qt yourself. For a simple Qt GUI app you need at least the Qt5Core and the Qt5Gui dll. They are not so big, However, the available binaries have a dependency to ICU. This lib is a bit large. If you don't need QWebKit you can disable ICU. There is probably some other stuff you can disable when you don't need it, but ICD is by far the biggest dependency.

And don't worry about the LGPL. You don't modify your libs. You just don't deliver the whole package. This is not what the LGPL demands. So it is perfectly fine just to deliver Qt5Core and Qt5Gui. Even when you configured and compiled your Qt5 yourself. You did not change the code of a lib.

like image 82
Greenflow Avatar answered Dec 25 '22 06:12

Greenflow


You can definitely do static linking and remain LGPL-compliant. What you need to make available, then, are the object files that you linked with Qt. So that someone else can take their own, perhaps modified, Qt, and statically re-link it with your objects. That's the nominal way to deal with it.

For a reasonable example of how to comply, see the QM Modeling Tool's compliance package.

like image 45
Kuba hasn't forgotten Monica Avatar answered Dec 25 '22 05:12

Kuba hasn't forgotten Monica