Skip to content

Commit ba62240

Browse files
committed
make some things more explicit and style conformity
1 parent 178462b commit ba62240

1 file changed

Lines changed: 48 additions & 83 deletions

File tree

docs/development/upgrading-chromium.md

Lines changed: 48 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -12,43 +12,38 @@ on each Chromium upgrade in Electron.
1212

1313
## Upgrade `libcc` to a new Chromium
1414

15-
### Steps
16-
### 1. Get the code and initialize the project:
17-
```sh
18-
$ git clone git@github.com:electron/libchromiumcontent.git
19-
$ cd libchromiumcontent
20-
$ ./script/bootstrap -v
21-
```
22-
### 2. Find the new beta/stable Chromium version from [OmahaProxy](https://omahaproxy.appspot.com/).
23-
### 3. Put it into the `libchromiumcontent/VERSION` file, then run `$ ./script/update`
24-
- It will probably fail applying patches.
25-
### 4. Fix `*.patch` files in the `/patches` and `/patches-mas` folders.
26-
### 5. (Optional) Run a separate script to apply patches (`script/update` uses it internally):
27-
```sh
28-
$ ./script/apply-patches
29-
```
30-
- There is also another script `/script/patch.py` that could be more useful, check `--help` to learn how it works with `$ ./script/patch.py -h`
31-
### 6. Run the build when all patches can be applied without errors
32-
```sh
33-
$ ./script/build
34-
```
35-
- If some patches are no longer compatible with the Chromium code, fix compilation errors.
36-
### 7. When build succeeds, create a `dist` for Electron
37-
`$ ./script/create-dist --no_zip`
38-
- It will create `dist/main` folder in the root of the libcc repo, you will need it to build Electron.
39-
### 8. (Optional) Update script contents if there are errors resultant of some files being removed or renamed. (`--no_zip` prevents script from create `dist` archives, you don't need them.)
15+
1. Get the code and initialize the project:
16+
- ```sh
17+
$ git clone git@github.com:electron/libchromiumcontent.git
18+
$ cd libchromiumcontent
19+
$ ./script/bootstrap -v```
20+
2. Find the new beta/stable Chromium version from [OmahaProxy](https://omahaproxy.appspot.com/).
21+
3. Put it into the `libchromiumcontent/VERSION` file, then run `$ ./script/update`
22+
- It will probably fail applying patches.
23+
4. Fix `*.patch` files in the `/patches` and `/patches-mas` folders.
24+
5. (Optional) Run a separate script to apply patches (`script/update` uses it internally):
25+
- `$ ./script/apply-patches`
26+
- There is also another script `/script/patch.py` that could be more useful
27+
- Check `--help` to learn how it works with `$ ./script/patch.py -h`
28+
6. Run the build when all patches can be applied without errors
29+
- `$ ./script/build`
30+
- If some patches are no longer compatible with the Chromium code, fix compilation errors.
31+
7. When build succeeds, create a `dist` for Electron
32+
- `$ ./script/create-dist --no_zip`
33+
- It will create `dist/main` folder in the root of the libcc repo
34+
- You will need it to build Electron.
35+
8. (Optional) Update script contents if there are errors resultant of some files being removed or renamed. (`--no_zip` prevents script from create `dist` archives, you don't need them.)
4036
4137
4238
## Update Electron Code
4339
44-
### Steps
45-
### 1. Get the code:
46-
```sh
47-
$ git clone git@github.com:electron/electron.git
48-
$ cd electron
49-
```
50-
### 2. If you already have libcc built on you machine in its own repo, you need to tell Electron explicitly to use it:
51-
```sh
40+
1. Get the code:
41+
- ```sh
42+
$ git clone git@github.com:electron/electron.git
43+
$ cd electron
44+
```
45+
2. If you already have libcc built on you machine in its own repo, you need to tell Electron explicitly to use it:
46+
- ```sh
5247
$ ./script/bootstrap.py -v \
5348
--libcc_source_path <libcc_folder>/src \
5449
--libcc_shared_library_path <libcc_folder>/shared_library \
@@ -58,19 +53,21 @@ $ cd electron
5853
`$ ./script/bootstrap.py -v`
5954
- Ensure that libcc submodule (`vendor/libchromiumcontent`) points to a right revision
6055
61-
### 3. Set CLANG_REVISION in` script/update-clang.sh` to match the version Chromium is using.
62-
- Located in `electron/libchromiumcontent/src/tools/clang/scripts/update.py`
63-
64-
### 4. Checkout Chromium if you haven't already: https://chromium.googlesource.com/chromium/src.git/+/{VERSION}/tools/clang/scripts/update.py
65-
- (Replace the `{VERSION}` placeholder in the url above to the Chromium version libcc uses.)
66-
### 5. Build Electron.
67-
- Try to build Debug version first: `$ ./script/build.py -c D`
68-
- You will need it to run tests
69-
### 6. Fix compilation and linking errors
70-
### 7. Ensure that Release build can be built too: `$ ./script/build.py -c R`
56+
3. Set CLANG_REVISION in` script/update-clang.sh` to match the version Chromium is using.
57+
- Located in `electron/libchromiumcontent/src/tools/clang/scripts/update.py`
58+
59+
4. Checkout Chromium if you haven't already:
60+
- https://chromium.googlesource.com/chromium/src.git/+/{VERSION}/tools/clang/scripts/update.py
61+
- (Replace the `{VERSION}` placeholder in the url above to the Chromium version libcc uses.)
62+
5. Build Electron.
63+
- Try to build Debug version first: `$ ./script/build.py -c D`
64+
- You will need it to run tests
65+
6. Fix compilation and linking errors
66+
7. Ensure that Release build can be built too
67+
- `$ ./script/build.py -c R`
7168
- Often the Release build will have different linking errors that you'll need to fix.
7269
- Some compilation and linking errors are caused by missing source/object files in the libcc `dist`
73-
### 8. Update `./script/create-dist` in the libcc repo, recreate a `dist`, and run Electron bootstrap script once again.
70+
8. Update `./script/create-dist` in the libcc repo, recreate a `dist`, and run Electron bootstrap script once again.
7471
7572
### Tips for fixing compilation errors
7673
- Fix build config errors first
@@ -87,54 +84,22 @@ Fix the failing tests.
8784
Follow all the steps above to fix Electron code on all supported platforms.
8885
8986
90-
## Update Crashpad
87+
## Updating Crashpad
9188
92-
- Electron's crashpad fork: https://github.com/electron/crashpad
93-
- Primary crashpad repo: https://chromium.googlesource.com/crashpad/crashpad/
89+
If there are any compilation errors related to the Crashpad, it probably means you need to update the fork to a newer revision: see [Upgrading Crashpad](https://github.com/electron/electron/tree/master/docs/development/upgrading-crashpad.md) for instructions on how to do that.
9490
9591
96-
### Steps
97-
If there are any compilation errors related to the Crashpad, it probably means you need to update the fork to a newer revision:
98-
99-
### 1. Clone Electron's fork of the Crashpad, add the main repo as another remote:
100-
```sh
101-
$ git clone https://github.com/electron/crashpad && cd crashpad
102-
$ git remote add upstream https://chromium.googlesource.com/crashpad/crashpad/ && git fetch upstream
103-
```
104-
### 2. Find a revision Chromium uses in src/third_party/crashpad/README.chromium
105-
### 3. Rebase the master branch to that REVISION
106-
```sh
107-
$ git rebase REVISION
108-
```
109-
- If there are nontrivial conflicts during rebase, consult with the commit's author.
110-
### 4. Add a tag with the next Electron version to a top commit in the master branch
111-
- e.g. if current Electron version is `1.11.*`, then use tag `electron-1.12.0`, because it will be used in the next version.
112-
### 5. Ensure Electron-specific commits in the master branch on GitHub are properly tagged
113-
- If they aren't, force push will make them orphans and they'll be lost.
114-
### 6. Force push to Electron's crashpad fork.
115-
### 7. Update `/vendor/crashpad` submodule in the Electron's upgrade branch to point to the updated crashpad.
116-
92+
## Updating NodeJS
11793
118-
## Update NodeJS
94+
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
11995
120-
- Upgrade `vendor/node` to the Node release that corresponds to the v8 version
121-
being used in the new Chromium release. See the v8 versions in Node on
122-
https://nodejs.org/en/download/releases for more details.
123-
- You can find v8 version Chromium is using on [OmahaProxy](http://omahaproxy.appspot.com).
124-
If it's not available check `v8/include/v8-version.h`
125-
in the Chromium checkout.
96+
See [Upgrading Node](https://github.com/electron/electron/tree/master/docs/development/upgrading-node.md) for instructions on how to do this.
12697
12798
## Verify ffmpeg Support
12899
129-
Electron ships with a version of `ffmpeg` that includes proprietary codecs by
130-
default. A version without these codecs is built and distributed with each
131-
release as well. Each Chrome upgrade should verify that switching this version is
132-
still supported.
100+
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.
133101
134-
You can verify Electron's support for multiple `ffmpeg` builds by loading the
135-
following page. It should work with the default `ffmpeg` library distributed
136-
with Electron and not work with the `ffmpeg` library built without proprietary
137-
codecs.
102+
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.
138103
139104
```html
140105
<!DOCTYPE html>

0 commit comments

Comments
 (0)