How should I deploy an application that uses Qt.labs.particles?
-
wrote on 10 Nov 2010, 10:06 last edited by
Hi,
I'm trying to develop a simple game based on QML and I stumbled into a problem with application deployment. I managed to supply all necessary DLLs (QtCore, mingw, etc.) and imageformats plugins (qsvg4.dll) but I do not understand how to show my application qmlparticles.dll file which is responsible for QML Particles Element.
At the moment I've tried:
- Placing it into executable directory with/without provided 'qmldir' file
- Placing it into executable directory under imports/Qt/labs/qmlparticles.dll
- Adding qmldir and qmlparticles plugin into game resources (because all qml files are in the resource system)
... and some other combinations too
None of it worked. How should it be done correctly?
Thanks for your replies in advance.
-
wrote on 10 Nov 2010, 12:16 last edited by
I think both the plugin and the qmldir file should be under the imports/Qt/labs/particles directory.
This is how it works in Linux, and I guess it's the same for Windows.
-
wrote on 10 Nov 2010, 12:37 last edited by
Should this directory be in executable folder? Or in resources? I tried both variants -- neither worked, may be I miss something.
-
wrote on 10 Nov 2010, 12:52 last edited by
The paths are specified by the QDeclarativeEngine. You can check the current path with QDeclarativeEngine::importPathList(), or add more with QDeclarativeEngine::addImportPath().
In Linux, the default import paths are the current folder and "/usr/lib/qt4/imports". But the particles are registered as "Qt.labs.particles", so the system could find them at:
./Qt/labs/paticles
or
/usr/lib/qt4/imports/Qt/labs/paticlesYou can find more details by reading the doc for QDeclarativeExtensionPlugin.
-
wrote on 10 Nov 2010, 13:07 last edited by
Thanks a lot, it works. It was one of the variants of directory structure which I missed.
1/5