Collabora Notes: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
These are helpful tips, made by [http://www.collabora.co.uk/ Collabora]ns, for those struggling to build the Mozilla source on different platforms.
These are helpful tips, made by [http://www.collabora.co.uk/ Collabora]ns, for those struggling to build Mozilla sources on different platforms.  


Collaborans are interested in building code from the Electrolysis project (E10s) on a machine on which Scratchbox is also installed, on which the Maemo SDK is installed, and on which one can cross-compile to the ARM architecture.
Collaborans are interested in building code from the Electrolysis project (E10s) on a machine on which Scratchbox is also installed, on which the Maemo SDK is installed, and on which one can cross-compile to the ARM architecture.<br>


= XEN IMAGES  =
= XEN IMAGES  =


One route to a working build environment is via a pre-configured virtual machine image. robin_bb has developed two such images. Each is Linux-based.
One route to a working build environment is via a pre-configured virtual machine image. robin_bb has developed two such images. Each is Linux-based.  


== Mozilla Central on Debian 5.0 32-bit i386 ==
== Mozilla Central on Debian 5.0 32-bit i386 ==


The [http://people.collabora.co.uk/~robinbb/lenny-32-mc.tar.bz2 Xen image called "lenny-32-mc" (1.1GB)] is a Debian 5.0 ("Lenny") installation on top of a 32-bit i386 Xen VM. It has a copy of the Mozilla Central code repository, and all of the Debian packages required to build that. The root password is "Collabora".
The [http://people.collabora.co.uk/~robinbb/lenny-32-mc.tar.bz2 Xen image called "lenny-32-mc" (1.1GB)] is a Debian 5.0 ("Lenny") installation on top of a 32-bit i386 Xen VM. It has a copy of the Mozilla Central code repository, and all of the Debian packages required to build that. The root password is "Collabora".  


To use that image, you'll need the [http://www.xen.org/ Xen virtual machine]. While installing Xen is quite an ordeal, it is significantly easier than configuring the build environment described above!
To use that image, you'll need the [http://www.xen.org/ Xen virtual machine]. While installing Xen is quite an ordeal, it is significantly easier than configuring the build environment described above!  


== Maemo + Scratchbox + E10s + on Debian 5.0 32-bit i386 ==
== Maemo + Scratchbox + E10s + on Debian 5.0 32-bit i386 ==


Coming soon.
Coming soon.  


= VIRTUALBOX IMAGE =
= VIRTUALBOX IMAGE =


Request from robin_bb.
Request from robin_bb.  


= MANUAL SETUP =
= MANUAL SETUP =


== Prerequisites for Building Mozilla's E10s Project ==
For those who don't have proper setup or recommended OS to install the provided Xen images -- or for those who want to understand the odds of setting up a cross-platform development environment for the mozilla codebase -- the following are three step-by-step guides focussing on building the Electrolysis projects (e10s) under three different platforms, namely linux, maemo and win32.<br>


The software that must be installed and configured on your build machine to build E10s is a superset of what is required to build 'mozilla-central'. Begin by performing a m-c build.
== Building e10s under linux<br> ==


See http://www.mozilla.org/docs/#building and follow the instructions there.
== Building e10s under maemo<br>  ==


You will need the Mercurial revision control software to obtain a copy of the m-c repo.
=== Installing Scratchbox Apophis  ===


== Installing Scratchbox Apophis  ==
''NOTE: There are actually two scratchbox versions supported by Nokia, namely Scratchbox 1.0 (Apophis) and Scratchbox2. Both allow electrolysis to build under maemo for ARM processors, but this document will only pertain to version 1.0.'' See <span style="text-decoration: underline;">Maemo</span> 's scratchbox for maemo 6 wiki page.  
 
''NOTE: There are actually two scratchbox versions supported by Nokia, namely Scratchbox 1.0 (Apophis) and Scratchbox2. Both allow electrolysis to build under maemo for ARM processors, but this document will only pertain to version 1.0.'' See <span style="text-decoration: underline;">Maemo</span> 's scratchbox for maemo 6 wiki page.


==== Install from your regular repositories  ====
==== Install from your regular repositories  ====
Line 41: Line 39:
==== Install manually from files.maemo.org  ====
==== Install manually from files.maemo.org  ====


In any other cases, you can also manually install Scratchbox 1.0.
In any other cases, you can also manually install Scratchbox 1.0.  


For that, you need [http://www.scratchbox.org/download/ Scratchbox Apophis].  
For that, you need [http://www.scratchbox.org/download/ Scratchbox Apophis].  
Line 55: Line 53:
Note:  
Note:  


The scratchbox '_X86' targets don't add extra value to the build and since your SB build environment might not be as complete&nbsp; So there's really little need for the XXX_X86 targets in Scratchbox. When you want to build for X86 processors, do it directly from your preferred linux console.
The scratchbox '_X86' targets don't add extra value to the build and since your SB build environment might not be as complete&nbsp; So there's really little need for the XXX_X86 targets in Scratchbox. When you want to build for X86 processors, do it directly from your preferred linux console.  


== Installing Maemo SDK  ==
=== Installing Maemo SDK  ===


As a Collabora developer, you might be targetting a specific maemo platform version.  
As a Collabora developer, you might be targetting a specific maemo platform version.  


== Pulling the mozilla codebase ==
== Building e10s under win32 ==


== Building ==
=== Installing dev. environment ===
 
== Running/Testing your build  ==


=== Installing ext3 fileSystem  ===


=== Setting MSVC up  ===


== On Win32 ==
=== The Build Proper ===


=== Installing dev. environment ===
== Common steps to all three platforms<br> ==


=== Installing ext3 fileSystem ===
=== Pulling the electrolysis project<br> ===


=== Setting MSVC up ===
=== Build the electrolysis project  ===


=== The Build Proper ===
=== Important considerations when using scratchbox  ===


= Notes on Building =
= Notes on Building =


When adding the first IPDL files to a Mozilla component, one must ensure that the following lines are added to the (sub)component's Makefile.in:
When adding the first IPDL files to a Mozilla component, one must ensure that the following lines are added to the (sub)component's Makefile.in:  


  include $(topsrcdir)/config/config.mk
  include $(topsrcdir)/config/config.mk
  include $(topsrcdir)/ipc/chromium/chromium-config.mk
  include $(topsrcdir)/ipc/chromium/chromium-config.mk

Revision as of 15:25, 20 October 2009

These are helpful tips, made by Collaborans, for those struggling to build Mozilla sources on different platforms.

Collaborans are interested in building code from the Electrolysis project (E10s) on a machine on which Scratchbox is also installed, on which the Maemo SDK is installed, and on which one can cross-compile to the ARM architecture.

XEN IMAGES

One route to a working build environment is via a pre-configured virtual machine image. robin_bb has developed two such images. Each is Linux-based.

Mozilla Central on Debian 5.0 32-bit i386

The Xen image called "lenny-32-mc" (1.1GB) is a Debian 5.0 ("Lenny") installation on top of a 32-bit i386 Xen VM. It has a copy of the Mozilla Central code repository, and all of the Debian packages required to build that. The root password is "Collabora".

To use that image, you'll need the Xen virtual machine. While installing Xen is quite an ordeal, it is significantly easier than configuring the build environment described above!

Maemo + Scratchbox + E10s + on Debian 5.0 32-bit i386

Coming soon.

VIRTUALBOX IMAGE

Request from robin_bb.

MANUAL SETUP

For those who don't have proper setup or recommended OS to install the provided Xen images -- or for those who want to understand the odds of setting up a cross-platform development environment for the mozilla codebase -- the following are three step-by-step guides focussing on building the Electrolysis projects (e10s) under three different platforms, namely linux, maemo and win32.

Building e10s under linux

Building e10s under maemo

Installing Scratchbox Apophis

NOTE: There are actually two scratchbox versions supported by Nokia, namely Scratchbox 1.0 (Apophis) and Scratchbox2. Both allow electrolysis to build under maemo for ARM processors, but this document will only pertain to version 1.0. See Maemo 's scratchbox for maemo 6 wiki page.

Install from your regular repositories

If you're running DEBIAN or UBUNTU, there's good chances that your distro's repositories keep an up-to-date version of Scratchbox Apophis. If so, install it throught the package manager and all relevant devkits and toolchains suggested in here.

Install manually from files.maemo.org

In any other cases, you can also manually install Scratchbox 1.0.

For that, you need Scratchbox Apophis.

Once you have scratchbox installed, you can clone the mozilla codebase repository.

If you want to build the code for different platforms and different processors, we really recommend that you put the codebase somewhere *UNDER* the /scratchbox directory, because scratchbox console is chroot'ed to the /scratchbox.

Best location is /scratchbox/users/<username>/home/<username>/mozilla/


Note:

The scratchbox '_X86' targets don't add extra value to the build and since your SB build environment might not be as complete  So there's really little need for the XXX_X86 targets in Scratchbox. When you want to build for X86 processors, do it directly from your preferred linux console.

Installing Maemo SDK

As a Collabora developer, you might be targetting a specific maemo platform version.

Building e10s under win32

Installing dev. environment

Installing ext3 fileSystem

Setting MSVC up

The Build Proper

Common steps to all three platforms

Pulling the electrolysis project

Build the electrolysis project

Important considerations when using scratchbox

Notes on Building

When adding the first IPDL files to a Mozilla component, one must ensure that the following lines are added to the (sub)component's Makefile.in:

include $(topsrcdir)/config/config.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk