forked from qt-creator/qt-creator
WebAssembly: fix crashes
Change-Id: I9a2a44c85a254628f119eb041036492bc3022cdf Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -42,17 +42,19 @@ namespace Internal {
|
||||
|
||||
static CommandLine emrunCommand(Target *target, const QString &browser, const QString &port)
|
||||
{
|
||||
BuildConfiguration *bc = target->activeBuildConfiguration();
|
||||
const QFileInfo emrunScript = bc->environment().searchInPath("emrun").toFileInfo();
|
||||
auto html = bc->buildDirectory().pathAppended(target->project()->displayName() + ".html");
|
||||
if (BuildConfiguration *bc = target->activeBuildConfiguration()) {
|
||||
const QFileInfo emrunScript = bc->environment().searchInPath("emrun").toFileInfo();
|
||||
auto html = bc->buildDirectory().pathAppended(target->project()->displayName() + ".html");
|
||||
|
||||
return CommandLine(bc->environment().searchInPath("python"), {
|
||||
emrunScript.absolutePath() + "/" + emrunScript.baseName() + ".py",
|
||||
"--browser", browser,
|
||||
"--port", port,
|
||||
"--no_emrun_detect",
|
||||
html.toString()
|
||||
});
|
||||
return CommandLine(bc->environment().searchInPath("python"), {
|
||||
emrunScript.absolutePath() + "/" + emrunScript.baseName() + ".py",
|
||||
"--browser", browser,
|
||||
"--port", port,
|
||||
"--no_emrun_detect",
|
||||
html.toString()
|
||||
});
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
// Runs a webassembly application via emscripten's "emrun" tool
|
||||
|
||||
Reference in New Issue
Block a user