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.

Build prerequisites

  • 64-bit version of Windows 10
  • Install Rust Compiler
  • Install Visual Studio 2017 (Community Edition)
  • 40 GB of free space on your hard drive

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.

browser/themes/windows/browser.css

4. I have changed the tab background picture to http://i.imgur.com/UkT7jcm.gif.

rowser/locales/en-US/chrome/browser/browser.dtd

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

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. 

First Build

Leave a Reply

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