[Interest] QML and macdeployqt

Nils Jeisecke njeisecke at saltation.de
Fri Apr 27 12:55:07 CEST 2012


Hi,

this is my script that must be run after macdeployqt:

----

#!/bin/sh

bundle=$1

qt_libs="QtCore QtGui QtDeclarative QtScript QtSvg QtSql QtXmlPatterns
QtNetwork QtWebKit"

# copy qml plugin
mkdir -p $1/Contents/MacOS/QtWebKit
cp $QTDIR/imports/QtWebKit/qmldir $1/Contents/MacOS/QtWebKit
cp $QTDIR/imports/QtWebKit/libqmlwebkitplugin.dylib
$1/Contents/MacOS/QtWebKit

# fix library references
for i in $qt_libs
do
  install_name_tool -change $QTDIR/lib/$i.framework/Versions/4/$i
@executable_path/../Frameworks/$i.framework/Versions/4/$i
$bundle/Contents/MacOS/QtWebKit/libqmlwebkitplugin.dylib
done

# copy qml desktop components plugin
rm -rf $1/Contents/MacOS/QtDesktop
cp -r $QTDIR/imports/QtDesktop $1/Contents/MacOS

# fix library references
for i in $qt_libs
do
  install_name_tool -change $QTDIR/lib/$i.framework/Versions/4/$i
@executable_path/../Frameworks/$i.framework/Versions/4/$i
$bundle/Contents/MacOS/QtDesktop/plugin/libstyleplugin.dylib
done

----

On Fri, Apr 27, 2012 at 4:53 AM, Yang Fan <missdeer at gmail.com> wrote:

> I guess, you need manually copy qmlwebkitplugin plugin to your app
> bundle after exeuting macdeployqt script, then run install_name_tool to
> modify the frameworks path for qmlwebkitplugin. And also, you may have to
> set the plugin path for QDeclarativeEngine object in your code.
>
>
> On Fri, Apr 27, 2012 at 4:22 AM, Alexander Semke <Alexander.Semke at web.de>wrote:
>
>> Hi all,
>>
>> I'm struggling with a problem concerning packaging of an Qt-application
>> on Mac
>> OS X. The program compiles and runs well. Everything works just fine,
>> until
>> the macdeployqt-tool is invoked. After that the QML-based part of the
>> application (mainly the startscreen with some funny animations) doesn't
>> work
>> anymore. It seems like the qml-file for the start screen is not loaded.
>> All
>> the qml-files are included in the binary via the Qt's ressource system
>> and, as
>> already mentioned, everything works without having invoked macdeployqt.
>> QtDeclarative is properly copied into the Content/Frameworks-directory.
>> Upon macdeployqt, otool -L my_binary shows the correct pathes to the
>> Qt-libs
>> inside my app-package. So, everything seems to be ok. But I'm surely
>> overseeing something :-(
>>
>> Any help/hint is highly appreciated.
>>
>>
>> Regards,
>> Alexander
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>>
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>


-- 
Dipl. Inform. Nils Jeisecke
fon: +49 (0) 521 - 329647-12
fax: +49 (0) 521 - 329647-40
email: jeisecke at saltation.de

---------------
saltation GmbH & Co. KG | Niederwall 43 | 33602 Bielefeld
Sitz Bielefeld | Amtsgericht Bielefeld HRA 15344
Persönlich haftende Gesellschafterin:
saltation Beteiligungs-GmbH | Niederwall 43 | 33602 Bielefeld
Sitz Bielefeld | Amtsgericht Bielefeld HRB 39339
Geschäftsführer: Daniel Brün
---------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120427/6daf00d3/attachment.html>


More information about the Interest mailing list