|
| 1 | +""" See automate.py. This script is for internal usage only, don't |
| 2 | +call it directly. This is a modified copy of automate-git.py from |
| 3 | +upstream CEF. |
| 4 | +
|
| 5 | +Some modifications were applied for CEF Python specific use case. |
| 6 | +There is a patch file with the same name as this script that contains |
| 7 | +differences from the original file. |
| 8 | +
|
| 9 | +------------------------------------------------------------------------------- |
| 10 | +
|
| 11 | +Usage: automate-git.py [options] |
| 12 | +
|
| 13 | + This utility implements automation for the download, update, build and |
| 14 | +distribution of CEF. |
| 15 | +
|
| 16 | +Options: |
| 17 | + -h, --help show this help message and exit |
| 18 | + --download-dir=DIR Download directory with no spaces [required]. |
| 19 | + --depot-tools-dir=DIR |
| 20 | + Download directory for depot_tools. |
| 21 | + --depot-tools-archive=DEPOTTOOLSARCHIVE |
| 22 | + Zip archive file that contains a single top-level |
| 23 | + depot_tools directory. |
| 24 | + --branch=BRANCH Branch of CEF to build (trunk, 1916, ...). This will |
| 25 | + be used to name the CEF download directory and to |
| 26 | + identify the correct URL if --url is not specified. |
| 27 | + The default value is trunk. |
| 28 | + --url=URL CEF download URL. If not specified the default URL |
| 29 | + will be used. |
| 30 | + --chromium-url=CHROMIUMURL |
| 31 | + Chromium download URL. If not specified the default |
| 32 | + URL will be used. |
| 33 | + --checkout=CHECKOUT Version of CEF to checkout. If not specified the most |
| 34 | + recent remote version of the branch will be used. |
| 35 | + --chromium-checkout=CHROMIUMCHECKOUT |
| 36 | + Version of Chromium to checkout (Git branch/hash/tag). |
| 37 | + This overrides the value specified by CEF in |
| 38 | + CHROMIUM_BUILD_COMPATIBILITY.txt. |
| 39 | + --chromium-channel=CHROMIUMCHANNEL |
| 40 | + Chromium channel to check out (canary, dev, beta or |
| 41 | + stable). This overrides the value specified by CEF in |
| 42 | + CHROMIUM_BUILD_COMPATIBILITY.txt. |
| 43 | + --chromium-channel-distance=CHROMIUMCHANNELDISTANCE |
| 44 | + The target number of commits to step in the channel, |
| 45 | + or 0 to use the newest channel version. Used in |
| 46 | + combination with --chromium-channel. |
| 47 | + --force-config Force creation of a new gclient config file. |
| 48 | + --force-clean Force a clean checkout of Chromium and CEF. This will |
| 49 | + trigger a new update, build and distribution. |
| 50 | + --force-clean-deps Force a clean checkout of Chromium dependencies. Used |
| 51 | + in combination with --force-clean. |
| 52 | + --dry-run Output commands without executing them. |
| 53 | + --dry-run-platform=DRYRUNPLATFORM |
| 54 | + Simulate a dry run on the specified platform (windows, |
| 55 | + macosx, linux). Must be used in combination with the |
| 56 | + --dry-run flag. |
| 57 | + --force-update Force a Chromium and CEF update. This will trigger a |
| 58 | + new build and distribution. |
| 59 | + --no-update Do not update Chromium or CEF. Pass --force-build or |
| 60 | + --force-distrib if you desire a new build or |
| 61 | + distribution. |
| 62 | + --no-cef-update Do not update CEF. Pass --force-build or --force- |
| 63 | + distrib if you desire a new build or distribution. |
| 64 | + --force-cef-update Force a CEF update. This will cause local changes in |
| 65 | + the CEF checkout to be discarded and patch files to be |
| 66 | + reapplied. |
| 67 | + --no-chromium-update Do not update Chromium. |
| 68 | + --no-depot-tools-update |
| 69 | + Do not update depot_tools. |
| 70 | + --fast-update Update existing Chromium/CEF checkouts for fast |
| 71 | + incremental builds by attempting to minimize the |
| 72 | + number of modified files. The update will fail if |
| 73 | + there are unstaged CEF changes or if Chromium changes |
| 74 | + are not included in a patch file. |
| 75 | + --force-patch-update Force update of patch files. |
| 76 | + --resave Resave patch files. |
| 77 | + --log-chromium-changes |
| 78 | + Create a log of the Chromium changes. |
| 79 | + --force-build Force CEF debug and release builds. This builds |
| 80 | + [build-target] on all platforms and chrome_sandbox on |
| 81 | + Linux. |
| 82 | + --no-build Do not build CEF. |
| 83 | + --build-target=BUILDTARGET |
| 84 | + Target name(s) to build (defaults to "cefclient"). |
| 85 | + --build-tests Also build the test target specified via --test- |
| 86 | + target. |
| 87 | + --no-debug-build Don't perform the CEF debug build. |
| 88 | + --no-release-build Don't perform the CEF release build. |
| 89 | + --verbose-build Show all command lines while building. |
| 90 | + --build-failure-limit=BUILDFAILURELIMIT |
| 91 | + Keep going until N jobs fail. |
| 92 | + --build-log-file Write build logs to file. The file will be named |
| 93 | + "build-[branch]-[debug|release].log" in the download |
| 94 | + directory. |
| 95 | + --x64-build Create a 64-bit build. |
| 96 | + --arm-build Create an ARM build. |
| 97 | + --run-tests Run the ceftests target. |
| 98 | + --no-debug-tests Don't run debug build tests. |
| 99 | + --no-release-tests Don't run release build tests. |
| 100 | + --test-target=TESTTARGET |
| 101 | + Test target name to build (defaults to "ceftests"). |
| 102 | + --test-prefix=TESTPREFIX |
| 103 | + Prefix for running the test executable (e.g. `xvfb- |
| 104 | + run` on Linux). |
| 105 | + --test-args=TESTARGS Arguments that will be passed to the test executable. |
| 106 | + --force-distrib Force creation of a CEF binary distribution. |
| 107 | + --no-distrib Don't create a CEF binary distribution. |
| 108 | + --minimal-distrib Create a minimal CEF binary distribution. |
| 109 | + --minimal-distrib-only |
| 110 | + Create a minimal CEF binary distribution only. |
| 111 | + --client-distrib Create a client CEF binary distribution. |
| 112 | + --client-distrib-only |
| 113 | + Create a client CEF binary distribution only. |
| 114 | + --sandbox-distrib Create a cef_sandbox static library distribution. |
| 115 | + --sandbox-distrib-only |
| 116 | + Create a cef_sandbox static library distribution only. |
| 117 | + --no-distrib-docs Don't create CEF documentation. |
| 118 | + --no-distrib-archive Don't create archives for output directories. |
| 119 | + --clean-artifacts Clean the artifacts output directory. |
| 120 | + --distrib-subdir=DISTRIBSUBDIR |
| 121 | + CEF distrib dir name, child of |
| 122 | + chromium/src/cef/binary_distrib |
| 123 | +
|
| 124 | +""" |
| 125 | + |
1 | 126 | # Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights |
2 | 127 | # reserved. Use of this source code is governed by a BSD-style license that |
3 | 128 | # can be found in the LICENSE file. |
@@ -945,9 +1070,14 @@ def check_pattern_matches(output_file=None): |
945 | 1070 | (options.nodistrib and options.forcedistrib) or \ |
946 | 1071 | ((options.forceclean or options.forcecleandeps) and options.fastupdate) or \ |
947 | 1072 | (options.chromiumcheckout and options.chromiumchannel): |
948 | | - print "Invalid combination of options." |
949 | | - parser.print_help(sys.stderr) |
950 | | - sys.exit() |
| 1073 | + # -- CEF Python modification below |
| 1074 | + if (options.nocefupdate and options.forceupdate): |
| 1075 | + pass |
| 1076 | + else: |
| 1077 | + print "Invalid combination of options." |
| 1078 | + parser.print_help(sys.stderr) |
| 1079 | + sys.exit() |
| 1080 | + # -- |
951 | 1081 |
|
952 | 1082 | if (options.noreleasebuild and \ |
953 | 1083 | (options.minimaldistrib or options.minimaldistribonly or \ |
@@ -1494,9 +1624,16 @@ def check_pattern_matches(output_file=None): |
1494 | 1624 | command = 'ninja ' |
1495 | 1625 | if options.verbosebuild: |
1496 | 1626 | command += '-v ' |
| 1627 | + |
| 1628 | + # -- CEF Python modification below |
| 1629 | + assert os.environ['CEFPYTHON_NINJA_JOBS'] |
| 1630 | + command += '-j' + os.environ['CEFPYTHON_NINJA_JOBS'] + ' ' |
| 1631 | + # -- |
| 1632 | + |
1497 | 1633 | if options.buildfailurelimit != 1: |
1498 | 1634 | command += '-k %d ' % options.buildfailurelimit |
1499 | 1635 | command += '-C ' |
| 1636 | + |
1500 | 1637 | target = ' ' + options.buildtarget |
1501 | 1638 | if options.buildtests: |
1502 | 1639 | target += ' ' + options.testtarget |
|
0 commit comments