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 <cristian.adam@qt.io>
This commit is contained in:
Alessandro Portale
2021-09-01 16:43:31 +02:00
parent 8db873a8c3
commit cd2e164b7d

View File

@@ -85,6 +85,11 @@ static void parseEmSdkEnvOutputAndAddToEnv(const QString &output, Environment &e
continue; 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) bool WebAssemblyEmSdk::isValid(const FilePath &sdkRoot)