[Qt-interest] macdeployqt questions

Harri Pasanen grego at mpaja.com
Mon May 2 18:21:55 CEST 2011


Hi,

I'm taking my first steps with a Mac.

To my great satisfaction I installed QtSDK 1.1RC without any problems, and my 
own application compiled and ran pretty much on the first try.

It is only after I started packaging my application I ran into problems.  In 
fact I've been through this same exercise on Meego and Windows over the past 
few days, and thanks to Qt the actual compilation / porting has pretty much 
consisted of slight UI tweaking only,  but packaging has been a bit of an 
ordeal on all platforms and MacOS seems no exception.

What I did: 

compile on Qt Creator, release mode.  My pro name is unmot.pro, so 
unmot-build-desktop was created an my app executable was there in 
Unmot_classique.app/Contents/MacOS

I could run it successfully through Qt Creator, and also from command line.

If I do 

macdeployqt unmot-build-desktop/Unmot_classique.app
that seems to break the application.  Running again from command line, I see  
messages like:

minimac:unmot harri$ ./unmot-build-
desktop/Unmot_classique.app/Contents/MacOS/Unmot_classique 
objc[2139]: Class QCocoaColorPanelDelegate is implemented in both 
/Users/harri/projects/unmot/./unmot-build-
desktop/Unmot_classique.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/Current/QtGui 
and /Users/harri/projects/unmot/./unmot-build-
desktop/Unmot_classique.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui. 
One of the two will be used. Which one is undefined.

So two versions of libs seem to be installed 4 and Current?  Indeed the 
Frameworks directory seems to take 66Mb which seems a bit excessive compared 
to other platforms, but perhaps its because universal binaries?

otool -L reports just the Current path.

@executable_path/../Frameworks/QtGui.framework/Versions/Current/QtGui

Hmm... surfing around
 http://developer.qt.nokia.com/forums/viewthread/4239 seems to describe the 
same problem I'm having.  I guess I'll need to install Qt and Qt Creator 
separately, will test that.

Any other quick fix?

Thanks,

Harri
http://mpaja.com/

PS. I don't have a display in my mac, and krdc in kubuntu 10.10 seems to be 
bit flaky with mac.   Perhaps I should buy another display and run synergy.  
Anyone have experience with http://synergy-foss.org/  ?  Is it good enough for 
real work?



More information about the Qt-interest-old mailing list