SeaMonkey:hg-based build

Revision as of 15:32, 18 June 2008 by KaiRo (talk | contribs) (begin to add calendar support list)

Based on the SeaMonkey/1.9.1_Repository_Options, I figured out how to build based on the directory structure of the "option A" listed there, but building on top of the Mozilla build system like in "option B", for now with the source that is not part of mozilla-central pulled from the old cvs repository.

The SeaMonkey- and Thunderbird-specific parts of the code should go into a shared hg repository in the future. The directory structure also keeps the option alive to go for a full "option A" approach with a build system separate from Mozilla's, which might be the best way to go once we can switch SeaMonkey and Thunderbird to run on top of (a precompiled?) XULRunner.

building SeaMonkey

  • pull mozilla-central into mozilla/
  • pull from CVS: suite/
  • pull from CVS: mailnews/
  • pull from CVS: mozilla/extensions/[irc|typeaheadfind|venkman|wallet] (those get checked out directly into mozilla/extensions/ as those that survive will end up in separate repositories and not mailsuite!)
  • create directory: directory/ - symlink into mozilla/
  • pull from CVS: directory/c-sdk and directory/xpcom
  • mozconfig: --enable-application=../suite
  • mozconfig: mk_add_options MOZ_OBJDIR=/path/to/objdir/mozilla (note the "mozilla" at the end!)
  • suite/confvars.sh: remove xml-rpc from MOZ_EXTENSIONS_DEFAULT in line 50 (bug 438676)
  • suite/build.mk: prefix mailnews/ and suite/ with ..
  • suite/makefiles.sh: prefix all suite/ directories in add_makefiles with "../"
  • mailnews/makefiles.sh: prefix all mailnews/ directories in add_makefiles with "../"
  • suite/confvars.sh: add the following line before MOZ_APP_VERSION (line 47) (without indentation):
   SEAMONKEY_VERSION=`cat $topsrcdir/../suite/config/version.txt`
  • suite/app-config.mk: create this file, containing the following lines (without indentation):
   MOZ_SUITE = 1
   SEAMONKEY_VERSION = $(MOZ_APP_VERSION)
   DEFINES += -DMOZ_SUITE=1
  • mozilla/toolkit/toolkit-makefiles.sh: move mailnews block at line 913 to suite/makefiles.sh line 38
  • cd mailnews/; sed -i 's/^DEPTH.*\.\.$/&\/mozilla/g' `find . -name Makefile.in`
  • cd suite/; sed -i 's/^DEPTH.*\.\.$/&\/mozilla/g' `find . -name Makefile.in`
  • suite/debugQA/locales/Makefile.in: prefix relativesrcdir in line 44 with ../
  • suite/locales/Makefile.in: prefix relativesrcdir in line 41 with ../
  • suite/build/Makefile.in: in the LOCAL_INCLUDES starting in line 74, add a ../ between $(topsrcdir)/ and suite/

build using

export MOZCONFIG=/path/to/mozconfig
cd mozilla
gmake -f client.mk build

for unit tests

Note that correct makefiles.sh files paper over the problem that make-makefiles does get confused with us being outside mozilla/ (bug 437896) but test makefiles rely on that automatic generation, so unit tests only can get built with a patch for that bug.

  • mailnews/imap/test/Makefile.in: in the LOCAL_INCLUDES line 74, add a ../ between $(topsrcdir)/ and mailnews/
  • mailnews/base/test/unit/head_mailbase.js: prefix "mailnews" directory with a "../"
  • mailnews/db/msgdb/test/unit/head_maildb.js: prefix "mailnews" directory with a "../"
  • mailnews/db/msgdb/test/unit/test_maildb.js: prefix "mailnews" directory with a "../"
  • mailnews/news/test/unit/head_server_setup.js: prefix "mailnews" directory with a "../"
  • mailnews/news/test/unit/test_server.js: prefix "mailnews" directory with a "../" in line 104
  • mailnews/local/test/unit/head_maillocal.js: prefix "mailnews" directory with a "../"
  • mailnews/compose/test/unit/head_compose.js: prefix "mailnews" directory with a "../"
  • mailnews/compose/test/unit/test_sendMailMessage.js: prefix "mailnews" directory with a "../" in line 20
  • mailnews/compose/test/unit/test_nsMsgCompose1.js: prefix "mailnews" directory with a "../" in lines 7,49,54
  • mailnews/addrbook/test/unit/head_addrbook.js: prefix "mailnews" directory with a "../"
  • mailnews/addrbook/test/unit/test_cardForEmail.js: prefix "mailnews" directory with a "../" in line 13
  • mailnews/addrbook/test/unit/test_mailList1.js: prefix "mailnews" directory with a "../" in line 35
  • mailnews/addrbook/test/unit/test_nsIAbCard.js: prefix "mailnews" directory with a "../" in line 14
  • mailnews/extensions/bayesian-spam-filter/test/unit/head_bayes.js: prefix "mailnews" directory with a "../"
  • mailnews/extensions/bayesian-spam-filter/test/unit/test_bug228675.js: prefix "mailnews" directory with a "../" in lines 41,155

additional changes to build Thunderbird

  • pull from CVS: mail/
  • mozconfig: --enable-application=../mail
  • mozconfig: mk_add_options MOZ_OBJDIR=/path/to/objdir/mozilla (again, note the "mozilla" at the end!)
  • cd mail/; sed -i 's/^DEPTH.*\.\.$/&\/mozilla/g' `find . -name Makefile.in`
  • mail/build.mk: prefix mailnews/ and mail/ with ..
  • mail/makefiles.sh: add removed mailnews block from mozilla/toolkit/toolkit-makefiles.sh line 913 at line 38
  • mail/makefiles.sh: prefix all mail/ directories in add_makefiles with "../"
  • mail/confvars.sh: add the following line before MOZ_APP_VERSION (line 55) (without indentation):
   THUNDERBIRD_VERSION=`cat $topsrcdir/../mail/config/version.txt`
  • mail/app-config.mk: create this file, containing the following lines (without indentation):
   MOZ_THUNDERBIRD = 1
   THUNDERBIRD_VERSION = $(MOZ_APP_VERSION)
   DEFINES += -DMOZ_THUNDERBIRD=1
  • mail/locales/Makefile.in: prefix relativesrcdir in line 41 with ../; prefix "mailnews" in line 100 with "../"
  • mail/base/jar.mn: replace /mailnews/ with /../mailnews/ (right-hand side)
  • mail/components/compose/jar.mn: replace /mailnews/ with /../mailnews/ (right-hand side)
  • mail/components/preferences/jar.mn: replace /mailnews/ with /../mailnews/ (right-hand side)
  • mail/components/addrbook/jar.mn: replace /mailnews/ with /../mailnews/ (right-hand side)
  • mail/extensions/smime/jar.mn: replace /mailnews/ with /../mailnews/ (right-hand side)
  • mail/app/Makefile.in: insert ../ between $(topsrcdir)/ and mail/ in line 52

building with Lighting calendar

  • pull from CVS: mozilla/calendar/
  • pull from CVS: mozilla/extensions/lightning/
  • pull from CVS: mozilla/extensions/webdav/
  • mozconfig: --enable-extensions=default,lightning