Calendar:Lightning:Building Lightning: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 4: Line 4:
Once you're set up with the right tools, you'll want to [http://www.mozilla.org/source.html get the source] either from the [http://www.mozilla.org/download-mozilla.html FTP server] or [http://www.mozilla.org/cvs.html through CVS].
Once you're set up with the right tools, you'll want to [http://www.mozilla.org/source.html get the source] either from the [http://www.mozilla.org/download-mozilla.html FTP server] or [http://www.mozilla.org/cvs.html 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 [http://gemal.dk/mozilla/build.html Gemal's Build Mozilla on Windows] page.
<small>'''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 [http://gemal.dk/mozilla/build.html Gemal's Build Mozilla on Windows] page.</small>


=== Getting the latest code from CVS ===
=== 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 [http://www.mozilla.org/cvs.html update with CVS] you have <tt>calendar</tt> specified as one of your <tt>MOZ_CO_OPTIONS</tt>.
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 [http://www.mozilla.org/cvs.html update with CVS] you have <tt>calendar</tt> specified as one of your <tt>MOZ_CO_OPTIONS</tt>.


'''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.
<small>'''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.</small>


== Building & Installing Lightning ==
== Building & Installing Lightning ==

Revision as of 00:03, 17 May 2005

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=lightning,inspector,venkman

After that, 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.