diff options
author | Alessandro Portale <alessandro.portale@qt.io> | 2021-06-30 15:21:04 +0200 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@qt.io> | 2021-07-01 07:02:58 +0000 |
commit | 2bc7f6603c93f9754b5dfe7a86ea0b42ae17f35f (patch) | |
tree | 7226d7a63c2483c656edf23e1634cbac149cef55 | |
parent | afa421887165fc33b100a00ae6908952dc102945 (diff) |
WebAssembly: (Win) Use python.exe from EMSDK_PYTHON instead from Path
This affects Windows only. Instead of searching python.exe in the Path,
use the executable name which is stored in the "EMSDK_PYTHON"
environment variable (which is set by emsdk_env).
emsdk_env also prepends entries to Path, but not the one pointing to the
emsdk-shipped python interpreter. I believe that earlier versions of
emsdk_env used to add the python location to Path, else this is an old
bug.
Fixes: QTCREATORBUG-25897
Change-Id: I9b5bc43f865d19a862f8c6cd45105be54286a549
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
-rw-r--r-- | src/plugins/webassembly/webassemblyrunconfiguration.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/webassembly/webassemblyrunconfiguration.cpp b/src/plugins/webassembly/webassemblyrunconfiguration.cpp index 8bef1249dc..d50c3abc23 100644 --- a/src/plugins/webassembly/webassemblyrunconfiguration.cpp +++ b/src/plugins/webassembly/webassemblyrunconfiguration.cpp @@ -50,8 +50,9 @@ static CommandLine emrunCommand(Target *target, const QString &browser, const QS // that the web server is killed when the application is stopped in Qt Creator. // On Non-windows, we prefer using the shell script, because that knows how to find the // right python (not part of emsdk). The shell script stays attached to the server process. - const FilePath interpreter = bc->environment().searchInPath( - QLatin1String(HostOsInfo::isWindowsHost() ? "python" : "sh")); + const FilePath interpreter = HostOsInfo::isWindowsHost() + ? FilePath::fromUserInput(bc->environment().value("EMSDK_PYTHON")) + : bc->environment().searchInPath("sh"); const QString emrunLaunchScript = HostOsInfo::isWindowsHost() ? emrun.absolutePath() + "/" + emrun.baseName() + ".py" : emrun.absoluteFilePath(); |