How to download chromium source code

Source: Internet
Author: User
I. compiling environment

My development environment: Windows XP + Visual Studio 2005 + Microsoft Windows sdk7 + Microsoft DirectX SDK (June 2010)

Note: It is recommended that you install

1. Use Visual Studio 2005
Visual Studio 2005 Service Pack 1.
Install hotfix 947315 and Hotfix 949009.
If the operating system is vista, you must install Visual Studio 2005 Service Pack 1 Update for Windows Vista.
2. Use Visual Studio 2008
Visual Studio 2008 Service Pack 1.
Install the patches kb967631, kb960075, kb958842, kb957912, and kb971092.
3. Install Microsoft Windows sdk7

Microsoft Windows sdk7

4. Install the latest Microsoft DirectX SDK
I use Microsoft DirectX SDK (June 2010) to meet compilation requirements.
5. Configure Microsoft Windows sdk7
Choose Start> All Programs> Microsoft Windows SDK V7> Visual Studio registration> Windows SDK Configuration tool. Select "V7" in the drop-down box on the Right of install Windows SDK versions ", in select Visual Studio versions, select Microsoft Visual Studio 2005 (or Microsoft Visual Studio 2008) and click make current (in the displayed dialog box, select OK ).

Ii. Download Code

Download the code management tool depot_tools, which is a client tool that Google uses to obtain SVN code encapsulated in Python. Decompress depot_tools to the directory e:/Chrome/depot_tools (do not include Chinese characters or spaces in the directory path), and add the directory path to the PATH environment variable. Then, create the environment variable gyp_msvs_version = 2005 (or 2008). The purpose of this environment variable is to ultimately produce the project type of vs2005 (or 2008. Then run the command CD to E:/Chrome/chromium to execute the command.
Gclient: configure the environment.


1. It is slow to directly download the source code using the depot_tools tool. I will first download the latest stable version of the source code offline package, and then update it to the latest version. Decompress the offline package, for example, E:/Chrome/chromium directory (do not include Chinese characters or spaces in the directory path, and ensure that the partition has 20 GB of remaining capacity ). Update the source code to the latest version, and produce the vs2005 (or vs2008) project file. Run the command line CD to E:/Chrome/chromium directory (SRC folder under chromium directory) and run the command gclient
Sync -- force: Run gclient runhooks -- verbose to generate the corresponding project file.


2. SVN download code: run the following command after depot_tools is installed:

CDE:/Chrome/Chromium
Gclient config https://src.chromium.org/chrome/trunk/src
SVN ls https://src.chromium.org/chrome

Generate a. gclient file after completion, and continue to execute gclient sync to start updating the Code. After the code is downloaded, run gclient runhooks-verbose to generate the project file.

3. Compile the code

Go to the E:/Chrome/chromium \ SRC \ chrome directory and open chrome. the SLN solution is slower than the process because vs intelliisense and visual assist (if installed) analyze the code, which is time-consuming and card-running. We strongly recommend that you disable vs intelliisense.
Directly compile the chrome. proj project under the chrome directory. This process is more time-consuming (it is related to computer configuration, and it takes about 4 hours). Please wait.
After compilation is successful, the debug program is generated in the E:/Chrome/chromium \ SRC \ chrome \ DEBUG directory.
Set chrome. proj as the startup project, F5, and debug mode. Check whether the source files in other projects can be set to a breakpoint (my files won't work, so it's so sad !), If you can, congratulations, go to Chrome's learning journey. But no, please continue.
Iv. Solution to Chrome's inability to debug
After entering the debugging mode, click "debug"-> "window"-> "module" to view the chrome. is the DLL symbolic file not loaded successfully? If yes, the problem should be the same as mine.
VS 2005 create a solution and add only chrome. proj and chrome_dll.proj project, set chrome. set proj as the startup project, F5, and debug directly (No compilation or compilation is required. If you need to compile, return to chrome. SLN compilation). Now let's see if you can set breakpoints. If you can, congratulations.
The cause of the problem may be that there are too many projects in Windows XP + 2 GB memory + chrome. sln (it seems that 2 GB memory faces chrome of nearly 500 projects, which is a bit out of the box ).



Now, the Chrome source code learning environment has been set up, and the learning journey is coming soon!


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.