You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.


Building Lightning

Requirements for Building Lightning

If this is your first time building any of the Mozilla products, you should first make sure that you get the tools required to build on your operating system.

Once you're set up with the right tools, you'll want to get the source either from the FTP server or through CVS.

Quick Start

If you already have everything you need installed to build Thunderbird and Lightning, then these commands should work to test cvs head:

export CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
cvs checkout mozilla/client.mk
cd mozilla
make -f client.mk checkout MOZ_CO_PROJECT=mail,calendar
./configure --enable-application=mail --enable-extensions=default,lightning
make
./dist/bin/thunderbird
# install dist/xpi-stage/lightning.xpi via the thunderbird extensions menu

If you have problems with Lightning crashing Thunderbird, you can disable all extensions with:

./dist/bin/thunderbird -safe-mode

Getting the latest code from CVS

The Lightning codebase changes quite a bit on a day to day basis. It's kept in the calendar project tree. To keep up to date with the latest changes, make sure that when you update with CVS you have calendar specified as one of your MOZ_CO_OPTIONS.

Note: If you downloaded your source as a tarball, you need to have unpackaged it with tar, not zip, in order to get the metadata required by CVS to do a proper update.

Building and installing Lightning

Lightning builds as an extension to Thunderbird, so follow the instructions to configure your build for Thunderbird.

It is suggested that you use an objdir to hold the final build, as this will allow you to quickly update from CVS and do an incremental rebuild from within the objdir.

Editing your .mozconfig file

You must add two lines to the .mozconfig file:

  • mk_add_options MOZ_CO_PROJECT=mail,calendar
  • ac_add_options --enable-extensions=default,lightning

Static builds are causing some problems (Bug 330753), so make sure that your .mozconfig doesn't include the lines:

  • ac_add_options --disable-shared
  • ac_add_options --enable-static

Save your .mozconfig and run your build process as per normal. This will create a dist/xpi-stage folder which will hold Lightning.

Installing the lightning.xpi

To install Lightning, run your Thunderbird build (located in dist/bin) and select Tools > Extensions to launch the Thunderbird extension manager. Then click "Install" and point to dist/xpi-stage/lightning.xpi. Exit Thunderbird and restart and Lightning should be enabled.

Pointing to a different profile

If you want to use a different profile for testing Lightning, make sure all Thunderbird windows are closed and run thunderbird -P to launch the Thunderbird Profile Manager. From here you can create new profiles and select which you want to use at startup. Once a profile has been created, you can launch Thunderbird using the profile either by invoking the Profile Manager or using the command thunderbird -P profilename.