forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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.
|
// 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
|
// 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.
|
// right python (not part of emsdk). The shell script stays attached to the server process.
|
||||||
const FilePath interpreter = bc->environment().searchInPath(
|
const FilePath interpreter = HostOsInfo::isWindowsHost()
|
||||||
QLatin1String(HostOsInfo::isWindowsHost() ? "python" : "sh"));
|
? FilePath::fromUserInput(bc->environment().value("EMSDK_PYTHON"))
|
||||||
|
: bc->environment().searchInPath("sh");
|
||||||
const QString emrunLaunchScript = HostOsInfo::isWindowsHost()
|
const QString emrunLaunchScript = HostOsInfo::isWindowsHost()
|
||||||
? emrun.absolutePath() + "/" + emrun.baseName() + ".py"
|
? emrun.absolutePath() + "/" + emrun.baseName() + ".py"
|
||||||
: emrun.absoluteFilePath();
|
: emrun.absoluteFilePath();
|
||||||
|
Reference in New Issue
Block a user