Make QML executable on Mac (1.0.1)
Using the simplest QML application ever (the helloWord application), I'm just trying to make the executable.
I created a blank application using New Project>Applications>Qt Quick Application
So I get the following folder structure
| |- qtquick2applicationviewer.pri
| |- Headers
| |- Sources
| |- main.cpp
so, from the command line, all I do is
and when I try to launch the application, I get
file:////<path_to_folder>/myApplication/main.qml: File not found
And if I do move the qml file at this location, it works.
here is my .pro file
Add more folders to ship with the application, here
folder_01.source = qml/myApplication
folder_01.target = qml
DEPLOYMENTFOLDERS = folder_01
Additional import path used to resolve QML modules in Creator's code model
The .cpp file which was generated for your project. Feel free to hack it.
SOURCES += main.cpp
Please do not modify the following two lines. Required for deployment.
As you can see, I can not make this application simpler… I guess I'm missing something basic but can't figure out which one.
You can move QML files into a Qt Resource file (qrc), then it will always work. Or run your app from Qt Creator (not command line) and it should also be working.
I will surely look into this Qt Resource file.
I also figured out that to launch the application, I had to run (from the command line) the myApplication inside the myApplication.app/Contents/MacOs folder.
Now I just need to figure out why, if I move that same folder into another Mac computer, it does not work !