diff --git a/devtools/client/webide/modules/simulator-process.js b/devtools/client/webide/modules/simulator-process.js index 7884a45a58d9..a8151e681432 100644 --- a/devtools/client/webide/modules/simulator-process.js +++ b/devtools/client/webide/modules/simulator-process.js @@ -154,6 +154,13 @@ SimulatorProcess.prototype = { // Ignore eventual zombie instances of b2g that are left over. args.push("-no-remote"); + // If we are running a simulator based on Mulet, + // we have to override the default chrome URL + // in order to prevent the Browser UI to appear. + if (this.b2gBinary.leafName.includes("firefox")) { + args.push("-chrome", "chrome://b2g/content/shell.html"); + } + return args; }, }; @@ -215,6 +222,19 @@ Object.defineProperty(ASPp, "b2gBinary", { }; binaries[OS].split("/").forEach(node => file.append(node)); } + // If the binary doesn't exists, it may be because of a simulator + // based on mulet, which has a different binary name. + if (!file.exists()) { + file = this.addon.getResourceURI().QueryInterface(Ci.nsIFileURL).file; + file.append("firefox"); + let binaries = { + win32: "firefox-bin.exe", + mac64: "B2G.app/Contents/MacOS/firefox-bin", + linux32: "firefox-bin", + linux64: "firefox-bin", + }; + binaries[OS].split("/").forEach(node => file.append(node)); + } return file; } });