Calendar:Lightning:Building Lightning

Revision as of 14:04, 23 March 2006 by Pweilbacher (talk | contribs) (enable-static twice doesn't make much sense)

As of October 7, 2005, nightly builds of Lightning are available for Windows, OSX and Linux. The following instructions are somewhat out of date, but should still be valid for anyone looking to compile Lightning for themselves.

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.

Note: if you're building on Windows using the free tools (ie: mingw instead of Visual Studio), then you might want to follow steps 1-9 on Gemal's Build Mozilla on Windows page.

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 & Installing Lightning

Lightning builds as an extension to Thunderbird, so follow the instructions to configure your build for Thunderbird. (Windows builders using the free tools should follow step 11 in Gemal's instructions.)

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 were causing some problems, so it's best to 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.