Shared library build of Chromium’s Content module
Python Shell Other
Switch branches/tags
v51.0.2704.61 v47.0.2526.110 v45.0.2454.85 v45.0.2454.85-atom v45.0.2454.85-atom-3 v45.0.2454.85-atom-2 v45.0.2454.85-atom-1 v44.0.2403.125 v44.0.2403.125-atom v43.0.2357.65-atom v43.0.2357.65-atom-8 v43.0.2357.65-atom-7 v43.0.2357.65-atom-6 v43.0.2357.65-atom-5 v43.0.2357.65-atom-4 v43.0.2357.65-atom-3 v43.0.2357.65-atom-2 v43.0.2357.65-atom-1 v42.0.2311.107 v42.0.2311.107-atom v42.0.2311.107-atom-3 v42.0.2311.107-atom-2 v42.0.2311.107-atom-1 v41.0.2272.76 v41.0.2272.76-atom v40.0.2214.91 v40.0.2214.91-atom v39.0.2171.95 v39.0.2171.95-atom v39.0.2171.95-atom-1 v39.0.2171.65 v39.0.2171.65-atom v38.0.2125.122 v38.0.2125.122-atom v38.0.2125.104 v38.0.2125.104-atom tmp-delete-me-later old-chromium66-branch libcc_13347f8a080ac895c30e63e6cea5f95e13da0617 libcc_362a9ba178fe7c36d94833147a15ab1cbfaeca5a libcc_7c308e6d0005ca3d8210b221db03bb62f8b552fb libcc_5baea01acbb22df55495dfeb421e25d699bd0bc1 libcc_da5e68c0f85bc89a904135421536527081903428 libcc_d05df813058689ef27d05cc6456edae4e7f8fc9e libcc_c6d142324fef3c806eaeea255e9da6be3acb9ab0 electron-4.0.0-nightly.20180819 electron-4.0.0-nightly.20180817 electron-4.0.0-nightly.20180816 electron-3.0.0-nightly.20180818 electron-3.0.0-beta.6 electron-3.0.0-beta.5 electron-3.0.0-beta.3 electron-3.0.0-beta.2 electron-3.0.0-beta.1 electron-2.1.0-unsupported.20180809 electron-2.0.8-nightly.20180820 electron-2.0.8-nightly.20180819 electron-2.0.7 electron-2.0.5 electron-2.0.4 electron-2.0.3 electron-2.0.2 electron-2.0.1 electron-2.0.0 electron-1.8.7 delete-me-later-2
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

libchromiumcontent

Automatically builds and provides prebuilt binaries of the Chromium Content module and all its dependencies (e.g., Blink, V8, etc.).

Development

Prerequisites

Note: Even though it is not mentioned in chromium documentation, pywin32 must also be installed for gclient to work properly. Before invoking script/update, download/install the x64 version from: https://sourceforge.net/projects/pywin32/

One-time setup

$ script/bootstrap

Building

$ script/update -t x64
$ script/build -t x64

Updating project files

If you switch to a different Chromium release, or modify files inside the chromiumcontent directory, you should run:

$ script/update

This will regenerate all the project files. Then you can build again.

Building for ARM target

TODO: This section may be out of date, needs review

$ ./script/bootstrap
$ ./script/update -t arm
$ cd vendor/chromium/src
$ ./build/install-build-deps.sh --arm
$ ./chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py --arch=arm
$ cd -
$ ./script/build -t arm

Building for ARM64 target

$ ./script/bootstrap
$ ./script/update -t arm64
$ ./script/build -t arm64
$ ./script/create-dist -t arm64

Adding a Patch

The Chromium checkout consists of several repos. Chromium itself is in the src directory, and its dependencies are in subdirectories of src, mostly in src/third_party/*.

Files in the top level of the patches directory only contain patches for the files in src that belong to the Chromium repo itself. Subdirectories like patches/v8 or patches/third_party/skia contain patches for the corresponding subdirectories in src (src/v8 and src/third_party/skia respectively), which are independent repos.

If you need to make changes in two different repos, you must create two patch files. Giving those patch files the same name is a good idea.

Get Chromium in src/ and apply existing patches to it. No need to do this again if it has already been done:

./script/update

Change to the src directory:

cd src

Stage existing changes to make git diff useful:

git add .

Make any code changes you like.

When you're done, pipe the diff into a patch file. The file should be prefixed with a number with leading zeros that is greater than any existing patch index, e.g. 0052 if the last patch in the folder is named 0051-some-other.patch:

git diff > patches/0052-meaningful-name.patch

Releases

There is no formal release process for libchromiumcontent, as release artifacts are created as a byproduct of CI. When a build is successful, its compiled asset is automatically uploaded to S3. These assets are later downloaded as part of Electron's bootstrap script. These files are about 4GB, so the bootstrap task takes a while to run.

Asset URLs have the following format:

`https://s3.amazonaws.com/github-janky-artifacts/libchromiumcontent/${platform}/${commit}/libchromiumcontent.zip`

Builds exist for the following platform/arch pairs:

  • linux/arm
  • linux/ia32
  • linux/x64
  • mas/x64 (though osx/mas would be a more accurate name)
  • osx/x64
  • win/ia32
  • win/x64

The Linux machines only build for pushes by GitHub employees, so PRs from third parties have to have their linux builds triggered manually.

Each platform/arch has its own CI task, so it should be made sure that all platform/arch have the CI tasks started and finished. To verify that a given commit has all the necessary build artifacts:

npm i -g electron/libcc-check
libcc-check 7a9d4a1c9c265468dd54005f6c1920b2cc2c8ec3

Setting libchromiumcontent version in Electron

For Electron versions 1.7 and higher, libchromiumcontent is vendored as a git submodule in the Electron repo. To change the version that Electron is using, use git to check out the target branch / SHA:

cd electron/electron/vendor/libchromiumcontent
git checkout some-branch-or-sha

For Electron versions 1.6 and lower, libchromiumcontent is vendored as part of a (now retired) project called brightray. To change the version that Electron is using, change the commit SHA in config.py.