Mulet: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
m (Fixed grammar issue)
 
(9 intermediate revisions by 6 users not shown)
Line 1: Line 1:


         |\              /|
         |\              /|
         |\\            //|
         |\\            //|     Mulet is a meant to merge all Firefox OS runtimes that exist on desktop:
         | \\          //8|
         | \\          // |         - b2g desktop
         |_=\\        //7_|     Mulet is a meant to merge all Firefox OS runtime that currently exists on desktop:
         |_=\\        //=_|         - Fx OS simulator addon
         | _=||      ||3_ |        - b2g desktop
         | _=||      ||=_ |        - Special gaia profile running on Firefox nightly ("DEBUG=1" gaia profiles)
         \ _=||      ||4_ /        - Fx OS simulator addon
         \ _=||      ||=_ /         
         \_ =\',:;:,'/9 _/         - Special gaia profile running on Firefox nightly ("DEBUG=1" gaia profiles)
         \_ =\',:;:,'/= _/       Mulet nightly builds are available here (Windows and Mac)
           \__" `:` "__/      
           \__" `:` "__/           http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-central/
               )    (            Mulet isn't released yet, but you can build it out of mozilla-central with the following mozconfig:
               )    (             
             /      \             ac_add_options --enable-application=b2g/dev
             /      \         It requires a gaia profile to startup correctly: 
             |        |      
             |        |           $ cd ~/gaia
             |_      _|         Nightly builds are coming soon, but mulet is already built on TBPL.
             |_      _|           $ make
             (0\    /0)         So far we are only running mochitest-plain.
             (0\    /0)           $ ~/mulet/firefox-bin -profile profile/
             |        |        
             |        |          
             `.      .'           
             `.      .'          You should see gaia automatically loaded in first tab, 
             |      |           
             |      |          with the devtools showing up on the side.
             ;      |           
             ;      |           
             :|    |;           
             :|    |;          You can build it out of mozilla-central with the following mozconfig:
             '/    \'          
             '/    \'             ac_add_options --enable-application=b2g/dev
             (()  ())           
             (()  ())           
     ©jgs    \    /          ("Mulet" comes the french word designating a "mule".)
     ©jgs    \    /          (''"Mulet"'' comes the french word designating a "mule" and is spelled with only one ''l''!)
               `---'
               `---'


=== Why merge all runtimes? ===
=== Why merge all runtimes? ===


To ensure that everyone, app developers, gaia contributors and platform engineers are all on the same page and use the same environment and runtime.
To ensure that everyone: app developers, gaia contributors and platform engineers are all on the same page and use the same environment and runtime.
Then merging all runtimes allows to share the advantages of all of them.
Then merging all runtimes allows to share the advantages of all of them.
Gaia will run with the same feature set than b2g desktop (ie. many features require some glue code that doesn't exists in Firefox. for example system message API).
Gaia will run with the same feature set than b2g desktop (ie. many features require some glue code that doesn't exist in Firefox. for example system message API).
And we will have all devtools working against gaia.
And we will have all devtools working against gaia.
While sharing the additional features coming from the simulator (rotation support for ex)
While sharing the additional features coming from the simulator (rotation support for ex)
Line 33: Line 33:
=== Where can I download it? ===
=== Where can I download it? ===


Unfortunately, mulet isn't released anywhere yet, but nightly builds should come soon.
For Windows and Mac nightly builds are available [http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-central/ here].
Look got ''firefox-*'' packages for your platform.
 
For Linux, check [https://tools.taskcluster.net/index/artifacts/#gecko.v1.mozilla-central.latest.linux.mulet/gecko.v1.mozilla-central.latest.linux.mulet.opt here]


=== How different is mulet compared to the existing runtimes? ===
=== How different is mulet compared to the existing runtimes? ===


Compared to b2g desktop, mulet runs within a customized version of Firefox.
Compared to b2g desktop, mulet runs within a customized version of Firefox.
The goal is to seemlessly run b2g within a firefox tab.
The goal is to seamlessly run b2g within a firefox tab.
So mulet contains all preferences, settings and glue code that used to exists in b2g desktop.
So mulet contains all preferences, settings and glue code that used to exist in b2g desktop.


=== How do I build it? ===
=== How do I build it? ===
Line 45: Line 48:
Checkout mozilla-central and use "ac_add_options --enable-application=b2g/dev" in your mozconfig.
Checkout mozilla-central and use "ac_add_options --enable-application=b2g/dev" in your mozconfig.


=== How do I run FxOS on it? ===
=== How do I run B2G OS on it? ===
 
Updated instructions are available on [https://developer.mozilla.org/en-US/docs/Mozilla/B2G_OS/Mulet Mulet MDN page]
Checkout the gaia repo, then build a regular profile (just run make within your gaia folder).
Checkout the gaia repo, then build a regular profile (just run make within your gaia folder).
Once your gaia profile is built, open mulet with this profile.
Once your gaia profile is built, open mulet with this profile.
Line 54: Line 58:
   ...
   ...
   $ cd ~/gecko
   $ cd ~/gecko
  $ echo "ac_add_options --enable-application=b2g/dev" > mulet
  $ MOZCONFIG=mulet ./mach build
   $ MOZCONFIG=mulet ./mach run -profile ~/gaia/profile
   $ MOZCONFIG=mulet ./mach run -profile ~/gaia/profile


Then, if FxOS doesn't automatically open itself, go to the following URL:
Then, if FxOS doesn't automatically open itself, go to the following URL:
   chrome://b2g/content/shell.html
   chrome://b2g/content/shell.html
=== How do I run tests? ===
Just like on desktop firefox (see [https://developer.mozilla.org/en/docs/Running_automated_tests Running automated tests] on MDN).
One exception are reftests: Mulet reftests run in a different environment than regular reftests. The mulet reftest window has chrome://b2g/content/shell.html as its root document and uses a gaia profile that contains the reftest extension. The Marionette test runner injects a script in the gaia environment that loads the reftest harness, which injects a (non-remote) xul:browser into shell.html.
The easiest way to run Mulet reftests locally is by using docker and executing the "Run locally" script from a taskcluster "Inspect task" page of a Mulet reftest job that has run on treeherder. See [https://bugzilla.mozilla.org/show_bug.cgi?id=1233206#c1 bug 1233206] for more information.
=== How to report bugs? ===
Please fill bugs within [https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox%20OS&component=Runtime Firefox OS::Runtime component].
=== What is mulet for a gecko developer? ===
Mulet is a Firefox desktop build, with MOZ_B2G env variable set to 1.
This variable enables most of the b2g specifics that are built only on FxOS (and not on Fx Desktop).
It is also built with MOZ_MULET=1 in order to help distinguish Firefox Desktop from Mulet.
A dedicated folder exists for mulet in mozilla-central, [http://mxr.mozilla.org/mozilla-central/source/b2g/dev/ m-c/b2g/dev], which contains mostly build/configuration files.
[[Category:Firefox OS]]

Latest revision as of 08:06, 20 August 2016

       |\               /|
       |\\             //|      Mulet is a meant to merge all Firefox OS runtimes that exist on desktop:
       | \\           // |         - b2g desktop
       |_=\\         //=_|         - Fx OS simulator addon
       | _=||       ||=_ |         - Special gaia profile running on Firefox nightly ("DEBUG=1" gaia profiles)
       \ _=||       ||=_ /         
        \_ =\',:;:,'/= _/       Mulet nightly builds are available here (Windows and Mac):   
          \__" `:` "__/           http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-central/
             )     (            
            /       \          It requires a gaia profile to startup correctly:   
           |         |            $ cd ~/gaia
           |_       _|            $ make
           (0\     /0)            $ ~/mulet/firefox-bin -profile profile/
           |         |            
           `.       .'          You should see gaia automatically loaded in first tab,  
            |       |           with the devtools showing up on the side.
            ;       |           
            :|     |;           You can build it out of mozilla-central with the following mozconfig:
            '/     \'             ac_add_options --enable-application=b2g/dev
            (()   ())           
    ©jgs     \     /           ("Mulet" comes the french word designating a "mule" and is spelled with only one l!)
              `---'

Why merge all runtimes?

To ensure that everyone: app developers, gaia contributors and platform engineers are all on the same page and use the same environment and runtime. Then merging all runtimes allows to share the advantages of all of them. Gaia will run with the same feature set than b2g desktop (ie. many features require some glue code that doesn't exist in Firefox. for example system message API). And we will have all devtools working against gaia. While sharing the additional features coming from the simulator (rotation support for ex)

Where can I download it?

For Windows and Mac nightly builds are available here. Look got firefox-* packages for your platform.

For Linux, check here

How different is mulet compared to the existing runtimes?

Compared to b2g desktop, mulet runs within a customized version of Firefox. The goal is to seamlessly run b2g within a firefox tab. So mulet contains all preferences, settings and glue code that used to exist in b2g desktop.

How do I build it?

Checkout mozilla-central and use "ac_add_options --enable-application=b2g/dev" in your mozconfig.

How do I run B2G OS on it?

Updated instructions are available on Mulet MDN page

Checkout the gaia repo, then build a regular profile (just run make within your gaia folder). Once your gaia profile is built, open mulet with this profile.

 $ cd ~/gaia
 $ make
 ...
 $ cd ~/gecko
 $ echo "ac_add_options --enable-application=b2g/dev" > mulet
 $ MOZCONFIG=mulet ./mach build
 $ MOZCONFIG=mulet ./mach run -profile ~/gaia/profile

Then, if FxOS doesn't automatically open itself, go to the following URL:

 chrome://b2g/content/shell.html

How do I run tests?

Just like on desktop firefox (see Running automated tests on MDN).

One exception are reftests: Mulet reftests run in a different environment than regular reftests. The mulet reftest window has chrome://b2g/content/shell.html as its root document and uses a gaia profile that contains the reftest extension. The Marionette test runner injects a script in the gaia environment that loads the reftest harness, which injects a (non-remote) xul:browser into shell.html. The easiest way to run Mulet reftests locally is by using docker and executing the "Run locally" script from a taskcluster "Inspect task" page of a Mulet reftest job that has run on treeherder. See bug 1233206 for more information.

How to report bugs?

Please fill bugs within Firefox OS::Runtime component.

What is mulet for a gecko developer?

Mulet is a Firefox desktop build, with MOZ_B2G env variable set to 1. This variable enables most of the b2g specifics that are built only on FxOS (and not on Fx Desktop). It is also built with MOZ_MULET=1 in order to help distinguish Firefox Desktop from Mulet. A dedicated folder exists for mulet in mozilla-central, m-c/b2g/dev, which contains mostly build/configuration files.