Build a Google Chrome browser for Linux

Source: Internet
Author: User
Article Title: Build a Linux version of Google Chrome. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Chromium compilation instructions (for Linux)

This page describes how to compile and build a Chromium browser on a Linux operating system. If you are testing chromium or want to port chromium to another platform, please continue reading.

TIPS: Currently, there is no Chromium browser running in Linux. Although the molecular modules of Chromium have been compiled in linux and tested in a small number of units, all those are just a command called "all tests pass!

Prerequisites

Note: Our idea is that you can compile and build Chromium in any applicable modern Linux release, and we try our best to list the system compilation prerequisites. Of course, please bear the fact that Linux porting is only at the beginning, and we have limited testing in most Linux releases. within Chromium, our development platform is a variant of Ubuntu8 (hard heron), and we hope you will have good luck on this system platform.

The Linux platform requires the following software to compile and build:

Subversion> = 1.4 (Note: if you are using the tarball (compressed package format), it is difficult to pay attention to code changes. You need version 1.5 and we will fix it later: subversion is a version control software that is more advanced than CVS)

Pkg-config> = 0.20 (TRANSLATOR: pkg-config is a library Configuration tool for development)

Python> = 2.4 (TRANSLATOR: Python programming language, which refers to the Python environment and Tool)

Perl> 5.x

Gcc/g ++> = 4.2

Bison> = 2.3 (TRANSLATOR: GNU bison syntax analysis Conversion Tool ?)

Flex> = 2.5.34

Gperf> = 3.0.3

Libnss3-dev> = 3.12

In Ubuntu8, you can use the following command to get all the software at once:

$ Sudo apt-get install subversion pkg-config python perl g ++ bison flex gperf libnss3-dev

Get code

1. Select the compiled directory.

In this document, we will call this directory the variable $ CHROMIUM_ROOT.

2. Get the code library tool.

$ Cd $ CHROMIUM_ROOT

$ Svn co linux> http://src.chromium.org/svn/trunk/depot_tools/linux depot_tools

(Or download the compressed package file in .tar.gz format: depot_tools_linux.tar.gz)

To keep this Compilation instruction document independent and complete, assume that your depot_tools directory is under your compilation directory ($ CHROMIUM_ROOT), but it is not necessary, you can place it anywhere and add this PATH to your PATH environment variable or other variables,

3. because many people are highly interested in this, our temporary work server cannot be accessed. Please download the code snapshot from SVN, decompress it, and upgrade the code as instructed below, you will get the same result through gclient synchronization.

$ Cd $ CHROMIUM_ROO

$ Export LANG = C # temp workaround for gclient behavior

$./Depot_tools/gclient config http://src.chromium.org/svn/trunk/src

$./Depot_tools/gclient sync

Tip: by default, when you run the gclient synchronization tool, depot_tools will automatically update the code to the latest version (at any time). If you want to disable this operation, please refer to the depot_tools documentation page.

Build

Compile and build the current Chromium linux subset:

$ Cd $ CHROMIUM_ROOT/src/chrome

$ ../Third_party/scons. py Hammer

After compilation, the executable program is placed in the $ CHROMIUM_ROOT/src/chrome/Hammer directory.

Troubleshooting

Sh: d: not found while processing Hammer/webkit/WebCore/xml/XPathGrammar. y

You have not installed bison. We are repairing our compilation script to make it easier to use and friendly, but our code change records are not updated when you read this document!

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.