Bug 987411 - Fix Simulator path to b2g on Mac. r=ochameau, a=bajaj
authorJ. Ryan Stinnett <jryans@gmail.com>
Thu, 27 Mar 2014 11:40:25 -0400
changeset 192983 f9793983f4f5f601f1ddaebad99157515cc3ddb4
parent 192982 7904ad4a140fb9416c8c4029f48e10cfee114dc5
child 192984 000d5762273c47d7039cb0886dbe2186205185a7
push id474
push userasasaki@mozilla.com
push dateMon, 02 Jun 2014 21:01:02 +0000
treeherdermozilla-release@967f4cf1b31c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersochameau, bajaj
bugs987411
milestone30.0a2
Bug 987411 - Fix Simulator path to b2g on Mac. r=ochameau, a=bajaj
b2g/simulator/build_xpi.py
b2g/simulator/lib/simulator-process.js
--- a/b2g/simulator/build_xpi.py
+++ b/b2g/simulator/build_xpi.py
@@ -126,17 +126,17 @@ def main(platform):
       "--strip-sdk", \
       "--update-link", update_link, \
       "--update-url", update_url, \
       "--static-args", "{\"label\": \"Firefox OS %s\"}" % version, \
       "--output-file", xpi_path \
     ])
 
     # Ship b2g-desktop, but prevent its gaia profile to be shipped in the xpi
-    add_dir_to_zip(xpi_path, os.path.join(distdir, "b2g"), "b2g", ("gaia"))
+    add_dir_to_zip(xpi_path, os.path.join(distdir, "b2g"), "b2g", ("gaia", "B2G.app/Contents/MacOS/gaia"))
     # Then ship our own gaia profile
     add_dir_to_zip(xpi_path, os.path.join(gaia_path, "profile"), "profile")
 
 if __name__ == '__main__':
     if 2 != len(sys.argv):
         print("""Usage:
   python {0} MOZ_PKG_PLATFORM
 """.format(sys.argv[0]))
--- a/b2g/simulator/lib/simulator-process.js
+++ b/b2g/simulator/lib/simulator-process.js
@@ -136,17 +136,17 @@ exports.SimulatorProcess = Class({
 
   // compute current b2g file handle
   get b2gExecutable() {
     if (this._executable) return this._executable;
 
     let bin = URL.toFilename(BIN_URL);
     let executables = {
       WINNT: "b2g-bin.exe",
-      Darwin: "Contents/MacOS/b2g-bin",
+      Darwin: "B2G.app/Contents/MacOS/b2g-bin",
       Linux: "b2g-bin",
     };
 
     console.log("bin url: "+bin+"/"+executables[Runtime.OS]);
     let path = bin + "/" + executables[Runtime.OS];
 
     let executable = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
     executable.initWithPath(path);