1. Make sure to install the mozilla build environment for your platform: windows, Mac OS X, linux. BlueGriffon is based on mozilla-central.
  2. create a new directory for BlueGriffon's and XULrunner's sources ; open a terminal window in that directory
  3. IF YOU BUILD BLUEGRIFFON 1.0: get firefox4 source from ftp.mozilla.org
    wget ftp://ftp.mozilla.org/pub/firefox/releases/4.0/source/firefox-4.0.source.tar.bz2
    bzip2 -dc firefox-4.0.source.tar.bz2 | tar xf -

    IF YOU BUILD BLUEGRIFFON FROM TRUNK OR ABOVE 1.0 : get mozilla-central from Mozilla through Mercurial

    hg clone http://hg.mozilla.org/mozilla-central mozilla-2.0

    BlueGriffon 1.4 is for instance based on revision 15fb7f28f213 so you'll have to perform a hg update -r 15fb7f28f213 after the cloning operation above.

  4. get BlueGriffon's tree through subversion:
    cd mozilla-2.0

    IF YOU BUILD BLUEGRIFFON 1.4:

    svn checkout http://sources.disruptive-innovations.com/bluegriffon/tags/1.4 bluegriffon

    IF YOU BUILD BLUEGRIFFON FROM TRUNK:

    svn checkout http://sources.disruptive-innovations.com/bluegriffon/trunk bluegriffon
  5. get BlueGriffon locales through subversion:
    cd bluegriffon

    IF YOU BUILD BLUEGRIFFON 1.4:

    svn checkout http://sources.disruptive-innovations.com/bluegriffon-l10n/tags/1.4 locales

    IF YOU BUILD BLUEGRIFFON FROM TRUNK:

    svn checkout http://sources.disruptive-innovations.com/bluegriffon-l10n/trunk locales
  6. tweak variable  _AVAILABLE_LOCALES in file bluegriffon/langpacks/Makefile.in according to your wishes ; en-US is always built, this is for the extra locales
  7. apply the minimal patch to the trunk
    cd mozilla-2.0
    patch -p 1 < bluegriffon/config/content.patch
  8. create a .mozconfig file. I am using myself the following settings for my daily work:
    # CHANGE FOLLOWING LINE ACCORDING TO YOUR WISHES
    mk_add_options MOZ_OBJDIR=/Users/glazou/bin/opt/bg-central 

    ac_add_options --enable-application=bluegriffon
    # Uncomment the following lines for an optimized build
    ac_add_options --disable-debug
    ac_add_options --enable-optimize

    # Comment out the following lines for a debug build
    #ac_add_options --enable-debug
    #ac_add_options --disable-optimize
    ac_add_options --disable-installer
    #ac_add_options --disable-javaxpcom
    ac_add_options --disable-activex
    ac_add_options --disable-activex-scripting
    ac_add_options --disable-tests
    ac_add_options --disable-airbag
    ac_add_options --enable-places
    ac_add_options --enable-storage
    ac_add_options --enable-shared
    ac_add_options --disable-static
    mk_add_options MOZ_MAKE_FLAGS="-s -j4"
    # NEXT LINE IS FOR WINDOWS XP ONLY
    #ac_add_options --disable-vista-sdk-requirements
    # NEXT LINES UP TO EOF ONLY FOR MAC OS X 10.6.3
    CC="gcc-4.2 -arch i386"
    CXX="g++-4.2 -arch i386"
    ac_add_options --target=i386-apple-darwin8.0.0
    ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.5.sdk
    ac_add_options --enable-macos-target=10.5
    # bug 491774. crashreporter won't build in cross compile
    ac_add_options --disable-crashreporter
    HOST_CC="gcc-4.2"
    HOST_CXX="g++-4.2"
    RANLIB=ranlib
    AR=ar
    AS=$CC
    LD=ld
    STRIP="strip -x -S"
    CROSS_COMPILE=1
  9. type make -f client.mk build_all
  10. bluegriffon.exe is in $MOZ_OBJDIR/dist/bin on windows/linux and BlueGriffon.app is in $MOZ_OBJDIR/dist on Mac (launch with open BlueGriffon.app)