Project Findbar: setting up a Mozilla dev environment (Windows XP, MSVC++ 2010 Express)

I’ve renamed my Mozilla findbar project to Project Findbar. Clever hey?

nn

I wanted to have a dedicated development environment for doing this work. I have some good reasons for doing this. Firstly, I didn’t want to fill my host system with a bunch of SDKs and source & binary folders. Who knows what some of those SDKs do to my registry or other system configuration. I was especially concerned about what installing the DirectX SDK would do to the version of DirectX that I use for gaming. Keeping the dev environment separate keeps everything nice and clean. No cross over between my stable host system and my “experimental” dev environment.

nn

Secondly, I want to be able to tear down and archive the environment once it is set up. I do not plan on doing any additional Mozilla development after I get the findbar improvement completed. However, as new versions of Firefox are published in the future, I may need to reapply and re-test my modifcations. That is assuming that the Mozilla gods do not accept my submission into the main distro, which I think is what is going to happen. Since the environment will be virtual, I can shut it down, move it to a different computer or drive, and restore it without issue.

nn

Mozilla publishes some great instructions on setting up the software required for building Mozilla.

nn

So here are the instructions that I followed to set up a basic Mozilla development environment:

nn

Materials:

nn

    n

  1. n

    Windows XPnI used Windows XP, so all the instructions below will be for that version. Newer versions of Windows (7&8) can use the 2012 version of Visual Studio.

    n

  2. n

  3. n

    VirtualBox

    n

  4. n

  5. n

    Visual Studio 2010 Express

    n

  6. n

  7. n

    Mozilla Build

    n

  8. n

  9. n

    Mozilla source (you will acquire this as part of the steps below)

    n

  10. n

nn

Steps:

nn

    n

  1. n

    Install VirtualBox.

    n

  2. n

  3. n

    Launch VirtualBox. Create a new virtual machine. The default options should suffice.

    n

  4. n

  5. n

    Insert the Windows CD. Start the virtual machine. Set the CD drive to be the startup disk in the virtual machine.

    n

  6. n

  7. n

    Switch to Scale Mode (optional)nThis is personal preference. Scale mode will allow you to increase the size of the virtual machine window and its contents. The virtual machine screen will be much easier to read.

    n

  8. n

  9. n

    Install Windows as normal. The default options should suffice.

    n

  10. n

  11. n

    After Windows installs and launches, run Windows Update at least once. The system will download a whole bunch of updates that will make your life a heck of a lot easier (such as a newer version of Internet Explorer).

    n

  12. n

  13. n

    Set up shared folders and clipboard in the virtual machine (optional)nShared folders will allow you to easily move files and folders between your host system and the virtual machine. Sharing the clipboard (from host to virtual machine/guest) will allow you to copy text (such as a URL) from a web browser on your host to your guest.

    n

  14. n

  15. n

    Install Visual Studio C++ 2010 Express. The default options should suffice.

    n

  16. n

  17. n

    Install Mozilla Build. The default options should suffice.

    n

  18. n

  19. n

    Launch the Mozilla build command prompt.nOpen a console windows and execute:

    n

  20. n

nn

start-msvc10.batn

nn

    n

  1. Create the source folders:
  2. n

nn

cd /c; mkdir mozilla-source; cd mozilla-sourcen

nn

    n

  1. Download the Mozilla source:
  2. n

nn

hg clone https://hg.mozilla.org/mozilla-centraln

nn

    n

  1. Start the build process:
  2. n

nn

cd mozilla-centralnnnnn./mach buildn

nn

You may be asked to confirm the build

nn

That is as far as I am now. I will update more when I complete it.

nn

Todo:

nn

    n

  • n

    Installing guest additions

    n

  • n

  • n

    Installing Windows XP SP3

    n

  • n

  • n

    Building the source

    n

  • n

Leave a Reply

Your email address will not be published. Required fields are marked *