Thanks for the info Kai...I'll try it out.

On 10/14/10 3:02 AM, "Kai Koehne" <kai.koe...@nokia.com> wrote:

On 10/12/2010 1:02 AM, Ong Tim (Nokia-MS/MtView) wrote:
> I'm still stuck. Does anyone know how to manually add imports to the
> QMLViewer.app application bundle? I feel like I'm close, but can't get
> passed these errors.

You have to:

1) Copy the plugins you're interested in from the $QTDIR/imports
directory into $QTDIR/bin/QMLViewer.app/Contents/MacOS, so that there's e.g.

  QMLViewer.app/Contents/MacOS/QtWebKit/qmldir

2) Fix the references of the import plugin to the Qt frameworks. You can
fix these by hand using install_name_tool. Something like this should
work (haven't tested it though):

install_name_tool -change
/Users/tiiong/qt/qt/*lib/QtCore.framework/Versions/4/QtCore

@executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
          QMLViewer.app/Contents/MacOS/QtWebKit/libqmlwebkitplugin.dylib

Do the same for the other Qt libraries that the plugin depends on.

All the glory of fixing the references is also described in

http://doc.trolltech.com/4.7/deployment-mac.html

Hope this helps,

Kai


> Thanks in advance!
> Tim
>
>
> On 10/8/10 11:31 AM, "Ong Timothy Andrew" <tim....@nokia.com> wrote:
>
>     Thought it might be a pathing issue so I ran macdeployqt in the dir
>     where I build Qt, and still get the same error.
>
>         objc[590]: Class QCocoaApplicationDelegate is implemented in
>         both
>         
> */Users/tiiong/qt/qt/*bin/QMLViewer.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui
>         and */Users/tiiong/qt/qt/*lib/QtGui.framework/Versions/4/QtGui.
>         One of the two will be used. Which one is undefined.
>
>         objc[590]: Class QCocoaWindowCustomThemeFrame is implemented in
>         both
>         
> /Users/tiiong/qt/qt/bin/QMLViewer.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui
>         and /Users/tiiong/qt/qt/lib/QtGui.framework/Versions/4/QtGui.
>         One of the two will be used. Which one is undefined.
>
>         objc[590]: Class QCocoaToolBarDelegate is implemented in both
>

Right, you then also need to fix the shared library paths of the
>
>
>     On 10/8/10 10:42 AM, "Ong Timothy Andrew" <tim....@nokia.com> wrote:
>
>         When I have "QMLViewer.app/Contents/imports/Qt/labs/gestures"
>         and then try to run a QML that imports gestures I get a viewer
>         crash with an error stack that has stuff like:
>
>
>             objc[32086]: Class QCocoaColorPanelDelegate is implemented
>             in both
>             
> /Users/tiiong/qmlapp/Mac_qt_4.7_GESTURES/QMLViewer.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui
>             and
>             /Users/tiiong/qt/qt/lib/QtGui.framework/Versions/4/QtGui.
>             One of the two will be used. Which one is undefined.
>
>             objc[32086]: Class QMacSoundDelegate is implemented in both
>             
> /Users/tiiong/qmlapp/Mac_qt_4.7_GESTURES/QMLViewer.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui
>             and
>             /Users/tiiong/qt/qt/lib/QtGui.framework/Versions/4/QtGui.
>             One of the two will be used. Which one is undefined.
>
>             objc[32086]: Class QCocoaPanel is implemented in both
>
>
>         I can run a QML that doesn't import gestures just fine.
>
>         If I have
>         "QMLViewer.app/Contents/MacOS/imports/Qt/labs/gestures" I get
>         "module Qt.labs.gestures not installed"
>
>         -to
>
>
>         On 10/8/10 10:07 AM, "Ong Timothy Andrew" <tim....@nokia.com> wrote:
>
>             Thanks.
>
>             Do you know where I should put the imports in the bundle?
>
>             I tried:
>
>                 * QMLViewer.app/Contents/MacOS/imports/Qt/labs/gestures
>                 * QMLViewer.app/Contents/Plugins/gestures/
>                 * QMViewer.app/Contents/imports/Qt/labs/gestures
>
>
>             No love so far...
>
>
>             -to
>
>
>
>
>             On 10/8/10 12:24 AM, "ext Kai Koehne" <kai.koe...@nokia.com>
>             wrote:
>
>                 On 10/7/2010 10:09 PM, ext tim....@nokia.com wrote:
>                 >  Hi,
>                 >
>                 >
>                 >  I'm using a mac. I just built Qt from qt.git master
>                 (d7dd96), and
>                 >  gesturearea from qml-gesturearea.git master (b826a9).
>                 >
>                 >  I copied the gesturearea 'gestures' dir in to the qt
>                 imports/Qt/labs/
>                 >  dir (replaced the old 'gestures' dir).
>                 >
>                 >  When I tell Qt Creator to use the QMLViewer in my qt
>                 bin folder I can
>                 >  run an app that does "import Qt.labs.gestures 2.0"
>                 >
>                 >  However, when I do 'macdeployqt QMLViewer.app' and
>                 then tell Qt Creator
>                 >  to use that viewer I get:
>                 >
>                 >  module "Qt.labs.gestures" is not installed
>
>                 Hi,
>
>                 It seems that macdeployqt not bundling import plugins
>                 yet. I created a
>                 task for this in the bug handler:
>
>                 http://bugreports.qt.nokia.com/browse/QTBUG-14342
>
>                 Meanwhile, you can copy by hand the needed folders from
>                 $QTDIR/imports
>                 into the application bundle.
>
>                 Regards
>
>                 Kai
>
>                 >  import Qt.labs.gestures 2.0
>                 >
>                 >  Any ideas how to make this work?
>                 >
>                 >  Thanks,
>                 >  Tim
>
>
>                 --
>                 Kai Koehne
>                 Software Engineer
>                 Nokia, Qt Development Frameworks
>
>                 Nokia gate5 GmbH
>                 Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany
>                 Registergericht: Amtsgericht Charlottenburg, Berlin: HRB
>                 106443 B
>                 Umsatzsteueridentifikationsnummer: DE 812 845 193
>                 Geschäftsführer: Dr. Michael Halbherr, Karim Tähtivuori
>                 _______________________________________________
>                 Qt-qml mailing list
>                 Qt-qml@trolltech.com
>                 http://lists.trolltech.com/mailman/listinfo/qt-qml
>
>
>
>


--
Kai Koehne
Software Engineer
Nokia, Qt Development Frameworks

Nokia gate5 GmbH
Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany
Registergericht: Amtsgericht Charlottenburg, Berlin: HRB 106443 B
Umsatzsteueridentifikationsnummer: DE 812 845 193
Geschäftsführer: Dr. Michael Halbherr, Karim Tähtivuori

_______________________________________________
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml

Reply via email to