2017-08-07 22:31:12 +00:00
|
|
|
# Upgrading Chromium Workflow
|
|
|
|
|
|
|
|
This document is meant to serve as an overview of what steps are needed
|
|
|
|
on each Chromium upgrade in Electron.
|
|
|
|
|
|
|
|
## Update libchromiumcontent (a.k.a. libcc)
|
|
|
|
|
2017-08-11 12:22:35 +00:00
|
|
|
- Clone the repo:
|
2017-08-28 15:41:52 +00:00
|
|
|
```sh
|
2017-08-11 12:22:35 +00:00
|
|
|
git clone git@github.com:electron/libchromiumcontent.git
|
|
|
|
cd libchromiumcontent
|
|
|
|
```
|
|
|
|
- Run bootstrap script to init and sync git submodules:
|
2017-08-28 15:41:52 +00:00
|
|
|
```sh
|
2017-08-11 12:22:35 +00:00
|
|
|
./script/bootstrap -v
|
|
|
|
```
|
|
|
|
- Update `VERSION` file to correspond to Chromium version.
|
2017-08-07 22:31:12 +00:00
|
|
|
- Run `script/update`, it will probably fail applying patches.
|
|
|
|
- Fix failing patches. `script/patch.py` might help.
|
|
|
|
- Don't forget to fix patches in the `patches-mas/` folder.
|
2017-08-11 12:22:35 +00:00
|
|
|
- Build libcc:
|
2017-08-28 15:41:52 +00:00
|
|
|
```sh
|
2017-08-11 12:22:35 +00:00
|
|
|
./script/build
|
|
|
|
```
|
|
|
|
- Create dist folders which will be used by electron:
|
2017-08-28 15:41:52 +00:00
|
|
|
```sh
|
2017-08-11 12:22:35 +00:00
|
|
|
./script/create-dist --no_zip
|
|
|
|
cd dist/main
|
|
|
|
../../tools/generate_filenames_gypi filenames.gypi src shared_library static_library
|
|
|
|
cd -
|
|
|
|
```
|
|
|
|
- Open a pull request to `electron/libchromiumcontent` with the changes.
|
2017-08-07 22:31:12 +00:00
|
|
|
- Fix compilation on the all supported platforms/arches.
|
|
|
|
|
2017-08-11 12:22:35 +00:00
|
|
|
## Update Electron
|
2017-08-07 22:31:12 +00:00
|
|
|
|
|
|
|
- Set `vendor/libchromiumcontent` revision to a version with the new Chromium.
|
|
|
|
- It will be great if GH builds for this libcc version are already green
|
|
|
|
and its archives are already available. Otherwise everyone would need
|
|
|
|
to build libcc locally in order to try build a new Electron.
|
|
|
|
- Set `CLANG_REVISION` in `script/update-clang.sh` to match the version
|
2017-08-11 12:22:35 +00:00
|
|
|
Chromium is using. You can find it in file `src/tools/clang/scripts/update.py` in updated `electron/libchromiumcontent` repo.
|
|
|
|
- Run `script/bootstrap.py`.
|
2017-08-07 22:31:12 +00:00
|
|
|
- Upgrade Node.js if you are willing to. See the notes below.
|
|
|
|
- Fix compilation.
|
|
|
|
- Open a pull request on `electron/electron` with the changes.
|
|
|
|
- This should include upgrading the submodules in `vendor/` as needed.
|
|
|
|
- Fix failing tests.
|
|
|
|
|
|
|
|
## Upgrade Node.js
|
2017-01-25 20:31:06 +00:00
|
|
|
|
2017-08-07 22:31:12 +00:00
|
|
|
- Upgrade `vendor/node` to the Node release that corresponds to the v8 version
|
|
|
|
being used in the new Chromium release. See the v8 versions in Node on
|
|
|
|
https://nodejs.org/en/download/releases for more details.
|
|
|
|
- You can find v8 version Chromium is using on [OmahaProxy](http://omahaproxy.appspot.com).
|
|
|
|
If it's not available check `v8/include/v8-version.h`
|
|
|
|
in the Chromium checkout.
|
|
|
|
|
|
|
|
## Troubleshooting
|
|
|
|
|
|
|
|
**TODO**
|
|
|
|
|
|
|
|
|
2017-03-29 22:08:06 +00:00
|
|
|
## Verify ffmpeg Support
|
2017-03-29 22:07:30 +00:00
|
|
|
|
|
|
|
Electron ships with a version of `ffmpeg` that includes proprietary codecs by
|
|
|
|
default. A version without these codecs is built and distributed with each
|
|
|
|
release as well. Each Chrome upgrade should verify that switching this version is
|
|
|
|
still supported.
|
|
|
|
|
|
|
|
You can verify Electron's support for multiple `ffmpeg` builds by loading the
|
|
|
|
following page. It should work with the default `ffmpeg` library distributed
|
|
|
|
with Electron and not work with the `ffmpeg` library built without proprietary
|
|
|
|
codecs.
|
|
|
|
|
|
|
|
```html
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>Proprietary Codec Check</title>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<p>Checking if Electron is using proprietary codecs by loading video from http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4</p>
|
|
|
|
<p id="outcome"></p>
|
|
|
|
<video style="display:none" src="http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4" autoplay></video>
|
|
|
|
<script>
|
|
|
|
const video = document.querySelector('video')
|
|
|
|
video.addEventListener('error', ({target}) => {
|
|
|
|
if (target.error.code === target.error.MEDIA_ERR_SRC_NOT_SUPPORTED) {
|
|
|
|
document.querySelector('#outcome').textContent = 'Not using proprietary codecs, video emitted source not supported error event.'
|
|
|
|
} else {
|
|
|
|
document.querySelector('#outcome').textContent = `Unexpected error: ${target.error.code}`
|
|
|
|
}
|
|
|
|
})
|
|
|
|
video.addEventListener('playing', () => {
|
|
|
|
document.querySelector('#outcome').textContent = 'Using proprietary codecs, video started playing.'
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
```
|
|
|
|
|
2017-08-07 22:31:12 +00:00
|
|
|
## Useful Links
|
2017-01-25 20:31:06 +00:00
|
|
|
|
|
|
|
- [Chrome Release Schedule](https://www.chromium.org/developers/calendar)
|
2017-08-07 22:31:12 +00:00
|
|
|
- [OmahaProxy](http://omahaproxy.appspot.com)
|
|
|
|
- [Chromium Issue Tracker](https://bugs.chromium.org/p/chromium)
|