X Tutup
Skip to content

Commit 2a47413

Browse files
committed
automate.py and patches. Not yet working.
1 parent 62c8c48 commit 2a47413

File tree

10 files changed

+1361
-51
lines changed

10 files changed

+1361
-51
lines changed

patches/Build-CEF-with-patches.md

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,48 @@
11
# Build CEF with the cefpython patches applied
22

3+
Use tools/automate.py with the --build-cef flag to build CEF
4+
in an automated way with patches in this directory applied.
5+
6+
7+
# Build manually
8+
39
CEF Python official binaries come with custom CEF binaries
410
with a few patches applied for our use case.
511

6-
On Linux before running any CEF tools apply the issue73 patch
12+
On Linux before running any of CEF tools apply the issue73 patch
713
first.
814

915
To build CEF follow the instructions on the Branches and
1016
Building CEF wiki page:
1117
https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
1218

13-
Use the automate-git.py tool, for example:
14-
```
15-
mkdir chromium && cd chromium
16-
python automate-git.py --download-dir=./ --branch=2526 --no-debug-build --verbose-build --build-log-file
17-
```
19+
After it is successfully built - apply patches, rebuild and remake
20+
distribs.
21+
22+
Note that CEF patches must be applied in the
23+
"download_dir/chromium/src/cef/" directory, not in the "download_dir/cef/"
24+
directory.
1825

19-
After it is built apply patches and rebuild:
20-
```
21-
cd chromium/src
22-
ninja -v -j2 -Cout\Release cefclient
23-
```
2426

2527
## How to patch
2628

27-
Create a patch from unstaged changes in current directory:
29+
Apply a patch in current directory:
2830
```
2931
cd chromium/src/cef/
30-
git diff > cef.gyp.patch
32+
git apply cef.gyp.patch
3133
```
3234

33-
Apply a patch in current directory:
35+
Create a patch from unstaged changes in current directory:
3436
```
3537
cd chromium/src/cef/
36-
git apply cef.gyp.patch
38+
git diff --relative > cef.gyp.patch
3739
```
3840

39-
## Ninja build slowing down computer
4041

41-
If ninja slows down your computer too much, build manually with
42-
this command (where -j2 means to run 2 jobs in parallel)
42+
## Ninja build slows down computer
43+
44+
If ninja slows down your computer too much (6 parallel jobs by default),
45+
build manually with this command (where -j2 means to run 2 jobs in parallel):
4346
```
4447
cd chromium/src
4548
ninja -v -j2 -Cout\Release cefclient
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
Patch to fix HTTPS cache problems on pages with certificate errors:
1+
Patch to Chromium. Fixes HTTPS cache problems on sites with certificate errors:
22
https://github.com/cztomczak/cefpython/issues/125
33

44
Apply the patch in the "chromium/src/" directory.
5-
Modifications are made to the HttpCache::Transaction::
6-
WriteResponseInfoToEntry function.
5+
It modifies WriteResponseInfoToEntry().
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
Index: net/http/http_cache_transaction.cc
2-
===================================================================
3-
--- http_cache_transaction.cc (revision 241641)
4-
+++ http_cache_transaction.cc (working copy)
5-
@@ -2240,7 +2240,8 @@
6-
// reverse-map the cert status to a net error and replay the net error.
7-
if ((cache_->mode() != RECORD &&
8-
response_.headers->HasHeaderValue("cache-control", "no-store")) ||
9-
- net::IsCertStatusError(response_.ssl_info.cert_status)) {
10-
+ (!cache_->GetSession()->params().ignore_certificate_errors &&
11-
+ net::IsCertStatusError(response_.ssl_info.cert_status))) {
1+
diff --git a/http_cache_transaction.cc b/http_cache_transaction.cc
2+
index 9dd8458..e61f1f0 100644
3+
--- a/http_cache_transaction.cc
4+
+++ b/http_cache_transaction.cc
5+
@@ -2661,7 +2661,8 @@ int HttpCache::Transaction::WriteResponseInfoToEntry(bool truncated) {
6+
// blocking page is shown. An alternative would be to reverse-map the cert
7+
// status to a net error and replay the net error.
8+
if ((response_.headers->HasHeaderValue("cache-control", "no-store")) ||
9+
- IsCertStatusError(response_.ssl_info.cert_status)) {
10+
+ (!cache_->GetSession()->params().ignore_certificate_errors &&
11+
+ IsCertStatusError(response_.ssl_info.cert_status))) {
1212
DoneWritingToEntry(false);
13-
ReportCacheActionFinish();
14-
if (net_log_.IsLoggingAllEvents())
13+
if (net_log_.IsCapturing())
14+
net_log_.EndEvent(NetLog::TYPE_HTTP_CACHE_WRITE_INFO);

patches/issue218_linux/PATCH.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
Fixes to the CEF GTK implementation on Linux:
1+
Patch to CEF. Fixes GTK/wxPython issues on Linux:
22
https://github.com/cztomczak/cefpython/issues/218
33

44
Apply the patch in the `~/chromium/src/cef/` directory.
5-
6-
Modifications are made to the CefBrowserHostImpl::
7-
PlatformCreateWindow function.
5+
It modifies PlatformCreateWindow().

patches/issue73_linux/PATCH.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
Patch to fix tcmalloc issue on Linux:
1+
Patch to CEF. Fixes tcmalloc issue on Linux:
22
https://github.com/cztomczak/cefpython/issues/73
33

4-
You have two options:
5-
1. Copy `include.gypi` to `~/.gyp/`.
6-
2. Or run the `use_allocator_none.sh` script - this will set
7-
the GYP_DEFINES env variable, but it will last only for
8-
current session.
4+
Copy the "include.gypi" file to "~/.gyp/".

patches/issue73_linux/use_allocator_none.sh

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)
X Tutup