Calendar:Build: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Initial page)
 
(Remove page contents, since most of it is outdated)
 
(23 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<p>Written on 26 Nov 07 and last updated on 27 Nov 07.</p>
Building Calendar means building Lightning nowadays, which is done by creating a Thunderbird build with Lightning enabled. You can find the instructions on [https://developer.mozilla.org/en-US/docs/Simple_Thunderbird_build developer.mozilla.org], be sure to read the section on how to enable Lightning before starting the build.
<p>Specs: MacBook Pro, 2.2Ghz, 2GB ram, 8600M GT 128MB, Mac OS X 10.4.11</p>
<p>Purpose: This guide is meant to serve as a quickstart on compiling Sunbird 0.7 for the Intel Mac, in under an hour. It is not intended to be comprehensive.</p>
<p>Why Sunbird: Sunbird is an application that can be compiled in under half an hour on my machine. (Firefox definitely takes much longer)</p>
 
<p>Documentation used:
http://developer.mozilla.org/en/docs/Build_Documentation
http://developer.mozilla.org/en/docs/Mac_OS_X_Build_Prerequisites
http://developer.mozilla.org/en/docs/Configuring_Build_Options
http://developer.mozilla.org/en/docs/Build_and_Install
</p>
<p><strong>1. Install the prerequisites</strong> (20 - 25 minutes, your mileage may vary)</p>
<p>Xcode 2.4.1 came with my Tiger restore DVD, and I installed it with the default options. (ten minutes)</p>
<p>Having a choice of Fink and MacPorts, I went with MacPorts. You can download it here:
http://svn.macosforge.org/repository/macports/downloads/MacPorts-1.5.0/ Installing MacPorts is as simple as running the installer found in the mounted .dmg. (five minutes)</p>
 
<p>Next, I used MacPorts to install libIDL (which also installs GLib): [note: ignore the &quot;$&quot;, it's meant to represent a set of commands to be executed]</p>
<p><em>$ sudo port sync<br/>
$ sudo port install libidl</em></p>
<p>(You would need to have your administrative password ready; takes around five to ten minutes, depending on your internet connection)</p>
<p><strong>2. Download the source</strong> (5 minutes; depends on your internet connection)</p>
<p>I chose not (yet) to plunge into CVS and instead downloaded the source directly.
http://releases.mozilla.org/pub/mozilla.org/calendar/sunbird/releases/0.7/source/lightning-sunbird-0.7-source.tar.bz2
 
<p>I created a folder on my desktop called &quot;Test&quot; (or whatever you want to call it), dragged the .tar.bz2 file inside and ran this command from that folder &quot;Test&quot; in Terminal:</p>
<p><em>$ tar xjfv lightning-sunbird-0.7-source.tar.bz2</em></p>
<p>There will be an extracted &quot;mozilla&quot; folder inside.</p>
<p><strong>3. Configure build options</strong> (5 minutes)</p>
 
<p>In the mozilla folder, I ran</p>
<p><em>$ echo &quot;# My first mozilla config&quot; &gt; .mozconfig</em></p>
<p>in Terminal. This creates a .mozconfig file with the comment &quot;My first mozilla config&quot;.<br />
</p>
<p>I skipped all the Objdir stuff as I am only compiling Sunbird, and entered the .mozconfig below: (the ones with # are comments)</p>
<p><em># My first mozilla config<br />
 
# v0.1 alpha test</em></p>
<p><em> . $topsrcdir/calendar/sunbird/config/mozconfig<br />
  ac_add_options --enable-optimize<br />
  ac_add_options --disable-static --enable-shared<br />
  ac_add_options --disable-debug<br />
  ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.4u.sdk<br />
 
  ac_add_options --disable-tests</em></p>
<p>No debugging, no static build, no auxillary tests needed, optimized and Intel-only build configuration. For a more comprehensive documentation on all the switches and options in .mozconfig, please refer to:
http://developer.mozilla.org/en/docs/Configuring_Build_Options</p>
<p><strong>4. Build the source</strong> (25 minutes)</p>
<p>Having done up everything, I proceeded to compile the source by this Terminal input in the same location as .mozconfig:</p>
<p><em>$ make -f client.mk build</em></p>
<p>It took just under half an hour for my hardware configuration. Your mileage may vary though. I had no build problems.</p>
 
<p><strong>5. Run your program!</strong></p>
<p>The compiled Calendar.app (for Intel Mac only; not a universal binary) after completion appears in /mozilla/dist/. It takes up 7.4MB.</p>
 
<p>Due to trademark issues, there is a switch that must be input in .mozconfig to make it compile with official branding. For my case, it didn't matter to me, as I have just compiled my first application on the Mac. (Gentoo Linux experience a few years back was a good help too.)</p>
<p>Endnotes: I hope this guide serves as a decent beginner's guide to building Sunbird. It should be noted that any build questions should go to #calendar or #developers on irc.mozilla.org, where there are lots of other experienced people who are more than willing to answer any of your queries (Please ask nicely). Do read the Mozilla documentation as well.</p>
 
----
 
Copied verbatim by myself from a Nov 07 post on '''[http://weblogs.mozillazine.org/rumblingedge/archives/2007/11/howto_compile_sunbird_07_on_an_intelmac_in_an_hour.html The Rumbling Edge]'''.
 
Feel free to edit the material above for future versions from now on. =)
 
[[User:Nth10sd|Nth10sd]] 05:48, 5 January 2008 (PST)

Latest revision as of 19:45, 9 February 2014

Building Calendar means building Lightning nowadays, which is done by creating a Thunderbird build with Lightning enabled. You can find the instructions on developer.mozilla.org, be sure to read the section on how to enable Lightning before starting the build.