Skip to content

Commit 682074e

Browse files
authored
Merge pull request cztomczak#483 from jakogut/cef-git-url-option
Add option --cef-git-url to use a repo other than upstream
2 parents 3649975 + ea1ad05 commit 682074e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tools/automate.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
[--fast-build FAST_BUILD]
3030
[--force-chromium-update FORCE_CHROMIUM_UPDATE]
3131
[--no-cef-update NO_CEF_UPDATE]
32-
[--cef-branch BRANCH] [--cef-commit COMMIT]
32+
[--cef-git-url URL] [--cef-branch BRANCH] [--cef-commit COMMIT]
3333
[--build-dir BUILD_DIR] [--cef-build-dir CEF_BUILD_DIR]
3434
[--ninja-jobs JOBS] [--gyp-generators GENERATORS]
3535
[--gyp-msvs-version MSVS]
@@ -54,6 +54,7 @@
5454
--force-chromium-update Force Chromium update (gclient sync etc).
5555
--no-cef-update Do not update CEF sources (by default both cef/
5656
directories are deleted on every run).
57+
--cef-git-url=<url> Git URL to clone CEF from, defaults to upstream
5758
--cef-branch=<b> CEF branch. Defaults to CHROME_VERSION_BUILD from
5859
"src/version/cef_version_{platform}.h".
5960
--cef-commit=<c> CEF revision. Defaults to CEF_COMMIT_HASH from
@@ -95,7 +96,7 @@
9596
from setuptools.msvc import msvc9_query_vcvarsall
9697

9798
# Constants
98-
CEF_GIT_URL = "https://bitbucket.org/chromiumembedded/cef.git"
99+
CEF_UPSTREAM_GIT_URL = "https://bitbucket.org/chromiumembedded/cef.git"
99100
RUNTIME_MT = "MT"
100101
RUNTIME_MD = "MD"
101102

@@ -111,6 +112,7 @@ class Options(object):
111112
fast_build = False
112113
force_chromium_update = False
113114
no_cef_update = False
115+
cef_git_url = ""
114116
cef_branch = ""
115117
cef_commit = ""
116118
cef_version = ""
@@ -170,6 +172,9 @@ def setup_options(docopt_args):
170172
Options.tools_dir = os.path.dirname(os.path.realpath(__file__))
171173
Options.cefpython_dir = os.path.dirname(Options.tools_dir)
172174

175+
if not Options.cef_git_url:
176+
Options.cef_git_url = CEF_UPSTREAM_GIT_URL
177+
173178
# If --cef-branch is specified will use latest CEF commit from that
174179
# branch. Otherwise get cef branch/commit from src/version/.
175180
if not Options.cef_branch:
@@ -307,7 +312,7 @@ def create_cef_directories():
307312
# Clone cef repo and checkout branch
308313
if os.path.exists(cef_dir):
309314
rmdir(cef_dir)
310-
run_git("clone -b %s %s cef" % (Options.cef_branch, CEF_GIT_URL),
315+
run_git("clone -b %s %s cef" % (Options.cef_branch, Options.cef_git_url),
311316
Options.cef_build_dir)
312317
if Options.cef_commit:
313318
run_git("checkout %s" % Options.cef_commit, cef_dir)

0 commit comments

Comments
 (0)