Friday, September 21, 2007

Session 5 - build ff debug mode in Windows XP computer

I assumed that my experience on the spring about building the fox was enough, therefore I didn't worry too much to do this time, but I decided to have multiple mozconfig files and I have seen that the build in my windows vista doesn't work properly.

Now, I'm gone to my brothers XP computer and I have done this:
  • Installed MS Visual C++ Express edition
  • Installed Windows 2003 SP SDK
  • Installed Mozilla Build 1.1
I've run msvc8.bat and run these commands:
  • cd /c/
  • mkdir ff
  • cd ff
  • cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/client.mk
  • time make -f client.mk checkout MOZ_CO_PROJECT=browser // 11 min and 27 sec
  • vi .mozconfig
  • # mozconfig file for Firefox in debug mode, disable optimization
    # and using shared libraries instead of static

    mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../ff-debug-@CONFIG-GUESS@

    # this line includes two commands that appear on
    # http://mxr.mozilla.org/mozilla/source/browser/config/mozconfig
    # it adds MOZ_CO_PROJECT=browser and enable app = browser
    . $topsrcdir/browser/config/mozconfig

    ac_add_options --disable-optimize
    ac_add_options --enable-debug
    ac_add_options --disable-static --enable-shared
  • time make -f client.mk checkout // 5 min; I don't have to type MOZ_CO_PROJECT since it is defined in the .mozconfig - Last checkout to see if I've the latest code
  • Before I build (instructions )
  • time make -f client.mk build // 81min (Amd Sempron 2600+, 1,6Ghz, 768MBRam)
Let's run the ff3 in debug mode:
  • export XPCOM_DEBUG=warn
  • /c/ff/mozilla/ff-debug-/dist/bin/firefox.exe -Profilemanager -no-remote
  • Create a new profile: development
  • Select "OK", few error messages and minefield is running

Another things that I have learnt:
  • I could download a tar ball (source code compressed into .tar.gz extension) and build from there
  • For trunk builds, you can simply run make package in your object directory to create a packaged build. This will create a zip or tar.gz file in objdir/dist which you can then unpack anywhere.
  • To build a Windows installer, simply use make installer in your object directory.

No comments:

Post a Comment

Post a Comment