Commit Graph

4 Commits

Author SHA1 Message Date
hjk
b998ad621b Wasm: Some steps towards making it work on docker
To start using the docker bits the emsdk location has to
be specified manually in the path selector as
docker://<id-of-image>/<path/to/emsdk>

Change-Id: I70c6e7a334762953c3931105b7f697c608523159
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-07-08 10:28:56 +00:00
Alessandro Portale
105d65b19c WebAssembly: Always use system environment to run em++ -dumpversion
On Windows, we would start with a clean environment just with the emsdk
environment added in order to run "em++.bat -dumpversion".

That fails for some emsdk versions for reasons unknown. Let's reduce OS-
specific special casing and instead use the system environment as basis
everywhere.

Change-Id: I143fe6193528390e17ee0a62936ad03d2c5a109e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-03-30 13:59:03 +00:00
Alessandro Portale
dc8edcefba WebAssembly: Fix WebAssemblyPlugin::testEmSdkEnvParsing for non-Windows
The ':' in "c:\" got confused with the paths list separator ':' on
Linux/Mac.

Let's add a non-Windows specific emsdk_env output to be parsed by the
autotest.

Change-Id: I900e13065237bc0d68eca5582b286177e90cc0af
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-24 12:18:06 +00:00
Alessandro Portale
b057ea1ab8 WebAssembly: Revamp Emscripten SDK registration and toolchain handling
Qt Creator's ability to register Emscripten toolchains depended on an
SDK being activated "globally", and on the presence of the ~/.emscripten
file. Qt Creator would parse that file in order to determine the
location of the compiler and the necessary environment variables that
have to be set.

As of recently, the Emscripten SDK does neither activate gobally
anymore, nor is the ~/.emscripten generated. This change here addresses
the new situation in a couple of ways:

- Instead of trying to silently detect everything, add a UI
(IOptionsPageWidget) that lets the user select the Emscripten SDK root.
- Instead of parsing the ~/.emscripten file, parse the output of the
emsdk_env tool to determine the toolchain environment
(ToolChain::addToEnvironment). The parsing is cached. A test for the
parsing is included.
- Instead of registering the underlying clang as compiler, register the
emcc/em++ wrapper scripts, which are (also as of recently) compatible
with Qt Creator's way of determining gcc's predefined macros and built-
in header paths.

One Emscripten SDK is registered globally in Qt Creator. When changing
that, the previous Emscripten toolchains are removed, the new ones are
registered and the kit are "fixed" to use those.

On startup, an InfoBar entry is shown if Qt for Webassembly kits exist
and no Emscripten toolchains are present. That's the case for first-time
use after installing Qt for Webassembly via Qt SDK installer. The
InfoBar entry opens up the IOptionsPageWidget.

Qt 5.15.0 for WebAssembly and Emscripten SDK 1.39.0 are the minimum
supported versions. The new UI will show warnings accordingly.

Task-number: QTCREATORBUG-24811
Fixes: QTCREATORBUG-24822
Fixes: QTCREATORBUG-24814
Fixes: QTCREATORBUG-23741
Fixes: QTCREATORBUG-23561
Fixes: QTCREATORBUG-23160
Fixes: QTCREATORBUG-23126
Change-Id: I017c61586b17e815bb20a90e3f305a6bf705da36
Reviewed-by: hjk <hjk@qt.io>
2020-11-16 07:39:20 +00:00