Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!


OverviewFelgo 2 Support (Qt 5) › Examples project files

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #9720



    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



    Felgo Team

    Hi Sam,

    the qrc approach is the last step when publishing a game and not the ideal workflow during development. The main advantage you get by using the qrc approach, is that you can protect your QML source code.

    So you might test performance in release builds and still not use the qrc approach. Or not use qrc in release builds because especially when not using shadow builds the workflow is much faster (because you can just perform a re-run of the appliation without compiling it).

    The third reason why we decided against the autamitc switching as you suggested is this: When you add a new folder in your project tree, you manually need to add this folder to the resources file. As your app would not start if you forget this step, this is a manual process you usually do when your app is ready for publishing and thus the better user experience is to use the DEPLOYMENTFOLDERS approach during development.

    Cheers, Chris

Viewing 2 posts - 1 through 2 (of 2 total)

RSS feed for this thread

You must be logged in to reply to this topic.