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.
Advertisements

5 responses to “Yay!

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

  2. 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.

  3. 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.

  4. Pingback: Peter » Blog Archive » Minefield For Dummies

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s