[Development] 5.4.1 OSX macdeployqt FAIL
mark diener
rpzrpzrpz at gmail.com
Sun May 10 18:57:52 CEST 2015
Hello:
Has someone gotten macdeployqt to actually work and create a self running
bundle
that successfully runs on OSX ?
If yes, please share your command line for macdeployqt.
My macdeployqt command line:
macdeployqt ./testdep.app/ -qmldir=/macdev/qdev/testdep/
my otool dump of the bundle after macdeployqt:
mds-MacBook-Pro:buildosx md$ otool -L ./testdep.app/Contents/MacOS/testdep
./testdep.app/Contents/MacOS/testdep:
@executable_path/../Frameworks/QtQuick.framework/Versions/5/QtQuick
(compatibility version 5.4.0, current version 5.4.1)
@executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui
(compatibility version 5.4.0, current version 5.4.1)
@executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore
(compatibility version 5.4.0, current version 5.4.1)
/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
(compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
(compatibility version 1.0.0, current version 275.0.0)
@executable_path/../Frameworks/QtQml.framework/Versions/5/QtQml
(compatibility version 5.4.0, current version 5.4.1)
@executable_path/../Frameworks/QtNetwork.framework/Versions/5/QtNetwork
(compatibility version 5.4.0, current version 5.4.1)
@executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets
(compatibility version 5.4.0, current version 5.4.1)
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
(compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility
version 1.0.0, current version 1.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current
version 104.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 1213.0.0)
Added directories to my bundle:
Contents
------------>Frameworks (QtCore, QtGui, QtNetwork, QtPrintSupport, QtQml,
QtQuick, QtWidgets)
------------>PlugIns (bearer, imageformats, platforms, printsupport, quick)
------------>Resources -> qml -> Qt/ Qtquick/ QtQuick.2/
When executing the program after macdeployqt
applicationDirPath(): "/macdev/qdev/buildosx/testdep.app/Contents/MacOS"
QLibraryInfo::PrefixPath: "/macdev/qdev/buildosx/testdep.app/Contents"
QLibraryInfo::LibrariesPath:
"/macdev/qdev/buildosx/testdep.app/Contents/lib"
QLibraryInfo::PluginsPath:
"/macdev/qdev/buildosx/testdep.app/Contents/PlugIns"
QLibraryInfo::Qml2ImportsPath:
"/macdev/qdev/buildosx/testdep.app/Contents/Resources/qml"
QQmlApplicationEngine failed to load component
qrc:/main.qml:1 module "QtQuick" plugin "qtquick2plugin" not found
Anybody gotten through this OSX Ugliness?
Mark
###############################
Here is the simple source code:
#include <QApplication>
#include <QQmlApplicationEngine>
#include <QLibraryInfo>
#include <QString>
#include <QDebug>
int main(int argc, char *argv[])
{
QString gval ;
QApplication app(argc, argv);
QQmlApplicationEngine engine;
gval = QApplication::applicationDirPath() ;
qDebug() << "applicationDirPath():" << gval << endl ;
gval = QLibraryInfo::location(QLibraryInfo::PrefixPath) ;
qDebug() << "QLibraryInfo::PrefixPath:" << gval << endl ;
gval = QLibraryInfo::location(QLibraryInfo::LibrariesPath) ;
qDebug() << "QLibraryInfo::LibrariesPath:" << gval << endl ;
gval = QLibraryInfo::location(QLibraryInfo::PluginsPath) ;
qDebug() << "QLibraryInfo::PluginsPath:" << gval << endl ;
gval = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath) ;
qDebug() << "QLibraryInfo::Qml2ImportsPath:" << gval << endl ;
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
return app.exec();
}
Here is the simple QML:
import QtQuick 2.4import QtQuick.Controls 1.3import QtQuick.Window
2.2import QtQuick.Dialogs 1.2import QtQuick.Layouts 1.1
ApplicationWindow { title: qsTr("Hello World") width: 640
height: 480 visible: true
menuBar: MenuBar { Menu { title: qsTr("&File")
MenuItem { text: qsTr("&Open")
onTriggered: messageDialog.show(qsTr("Open action triggered"));
} MenuItem { text: qsTr("E&xit")
onTriggered: Qt.quit(); } } }
RowLayout { anchors.centerIn: parent
Button { id: button1 text: qsTr("Press
Me 1") onClicked: messageDialog.show(qsTr("Button 1
pressed")) }
Button { id: button2 text: qsTr("Press
Me 2") }
Button { id: button3 text: qsTr("Press
Me 3") } }
MessageDialog { id: messageDialog title: qsTr("May I
have your attention, please?")
function show(caption) { messageDialog.text =
caption; messageDialog.open(); } }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20150510/8ccd2f8a/attachment.html>
More information about the Development
mailing list