My Journey on Building Firefox for the First Time!

I want to share my experience on building Firefox from the ground up. I’ll be using windows 10 for this operation. To begin, my first task was to determine whether my computer has all the necessary tools and configurations to build Firefox.

Note:If you would like to build your own version of Firefox you may download the links provided. However, I believe Its best that you follow the official installation guide of MDN.

Build prerequisites

Next, I will download MozillaBuild 3.0, which enables me to clone the source code of Firefox and eventually build it using built-in commands.

Patience is a virtue

After cloning the source code to my hard drive I felt that finally I’m making some progress. Now, the fun begins as I need to make some changes to the source code. In my lab requirement I had to change few things, which described in more detail in the drop-down tabs on the right.

browser/base/content/browser.css

1. I’ve replaced the following function method so when a user opens a new tab the browser will open a cats GIF.

function OpenBrowserWindow(options){

return window.open(“http://www.chilloutandwatchsomecatgifs.com”);

}

browser/base/content/browser.js

2. In this File I have changed the default text color to GREEN when initiating Firefox remote control mode.

browser/themes/shared/tabs.inc.css

3. In here I have altered the “min-height” of the tab to appear to be bigger.

5. I have modified the labels for menu items for “New Window” to “Yo! NEW WINDOW ASAP!”

ERROR: Couldn't load XPCOMIf you see this error messege after running "mach run" command on MozillaBuild try to rebuild the source code ("mach build") it should fix this issue.

How long did it take me?

Hour, Build time

Hours, Download time

So far, so good

After hours of compiling and downloading time I have noticed that Firefox is built on many languages such as C++, C, JavaScript, XUL and many more and that it is also made of 17,998,723 lines of code as it is a truly remarkable project. This was an pleasant experience even though sometimes I wasn’t sure if I were following the instruction correctly. My recommendation to anyone who is trying to build on any operating system is to never give-up no matter how many errors you get. It’s great to see that with a small code modification you could experienced a whole new browser.