Google Chromium Development Documentation-Getting Started Guide

Source: Internet
Author: User
If you really want to learn how chromium works, this document is designed for you. You will get the chromium code and compile it. Then you will use Visual Studio 2005debugger to debug it and see how it runs. For more information, you will know how it handles user operations.

Tip: This document is provided to Windows system developers and testers and shows them how to run the Code. If you have not set up the compilation environment, you can refer to the "documentation" page. If your system is not windows, refer to Mac and Linux (another article I translated to build chrome for Linux) compilation Guide prepared by the user.

Get the software you need

This section will show you how to set up the compiling environment for your Windows system. If you have any problems or want to learn more, please refer to "Compilation Guide (for Windows )"

Software that meets the prerequisites

First, you must install the following software on your computer:

* Windows XP (SP2 or later) or Windows Vista

* Microsoft Visual Studio 2005 (8.0)

Additional software (free) download

After Visual Studio is installed, You need to download and install many related software.

1. Download and install Microsoft Visual Studio 2005 Service Pack 1.

Depending on your computer, the installation may take an hour, and you need to restart the computer after installation.

2. download and install the Microsoft Windows SDK.

After the installation is complete, you need to restart the computer. You do not need to install documents or code examples to reduce the disk space.

Tip: although the SDK says it can only be used on Vista, both XP and Vista systems can be used,

If you already have the Microsoft 2008 SDK, you do not need to download a new one.

3. Integrate SDK and Visual Studio

Start Menu> program> Microsoft Windows SDK> Visual Studio registration> merge windows SDK and Visual Studio 2005

4. Obtain chromium depot_tools:

A.download depot_tools.zip

B. decompress the file (unzip)

Tip: If cygwin is installed, do not use unzip to decompress the package. This will cause unauthorized access.

C. Add the depot_tools path to your path, for example, C: \ bin \ depot_tools.

Tip: by default, when you run the gclient synchronization tool, depot_tools automatically updates the code to the latest version (at any time ),

If you want to disable this action, please refer to the depot_tools document page.

Chromium code

There are hundreds of thousands of files in the chromium code library, which means that it takes a long time to directly Use Subversion to detect the code (SVN) from the library. To speed up process processing, we also provide a tarball compressed package file for pilot download. If you select either, you can skip downloading the tarball package and directly obtain code from SVN (this method is not recommended)

Tip: there is no better way to get Code directly from SVN. the tarball package already contains directories and files in SVN. Therefore, after extracting the tarball package, you can use glient sync to get the latest code.

If you only want to view the source code, you need at least 1. 6 GB of available hard disk space. If you want to compile it, you need about 10 Gb of hard disk space, it includes all intermediate code and executable files.

Guided use of the tarball package

1.make sure you have a program that can decompress .tar.gz, such as open-source 7-zip compression.

Package Manager, free bsdtar tool (part of libarchive), and WinZip.

2. Download the tarball compressed package of the source code.

3. Select the directory where you want to place the source code, such as c: \ chromiumtrunk.

Important: Make sure your directory name does not contain spaces

4. decompress the source code package to the directory you selected. For example, if you are using libarchive, run the following command:

"C: \ Program Files \ gnuwin32 \ bin \ bsdtar.exe"-xzf chromium. tgz

5. You can synchronize the code to the latest version.

A. Visit the chromium buildbot watefall page to view the status of the code tree. If the top of watefall is:

Open ??? -The status of this code tree is feasible. You can compile the code and jump to the next step.

Closed-it is possible to compile or test features. You can download the code, but you want to get those features and try to compile it or test new features,

You 'd better update your code again.

B. In the command line window, execute the following command:

Cd c: \ chromiumtrunk

Gclient sync

The preceding depot tool contains the gclient tool. When you run the gclient for the first time,

It has some latency (about one minute) because it needs to update the depot tool first.

Check out code from SVN

You will use the gclient package management tool to download the chromium code from the svn code base ???

1. Create a directory to store your code, such as c: \ chromiumtrunk.

Important: make sure there are no spaces in your directory name.

2. Access the chromium buildbot watefall page to view the status of the code tree. If

Said at the top of watefall:

Open ??? -The status of this code tree is feasible. You can compile the code and jump to the next step.

Closed-it is possible to compile or test features. You can download the code, but you want to get those features and try to compile it or test new features,

You 'd better update your code again.

3. In the command line window, execute the following command:

Cd c: \ chromiumtrunk

Gclient config http://src.chromium.org/svn/trunk/src

Gclient sync

When you run gclient for the first time, it has some latency (about one minute) because it needs to update the depot tool first.

It takes about an hour to download the chromium code.

Build and start Chromium

Once you have all the software and code, you can build chromium and start running it in debug mode.

1. Start Visual Studio

2. Select a File> open the project/solution... and go to the SRC \ chrome directory (C: \ chromiumrunk or

Directory), and then open the chrome. sln project file.

3. In the solution window, right-click the app directory, select chrome_exe, and select "set as startup project"

4. Set the user information required for chromium build

A. Right-click chrome_exe and choose "properties"

B. In the left bar, select "configuration Properties> debug

C. In the right sidebar, change the Command Option to something similar to the following:

-- User-data-Dir = C: \ TMP \ debugprofile

Click OK. Chromium will create a specified information directory.

(C: \ TMP \ debugprofile in the preceding example). If this directory does not exist

Tip: if you have not set the information page, when Google Chrome or chromium is already running

When you run chromium, a new window will be opened in an existing running browser,

This behavior is to ensure that the browser exclusively occupies a user information, but it means that you do not debug your

The new version of chromium.

Warning if the last constructed chromium has a new Information Format, Google Chrome

And earlier versions of chromium may not be able to normally read that information format, unless you have set

You may lose your Google Chrome data.

5. Press F5 to build the chrome_exe solution and run chromium in debug mode.

Answer: If you want to build an expired project, select YES.

6. The build process will take 15 to 40 minutes. After the build is complete, a browser window will appear in you

. If a build error occurs or no new browser window exists, refer to chrome build

The manual for Windows is for help.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.