Results 1 to 6 of 6

Thread: Compiling QtCore4 and QtGUI4 as small as possible

  1. #1
    Join Date
    Nov 2006
    Location
    Reading, Berkshire, UK
    Posts
    6
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Compiling QtCore4 and QtGUI4 as small as possible

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Compiling QtCore4 and QtGUI4 as small as possible

    You could always try using UPX to reduce the size of your application.

  3. #3
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Compiling QtCore4 and QtGUI4 as small as possible

    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.

  4. #4
    Join Date
    Nov 2006
    Location
    Reading, Berkshire, UK
    Posts
    6
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Compiling QtCore4 and QtGUI4 as small as possible

    Quote Originally Posted by Brandybuck View Post

    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"?

  5. #5
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Compiling QtCore4 and QtGUI4 as small as possible

    Quote Originally Posted by pkirk25 View Post
    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.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Compiling QtCore4 and QtGUI4 as small as possible

    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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.