PDA

View Full Version : Compiling QtCore4 and QtGUI4 as small as possible



pkirk25
8th December 2006, 17:12
Hi all,

How can I reduce the size of QtCore4.dll and QTGUI4.dll so that my downloaded program is as small as possible?

Patrick

e8johan
8th December 2006, 18:17
You could always try using UPX to reduce the size of your application.

Brandybuck
8th December 2006, 18:28
There are several make variables Qt uses during its build that can reduce its size. These are intended for Qtopia, but should be usable by Qt/win32 as well. These are listed in src/corelib/global/qfeatures.h. I have never done this, but presumably you can edit qconfig.h and add these variables, then make sub-src.

p.s. You can, of course, statically link your application, then strip it. That will give you the smallest size executable possible. It won't work if you have multiple executables using the libraries, but is ideal for deploying single applications. There is a page deploying in Assistant.

p.p.s. If you have a commercial license, you may consider "downgrading" to the desktop-light edition.

pkirk25
8th December 2006, 19:31
p.p.s. If you have a commercial license, you may consider "downgrading" to the desktop-light edition.

I do have the commercial version - how do you "downgrade"?

Brandybuck
8th December 2006, 20:43
I do have the commercial version - how do you "downgrade"?
I have no idea. But I'm sure the Trolls do, so you should ask them. If it ends up that there's no way to do it (for some bizarre legal reason), you still have support at Trolltech to ask. They're very good people, and they can help you build a custom "diet" Qt.

wysota
8th December 2006, 21:50
I think one can do the "downgrade" by (un)defining some defines which turn off support for parts of the api. But one needs to scan Qt code to find proper defines :)