Yay!

I have successfully built mozilla on my laptop running Windows. Note, my laptop is running vs 2003 and not the recommended vs 2005. I have that on desktop and will be doing the build before I go to bed tonight.

Anyhow, I figured I would take this time to document the steps I took to do it:

  1. Download the build tools. For windows:
    http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites. Because I’m using vs 2003 on laptop, I ran start-msvc71.bat
  2. Create a directory where you would like your source code to go. Note that path name cannot contain spaces.
  3. use cvs to checkout the source code. The quick start guide at:
    http://developer.mozilla.org/en/docs/Mozilla_Source_Code_%28CVS%29#CVS_Client_Settings
    shows the three commands needed to checkout the source for the browser and put it into a directory called mozilla. NOTE. running all 3 lines will get you the source.
  4. after getting the source, go into the top directory of the source and create a folder where you will want your object files to go. This will allow you to clean the build and rebuild more easily. This folder can have any name.
  5. Create a .mozconfig file in your top directory. This file specifies the options. The options I specified enabled debugging, disabled optimizing, specified the location of my object files. It was four lines long and contained:. $topsrcdir/browser/config/mozconfig
    mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objectfiles
    ac_add_options –enable-debug
    ac_add_options –disable-optimize
  6. Build it with the command:
    make -f client.mk build
  7. wait for about an hour (hoping it will be less on my desktop).
  8. test it out. Suppose that you had named the directory where you want the object files to go in step 4 “objectfiles”, your executable will be in objectfiles\dist\bin
    Special note. The first time I tried to test it out, I had firefox already running. So when I went to run the executable that I had just built, I spawned another window of firefox 2. I had to close off firefox 2 first before running it.

5 Comments

  1. Will said,

    September 19, 2007 at 6:46 am

    Congratulations on your successful build. It’s kind of a beast at first.

  2. Ben said,

    September 19, 2007 at 11:36 am

    Good job!

  3. Lukas Blakk said,

    September 19, 2007 at 3:43 pm

    yes, congrats. and also you’re not the only one who opened the new build with a ff2 running in the background – there should be a note about that somewhere.

  4. September 19, 2007 at 4:06 pm

    You should use -no-remote when you run your minefield build, which lets you have multiple instances going at the same time. I’d do it like this:

    $ cd objdir/dist/bin
    $ firefox.exe -no-remote -profilemanager

    You want the last one so you can make a new profile and not corrupt your old one.

  5. January 25, 2008 at 10:35 pm

    [...] , if I use Visual Studio 2005 on my machine (I think). Use start-msvc71.bat if you use VS 2003 as Cathy said. This will bring up a sort of bash shell window that accepts unix commands. We’ll be working [...]


Post a Comment