hi,
I have a little add on for the pro file:
this code can be added after :
RESOURCES += #resources.qrc # uncomment for publishing
contains( RESOURCES, "resources.qrc" ) {
DEFINES += "VPLAY_BUILD_RELEASE"
}
then in main.cpp
#ifndef VPLAY_BUILD_RELEASE
qDebug() << "LOAD qml from external qml dir";
vplay.setMainQmlFileName(QStringLiteral("qml/Main.qml"));
#endif
// use this instead of the above call to avoid deployment of the qml files and compile them into the binary with qt's resource system qrc
// this is the preferred deployment option for publishing games to the app stores, because then your qml files and js files are protected
// to avoid deployment of your qml files and images, also comment the DEPLOYMENTFOLDERS command in the .pro file
// also see the .pro file for more details
#if VPLAY_BUILD_RELEASE
qDebug() << "LOAD qml from RESOURCE.RC";
vplay.setMainQmlFileName(QStringLiteral("qrc:/qml/Main.qml"));
#endif
so the process is automated when loading qml files from resource or from qml files.
maybe it can be automated even further, but i thought this could be handy
gr,
Bas