summaryrefslogtreecommitdiffstats
path: root/build/scripts/build_resources.py
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2013-08-21 19:16:29 +0200
committerAndras Becsi <andras.becsi@digia.com>2013-08-21 23:25:29 +0200
commitfd661fe6e07fc6771a9e3e936ca955a88004fd03 (patch)
treedd1a64b457208548549c661683352a31718efa73 /build/scripts/build_resources.py
parent6b94d9732f5950d43ed3e61e4bf5c6f12b46aead (diff)
Add command line flags to init-repository.py
This patch adds --upstream (-u) and --snapshot (-s) flags to the init-repository script which make it possible to choose the Chromium sources to use when building QtWebEngine. The default is to use the upstream submodules. This option is persisted with git config and used throughout the build system. This patch also keeps support for the CHROMIUM_SRC_DIR env variable which can be used to specify external Chromium sources which are assumed to be set up for the build and thus left untouched by the script. Change-Id: Ic83984199770076f90867f1b22a63b220bfe7359 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'build/scripts/build_resources.py')
-rwxr-xr-xbuild/scripts/build_resources.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/build/scripts/build_resources.py b/build/scripts/build_resources.py
index 1b924750f..7b20aa9ad 100755
--- a/build/scripts/build_resources.py
+++ b/build/scripts/build_resources.py
@@ -50,13 +50,12 @@ import time
qtwebengine_src = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))
-chrome_src = os.environ.get('CHROMIUM_SRC_DIR')
+
+chrome_src = subprocess.check_output("git config qtwebengine.chromiumsrcdir || true", shell=True).strip()
if chrome_src:
- chrome_src = os.path.abspath(chrome_src)
+ chrome_src = os.path.join(qtwebengine_src, chrome_src)
if not chrome_src or not os.path.isdir(chrome_src):
chrome_src = os.path.join(qtwebengine_src, '3rdparty/chromium')
- if not os.path.isdir(chrome_src):
- chrome_src = os.path.join(qtwebengine_src, '3rdparty_upstream/chromium')
print 'CHROMIUM_SRC_DIR not set, falling back to ' + chrome_src
grit_tool = os.path.join(chrome_src, 'tools/grit/grit.py')