-
Notifications
You must be signed in to change notification settings - Fork 1
setting up chromium build env on mac
Here we go.
This is the fast way to get most of the code. then you'll update what's in the tarball using gclient/svn). It can be found here (look for the link that says "download the source tarball"): http://dev.chromium.org/developers/how-tos/get-the-code
The above tarball is going to take a long time to download. So, install yourself a new version of xcode in the meantime.
git clone https://git.chromium.org/chromium/tools/depot_tools.git
git clone git://github.com/martine/ninja.git
cd ninja/
./bootstrap.py
./ninja -h
For a long-term solution, edit ~/.bash_profile
with something like:
export PATH="$PATH":/Users/jbrandt/development/depot_tools:/Users/jbrandt/development/ninja
Or, just do that at the command line in the terminal you plan to use.
For some reason, the tarball contains a lot of extraneous directories. So, do something like:
mkdir /some/temp/dir
mv chromium.r125269.tgz /some/temp/dir/
cd /some/temp/dir
tar -xvzf chromium.r125269.tgz
mv home/chrome-svn/tarball/chromium ~/development/chromium
IMPORTANT: full path to the 'chromium' directory above cannot have any spaces
There's a file called '.gclient' in the 'chromium' directory that tells gclient what to sync to. We all want to be on the same revision, and we'd like to be on a revision that builds correctly. So, change the "url" entry in .gclient' to something from this page: https://src.chromium.org/chrome/releases/
As of this writing, we're on: https://src.chromium.org/chrome/releases/21.0.1154.0/
So, the .gclient file should look something like:
solutions = [
{ "name" : "src",
"url" : "https://src.chromium.org/chrome/releases/21.0.1154.0/",
"custom_deps" : {
# To use the trunk of a component instead of what's in DEPS:
#"component": "https://svnserver/component/trunk/",
# To exclude a component from your working copy:
#"data/really_large_component": None,
"src/third_party/WebKit/LayoutTests": None,
"src/chrome_frame/tools/test/reference_build/chrome": None,
"src/chrome/tools/test/reference_build/chrome_mac": None,
"src/chrome/tools/test/reference_build/chrome_win": None,
"src/chrome/tools/test/reference_build/chrome_linux": None,
}
}
]
SVN keeps its own cache of ssl certs, and sometimes chromium.org isn't in it. That'll cause problems later with 'batch' commands. So, you can check by doing some quick, interactive svn command like:
svn list https://src.chromium.org/chrome/trunk/src
That may prompt you to add an ssl cert. If it does, add it permanently. If it doesn't, you win. Proceed to next step.
Make sure you're in the "chromium" dir that has "src" inside it and run
gclient sync --force
This can take an hour or so. Or longer.
Change to the chromium src dir:
cd [something]/chromium/src
Update clang:
tools/clang/scripts/update.sh
Generate build files
#for ninja:
GYP_GENERATORS=ninja GYP_DEFINES=mac_sdk=10.6 ./build/gyp_chromium
#for xcode:
GYP_GENERATORS=xcode GYP_DEFINES=mac_sdk=10.6 ./build/gyp_chromium
To build with ninja, from chromium/src dir, run:
ninja -C out/Debug content_shell
# or
ninja -C out/Release content_shell
or use Xcode by opening chromium/src/content/content.xcodeproj and throwing away your life.