Building Mozilla on Mac OS
Generic Build Instructions
http://developer.mozilla.org/en/docs/Build_Documentation
System Setup
- Download XCodeTools for your Development Environment
- Download a package manage tool. Preferably MacPorts
- Install libidl and GLib (lididl include GLib)
$ sudo port sync
$ sudo port install libidl
- If you are running on the intel, confirm that your gcc version is 4.0.
gcc --version
- Run the following mozscript with environment specific modifications.
export MOZCONFIG=~/moztrunk/mozilla/.mozconfig
export CVS_RSH=ssh
export MACOSX_DEPLOYMENT_TARGET=10.4
export JDKHOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
export MOZ_JDKHOME=$JDKHOME
export JAVA_HOME=$JDKHOME
export MOZ_SRC=/Users/joelle/moztrunk/mozilla
export MOZILLA_FIVE_HOME=$MOZ_SRC/mozilla/dist/bin
export DYLD_LIBRARY_PATH=$MOZILLA_FIVE_HOME:$MOZILLA_FIVE_HOME/components
export ANT_HOME=/usr/lib/ant1.7.0
export XPCOM_DEBUG_BREAK=warn
export NSPR_LOG_MODULES=webclient4:webclientstub:4
export NSPR_LOG_FILE=logfile.txt
export BUILD_WEBCLIENT_ONLY=1
$SHELL
exit
Note: Additional setup prerequisites can be found here
http://developer.mozilla.org/en/docs/Mac_OS_X_Build_Prerequisites
Checkout Mozilla like so.
- {MOZTRUNK} is the directory you want mozilla installed into. From your {MOZTRUNK} run.
- You will be checking out release FIREFOX_2_0_0_3_RELEASE
Create MozConfig File
- You can create your own .mozconfig using the following script
- Otherwise, simply copy the text below, and place it in {$MOZTRUNK}/mozilla/.mozconfig
- Notice the location that you will be placing your OBJ (built files).
#trunk/mozilla/.mozconfig
mk_add_options MOZ_CO_PROJECT=xulrunner
mk_add_options MOZ_CO_MODULE=xulrunner
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/xulrunner-macosx-intel-cocoa_d.obj
ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.4u.sdk
ac_add_options --enable-debug
ac_add_options --enable-application=xulrunner
ac_add_options --disable-optimize
ac_add_options --enable-default-toolkit=cocoa
Make Mozilla
cd {MOZTRUNK}/mozilla
Note: make -f client.mk checkout MOZ_CO_PROJECT=xulrunner
make -f client.mk build
- Verify build by running to your {MOZ_OBJDIR}/dist/bin/xulrunner-bin. You will simply get a usage printed to your terminal.
Checkout Webclient
- Go to {MOZTRUNK}/mozilla
- Checkout Blackwood
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co Blackwood
Note: Note the capital "B" in "Blackwood".
- Verify the checkout by notice a "java" folder and it's contents in {MOZTRUNK}/mozilla
Build Webclient
cd {MOZTRUNK}/mozilla/java
../configure
cp build.properties.samples build.properties
vi build.properties #Modify the appropriate path. You will also need to have junit
- Copy the contents of {MOZTRUNK}/mozilla/java/makefiles to {MOZTRUNK}/mozilla/allmakefiles.sh. You will insert it as such:
#
# Common makefiles used by everyone
#
add_makefiles "
Makefile
build/Makefile
build/unix/Makefile
config/Makefile
config/autoconf.mk
config/mkdepend/Makefile
config/doxygen.cfg
java/dom/jni/Makefile
java/dom/src/Makefile
java/webclient/src_moz/gtk/Makefile
java/webclient/src_moz/Makefile
java/webclient/src_ie/Makefile
java/webclient/src_share/Makefile
java/plugins/src/Makefile
java/plugins/jni/Makefile
java/plugins/mozilla/Makefile
"
- Return {MOZTRUNK}/mozilla/java and run "ant"
- You should now how a viable webclient build.