Tip:
Highlight text to annotate it
X
This video assumes that you already have your development environment setup.
The first thing we're going to do is go to the C:\mozilla-build folder
and we're going to find the file: start-msvc11.bat
And that file corresponds to Visual Studio 2012.
So we're going to go ahead and open that file.
And I'm just going to clear the terminal.
What we're doing in this video is we're getting the source code.
Now there's 2 different ways to get the source code:
1. To use hg clone, and that's the best way if you have a good internet connection.
But it has no resume capabilities. So if you don't have the best internet connection,
you're going to want to use a prepacked bundle for download.
And then, that's a little bit more complicated, but we're going to do both in this video.
And we're going to start with the easier one which is hg clone, so people can drop out if they don't need the rest.
So the first thing we're going to do is we're going to create a directory where the source code is going to live.
I typically put that inside a folder called /c/projects/mozilla
And I'm just going to go inside of that folder now.
And I use hg clone, the location of the source code is at: hg.mozilla.org/mozilla-central
And I'm going to hit enter.
Now this process is going to take, maybe 30 minutes, so I'm just going to pause the video at this point.
And I'll resume it when it's done.
And we're done now. If things succeeded for you like they did for me.
You're going to have a new folder called mozilla-central.
So I'm just going to go into it.
And I'm going to list the files in that directory.
And you can see that I have everything checked out.
If you weren't so lucky and things didn't work out, what we're going to do now is download a bundle.
So I'm just going to open up the Firefox browser, and in quotes I'm going to type:
"mozilla-central.hg"
And I'm going to search for that, the quotes just tell Google to interpret the query literally.
And the first result says Bundles, so I'm going to click that.
And I'm going to scroll down,
and the bundle we want to download is called mozilla-central.
So go ahead and click that.
And it'll try to save it, I already have it downloaded so I'm just going to press Cancel.
And then if you go look in your downloads, you'll see mozilla-central.hg.
So I'm going to go back to my terminal here.
And I'm going to go back one directory.
I'm going to move the one that we just checked out to a new location.
And I'm going to re-create a mozilla-central directory.
And the first thing I'm going to do is initialize a new hg repository locally.
Actually I need to go into the mozilla-central directory first.
hg init
Next what we have to do is type hg unbundle
And we're going to go to the Downloads location of our users directory.
And we're going to look for mozilla-central.hg
And we're just going to hit enter.
So this process also takes a very long time, so I'm going to pause again.
OK and we're back, so that took a while, and if we go look at the directory.
We're going to see that we see... not all the source code
just a .hg folder.
So what we're going to do now is we're going to add a mozilla-central URL into the .hg/hgrc file
And that's going to basically allow us to pull in the changes, the changes that were made since the bundle was created basically.
gvim hgrc
Hit enter
And I'm going to go ahead and type: [paths] default = http://hg.mozilla.org/mozilla-central
I'm going to save and quit.
So that just sets the default for where to pull new changes [from]
From here on out you're going to use hg. You don't need to use bundles anymore.
And that sets that up for you basically.
So now we're going to get all the changes since the bundle was created by using hg pull
And that shouldn't take very long.
The bundles are updated on the web pretty frequently.
And then hg update, will actually fill in all those files that we seen were missing.
To get your whole source directory.
And that's about all for this video.
When you're done you'll have an exact copy of what you have from an hg clone by the way.
See you soon.
Subtitles by the Amara.org community