Closed Bug 987411 Opened 10 years ago Closed 10 years ago

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

Categories

(Firefox OS Graveyard :: Simulator, defect)

x86
macOS
defect
Not set
normal

Tracking

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

RESOLVED FIXED
1.4 S6 (25apr)
Tracking Status
firefox30 --- fixed
firefox31 --- fixed
b2g-v1.4 --- fixed
b2g-v2.0 --- fixed

People

(Reporter: jryans, Assigned: jryans)

References

Details

Attachments

(1 file, 1 obsolete file)

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.
Attached patch Fix Simulator path to b2g on Mac (obsolete) — Splinter Review
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.
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: 10 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.

Attachment

General

Created:
Updated:
Size: