Compiling chrome from source (chromium)

Source: Internet
Author: User
Tags windows 7 x64

Transferred from: http://www.udpwork.com/item/13827.html

Website description

Http://www.chromium.org/developers/how-tos/build-instructions-windows

Why do you have to write this blog?
    1. It's been a long time since I wrote a blog
    2. Chrome compiled tutorials, too many on the web, but a variety of errors (perhaps not a mistake for their version at the time)
    3. A lot of blogs didn't make the problem clear.
SOURCE package Download (vbox system image file)

Http://pan.baidu.com/s/1ntCHH1Z Password: NBRM

Please leave a message if it expires

The first step is to modify the system language

Switching system language is English!!!!!!

Original website:

You must set your Windows system locale to 中文版, or else you could get build errors about "The file contains a character That cannot is represented in the current code page.

No change, absolute pit!! Reported various coding errors, finally I reinstall Win7 flagship version!!

Must be a x64 system!! Think of memory requirements should also understand!

You must has Windows 7 x64 or later. x86 OSs is unsupported.

Again, install all important system patches and install them with the Windows Update Service!!! It contains IE11, necessary. – This step is only for the sake of insurance.

Step two, install VS2013

The requirements of the official website is VS2013, not 2008, not 2010, not 2012, the current requirements are 2013!!

You must build with Visual Studio Update 4, no other versions is supported.

Http://www.visualstudio.com/downloads/download-visual-studio-vs

Network installation or download ISO (around 6G) can be, only need to install C + + package, all other cancellation.

Tip: The last step to install Update4 patch package (that is, the last stage), will be very slow, very slow, do not know why, anyway, long, wait.

The third step, scientific internet

The next steps need scientific internet, stable scientific Internet, reliable scientific internet, do not blame I didn't remind you git clone is not support for the continuation of the breakpoint!!!

Fourth step, add environment variables

The system's environment variable is added with a depot_tools_win_toolchain value of 0

Fifth Step, install Depot_tools

Download page: Http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_ Tutorial.html#_setting_up:https://src.chromium.org/svn/trunk/tools/depot_tools.zip

Extract to the root directory of a disk, do not take Chinese, special characters and other things like egg, modify the system's environment variables, add the path of Depot_tools to Path

Start cmd, find a directory, execute

Gclient

Will download PYTHON,GIT,SVN and so on self-reliance tools, the system has been installed PYTHON,GIT is not recognized!!!

Sixth step, download the source code

Re-open a console (cmd or comems)

In a disk with more than 60G of space, it is recommended that SSD, at least SSD accelerator disk or hybrid drive

Build a folder, called Chrome_build, or any English name you like, don't Chinese ah ah ah, assuming W:\chrome_build

W:mkdir CHROME_BUILDCD W:\chrome_build

Classic practice, direct fetch

Fetch Chromium #会很久很久

Method of saving traffic

Fetch Chromium # After the sync Word, stop (CTRL + C) gclient sync--no-history--force # takes a long time # if disconnected, re-execute the gclient statement is ready, no need to execute fetch .

Don't think sync is just download the source code, and finally will download the NaCl SDK!!

6th Step Supplemental instructions, about download WebKit

Normal download, download WebKit will be a long time, because it is the entire history of download down.

The following describes the practice, need to modify the Deps file, compare toss, imagine it yourself.

See

[0:13:08]   Src/third_party/webkit

, you can terminate the Gclient

Then, execute:

# Open Src/deps with notepad++, find webkit_revision configuration CD src/third_party/git clone--depth=10 https:// Chromium.googlesource.com/chromium/blink.git webkit# probably download 360mbCloning into ' WebKit ' ... remote:sending approximately  5.08 GiB ... remote:counting objects:123641, doneremote:finding sources:100% (123641/123641) remote:total 123641 (delta 37772), reused 78823 (Delta 37772) receiving objects:100% (123641/123641), 360.61 MiB | 444.00 kib/s, done. Resolving deltas:100% (37772/37772), done. Checking connectivity ... done. Checking out files:100% (144812/144812), done.# executes git rev-list find an available revgit rev-list head#  and then find the SHA1 of the penultimate commit, Modify the value of Webkit_revision # back to the root directory and restart gclientgclient sync--no-history--force

Continue to wait for a long time, really long long, wash and sleep it.

PS:V8 is also very slow, a matter of opinion.

Seventh step, compile

Compiling can be said to be the simplest step

Sir into various documents (can be omitted)

Gclient Runhooks

Perform the compilation, Out/debug can be changed to out/release and so on.

CD Srcninja-c Out/debug Chrome

Output:

ninja:entering directory ' Out/debug ' [541/19418] RULE assembling nacl_switch_unwind_win.asm to OBJ\NATIVE_CLIENT\SR ... Ice_runtime\arch\x86_64\service_runtime_x86_64.gen\nacl_switch_unwind_win.obj. ASSEMBLING:NACL_SWITCH_UNWIND_WIN.ASM[19418/19418] STAMP Obj\chrome\chrome.actions_rules_copies.stamp

19,418 compile tasks, 193xx time to start the link, very slow, my laptop i7-3630, 8G memory, 32G SSD accelerated ordinary mechanical hard drive, compiled for 2 hours.

After the compilation is complete, you can find the Chrome.exe in the Out/debug directory, and launch the chrome you compiled.

How to package the installation files, not yet found the method.

Original link: http://wendal.net/2015/02/04.html

Compiling chrome from source (chromium)

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.