Monday, April 4, 2011

Getting the Firefox 4 Source on Linux

A couple of days ago, I decided that I wanted to use whatever little technical skills I have to help contribute to an open source project. Firefox was the first one that came to my mind and I decided to go about reading about it. To my surprise, I found very very little material that is dedicated to helping beginners begin contributing to Open Source and I took it upon myself to write a couple of tutorials along my learning journey to help those who may want to follow.

Unfortunately, for now, the tutorials will be restricted to Firefox (The project of my choice)

The first Challenge I faced was finding documentation that showed a newbie how to download the Firefox source.

Most developers use a Source Code Management tool. For reasons unknown to me, the Firefox developers have decided to choose Mercurial:
for more info: http://en.wikipedia.org/wiki/Mercurial

I haven't mastered mercurial. I only know what it is. I don't intend on spending much time learning it separately and hopefully, my choice is right.

I currently use Ubuntu and all my tutorials (wherever OS and distro specific) will be based around Ubuntu.

The first thing you need to do is to install Mercurial.

The Mozilla developer guide is relatively straightforward:
https://developer.mozilla.org/en/Installing_Mercurial

Once you've done that, I strongly suggest you read the Mercurial Basics:
https://developer.mozilla.org/en/Mercurial_basics

Next, open the terminal (if not already opened). Create a directory in your Home directory (or anywhere else) called <whatever you want>.This is the folder where you will be doing your work.I've created a folder called ffox. In this folder,
I've downloaded the source. To do the same:


# Create a new folder called <whatever you want>
#Mine's called ffox
cd #jumps to home folder
mkdir ffox
cd ffox #jumps to ffox


 Please note that the lines/phrases starting with a # are comments and are NOT to be typed in.They are only for reference.


The next thing you want to do is to download the source for firefox 4:

# Pull the Mozilla source to the folder 200src/ - may take a while
# as hundreds of megabytes of history is downloaded to .hg
hg clone http://hg.mozilla.org/releases/mozilla-2.0/ 200src


Please note that the lines starting with a # are comments and are NOT to be typed in .They are only for reference.


More tutorials WILL follow. Please do comment or ping me to let me know if you'd like something to be included.















 










No comments:

Post a Comment