The Linux distillery
Bringing the world of Linux to you, David cuts through the tech and shows you how it works and how to use it, in terms that apply to any distro. RSS
Technology news and Jobs arrow The Linux distillery arrow A Linux users' guide to Google Chrome
A Linux users' guide to Google Chrome E-mail
by David M Williams   
Thursday, 04 September 2008
Other Linux distros will have similar commands using the relevant package manager. Or, you can always use the graphical package tools to locate and tag each of the above for installation or updating.

Next, make a directory to put the Chrome source code.
mkdir chrome
cd chrome


Download depot_tools, which is a set of utility functions provided by, and required by, Chrome.
svn co http://src.chromium.org/svn/trunk/depot_tools /linux depot_tools

If you get output similar to mine then it has worked successfully:
A    depot_tools/gcl
A    depot_tools/gclient
A    depot_tools/hammer
A    depot_tools/README
A    depot_tools/bootstrap
A    depot_tools/bootstrap/update.sh
Checked out revision 1673.

The depot_tools consist of four main items. First gcl is a tool for uploading and managing code reviews on the Chromium project using the Rietveld code review tool.

gclient is a script for managing a workspace with modular dependencies that are checked out independently from different repositories. It makes call to Subversion under the hood.

The intriguingly named hammer is a wrapper script for building Chrome with the SCons software construction tool. SCons is an improved, latest-generation software build tool which is intended to ultimately replace classic mainstays like make, autoconf and ccache.

Finally, depot_tools can keep itself up-to-date by running bootstrap/update.sh periodically. Actually, when you run gclient it will do this automatically anyhow. There’s likely no reason to prevent this behaviour but if you wish to do so set the environment variable DEPOT_TOOLS_UPDATE to 0.

Now with all these prerequisites in place it’s time to download the most important item, the Chrome source code itself, which is known as the Chromium Project.. Download the file http://build.chromium.org/buildbot/archives/chromium.tgz. Unpack its contents into the chrome directory you have made. You should now have these files and directories:
depot_tools
.gclient
.gclient_entries
README-archive
src

To make sure everything is absolutely up to date, run the following series of commands:
export LANG=C
./depot_tools/linux/gclient config
http://src.chromium.org/svn/trunk/src
./depot_tools/linux/gclient sync

Running gclient causes it to update the depot_tools utilities, and passing it the sync parameter also forces it to update the source code tree for Chrome itself. Really, gclient is a wrapper around the Subversion svn tool which provides version management for software projects.

Build the package with these commands:
cd src/chrome
../third_party/scons/scons.py Hammer

This last command will take a while to run, and the files it builds will be placed in the folder chrome/src/chrome/Hammer. Now, depending on what has been updated since I wrote this you may have more success than I did, but my build didn’t complete.

Nevertheless, you are now in a position to synchronise your source code with the official development source code repository back at Google HQ meaning you have a time advantage as progress is made; the above process will be the exact same set of steps to update the code you have and to build the project no matter what its stage of development.

We may not have a working Chrome browser but we can begin exploring the source code to probe the Chrome internals.

CONTINUED







 
< Next story in category   Previous story in the category >
iTWire user statistics Visitors last 30 days
Suscribers
904,266
13,751
#1 independent technology news advertise here
  •   *  
  • Search
  • AdvSeach
  • Login
  • Events
  • FreeStuff
Subscribe to our free e-newsletter