1. Install the git Tool
: Http://code.google.com/p/git-osx-installer/downloads/list? Can = 3 & q = & sort =-uploaded & colspec = Filename + Summary + Uploaded + Size + DownloadCount
2. Install XCode command line tools
If XCode is not installed, download Xcode in app store and install Xcode command line tools following the steps below to make the source code in the command terminal.
XCode> Open Developer Tool> More Developer Tools
Select the command line tools of the mac system
3. Download The gaia source code
Create a directory for source code. Assume that the directory you created is $ DIR $.
# Cd $ DIR $
# Git clone git: // github.com/mozilla-b2g/gaia
4. Download B2G desktop for MAC
B2G desktop is not a full version of B2G, but a gaia desktop running environment. It can be considered as a simulator for the moment.
There are currently three methods to run gaia, as described on the official website:
Gaia can be run in 3 different ways, each one requiring some specific steps to be set-up:
· Inside a web browser such a Firefox
· Inside a device emulator
· On the device
Here we use B2G desktop to simulate the environment: http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-central/
Select the Mac version.
Put the b2g. app in the downloaded B2G-*. en-US.mac64.dmg in the $ DIR $/gaia directory
5. Compile gaia
Compile with the following command. The B2G simulator is automatically run after compilation.
# Cd $ DIR $/gaia
# DEBUG = 1 make & B2G. app/Contents/MacOS/b2g-profile $ DIR $/gaia/profile
Running effect:
Note: Replace $ DIR $ with your actual directory.
Reference: https://wiki.mozilla.org/gaia/hackinginstructions about other operating systems)