OSX deployment ~ frameworks folder = 50MB
-
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!@
#! /bin/sh
QTDIR=$PWD/qt-4.7-x86_64-reduced
QTSRC=$PWD/qt-4.7-srcexport PATH=~/bin:$PATH # to use ccache
rm -rf $QTDIR
mkdir $QTDIR-arch 'ppc x86 x86_64' \
cd $QTDIR
make confclean
export MAKEFLAGS=-j2
printf "o\nyes\n" |
$QTSRC/configure
-debug-and-release
-prefix $PWD
-opensource
-fast
-no-pch
-no-exceptions
-no-phonon
-no-qt3support
-no-stl
-no-webkit
-no-xmlpatterns
-no-scripttools
-no-multimedia
-no-declarative
-no-dbus
-no-javascript-jit
-no-feature-concurrent
-make 'libs' || exit 1
make || exit 2
cd ..
@ -
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
7 Qt3Support.framework
6 QtCore.framework
25 QtGui.framework
3 QtNetwork.framework
1 QtSql.framework
1 QtSvg.framework
54 QtWebKit.framework
1 QtXml.framework
15 QtXmlPatterns.framework
1 phonon.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.
-
if I
@
strip Contents/Frameworks/QtGui.framework/Versions/4/QtGui
@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.