Skip to content

Commit 81bc0ef

Browse files
committed
fix styleguide errors
1 parent a75a854 commit 81bc0ef

File tree

1 file changed

+50
-34
lines changed

1 file changed

+50
-34
lines changed

docs/development/upgrading-chromium.md

Lines changed: 50 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Upgrading Chromium
22

3-
This document is meant to serve as an overview of what steps are needed
4-
on each Chromium upgrade in Electron.
3+
This is an overview of the steps needed to upgrade Chromium in Electron.
54

65
- Upgrade libcc to a new Chromium version
76
- Make Electron code compatible with the new libcc
@@ -10,73 +9,87 @@ on each Chromium upgrade in Electron.
109
- Update Electron docs if necessary
1110

1211

13-
## Upgrade `libcc` to a new Chromium
12+
## Upgrade `libcc` to a new Chromium version
1413

1514
1. Get the code and initialize the project:
1615
- ```sh
1716
$ git clone git@github.com:electron/libchromiumcontent.git
1817
$ cd libchromiumcontent
1918
$ ./script/bootstrap -v```
2019
2. Update the Chromium snapshot
21-
- Choose a version number from [OmahaProxy](https://omahaproxy.appspot.com/) and update the `VERSION` file with it
20+
- Choose a version number from [OmahaProxy](https://omahaproxy.appspot.com/)
21+
and update the `VERSION` file with it
2222
- This can be done manually by visiting OmahaProxy in a browser, or automatically:
2323
- One-liner for the latest stable mac version: `curl -so- https://omahaproxy.appspot.com/mac > VERSION`
2424
- One-liner for the latest win64 beta version: `curl -so- https://omahaproxy.appspot.com/all | grep "win64,beta" | awk -F, 'NR==1{print $3}' > VERSION`
2525
- run `$ ./script/update`
2626
- Time to brew some tea -- this may run for 30m or more.
2727
- It will probably fail applying patches.
28-
3. Fix `*.patch` files in the `/patches` and `/patches-mas` folders.
29-
4. (Optional) Run a separate script to apply patches (`script/update` uses it internally):
28+
3. Fix `*.patch` files in the `patches/` and `patches-mas/` folders.
29+
4. (Optional) Run a separate script to apply patches
30+
(`script/update` uses it internally):
3031
- `$ ./script/apply-patches`
3132
- There is also another script `/script/patch.py` that could be more useful
3233
- Check `--help` to learn how it works with `$ ./script/patch.py -h`
3334
5. Run the build when all patches can be applied without errors
3435
- `$ ./script/build`
35-
- If some patches are no longer compatible with the Chromium code, fix compilation errors.
36+
- If some patches are no longer compatible with the Chromium code,
37+
fix compilation errors.
3638
6. When build succeeds, create a `dist` for Electron
3739
- `$ ./script/create-dist --no_zip`
3840
- It will create `dist/main` folder in the root of the libcc repo
3941
- You will need it to build Electron.
40-
7. (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.)
42+
7. (Optional) Update script contents if there are errors resulting from files
43+
being removed or renamed. (`--no_zip` prevents script from create `dist`
44+
archives, you don't need them.)
4145
4246
43-
## Update Electron Code
47+
## Update Electron's code
4448
4549
1. Get the code:
4650
- ```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+
$ git clone git@github.com:electron/electron.git
52+
$ cd electron
53+
```
54+
2. If you have libcc built on your machine in its own repo,
55+
tell Electron to use it:
5156
- ```sh
52-
$ ./script/bootstrap.py -v \
57+
$ ./script/bootstrap.py -v \
5358
--libcc_source_path <libcc_folder>/src \
5459
--libcc_shared_library_path <libcc_folder>/shared_library \
5560
--libcc_static_library_path <libcc_folder>/static_library
56-
```
57-
- If you haven't yet built libcc but it's already supposed to be upgraded to a new Chromium, bootstrap Electron as usual
58-
`$ ./script/bootstrap.py -v`
59-
- Ensure that libcc submodule (`vendor/libchromiumcontent`) points to a right revision
60-
61-
3. Set CLANG_REVISION in` script/update-clang.sh` to match the version Chromium is using.
61+
```
62+
3. If you haven't yet built libcc but it's already supposed to be upgraded
63+
to a new Chromium, bootstrap Electron as usual
64+
`$ ./script/bootstrap.py -v`
65+
- Ensure that libcc submodule (`vendor/libchromiumcontent`) points to the
66+
right revision
67+
68+
4. Set `CLANG_REVISION` in `script/update-clang.sh` to match the version
69+
Chromium is using.
6270
- Located in `electron/libchromiumcontent/src/tools/clang/scripts/update.py`
6371
64-
4. Checkout Chromium if you haven't already:
72+
5. Checkout Chromium if you haven't already:
6573
- https://chromium.googlesource.com/chromium/src.git/+/{VERSION}/tools/clang/scripts/update.py
66-
- (Replace the `{VERSION}` placeholder in the url above to the Chromium version libcc uses.)
67-
5. Build Electron.
74+
- (Replace the `{VERSION}` placeholder in the url above to the Chromium
75+
version libcc uses.)
76+
6. Build Electron.
6877
- Try to build Debug version first: `$ ./script/build.py -c D`
6978
- You will need it to run tests
70-
6. Fix compilation and linking errors
71-
7. Ensure that Release build can be built too
79+
7. Fix compilation and linking errors
80+
8. Ensure that Release build can be built too
7281
- `$ ./script/build.py -c R`
73-
- Often the Release build will have different linking errors that you'll need to fix.
74-
- Some compilation and linking errors are caused by missing source/object files in the libcc `dist`
75-
8. Update `./script/create-dist` in the libcc repo, recreate a `dist`, and run Electron bootstrap script once again.
82+
- Often the Release build will have different linking errors that you'll
83+
need to fix.
84+
- Some compilation and linking errors are caused by missing source/object
85+
files in the libcc `dist`
86+
9. Update `./script/create-dist` in the libcc repo, recreate a `dist`, and
87+
run Electron bootstrap script once again.
7688
7789
### Tips for fixing compilation errors
7890
- Fix build config errors first
79-
- Fix fatal errors first, like missing files and errors related to compiler flags or defines
91+
- Fix fatal errors first, like missing files and errors related to compiler
92+
flags or defines
8093
- Try to identify complex errors as soon as possible.
8194
- Ask for help if you're not sure how to fix them
8295
- Disable all Electron features, fix the build, then enable them one by one
@@ -91,8 +104,8 @@ Follow all the steps above to fix Electron code on all supported platforms.
91104
92105
## Updating Crashpad
93106
94-
If there are any compilation errors related to the Crashpad, it probably
95-
means you need to update the fork to a newer revision. See
107+
If there are any compilation errors related to the Crashpad, it probably means
108+
you need to update the fork to a newer revision. See
96109
[Upgrading Crashpad](https://github.com/electron/electron/tree/master/docs/development/upgrading-crashpad.md)
97110
for instructions on how to do that.
98111
@@ -105,9 +118,12 @@ used in the new Chromium release. See the v8 versions in Node on
105118
See [Upgrading Node](https://github.com/electron/electron/tree/master/docs/development/upgrading-node.md)
106119
for instructions on this.
107120
108-
## Verify ffmpeg Support
121+
## Verify ffmpeg support
109122
110-
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.
123+
Electron ships with a version of `ffmpeg` that includes proprietary codecs by
124+
default. A version without these codecs is built and distributed with each
125+
release as well. Each Chrome upgrade should verify that switching this version
126+
is still supported.
111127
112128
You can verify Electron's support for multiple `ffmpeg` builds by loading the
113129
following page. It should work with the default `ffmpeg` library distributed
@@ -142,7 +158,7 @@ codecs.
142158
</html>
143159
```
144160
145-
## Useful Links
161+
## Useful links
146162
147163
- [Chrome Release Schedule](https://www.chromium.org/developers/calendar)
148164
- [OmahaProxy](http://omahaproxy.appspot.com)

0 commit comments

Comments
 (0)