diff options
-rw-r--r-- | README.md | 59 | ||||
-rwxr-xr-x | tools/scripts/init-repository.py (renamed from init-repository.py) | 56 |
2 files changed, 5 insertions, 110 deletions
diff --git a/README.md b/README.md deleted file mode 100644 index 4861b8f9d..000000000 --- a/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# QtWebEngine - Combining the power of Chromium and Qt # - - -To be able to build QtWebEngine you need Qt 5.2 or newer. - -## I. Getting the Code ## - -### 1) Clone the QtWebEngine repository ### - - git clone git://gitorious.org/qt/qtwebengine.git - -### 2) Initialize the repository ### - -This will fetch a snapshot of chromium sources we rely on. - - ./init-repository.py - -## II. Build Instructions## - -### 1) Generate the ninja build files by running qmake. ### - -It's a also possible to use qmake -r to forcefully re-gyp (without relying on make to determine if it's necessary). - - qmake - -### 2) build with make ### - -Everything should be set up properly now. - - make - -### 3) [optional] make install ### - -This step is required for installing l10n files and other resources (such as the resources for the remote inspector). - - make install - -## Additional tips and tricks ## - -### Complete Upstream Chromium Checkout ### -If you want to have a complete chromium checkout with the complete history instead of the snapshot, -then you can run the init-repository script with the -u option. - -This will then create a complete ninja and chromium checkout in the subdirectory src/3rdparty\_upstream. -qmake will automatically pickup the location and make use of the sources in the subsequent steps II.1) and II.2). - - ./init-repository.py -u - -### Use external Chromium sources ### -If you want to use external chromium sources instead of the submodule provided in the QtWebEngine repository, -you can export the CHROMIUM\_SRC\_DIR variable point it to your source directory. - -### Debug vs. Release builds ### - -By default, the configuration used for building Qt is followed. -It is possible to override this by passing CONFIG+=release or debug at qmake time. e.g: - - qmake -r CONFIG+=debug - diff --git a/init-repository.py b/tools/scripts/init-repository.py index 4e5452b64..1141ee983 100755 --- a/init-repository.py +++ b/tools/scripts/init-repository.py @@ -48,25 +48,8 @@ import sys import string import argparse -qtwebengine_root = os.path.abspath(os.path.join(os.path.dirname(__file__))) +qtwebengine_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')) -def sanityCheckRepo(): - os.chdir(qtwebengine_root) - if not '.git' in os.listdir('.'): - print '' - print 'This source tree cannot be initialized with init-repository.py.' - print '' - print 'If you downloaded an archive containing these sources,' - print 'you do not need to run the init-repository.py script.' - print '' - print 'If you want to use git for working with qtwebengine,' - print 'use git to clone: git@gitorious.org:qt/qtwebengine.git' - print '' - sys.exit(0) - -sanityCheckRepo() - -sys.path.append(os.path.join(qtwebengine_root, 'tools', 'scripts')) import git_submodule as GitSubmodule import version_resolver as resolver @@ -75,7 +58,6 @@ ninja_src = os.path.join(qtwebengine_root, 'src/3rdparty_upstream/ninja') use_external_chromium = False parser = argparse.ArgumentParser(description='Initialize QtWebEngine repository.') -parser.add_argument('--no-gerrit', action='store_true', help='skip adding the upstream Gerrit remote and commit hook') parser.add_argument('--baseline-upstream', action='store_true', help='initialize using upstream Chromium submodule w/o applying patches (for maintenance purposes only)') group = parser.add_mutually_exclusive_group() group.add_argument('-u', '--upstream', action='store_true', help='initialize using upstream Chromium submodule') @@ -97,18 +79,11 @@ if not chromium_src or not os.path.isdir(chromium_src): args.snapshot = True print 'CHROMIUM_SRC_DIR not set, using Chromium in' + chromium_src -# Write our chromium sources directory into git config. -relative_chromium_src = os.path.relpath(chromium_src, qtwebengine_root) -subprocess.call(['git', 'config', 'qtwebengine.chromiumsrcdir', relative_chromium_src]) - +if not args.baseline_upstream: + # Write our chromium sources directory into git config. + relative_chromium_src = os.path.relpath(chromium_src, qtwebengine_root) + subprocess.call(['git', 'config', 'qtwebengine.chromiumsrcdir', relative_chromium_src]) -def which(tool_name): - path = os.environ.get('PATH') - for entry in path.split(os.pathsep): - entry = os.path.join(entry, tool_name) - if os.access(entry, os.X_OK): - return entry - return '' def updateLastChange(): if use_external_chromium: @@ -120,19 +95,6 @@ def updateLastChange(): subprocess.call(['python', 'build/util/lastchange.py', '-s', 'third_party/WebKit', '-o', 'build/util/LASTCHANGE.blink']) os.chdir(currentDir) -def addGerritRemote(): - os.chdir(qtwebengine_root) - remotes = subprocess.check_output(['git', 'remote']) - if not 'gerrit' in remotes: - subprocess.call(['git', 'remote', 'add', 'gerrit', 'ssh://codereview.qt-project.org:29418/qt/qtwebengine.git']) - -def installGitHooks(): - os.chdir(qtwebengine_root) - if sys.platform == 'win32': - subprocess.call(['pscp', '-p', '-P', '29418', 'codereview.qt-project.org:hooks/commit-msg', '.git/hooks']) - else: - subprocess.call(['scp', '-p', '-P', '29418', 'codereview.qt-project.org:hooks/commit-msg', '.git/hooks']) - def initUpstreamSubmodules(): ninja_url = 'https://github.com/martine/ninja.git' chromium_url = 'https://chromium.googlesource.com/chromium/src.git' @@ -174,14 +136,6 @@ def initSnapshot(): os.chdir(qtwebengine_root) -if not args.no_gerrit: - addGerritRemote() - installGitHooks() - -print 'Configuring git to ignore all submodules. Submodule changes will not show up in "git diff"!' -subprocess.call(['git', 'config', 'diff.ignoreSubmodules', 'all']) -subprocess.call(['git', 'update-index', '--assume-unchanged', '.gitmodules']) - if args.upstream: initUpstreamSubmodules() updateLastChange() |