[SOLVED] Mac deployment Qt Quick 2.0 Qt 5.3.1
-
Has anyone created a successful bundle for a Qt Quick 2.0 app for Qt5.3.1?
I have scoured the web looking for a working script and I still am getting 'QtQuick is not installed' error messages after running macdeployqt with the location of the qml dir's pointing to my app's qml folders, i.e.
/Users/user/Qt5.3.1/5.3/clang_64/bin/macdeployqt myapp.app -verbose=1
-qmldir=/Users/user/Documents/vcpp/qtquick/myapp
-qmldir=/Users/user/Documents/vcpp/qtquick/myapp/controls -
Hi,
I've created the app to prepare your application which you can send it to App Store. To get this application use "link":http://www.dshav.com/apps/QtAppMacDeploy.dmg.
P.S. If you find some issues let me now. I've tried to fix it.
P.S.S. To send your app to App Store you can use the App Loader from official "Apple Developer site":https://itunesconnect.apple.com/apploader/ApplicationLoader_3.0.dmg. -
Hi Shav: Awesome. Some usage questions:
- Are the Mac Certs required just to make the package.
- What is the entitlements path?
- What is the application path? Is it the app folder? e.g. myapp.app
- The QML path, is the path in my app or the path to Qt's QML folders?
- What is the install path? Is it where I want the output of the your tool to be placed?
Thanks.
-
Hi gbgsoft
-
Mac Certs need to use codesign tool. This tool need to use if you want submit your app to App Store. Also this tool helped you remove message dialog about secure. This dialog you can see when try to open application which downloads from websites not from App Store.
-
The entitlements plist is a manifest from Android (if you understand me). For more information please look "here":https://developer.apple.com/library/mac/documentation/Miscellaneous/Reference/EntitlementKeyReference/Chapters/EnablingAppSandbox.html#//apple_ref/doc/uid/TP40011195-CH4-SW1. Also you may need to "Info.plist keys":https://developer.apple.com/library/ios/documentation/general/Reference/InfoPlistKeyReference/Articles/AboutInformationPropertyListFiles.html#//apple_ref/doc/uid/TP40009254-SW4.
-
Application path is a full path to you Application.app (in you case is myapp.app).
-
QML path is a path to QML folder with you app QML files which you use in your app.
-
You mean Qt Install Folder? If this is true this folder is a folder where you install your version of Qt. But you must select it something like this:
@
/Volumes/Documents/Applications/Qt/Qt5.3.2/5.3/clang_64
@
don't select bin folder because application append it itself.
-
-
Hi Shav: I'm having some problems running the tool.
The picker buttons that invoke the path searches, eg QML path will not permit me to select folders. When I click on the desired folder, the 'Open' button remains disabled as do all the files in the display.
The Qt install Folder control will only select the topmost Qt folder and not the clang_64 folder as your example shows.
The app crashes in several spots, usual when return from a file open dialog, or when invoking it. This has happened from several different spots in the dialog.
But the biggest problem is that where I want to select a folder, I cannot do so.
-
Hi gbgsoft,
I've checked the application and fixed the bug with open QML folder. Also I've added a new flag which give you to create the shell script after first deploy. It will help to you when you will send the next build of app. But when you use the script don't change any paths (QML, Qt Install, your Application, Entitlements.plist, etc.)
The last version you can find "here":http://www.dshav.com/apps/QtAppMacDeploy.dmg.
P.S. I don't see any crashes when using open folder dialog. Could you send to me crash report by mail thanks.
-
Hi Shav: I download the upgrade which said that it included the source, but in inspecting the dmg and the package, I couldn't find the source. Where would that be located?
I ran the upgraded from and it crashed when I tried to select on of the paths (I forget which one), so I'd like to build the program from source and try to see what's happening. Alternatively, is there a git repository for the project. Thanks
-
Hi gbgsoft,
Sorry I've forgot add the sources to DMG file when upload a new version of project. Please re-download the DMG file. Also you can use the repos from "github":https://github.com/dshav/qtappmacdeploy.
P.S. Thanks for the crash report. I'll check it.
-
Hi Shav: I have cloned and built the project. As shown,
!http://www.gbgsoft.com/downloads/screen.png(Screen Shot)!
But the app just continues to run an run and never generates a script.
I have made up values for the 2 certs and the entitlements path. Not sure if I understand the entitlements purpose, so this is probably wrong.Is there something here that you can see that's amiss?
(Project built on the first go, you got to love git).
-
Hi gbgsoft,
For now you need to set real certificates because application used them to add codesign to your app and all plugins/libs/frameworks. This needs to open application as certificated on another Mac.
Now I trying implement code to remove this requirements (certivicates). Give me a few time and I commit the new version. Thanks for you help to create this app :-)
-
Hi Shav. Used the new build and found a couple of issues. The function getQtFolder() was not returning the correct folder, which I corrected as per below:
QString QmdSettings::getQtFolder()
{
m_qtFolder =getenv("QTDIR");
return m_qtFolder;
}Once corrected the app ran through to completion. Here are the scripts it generated:
"/Users/user/Qt5.3.1/5.3/clang_64/bin/macdeployqt" ("/Users/user/Documents/vcpp/qtquick/build-canvas_eagles-Desktop_Qt_5_3_clang_64bit-Release/canvas_eagles.app", "-verbose=1", "-qmldir=/Users/user/Documents/vcpp/qtquick/canvas_eagles", "-executable=/Users/user/Documents/vcpp/qtquick/build-canvas_eagles-Desktop_Qt_5_3_clang_64bit-Release/canvas_eagles.app/Contents/MacOS/canvas_eagles")
"rm" ("-rf", "/Users/user/Documents/vcpp/qtquick/build-canvas_eagles-Desktop_Qt_5_3_clang_64bit-Release/canvas_eagles.app/Contents/Resources/qml/com")
"ls" ("-al", "/Users/user/Documents/vcpp/qtquick/build-canvas_eagles-Desktop_Qt_5_3_clang_64bit-Release/canvas_eagles.app/Contents/Frameworks/")
"chmod" ("+x", "/Users/user/Documents/vcpp/qtquick/build-canvas_eagles-Desktop_Qt_5_3_clang_64bit-Release/script.sh")
"sh" ("/Users/user/Documents/vcpp/qtquick/build-canvas_eagles-Desktop_Qt_5_3_clang_64bit-Release/script.sh")
"rm" ("-rf", "/Users/user/Documents/vcpp/qtquick/build-canvas_eagles-Desktop_Qt_5_3_clang_64bit-Release/script.sh")
My app when run reports that it is unable to locate the several files, so obvisously the qmldir param in the first script is wrong. In your app, I pointed to the folder containing main.qml, but there are other folders containing qml files. What should those -qmldir parameters look like?
Application output from my app.
rc:///main.qml:4 module "QtQuick.Controls" is not installed
qrc:///main.qml:5 module "QtQuick.Window" is not installed
qrc:///main.qml:6 module "QtQuick.Controls.Styles" is not installed
qrc:///main.qml:3 module "QtQuick" is not installed
qrc:///main.qml:4 module "QtQuick.Controls" is not installed
qrc:///main.qml:5 module "QtQuick.Window" is not installed
qrc:///main.qml:6 module "QtQuick.Controls.Styles" is not installed
qrc:///main.qml:3 module "QtQuick" is not installed
qrc:///main.qml:4 module "QtQuick.Controls" is not installed
qrc:///main.qml:5 module "QtQuick.Window" is not installed
qrc:///main.qml:6 module "QtQuick.Controls.Styles" is not installed -
Hi gbgsoft,
Function getenv(“QTDIR”) works only when you build your app in debug/release mode. But if you close app and try to load your app as user (not from QtCreator) you can't get result of call getenv(“QTDIR”).
About issues:
-
Why in your script all commands have the symbol (")? In my code I didn't see this symbol in command name. The script must looks like this:
@
/Volumes/Documents/Applications/Qt/Qt5.3.2/5.3/clang_64/bin/macdeployqt /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/QtAppMacDeploy.app -verbose=1 -executable=/Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/QtAppMacDeploy.app/Contents/MacOS/QtAppMacDeploy
rm -rf /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/QtAppMacDeploy.app/Contents/Resources/qml/com
cp /Volumes/Documents/Applications/Qt/Qt5.3.2/5.3/clang_64/lib/QtCore.framework/Contents/Info.plist /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/QtAppMacDeploy.app/Contents/Frameworks/QtCore.framework/Resources
cp /Volumes/Documents/Applications/Qt/Qt5.3.2/5.3/clang_64/lib/QtGui.framework/Contents/Info.plist /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/QtAppMacDeploy.app/Contents/Frameworks/QtGui.framework/Resources
cp /Volumes/Documents/Applications/Qt/Qt5.3.2/5.3/clang_64/lib/QtNetwork.framework/Contents/Info.plist /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/QtAppMacDeploy.app/Contents/Frameworks/QtNetwork.framework/Resources
cp /Volumes/Documents/Applications/Qt/Qt5.3.2/5.3/clang_64/lib/QtPrintSupport.framework/Contents/Info.plist /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/QtAppMacDeploy.app/Contents/Frameworks/QtPrintSupport.framework/Resources
cp /Volumes/Documents/Applications/Qt/Qt5.3.2/5.3/clang_64/lib/QtQml.framework/Contents/Info.plist /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/QtAppMacDeploy.app/Contents/Frameworks/QtQml.framework/Resources
cp /Volumes/Documents/Applications/Qt/Qt5.3.2/5.3/clang_64/lib/QtQuick.framework/Contents/Info.plist /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/QtAppMacDeploy.app/Contents/Frameworks/QtQuick.framework/Resources
cp /Volumes/Documents/Applications/Qt/Qt5.3.2/5.3/clang_64/lib/QtWidgets.framework/Contents/Info.plist /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/QtAppMacDeploy.app/Contents/Frameworks/QtWidgets.framework/Resources
dsymutil /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/QtAppMacDeploy.app/Contents/MacOS/QtAppMacDeploy -o /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/QtAppMacDeploy.app/../QtAppMacDeploy.app.dSYM
@ -
You must select root folder of all your QML files. More information "here":http://qt-project.org/doc/qt-5/macosx-deployment.html#macdeploy.
P.S. Also I've found critical bug with app. When I added the codesing to app with my certificate the application can't run subprocess (and all functions doesn't work) for now I don't know how fix this bug. I need more time to research some solution for this.
-
-
Hi Shav - I think the extra symbol (") came as a result of me just copying the qDebug() output.
My folder was the root one of the app.
WRT the QtDir, I note your answer, but in the original form it was pulling my applications root folder, not Qt's.
Let me know when you've got a new build, I'll pull your changes from git and give it another whirl.
Thanks for your support. It is appreciated.
-
Holy crap, shav, you made my day !
I was experiencing the macdeployqt problem and was googling for a solution and found this thread.
Download your source, used it and my app now works on a non-Qt Mac !THANK YOU !!!!
Nils