This was not the first time I built a mozilla project (nor even firefox). The first time I built a moz project was on the last weekend of January 2006 when I wanted to learn about embedding Mozilla into other applications, I blogged the event saying (sic):
<blockquote>
“It took me over four hours to figure out the foundations of writting an embedded Mozilla/Gecko application, download (the correct) source code, figure out how to compile Mozilla, and compile Mozilla. To be fair about one hour of this was spent compiling the Mozilla Application Suite (now called SeaMonkey). I’d like to write about each of the above points in turn.<br />First of all, I’d like to thank the people at the Mozilla IRC channels for being so nice and helpful.<br />...<br />I’ve tried building Mozilla before and I wasn’t looking forward to failing again. But this time, I figured, I could go to the IRC channel and hopefully get some help. I squared my shoulders gritted my teeth and downloaded Mozilla.1.7.8 source. Untar. Write a mozconfig file. Look for instructions on writting a mozconfig. Look around for better instructions on writting a mozconfig file. Shrug shoulders, think “oh, to hell with it at least I’ll have something to show the guys on IRC and have them correct”. I wrote a mozconfig file. Exported the location as a system variable (as per instructions) and ran “make -f client.mk build”. It broke after 10 minutes.<br />
First of allSlightly intimdated but still hopeful I fire up Chatzilla and go to the Seamonkey channel looking for help. I discover two things. Firstly, I’d like I’m not using the latest source (ignoring Seamonkey 1.0 Source which isn’t quite released yet). The latest version is 1.7.12. I never noticed since it’s listed above 1.7.8 in the ftp server. Not to thank mention the people at fact that it’s awkward to even find the Mozilla IRC channels for being source since it’s not under ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/source/. No, no, no it’s under ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7.12/source/. Like so nice and helpfulmany other things with programming, it makes sense (sorta) once you know about it. Secondly, I mention that it broke while compiling something to do with FreeType.<br />
biesi: oh<br /> Mystic:the mozconfig file I wrote/copy/pasted doesn’t mention freetype at all.<br /> biesi: you probably have to disable freetype<br /> biesi: ac_add_options –disable-freetype2<br /> biesi: (1.7.x does not like new freetype versions)<br />
I’ve tried building Mozilla before and I wasn’t looking forward to failing again. But I’m not sure where this timeis documented but wherever it may be, I figured, I could go to the IRC channel and hopefully get some helpbiesi saved me hours. So I squared my shoulders gritted my teeth and downloaded Mozilla.1.7.8 source. Untar. Write a mozconfig file. Look for instructions on writting a mozconfig. Look around for better instructions on writting a mozconfig file. Shrug shoulders, think “oh, to hell with it at least I’ll have something to show added the guys on IRC changes as per biesi’s recomendation’s and have them correct”. I wrote a mozconfig file. Exported the location as a system variable (as per instructions) and ran “make -f client.mk build”. It broke after 10 minutes.follows:<br />
Slightly intimdated but still hopeful I fire up Chatzilla and go to the Seamonkey channel looking for help. I discover two things. Firstly, I’m not using the latest source (ignoring Seamonkey 1.0 Source which isn’t quite released yet). The latest version is 1.7.12. I never noticed since it’s listed above 1.7.8 in the ftp server. Not to mention the fact that it’s awkward to even find the source since it’s not under ftp: mk_add_options MOZ_CO_PROJECT=suite<br /> ac_add_options –enable-application=suite<br /ftp.mozilla.org> mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/pub/mozilla.org/mozilla/source/. No, no, no it’s under ftp://ftp.mozilla.orghopefullyWorked (or whatever you want to name your object dir)<br /pub> ac_add_options –disable-optimize<br /mozilla.org> ac_add_options –enable-debug<br /mozilla> ac_add_options –disable-freetype2<br /releases/mozilla1.7.12/source/. Like so many other things with programming, it makes sense (sorta) once you know about it. Secondly, I mention that it broke while compiling something to do with FreeType.>
biesi: oh Mystic:the mozconfig file I wrote/copy/pasted doesn’t mention freetype at all. biesi: you probably have to disable freetype biesi: ac_add_options –disable-freetype2 biesi: (1.7.x does not like new freetype versions) I’m not sure where this is documented but wherever it may be, biesi saved me hours. So I added the changes as per biesi’s recomendation’s and have a mozconfig file as follows: mk_add_options MOZ_CO_PROJECT=suite ac_add_options –enable-application=suite mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/hopefullyWorked (or whatever you want to name your object dir) ac_add_options –disable-optimize ac_add_options –enable-debug ac_add_options –disable-freetype2 An hour of compiling and I built mozilla (see http://developer.mozilla.org/en/docs/Build_and_Install to find out how to run/install a build). That’s all well and good, ofcourse, but I don’t really feel closer to having built an application embedding Mozilla.<br />That’s pretty much all so far, but there will be more.”<br />
</blockquote>
Due to a delightful mix of improved documentation, improved source code, and improved experience, this build went much quicker than my first experience. In fact outside of the issues of not knowing about which packages were required this build was a breeze.