Shared library build of Chromium’s Content module
Перейти к файлу
John Kleinschmidt 4a4acde552
Merge pull request #644 from electron/fix-s3-upload-1-7-x
Change to only copy proper file to s3
2018-08-10 11:11:18 -04:00
.circleci Add CircleCI 2017-08-29 09:31:42 -04:00
chromiumcontent Turned off debug mode in shared_library 2017-08-11 10:18:01 -04:00
patches Backported fix for V8 security issue (#475) 2018-03-10 03:28:27 +09:00
patches-mas fix: backport MAS api removal to 1-7-x 2018-08-07 11:40:22 -07:00
resources Use our own template 2015-06-29 10:33:58 +08:00
script Add CircleCI 2017-08-29 09:31:42 -04:00
tools Use ninja to copy libraries to dist dir 2017-08-13 16:17:49 -03:00
vendor Remove chromium submodule 2017-06-12 10:37:08 -07:00
.gitignore Configure gclient dynamically and allow use of "cache_dir". 2017-08-13 16:17:49 -03:00
.gitmodules Remove chromium submodule 2017-06-12 10:37:08 -07:00
Jenkinsfile Add Jenkinsfile for new server 2017-11-09 15:11:10 -05:00
LICENSE.txt Add README and LICENSE 2013-02-28 08:47:47 -05:00
README.md Configure gclient dynamically and allow use of "cache_dir". 2017-08-13 16:17:49 -03:00
VERSION Upgrade to Chrome 58.0.3029.110 2017-05-09 14:23:57 -07:00
appveyor-override.yml Use VS2015 for 2-0-x (and older) 2018-08-07 15:37:03 -04:00
vsts.yml Change to only copy proper file to s3 2018-08-09 16:37:10 -04:00

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

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.