| 1 | Please login and fix my errors |
| 2 | == Compiling Firefox and Thunderbird From CVS == |
| 3 | The Mozilla developers tend to be cautious, making stable releases quite infrequently. Meanwhile active development continues on cvs head. Compiling Firefox and Thunderbird from cvs isn't hard. Obviously you'll need cvs [http://www.linuxfromscratch.org/blfs/view/svn/basicnet/netprogs.html#cvs]. |
| 4 | First, decide where you're going to keep the code. The mozilla tree weighs in at more than 300Mb so it makes sense to use the same code for both Firefox and Thunderbird. First cd into a suitable folder and then login to cvs |
| 5 | |
| 6 | {{{ |
| 7 | export CVSROOT=":pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot" |
| 8 | cvs login |
| 9 | }}} |
| 10 | Just press enter when it asks you for a password. Then checkout some configuration files |
| 11 | {{{ |
| 12 | cvs co -f mozilla/client.mk |
| 13 | cvs co -f mozilla/browser/config/mozconfig |
| 14 | cvs co -f mozilla/mail/config/mozconfig |
| 15 | }}} |
| 16 | Now create a suitable mozconfig for Firefox |
| 17 | {{{ |
| 18 | cat > mozilla/mozconfig-fox << "EOF" |
| 19 | . $topsrcdir/browser/config/mozconfig |
| 20 | mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-build |
| 21 | ac_add_options --with-pthreads |
| 22 | ac_add_options --disable-tests |
| 23 | ac_add_options --enable-svg |
| 24 | ac_add_options --enable-canvas |
| 25 | ac_add_options --prefix=/usr |
| 26 | ac_add_options --disable-installer |
| 27 | EOF |
| 28 | }}} |
| 29 | And one for Thunderbird |
| 30 | {{{ |
| 31 | cat > mozilla/mozconfig-bird << "EOF" |
| 32 | . $topsrcdir/mail/config/mozconfig |
| 33 | mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/thunderbuild |
| 34 | ac_add_options --with-pthreads |
| 35 | ac_add_options --disable-tests |
| 36 | ac_add_options --prefix=/usr |
| 37 | ac_add_options --disable-installer |
| 38 | EOF |
| 39 | }}} |
| 40 | Create a folder to make a backup copy of the finished builds |
| 41 | {{{ |
| 42 | mkdir tarballs |
| 43 | }}} |
| 44 | Now you can build Firefox with these commands |
| 45 | {{{ |
| 46 | cd mozilla |
| 47 | ln -sf mozconfig-fox mozconfig |
| 48 | rm -rf firefox-build |
| 49 | make -f client.mk |
| 50 | make -C firefox-build/browser/installer |
| 51 | cp firefox-build/dist/firefox-3.0a1.en-US.linux-i686.tar.bz2 ../tarballs/firefox-$(date +%d-%m-%y).tar.bz2 |
| 52 | }}} |
| 53 | If you put those commands in a script it makes it easy to automate it and do a weekly build. The first time it is run it will take forever for cvs to pull the code (depending on the speed of you internet connection). [[BR]] |
| 54 | Building Thunderbird is basically the same |
| 55 | {{{ |
| 56 | cd mozilla |
| 57 | ln -sf mozconfig-bird mozconfig |
| 58 | rm -rf thunderbuild |
| 59 | make -f client.mk |
| 60 | make -C thunderbuild/xpinstall/packager |
| 61 | cp thunderbuild/dist/thunderbird-3.0a1.en-US.linux-i686.tar.bz2 ../tarballs/thunderbird-$(date +%d-%m-%y).tar.bz2 |
| 62 | }}} |
| 63 | The date in that command is in the European format, so tweak that to suit yourself. To run the finished build, untar it somewhere suitable and run the {firefox,thunderbird} script in the folder, just like the tarballs you can download from Mozilla. |
| 64 | == Tweak the Build == |
| 65 | If I have to start afresh, I like Firefox to create the default profile with my bookmarks already there. To do this, copy ~/.mozilla/firefox/<random number>/bookmarks.html into the mozilla source, mozilla/browser/locales/en-US/profile/bookmarks.html then the next time you run the build script they'll be built in. If it causes a problem for cvs then delete the file and run the build script again, cvs will replace it. [[BR]] |
| 66 | Another file that's ripe for tweaking is mozilla/browser/app/profile/prefs.js which, when it becomes the prefs.js file in you profile, stores many imporant settings (font sizes and suchlike). |