Unsolved Qt for WebAssembly Tech Preview how to get?
-
here: https://www.phoronix.com/scan.php?page=news_item&px=Qt-WASM-Tech-Preview-Beta
its said that it will be part of the 5.11.0 release, but after installing said release on my Ubuntu machine, I cant find t?Is it available some ware for download or do i need to build it from source like described here: https://wiki.qt.io/Qt_for_WebAssembly
Cheers
David X.[Edit aha_1980: fixed small typos]
-
Hi David,
building it from source like described in the Wiki is pretty much straight forward. It took me ~2 hours to get a first QML project work. Don't forget to install Emscripten.
Cheers,
Martin -
I downloaded the tar.xz file with the archive, when i run the configuration command as described in the wiki get
ERROR: Unknown command line option '-no-thread'So do i need to get the sources from git instead?
btw: the wiki article says something about a download section in my account but I don't see one just profile and that's it.I downloaded the 3 repos linkd in the viki and took the rest of the ources from the tar.xz file, but when i run configure i get
ERROR: Unknown command line option '-xplatform'. -
David,
you have to clone the git-repositories like stated in the wiki.
Martin
-
Only the 3 or all of them and if all of them where can i find an exhaustive list?
-
Only the 3.
In the directory of your choice:
git clone -b wip/webassembly https://code.qt.io/qt/qtbase.git git clone -b wip/webassembly https://code.qt.io/qt/qtdeclarative.git git clone -b wip/webassembly https://code.qt.io/qt/qtwebsockets.git
Then in ./qtbase:
./configure -xplatform emscripten -developer-build -release -static -no-thread -nomake tests -nomake examples -no-dbus -no-headersclean -system-libpng -no-ssl -no-warnings-are-errors make -j4 (or whatever number of CPUs you want to incorporate).
Before install "emscripten" as described here:
https://kripken.github.io/emscripten-site/docs/getting_started/downloads.htmlBe sure you have the emscripten tools in your PATH before building Qt.
-
You can either grab the source with git according to the Qt WebAssembly wiki, or download the package here:
https://download.qt.io/development_releases/qt/qtwebassembly-for-5.11-tp/
-
@matze42 I did exactlywhat you say, but when I run ./configure it doesn't access or use the qtdeclarative and qtwebsockets directories for the build.
And using @lorn-potter method I get "Checking for target architecture... Project ERROR: target architecture detection binary not found."
I'm using Xubuntu 18.04 64 bits version -
You probably have emscripten version greater than 1.38.
If you have 1.38 and want to compile the tech preview package, you need this patch:
https://codereview.qt-project.org/#/c/230230/2//ALL,unifiedIf you are using git repos, you will need to run qmake for qtdeclarative and qtwebsockets manually
-
Thanks @lorn-potter. It works as a charm
-
@lorn.potter I have emscripten 1.38.12 , I want to compile the latest base 5.12, I cloned the three modules mentioned .. I can run ./qtbase/configure ... my problem is "How to run qmake separately for the other modules .. I am almost ignorant in this! by guess, compile them as normal project by running ~/qtbase/qmake/qmake qtdeclarative.pro , am I write?
-
@Mohammad-Kanan
For other modules just make sure that the qmake from that build is in your path (as well as the emscripten compiler), and then run qmake as normal.WebAssembly support is now in the 5.12 branch of QtDeclarative (as of today), so if you use QtBase 5.12 branch, then use that as well.
There are changes in the 5.12 like filedialog is not currently enabled, but we will open them back up soon.
Other modules like QtCharts, QtQuickcontrols can be used with just the 5.12 branch. -
@lorn.potter , Thanks so much for your fast response. regarding: "WebAssembly support is now in the 5.12 branch of QtDeclarative (as of today), so if you use QtBase 5.12 branch, then use that as well."
, I am currently downloading the three modules as mentioned in the Qt for WebAssembly wiki (i.e I don't use anything from WebAssembly 5.11-tp), I assume all downloads in the wiki are QtBase 5.12 and no further download or git updates needed?