|
6 | 6 |
|
7 | 7 | Usage: |
8 | 8 | automate.py (--prebuilt-cef | --build-cef) |
| 9 | + [--force-chromium-update FORCECHROMIUMUPDATE] |
9 | 10 | [--cef-branch BRANCH] [--cef-commit COMMIT] |
10 | 11 | [--build-dir BUILDDIR] [--cef-build-dir CEFBUILDDIR] |
11 | 12 | [--ninja-jobs JOBS] [--gyp-generators GENERATORS] |
12 | 13 | [--gyp-msvs-version MSVS] |
13 | 14 | automate.py (-h | --help) [type -h to show full description for options] |
14 | 15 |
|
15 | 16 | Options: |
16 | | - -h --help Show this help message. |
17 | | - --prebuilt-cef Whether to use prebuilt CEF binaries. Prebuilt |
18 | | - binaries for Linux are built on Ubuntu. |
19 | | - --build-cef Whether to build CEF from sources with the cefpython |
20 | | - patches applied. |
21 | | - --cef-branch=<b> CEF branch. Defaults to CHROME_VERSION_BUILD from |
22 | | - "src/version/cef_version_{platform}.h" (TODO). |
23 | | - --cef-commit=<c> CEF revision. Defaults to CEF_COMMIT_HASH from |
24 | | - "src/version/cef_version_{platform}.h" (TODO). |
25 | | - --build-dir=<dir1> Build directory. |
26 | | - --cef-build-dir=<dir2> CEF build directory. By default same |
27 | | - as --build-dir. |
28 | | - --ninja-jobs=<jobs> How many CEF jobs to run in parallel. To speed up |
29 | | - building set it to number of cores in your CPU. |
30 | | - By default set to cpu_count / 2. |
31 | | - --gyp-generators=<gen> Set GYP_GENERATORS [default: ninja]. |
32 | | - --gyp-msvs-version=<v> Set GYP_MSVS_VERSION. |
| 17 | + -h --help Show this help message. |
| 18 | + --prebuilt-cef Whether to use prebuilt CEF binaries. Prebuilt |
| 19 | + binaries for Linux are built on Ubuntu. |
| 20 | + --build-cef Whether to build CEF from sources with the |
| 21 | + cefpython patches applied. |
| 22 | + --force-chromium-update Force Chromium update (gclient sync etc). |
| 23 | + --cef-branch=<b> CEF branch. Defaults to CHROME_VERSION_BUILD from |
| 24 | + "src/version/cef_version_{platform}.h" (TODO). |
| 25 | + --cef-commit=<c> CEF revision. Defaults to CEF_COMMIT_HASH from |
| 26 | + "src/version/cef_version_{platform}.h" (TODO). |
| 27 | + --build-dir=<dir1> Build directory. |
| 28 | + --cef-build-dir=<dir2> CEF build directory. By default same |
| 29 | + as --build-dir. |
| 30 | + --ninja-jobs=<jobs> How many CEF jobs to run in parallel. To speed up |
| 31 | + building set it to number of cores in your CPU. |
| 32 | + By default set to cpu_count / 2. |
| 33 | + --gyp-generators=<gen> Set GYP_GENERATORS [default: ninja]. |
| 34 | + --gyp-msvs-version=<v> Set GYP_MSVS_VERSION. |
33 | 35 |
|
34 | 36 | """ |
35 | 37 |
|
@@ -87,6 +89,7 @@ class Options(object): |
87 | 89 | # From command-line |
88 | 90 | prebuilt_cef = False |
89 | 91 | build_cef = False |
| 92 | + force_chromium_update = False |
90 | 93 | cef_branch = "" |
91 | 94 | cef_commit = "" |
92 | 95 | build_dir = "" |
@@ -179,9 +182,10 @@ def setup_options(docopt_args): |
179 | 182 | # cpu_count() returns number of CPU threads, not CPU cores. |
180 | 183 | # On i5 with 2 cores and 4 cpu threads the default of 4 ninja |
181 | 184 | # jobs slows down computer significantly. |
182 | | - Options.ninja_jobs = int(multiprocessing.cpu_count() / 2) |
183 | | - if Options.ninja_jobs < 1: |
184 | | - Options.ninja_jobs = 1 |
| 185 | + if not Options.ninja_jobs: |
| 186 | + Options.ninja_jobs = int(multiprocessing.cpu_count() / 2) |
| 187 | + if Options.ninja_jobs < 1: |
| 188 | + Options.ninja_jobs = 1 |
185 | 189 |
|
186 | 190 |
|
187 | 191 | def build_cef(): |
@@ -515,6 +519,10 @@ def run_automate_git(): |
515 | 519 | # We clone cef repository ourselves and update cef patches with ours, |
516 | 520 | # so don't fetch/update CEF repo. |
517 | 521 | args.append("--no-cef-update") |
| 522 | + # Force Chromium update so that gclient sync is called. It may fail |
| 523 | + # sometimes with files missing and must re-run to fix. |
| 524 | + if Options.force_chromium_update: |
| 525 | + args.append("--force-update") |
518 | 526 | args.append("--no-distrib-archive") |
519 | 527 | if platform.system() == "Linux": |
520 | 528 | # Building cefclient target isn't supported on Linux when |
|
0 commit comments