Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Setting up WebAssembly 5.14.0 ( Qt Maintenance Tool ) with QBS+QtCreator



  • 531c8f1d-2379-42cd-8730-1135c61cb5cf-image.png
    I have this installed.

    73545cb0-0327-481a-abba-5c884a85fadc-image.png
    And I grabbed the latest em++ via the emsdk, because the documentation does not say which version I should use for 5.14.0

    I have no idea where to go from here however, because:
    fde675c1-dc01-4f2b-8a83-162bdbf1acde-image.png

    I don't work very often with QMake and make systems in general, and this all is frankly my weakest point in programming. I do however like QBS, and so I have decided to use this to manage my project
    a3f2469f-bbb4-40e1-a86d-ac8ef4e6e0d2-image.png
    If I could get some help to configure it so I can at least start generating

    • appname.wasm Main application binary
    • appname.js Emscripten JavaScript runtime
    • appname.html Html container
    • qtloader.js Qt JavaScript runtime

    That would help. Thanks.



  • Qbs is not supported for webassembly at this time.

    That said, take a look at src/mkspecs/features/wasm/wasm.prf
    Those files are not generated, but copied, with qtloader.js also having a text substitution
    s/@APPNAME@/$$TARGET_BASE/g



  • I realize QBS is not supported, but what you can do, is use the project build settings like so:
    ca5ad0e8-9b59-4a7f-b3e4-653963744853-image.png
    Thus if I can create a series of build steps here, then I can use QBS to build and run my project, and hopefully use that to create a tutorial.

    I am looking at the .prf file you showed me; How should I utilize this? By copying its structure, or by running I am assuming QMake on it?
    Thanks



  • For those wondering, I got it set up like this:

    dcc337b5-877c-4e46-8b9a-8bf2e8db189b-image.png

    You have to manually copy the environment variables set when you run

    source ./emsdk_env.sh
    

    in the shell. I did not know that source was a shell builtin


Log in to reply