Introduce Chromium
Lu Yuan
2016-08-03
Background
Welcome to Chromium
Tuesday, September 2, 2008
- Why did Google release the source code?
- How will we be working with the open source community?
Breaking News
- 2008-09-02 Google Chrome for Windows
- 2008-10-01 Google Chrome, Chromium, and Google
- 2009-01-08 Google Chrome Release Channels
- 2009-06-04 Danger: Mac and Linux builds available
- 2010-08-02 Google Chrome in a Coal Mine (Canary)
- 2013-04-03 Blink: A rendering engine for the Chromium project
- 2014-06-03 Try out the new 64-bit Windows Canary and Dev channels
Cost
- The huge size of source code
- High requirement to hardware
- Lack of documentation
- Body of knowledge
Advantage
- Specification and implementation
- Good design ideas
- Optimization
- Monitoring
- Testing
- Simulator
- Cross platform client
- Customizing WebView
- ...
Tools
- depot_tools
- fetch
- gclient
- gyp
- ninja
depot_tools
A collection of tools for dealing with Chromium development.
- git map
- git auto-svn
- git upstream-diff
- gcl
- ...
- fetch
- gclient
fetch
- fetch android
- fetch ios
- fetch blink
- fetch v8
- fetch skia
- fetch chromium
gclient
Meta checkout manager supporting both Subversion and GIT.
- gclient config
- gclient sync
- gclient runhooks
GYP (Generate Your Projects.)
GYP is a Meta-Build system: a build system that generates other build systems.
- Python
- VS CMake
Ninja
Ninja is a small build system with a focus on speed.
- Fast
- Static
- Designed to have its input files generated by a higher-level build system
Others
- GN
- API Keys
- ...
Steps
- Prerequisites
- Checkout
- Build
- Run
- Debug
Prerequisites
- platform
- IDE
- SDK
- depot_tools
- Envionment Variables
$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
$ export PATH=$PATH:/path/to/depot_tools
$ xcode-select --install
$ ls `xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs
Checkout
- fetch
- gclient
- git
$ mkdir chromium
$ cd chromium
$ fetch chromium # [fetch --no-history chromium]
$ cd src # All other commands are executed from the src/ directory.
$ gclient runhooks
Checkout (iOS)
- fetch
$ cat > chromium.gyp_env <<EOF
{
"GYP_DEFINES": "OS=ios chromium_ios_signing=0",
"GYP_GENERATORS": "ninja,xcode-ninja",
}
EOF
$ mkdir chromium_ios
$ cd chromium_ios
$ fetch ios
$ cd src # All other commands are executed from the src/ directory.
$ gclient runhooks
Build
- ninja
$ ninja -C out/Debug chrome
Build (iOS)
- ninja
$ ninja -C out/Debug-iphonesimulator All
$ ninja -C out/Debug-iphoneos All
Run
out/{Debug|Release} directory
Run (iOS)
$ out/Debug-iphonesimulator/iossim out/Debug-iphonesimulator/ios_web_shell.app
Debug
- Disabling ReportCrash
- --single-process
- --renderer-startup-dialog
$ launchctl unload -w /System/Library/LaunchAgents/com.apple.ReportCrash.plist
$ sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.ReportCrash.Root.plist
$ ~/dev/chrome//src/xcodebuild/Debug/Chromium.app/Contents/MacOS/Chromium --renderer-startup-dialog
Cases
- Render
- API
Thank you
Introduce Chromium
By luyuan
Introduce Chromium
Introduce Chromium
- 1,611