Calendar:Lightning:Building Lightning: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
As of October 7, 2005, [[Calendar:Lightning:Nightly Builds|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 [http://www.mozilla.org/build/index.html#requirements get the tools] required to build on your operating system.
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].
<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>
= Quick Start =
If you already have everything you need installed to build thunderbird and lightning, then these commands should work to test cvs head:
<pre><nowiki>
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
</nowiki></pre>
If you have problems with lightning crashing thunderbird, you can disable all extensions with:
<pre><nowiki>
./dist/bin/thunderbird -safe-mode
</nowiki></pre>
= 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>.
<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 =
Lightning builds as an extension to Thunderbird, so follow the instructions to [http://www.mozilla.org/build/configure-build.html configure your build] for Thunderbird. (Windows builders using the free tools should follow step 11 in [http://gemal.dk/mozilla/build.html Gemal's instructions].)
It is suggested that you use an [http://www.mozilla.org/build/configure-build.html#objdir 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 <tt>.mozconfig</tt> file:
*<tt>mk_add_options MOZ_CO_PROJECT=mail,calendar</tt>
*<tt>ac_add_options --enable-extensions=default,lightning</tt>
Static builds are causing some problems ([https://bugzilla.mozilla.org/show_bug.cgi?id=330753 Bug 330753]), so make sure that your <tt>.mozconfig</tt> doesn't include the lines:
*<tt>ac_add_options --disable-shared</tt>
*<tt>ac_add_options --enable-static</tt>
Save your .mozconfig and run your build process as per normal. This will create a <tt>dist/xpi-stage</tt> folder which will hold Lightning.
= Installing the lightning.xpi =
To install Lightning, run your Thunderbird build (located in <tt>dist/bin</tt>) and select Tools > Extensions to launch the Thunderbird extension manager. Then click "Install" and point to <tt>dist/xpi-stage/lightning.xpi</tt>. 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 <tt>thunderbird -P</tt> 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 <tt>thunderbird -P ''profilename''</tt>.

Revision as of 13:18, 17 April 2006