12th Jan, 2009

Tutorial: How to Compile Google Chrome on Leopard

This is a tutorial to show how to compile Google Chrome on Leopard.

Download and Install Google Depot Tools

First thing you need to do is get gClient, a tool in Google’s Depot Tools. This will help download/sync the latest source code for Chrome. Open a terminal:

cd Desktop/
svn co http://src.chromium.org/svn/trunk/tools/depot_tools/ depot_tools

This will create a folder ‘depot_tools’ on the desktop. Move this somewhere you like. I move this folder into /usr/bin by hitting ‘command-shift-g’, navigating to /usr/bin and dragging this new folder in there. You will probably need to authenticate as well. You will need to add this to the $PATH as well. You do this by going to the terminal:

sudo nano /etc/bashrc

Add: export PATH=$PATH:/usr/bin/depot_tools and exit and save. Quit the terminal.

Download and Compile Google Chrome

After you have installed Depot Tools the gClient command should now work. Open up a terminal:

mkdir chrome
cd chrome
gclient config http://src.chromium.org/svn/trunk/src
gclient sync

If it is your first time downloading the source it could take a while so grab a drink… Later updates you can just run the sync (last command) and it is fairly quick. After it has completed downloading go to the the terminal:

cd src
cd build
xcodebuild -project all.xcodeproj -target All

You can also open the all.xcodeproj in Xcode if you wish. After it is complete you will notice a ‘Chromium.app’ in the xcodebuild directory in the chrome folder. That’s it. Happy Coding!

Leave a response

Your response:

Categories