Skip to content

Building the ExoBrowser

benjyz edited this page Mar 12, 2014 · 49 revisions

The ExoBrowser is based on both Chromium (Content API) and Node.JS, two very active opensource projects. To be able to properly integrate these two projects, we have to apply a few modifications to each. To keep track of these modifications, we use a patch for the chromium repository (as we only alter a few files) and a specific forked branch for node.

Steps 1 and 2 are identical for all systems (Linux, Mac and Windows).

1. The DEPS Directory

The source code of the ExoBrowser being valid only in the context of chromium and node, for any given version of the ExoBrowser we need to be able to know which commit to checkout in both repositories. The DEPS Directory exists for this reason. It maintains a set of revision and patches needed to build the current state of the source code:

chromium.RELEASE      # the release branch used for `chromium`
chromium.patch        # the patch to apply on `chromium
node_exo_browser.HEAD # the commit to use for the exo_browser branch of `node`
node.HEAD             # used internally to know on which commit of `node` the `exo_browser` branch is based

Whenever working with the ExoBrowser, you must have Chromium and NodeJS checked out at the revisions specified in the DEPS directory of the ExoBrowser revision you're working on.

2. Getting the Code

Prerequesites

We need the Chromium depot_tools to work with Chromium source code. Please refer to Chromium: Install depot_tools for more information.

  1. create a project directory, say mkdir exo_browser && cd exo_browser
  2. git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
  3. add depot_tools to your PATH: export PATH="$PATH":`pwd`/depot_tools
  4. you can update your .bashrc file to avoid adding it to the PATH each time you need it
  5. If you haven't already: install git, subversion and git-svn (apt-get install git subversion git-svn).

Get Chrome Source Code

Please refer to Chromium: Get The Code for more information about checking out Chromium. We're using the git workflow. node.patch

  1. mkdir chromium && cd chromium
  2. gclient config http://src.chromium.org/chrome/releases/XX.X.XXXX.XX/ (replace with value of DEPS, currently 32.0.1700.68)
  3. svn ls https://src.chromium.org/chrome to accept permanently the certificate from googlecode
  4. gclient sync (this may take some time. SVN read-access not needed)

A new src/ directory should have been checked out in your chromium directory. In the following src/ refers to the chromium/src directory.

Get the ExoBrowser Source Code

  1. clone [email protected]:breach/exo_browser.git in src/

Get NodeJS Source Code

  1. in src/third_party/ run git clone -b exo_browser https://github.com/breach/node.git
  2. in src/third_party/node/, git reset --hard `cat ../../exo_browser/DEPS/node_exo_browser.HEAD`

Apply the Patches on Chromium

You must be at the correct revision indicated in exo_browser/DEPS/chromium.HEAD for this to work.

  1. in src/, patch -p0 -i exo_browser/DEPS/chromium.patch

Your tree is now ready for work!

3. Building the ExoBrowser

We rely on Chromium cross-platform build tools (more specifically, gyp). The following is for Linux. For more information on OS specific information see:

Additionally we use ninja as our build system. See Chromium: Ninja Build for more information.

Prerequesites

  1. run src/build/install-build-deps.sh
  2. add export GYP_GENERATORS='ninja' to your PATH
  3. you can update your .bashrc file to avoid adding it to the PATH each time you build

Generate Build files

  1. in src/, run build/gyp_chromium exo_browser/exo_browser.gyp
  2. in src/third_party/node, run ./configure --ninja or ./configure --ninja --dest-cpu ia32 on OSX

This generates all the files needed to build the ExoBrowser (ninja, Makefile, XCode, ...) depending on your platform and configuration.

Build

  1. in src/, run ninja -C out/Debug exo_browser -j8 (this may take some time)
  2. cd into src/out/Debug/shell and npm install
  3. You should now be able to run the exo_browser binary in src/out/Debug

Troubleshooting

Much more information can be found within the project Chromium itself. One goal is to make this very simple, so please open up an issue if you run into problems.

If you get the message Running without the SUID sandbox! try exo_browser --no-sandbox or install the sandbox.

Clone this wiki locally