2012-10-02

r2d2b2g implementation details

Over at Mozilla Hacks, I just blogged about r2d2b2g (ratta-datta-batta-ga), an experimental prototype test environment for Firefox OS that makes it drop-dead simple to test your app in B2G Desktop.

r2d2b2g is an addon, but it bundles B2G Desktop nightly builds, which are native executables, and thus the addon is platform-specific, with packages available for Mac, Linux 32-bit, and Windows (caveat: B2G Desktop for Windows currently crashes on startup due to bug 794662 795484).

The packages are large, 50-60MB each, partly because of the executables, but mostly because they also bundle Gaia profiles, including all default apps. (It's probably worth bundling a few of these, for demonstration purposes, but we could make the packages much smaller by removing the rest.)

r2d2b2g uses the Add-on SDK as its addon framework and relies on several third-party addon modules (subprocess, menuitems) along with some Python utilities (mozdownload, mozbase) to download and unpack B2G Desktop builds. Plus Gaia, although recent work to bundle Gaia profiles with B2G Desktop builds may break that dependency.

I've demoed the project to a variety of folks over the last couple weeks, and I've received a bunch of positive feedback about it. B2G Desktop combines approachability with phoneliness and is the best existing test environment for Firefox OS. But its configuration is a challenge, and it provides no obvious affordances for installing and testing your own app. r2d2b2g shows that these problems are tractable (even if it doesn't yet solve them all) and demonstrates a promising product path.

After seeing r2d2b2g, Kevin Dangoor drafted a PRD for a Firefox OS Simulator that I'll use to guide further development. Interested in participating? Clone the code from its GitHub repository and contribute your improvements!

5 comments:

Caspy7 said...

Excellent!
I read this on planet.mozilla.org. Would you mind adding another post when windows is fixed? I would love to try this out.

Myk Melez said...

Caspy7: yes, I'll blog again when Windows works!

Vidhuran Harichandra Babu said...

Is there any particular addition setup to be performed ( especially for Windows ) apart from the ones mentioned in Github Readme ?

Vidhuran Harichandra Babu said...

Is there any special setup needed for building on Windows except for the steps mentioned in Github Readme ?

Myk Melez said...

Vidhuran: you should first download and install MozillaBuild, which gives you a Mozilla-centric development environment that makes it easier to build on Windows!

https://wiki.mozilla.org/MozillaBuild