Simulator (from m-c) uses wrong binary path on Mac

RESOLVED FIXED in Firefox 30

Status

defect
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: jryans, Assigned: jryans)

Tracking

unspecified
1.4 S6 (25apr)
x86
macOS
Dependency tree / graph

Firefox Tracking Flags

(firefox30 fixed, firefox31 fixed, b2g-v1.4 fixed, b2g-v2.0 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

I tested out building the simulator from m-c today, and it (almost) works great!

The path to b2g is however not correct for Mac.
This fixes it for me.

It's possible I just built it wrong... I did the following:

1. Added FXOS_SIMULATOR=1 and GAIADIR to my b2g desktop mozconfig
2. Ran mach configure && mach package
Attachment #8396024 - Flags: review?(poirot.alex)
Comment on attachment 8396024 [details] [diff] [review]
Fix Simulator path to b2g on Mac

Review of attachment 8396024 [details] [diff] [review]:
-----------------------------------------------------------------

Oh! That's not the only thing. We are also shipping the b2g desktop profile.
While you are at fixing Mac, could you also blacklist it here:
  http://mxr.mozilla.org/mozilla-central/source/b2g/simulator/build_xpi.py#134
It should be something like:
  add_dir_to_zip(xpi_path, os.path.join(distdir, "b2g"), "b2g", ("gaia", "B2G.app/Contents/MacOS/gaia")

Otherwise, I don't know about you, but it seems to crash on Mac, even with this fix.
It may be due to the fact that the mac I have do not have any battery and gaia shutdown...
Attachment #8396024 - Flags: review?(poirot.alex) → review+
(In reply to Alexandre Poirot (:ochameau) from comment #2)
> Comment on attachment 8396024 [details] [diff] [review]
> Fix Simulator path to b2g on Mac
> 
> Review of attachment 8396024 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Oh! That's not the only thing. We are also shipping the b2g desktop profile.
> While you are at fixing Mac, could you also blacklist it here:
>  
> http://mxr.mozilla.org/mozilla-central/source/b2g/simulator/build_xpi.py#134
> It should be something like:
>   add_dir_to_zip(xpi_path, os.path.join(distdir, "b2g"), "b2g", ("gaia",
> "B2G.app/Contents/MacOS/gaia")
> 
> Otherwise, I don't know about you, but it seems to crash on Mac, even with
> this fix.
> It may be due to the fact that the mac I have do not have any battery and
> gaia shutdown...

Looks like you are using "os.walk", which visits all subdirectories in the tree.  My current XPI did not have the "gaia" directory under b2g, so I think it is fine as-is.

Not too sure about the crashes you are seeing... still works fine here!
On mac instead of having a gaia profile in $(distdir)/b2g, it looks like you have one in $(distdir)/b2g/B2G.app/Contents/MacOS/. That ends up in the xpi at following path: B2G.app/Contents/MacOS/gaia/profile.
At least, that's what I've seen in my last try run from bug 920198.
Okay, well, at least now I am seeing what you are...  I now have "b2g-bin", like other platforms, and I am stripping the extra gaia profile.

I also see the issue of no window appearing at all.  Maybe we should tackle that as a separate issue.  It definitely appears to start up from the console output... but there's no UI... :/

Try: https://tbpl.mozilla.org/?tree=Try&rev=8e2c3bda3d2e
Attachment #8396024 - Attachment is obsolete: true
Attachment #8397187 - Flags: review+
Yes, let handle that in another patch, it may also fail on b2g desktop.
Okay, try builds here are looking good.  I'll file another bug for the missing window issue.
Keywords: checkin-needed
Summary: Simulator (from m-c) doesn't start on Mac → Simulator (from m-c) uses wrong binary path on Mac
https://hg.mozilla.org/mozilla-central/rev/6f3923ed6a4d
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → 1.4 S4 (28mar)
Comment on attachment 8397187 [details] [diff] [review]
Fix Simulator path to b2g on Mac (v2, ochameau: r+)

See bug 976773 comment 30.
We would like to build 1.4 simulators and need to uplift mostly desktop-specific patches.

This patch modify only desktop codepath.
Attachment #8397187 - Flags: approval-mozilla-aurora?
Attachment #8397187 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.