OSX deployment ~ frameworks folder = 50MB
I used the great macdeloyqt-tool on my .app and was pretty impressed with the 50MB frameworks-folder.
As a .dmg-file it still weights 22MB which is too much for my little application (on Windows I got it down to 7 MB).
What are good way to decreases the size besides compiling Qt itself with stuff disabled?
EDIT: I just saw each library is there twice (same size)
|- QtGui ===|
|- Current |---> same file
|- QtGui ===|@
Can I remove one of them?
There are symlinks - so they are not duplicates, there is single instances of binaries.
If not, then script which is making deployment not right.
Also you can try "strip" command to decrease size of binaries
They aren't symlinks (I checked with the file-command).
I only used the command macdeployqt MyProject.app -dmg
Which strip-options should I use?
I tried "strip -S QtCore" but the size didn't change at all.
I think there was a tool to strip unneeded architectures. "lipo"?
The libraries are already only for Intel x64 so lipo doesn't work here.
I usually customize my Qt libraries for deployment. Got it down to 8MB per platform without trying to hard. Still a lot of stuff in there that I don't need.
Can you provide a working qt config file?
Ugh, booting up my Mac (haven't done so for weeks;).
Note: This is meant to build Qt on Snow Leopard. Haven't tried it since 4.7.0.
Have fun with it!
export PATH=~/bin:$PATH # to use ccache
rm -rf $QTDIR
-arch 'ppc x86 x86_64' \
printf "o\nyes\n" |
-make 'libs' || exit 1
make || exit 2
Thanks, I'll have to tweak it a bit but that will do.
btw. qconfig is something different. You can exclude features in it like GUI-controls to further decrease the size but it's always a gample whether they'll compile.
These is the disk space used for the Qt libs in my application (i386 + ppc universal binaries):
volker@macpro MyApp.app/Contents/Frameworks $ du -ms *.framework
I copy the files manually (using a homebrewn script, as macdeployqt was not available when I started development). All files exist only once, with a bunch of symlinks inside the bundle. I don't know if macdeployqt strips this out, but I remove all the header files from the frameworks, that save some bytes too.
The configure options for unclewerner just strip down the build time of the Qt libs, as not all modules are built. QtCore, QtGui and all other modules that are built, will be the same size.
I have yet to find a fully compiling qconfig-file.
The option -no-exceptions makes the libraries smaller though.
macdeployqt strips the header-information out.
I get from 25 MB to 23 MB.
I would not bet too much on qconfig, you will waste a lot of time for not very much saved space.
Yeah, you are right with that.
Why is your QtGui 25MB anyways (mine is 12 MB) ? Is it the debug-version?
OT: what's more important now is the problem I have with the desktop-components (http://developer.qt.nokia.com/forums/viewthread/6047). Will you look into it?
It has two architectures (i386 and ppc) in the universal binary. If I had x86_64 too, it would be roughly 36MB.
I'll have a look into the components issue tomorrow, it's just too late now (1:30 in Berlin/Europe) and I need to go to bed :-)
Ah, at least I can exclude i386 and ppc here.
Good night and thanks for all the help.
This forum became quickly a new home for me.