Hi
I was wondering why the following is in every pro file in the examples:
# NOTE: for PUBLISHING, perform the following steps:
# 1. comment the DEPLOYMENTFOLDERS += qmlFolder line above, to avoid shipping your qml files with the application (instead they get compiled to the app binary)
# 2. uncomment the resources.qrc file inclusion and add any qml subfolders to the .qrc file; this compiles your qml files and js files to the app binary and protects your source code
# 3. change the setMainQmlFile() call in main.cpp to the one starting with "qrc:/" - this loads the qml files from the resources
# for more details see the "Deployment Guides" in the Felgo Documentation
It’s a bit hacky and won’t include the qrc in the tree fi. Something like:
CONFIG(debug, debug|release) {
DEPLOYMENTFOLDERS += qmlFolder
}
CONFIG(release, debug|release) {
RESOURCES += resources.qrc
}
would be better I reckon as I think that’s the main point of having a debug and release build.
In the main.cpp file something like the following could work:
#ifdef QT_DEBUG
vplay.setMainQmlFileName(QStringLiteral("qml/Main.qml"));
#else
vplay.setMainQmlFileName(QStringLiteral("qrc:/qml/Main.qml"));
#endif