Results 1 to 5 of 5

Thread: Very small size

  1. #1
    Join Date
    Aug 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Very small size

    (I'm not sure if it is proper board, but I didn't find better.)
    Hi! I'm trying to make a launcher for my game. It is a portable application and so must be a launcher. And launcher must be a very small size, about 1-2MB. I want to use a Qt for it, but I don't know how or if it is even possible to get that size. I tried to use wxWidgets instead (because I'm sure it can be small) but I have big problems with it. Can someone tell me how to make small Qt apps? If it's not possible, also tell me.
    Last edited by Xirdus; 10th August 2010 at 19:15. Reason: updated contents

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Very small size

    I guess its not easy to do that.. The Qt libraries itself take 10-12 MB... So if Qt is already installed on your target machine, may be your application can be of small size

  3. #3
    Join Date
    Dec 2008
    Location
    Poland
    Posts
    383
    Thanks
    52
    Thanked 42 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Very small size

    You could try to recompile Qt, look for the confg file in src - sorry but I don't remember where it was exactly. In that file you can comment out classes that You don't want to build. That way if You don't use QLabel in your code simply don't build it. Of course this will cripple Your Qt build but gave You smaller dll.
    Also there is an issue with LGPL, I don't know if You can recompile Qt that way and still use LGPL, but probably yes.
    My smallest redistribution was around 3.5 MB, of course this apply to the system without Qt libs.

  4. #4
    Join Date
    Aug 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Very small size

    Thanks for replies.
    Talei, what components did you compile when getting to 3.5MB? Do you think it is possible to get under 2MB (whole app, with static link)? I need only labels, buttons, combo and checkbox (and a file handling, but it's not related to Qt, I think). Do you think I could reach 2MB (after -Os -s, strip, upx and anything what will be neccesary)?

  5. #5
    Join Date
    Dec 2008
    Location
    Poland
    Posts
    383
    Thanks
    52
    Thanked 42 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Very small size

    I personally never get anything under 3.5MB. Mostly because I use LGPL, so I redistribute shared upx'ed dlls. And also I have old 2.2GHz AMD 1 Core so I really don't want to waste 3+h to recompile Qt only to get .5MB out of dll's (I'm guessing here).
    3.5MB was with static build without phonon, webkits, and some other things, plus upx - don't remember exactly because it was like year and a half ago.
    I saw post, from 07 or maybe older (qt mailing list, look google - query small qt or similar), in with person claims that achieve 2.6MB if I remember correctly. In that post is also what he/they changed to achieve that.
    Edit. Here is the link to that archive http://lists.trolltech.com/qt-intere...ad00675-0.html
    Look also for custom configuration of the Qt, it's in src/corelib/global/qfeatures.h and uncomment QT_NO_"Feature_Name"
    Also look here: http://www.formortals.com/build-qt-s...-gcc-compiler/ for compilers flag and difference in the size across different compilers.

    Can you get 2MB--? Personally I don't know, probably yes. In past I wanted to do comparison/test on how small exe You can get but, as said earlier, waiting 3h+ for each build is a little ...
    But I personally would want to hear from You about how small exe You get after custom compilation, and maybe config parameters.
    Best luck.

Similar Threads

  1. Self contained, small as possible app.
    By squidge in forum Installation and Deployment
    Replies: 4
    Last Post: 16th October 2009, 15:58
  2. Small Libraries
    By porfirio in forum Installation and Deployment
    Replies: 7
    Last Post: 13th August 2009, 10:16
  3. Replies: 2
    Last Post: 23rd March 2009, 17:26
  4. A small 2D game
    By Nyphel in forum Newbie
    Replies: 3
    Last Post: 1st May 2007, 17:16
  5. tool bar icon size looking small???
    By darpan in forum Qt Tools
    Replies: 7
    Last Post: 31st March 2006, 16:38

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.