1

Why rc1 but not release version?Because the macdeploy of release version has more bugs than rc1

The qml is very simple

import QtQuick 2.1

Rectangle{
width: 400
height: 300
color: "black"
}

my .pro

QT += core gui qml quick

CONFIG += c++11

SOURCES += \
main.cpp

OTHER_FILES += \
main.qml

But I can't even deploy this simple app

My scrips

#******copy main.qml into the bundle**********
cp /Users/Qt/program/experiment_apps_and_libs/qmlTest2/main.qml /Users/Qt/program/experiment_apps_and_libs/qmlTest2/qmlTest2.app/Contents/MacOs

#*******create the folder and copy the plugins into the bundle**********
mkdir qmlTest2.app/Contents/PlugIns
mkdir qmlTest2.app/Contents/PlugIns/QtQuick

mkdir qmlTest2.app/Contents/PlugIns/QtQuick/LocalStorage
cp /Users/yyyy/Qt5.1.0RC1/5.1.0-rc1/clang_64/qml/QtQuick/LocalStorage/libqmllocalstorageplugin.dylib qmlTest2.app/Contents/PlugIns/QtQuick/LocalStorage
cp /Users/yyyy/Qt5.1.0RC1/5.1.0-rc1/clang_64/qml/QtQuick/LocalStorage/plugins.qmltypes qmlTest2.app/Contents/PlugIns/QtQuick/LocalStorage
cp /Users/yyyy/Qt5.1.0RC1/5.1.0-rc1/clang_64/qml/QtQuick/LocalStorage/qmldir qmlTest2.app/Contents/PlugIns/QtQuick/LocalStorage

mkdir qmlTest2.app/Contents/PlugIns/QtQuick.2
cp /Users/yyyy/Qt5.1.0RC1/5.1.0-rc1/clang_64/qml/QtQuick.2/libqtquick2plugin.dylib qmlTest2.app/Contents/PlugIns/QtQuick.2
cp /Users/yyyy/Qt5.1.0RC1/5.1.0-rc1/clang_64/qml/QtQuick.2/plugins.qmltypes qmlTest2.app/Contents/PlugIns/QtQuick.2
cp /Users/yyyy/Qt5.1.0RC1/5.1.0-rc1/clang_64/qml/QtQuick.2/qmldir qmlTest2.app/Contents/PlugIns/QtQuick.2

#**********call macdeployqt***************
macdeployqt /Users/Qt/program/experiment_apps_and_libs/qmlTest2/qmlTest2.app -verbose=3

I run otool -L on every plugins I added, all of them become relative path after macdeployqt

When I run the program by lldb, it always give me the error messages

**file:///Users/Qt/program/experiment_apps_and_libs/qmlTest2/main.qml:23:1: module “QtQuick” is not installed import QtQuick 2.1 **

I am stuck staring at a blank white screen with no information on what I am doing wrong. No document, current document is almost useless because the bugs of macdeploy haven't fixed since Qt5.0.1, and I have no idea when they would fix it(maybe never get fixed). no information telling me which dylib I need.It is highly frustrating! Anybody know how to deploy QtQuick2 apps on mac os x?

If this keep going, maybe I better keep on using QWidget, atleast I don't have to suffer the deployment trouble again. I am pretty surprise they spend a lot of times to develop QtQuick2 but do not release a useful document to teach us how could we deploy the apps on their targeted platforms.

László Papp
  • 51,870
  • 39
  • 111
  • 135
StereoMatching
  • 4,971
  • 6
  • 38
  • 70

1 Answers1

0

Check out this answer. Thanks for miks131, MaximAlien and lasconic.

Remember to enter a correct qmldir, else the macdeploy would not copy the QtQuick2 and QtQuick folder into the bundle

work around

Community
  • 1
  • 1
StereoMatching
  • 4,971
  • 6
  • 38
  • 70