From cd2e164b7d7ef07c5d5bff1605406e16ad4845f8 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Wed, 1 Sep 2021 16:43:31 +0200 Subject: [PATCH] WebAssembly: Append EMSDK_PYTHON to environment PATH The wrapper scripts of emscripten 1.39.8 (required version for Qt 5.15) do not actively use the python interpreter which -at least on Windows- is found under EMSDK_PYTHON. This change appends the parent path of EMSDK_PYTHON to the environment's PATH to make wrapper scripts (e.g. emcc.bat) work. Fixes: QTCREATORBUG-26199 Change-Id: Icbc89f6d930f1c5ac5e4e6ac919383cfdd1b913b Reviewed-by: Cristian Adam --- src/plugins/webassembly/webassemblyemsdk.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/webassembly/webassemblyemsdk.cpp b/src/plugins/webassembly/webassemblyemsdk.cpp index 1fd109514f0..dc78de158d0 100644 --- a/src/plugins/webassembly/webassemblyemsdk.cpp +++ b/src/plugins/webassembly/webassemblyemsdk.cpp @@ -85,6 +85,11 @@ static void parseEmSdkEnvOutputAndAddToEnv(const QString &output, Environment &e continue; } } + + // QTCREATORBUG-26199: Wrapper scripts (e.g. emcc.bat) of older emsdks might not find python + const QString emsdkPython = env.value("EMSDK_PYTHON"); + if (!emsdkPython.isEmpty()) + env.appendOrSetPath(FilePath::fromUserInput(emsdkPython).parentDir().toUserOutput()); } bool WebAssemblyEmSdk::isValid(const FilePath &sdkRoot)