diff --git a/.gitignore b/.gitignore index db316a3aacbe451e666f15d6a807b470a3a36394..9570dacd184dd9c97d0dc00f76eb5063e0522d46 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,7 @@ *.o Makefile -process/process out/ -lib/lib.gyp -process/process.gyp -shared/shared.gyp +src/core/core.gyp *.pro.user* .qmake.cache *.moc diff --git a/.qmake.conf b/.qmake.conf index a094e83ca03e268bffe48713d3776412c6a4da85..66245228bdf5c50fbfafa55a21ee0eec52b5e578 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -1,4 +1,4 @@ -QMAKEPATH += $$PWD/build/qmake +QMAKEPATH += $$PWD/tools/qmake load(qt_build_config) # All modules share the same version number. We plan on following Qt's releases for now. diff --git a/init-repository.py b/init-repository.py index fa4508b6022a818d54384af199bd1a12a7b1e83c..2affa196aa428ef3588b1629c473d7f4db591b8a 100755 --- a/init-repository.py +++ b/init-repository.py @@ -48,13 +48,13 @@ import sys import string import argparse -qtwebengine_src = os.path.abspath(os.path.join(os.path.dirname(__file__))) +qtwebengine_root = os.path.abspath(os.path.join(os.path.dirname(__file__))) -sys.path.append(os.path.join(qtwebengine_src, 'tools')) +sys.path.append(os.path.join(qtwebengine_root, 'tools', 'scripts')) import git_submodule as GitSubmodule chromium_src = os.environ.get('CHROMIUM_SRC_DIR') -ninja_src = os.path.join(qtwebengine_src, '3rdparty_upstream/ninja') +ninja_src = os.path.join(qtwebengine_root, 'src/3rdparty_upstream/ninja') use_external_chromium = False parser = argparse.ArgumentParser(description='Initialize QtWebEngine repository.') @@ -69,15 +69,15 @@ if chromium_src: use_external_chromium = True if not chromium_src or not os.path.isdir(chromium_src): if args.snapshot: - chromium_src = os.path.join(qtwebengine_src, '3rdparty/chromium') - ninja_src = os.path.join(qtwebengine_src, '3rdparty/ninja') + chromium_src = os.path.join(qtwebengine_root, 'src/3rdparty/chromium') + ninja_src = os.path.join(qtwebengine_root, 'src/3rdparty/ninja') if args.upstream or not chromium_src: - chromium_src = os.path.join(qtwebengine_src, '3rdparty_upstream/chromium') + chromium_src = os.path.join(qtwebengine_root, 'src/3rdparty_upstream/chromium') args.upstream = 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_src) +relative_chromium_src = os.path.relpath(chromium_src, qtwebengine_root) subprocess.call(['git', 'config', 'qtwebengine.chromiumsrcdir', relative_chromium_src]) @@ -100,19 +100,19 @@ def updateLastChange(): os.chdir(currentDir) def addGerritRemote(): - os.chdir(qtwebengine_src) + 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-labs/qtwebengine.git']) def installGitHooks(): - os.chdir(qtwebengine_src) + os.chdir(qtwebengine_root) subprocess.call(['scp', '-p', '-P', '29418', 'codereview.qt-project.org:hooks/commit-msg', '.git/hooks']) def applyPatches(): if use_external_chromium: return - os.chdir(qtwebengine_src) + os.chdir(qtwebengine_root) subprocess.call(['sh', './patches/patch-chromium.sh']) def initUpstreamSubmodules(): @@ -124,16 +124,16 @@ def initUpstreamSubmodules(): # We will turn this on, once we actually switch to using the release branch. #chromium_ref = 'refs/branch-heads/1599' chromium_ref = '' - os.chdir(qtwebengine_src) + os.chdir(qtwebengine_root) current_submodules = subprocess.check_output(['git', 'submodule']) - if not '3rdparty_upstream/ninja' in current_submodules: - subprocess.call(['git', 'submodule', 'add', ninja_url, '3rdparty_upstream/ninja']) - if not use_external_chromium and not '3rdparty_upstream/chromium' in current_submodules: - subprocess.call(['git', 'submodule', 'add', chromium_url, '3rdparty_upstream/chromium']) + if not 'src/3rdparty_upstream/ninja' in current_submodules: + subprocess.call(['git', 'submodule', 'add', ninja_url, 'src/3rdparty_upstream/ninja']) + if not use_external_chromium and not 'src/3rdparty_upstream/chromium' in current_submodules: + subprocess.call(['git', 'submodule', 'add', chromium_url, 'src/3rdparty_upstream/chromium']) ninjaSubmodule = GitSubmodule.Submodule() - ninjaSubmodule.path = '3rdparty_upstream/ninja' + ninjaSubmodule.path = 'src/3rdparty_upstream/ninja' ninjaSubmodule.shasum = ninja_shasum ninjaSubmodule.url = ninja_url ninjaSubmodule.os = 'all' @@ -141,7 +141,7 @@ def initUpstreamSubmodules(): if not use_external_chromium: chromiumSubmodule = GitSubmodule.Submodule() - chromiumSubmodule.path = '3rdparty_upstream/chromium' + chromiumSubmodule.path = 'src/3rdparty_upstream/chromium' chromiumSubmodule.shasum = chromium_shasum chromiumSubmodule.ref = chromium_ref chromiumSubmodule.url = chromium_url @@ -152,11 +152,11 @@ def initUpstreamSubmodules(): def initSnapshot(): snapshot = GitSubmodule.Submodule() - snapshot.path = '3rdparty' + snapshot.path = 'src/3rdparty' snapshot.os = 'all' snapshot.initialize() -os.chdir(qtwebengine_src) +os.chdir(qtwebengine_root) addGerritRemote() installGitHooks() diff --git a/patches/patch-chromium.sh b/patches/patch-chromium.sh index 38cc4c126186a1e9727e73149f7624d4b03230d8..3c593c7417f363a6216528e85a76be6af581f6aa 100755 --- a/patches/patch-chromium.sh +++ b/patches/patch-chromium.sh @@ -43,7 +43,6 @@ # Script used temporarily to invoke gclient and apply our patches PATCH_DIR="$( cd "$( dirname "$0" )" && pwd )" -QTWEBENGINE_SRC_DIR="$( cd $PATCH_DIR/../ && pwd )" if [ -z "$CHROMIUM_SRC_DIR" ]; then CHROMIUM_SRC_DIR="$( cd `git config qtwebengine.chromiumsrcdir` && pwd )" diff --git a/qtwebengine.pro b/qtwebengine.pro new file mode 100644 index 0000000000000000000000000000000000000000..58c33f27cacc16d2f4baed83ef3264e8868eb181 --- /dev/null +++ b/qtwebengine.pro @@ -0,0 +1 @@ +load(qt_parts) diff --git a/src/core/core.pro b/src/core/core.pro new file mode 100644 index 0000000000000000000000000000000000000000..b6a856545ea62bd2faca64f290355dfda615ab4f --- /dev/null +++ b/src/core/core.pro @@ -0,0 +1,22 @@ +TEMPLATE = subdirs + +# core_gyp_generator.pro is a dummy .pro file that is used by qmake +# to generate our main .gyp file +core_gyp_generator.file = core_gyp_generator.pro + +# gyp_configure_host.pro and gyp_configure_target.pro are phony pro files that +# extract things like compiler and linker from qmake +gyp_configure_host.file = gyp_configure_host.pro +gyp_configure_target.file = gyp_configure_target.pro +gyp_configure_target.depends = gyp_configure_host + +# gyp_run.pro calls gyp through gyp_qtwebengine on the qmake step, and ninja on the make step. +gyp_run.file = gyp_run.pro + +gyp_run.depends = resources core_gyp_generator gyp_configure_host gyp_configure_target + +SUBDIRS += core_gyp_generator \ + gyp_configure_host \ + gyp_configure_target \ + gyp_run \ + resources \ diff --git a/src/core/core_gyp_generator.pro b/src/core/core_gyp_generator.pro index 76924ecd4c5860ae72004d048fd126f60fc3c059..a4128fc72c92b77730e69c907f2e043d95abfc6d 100644 --- a/src/core/core_gyp_generator.pro +++ b/src/core/core_gyp_generator.pro @@ -2,8 +2,9 @@ # We want the gyp generation step to happen after all the other config steps. For that we need to prepend # our gyp_generator.prf feature to the CONFIG variable since it is processed backwards CONFIG = gyp_generator $$CONFIG +GYPFILE = $$PWD/core.gyp GYPDEPENDENCIES += <(chromium_src_dir)/content/browser/devtools/devtools_resources.gyp:devtools_resources -GYPINCLUDES += ../qtwebengine.gypi +GYPINCLUDES += qtwebengine.gypi TEMPLATE = lib @@ -19,7 +20,7 @@ QT_PRIVATE += qml-private quick-private gui-private core-private qtHaveModule(v8): QT_PRIVATE += v8-private COPY_FILES = <(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak -COPY_DESTINATIONS = ../resources/ +COPY_DESTINATIONS = resources/ # Defining keywords such as 'signal' clashes with the chromium code base. DEFINES += QT_NO_KEYWORDS \ @@ -31,9 +32,9 @@ PER_CONFIG_DEFINES = QTWEBENGINEPROCESS_PATH=\\\"$$getOutDir()/%config/$$QTWEBEN # Keep Skia happy CONFIG(release, debug|release): DEFINES += NDEBUG -RESOURCES += lib_resources.qrc devtools.qrc +RESOURCES += core_resources.qrc devtools.qrc # We need this to find the include files generated for the .pak resource files. -INCLUDEPATH += $$absolute_path(../resources, $$PWD) +INCLUDEPATH += $$absolute_path(resources, $$PWD) # something fishy with qmake in 5.2 ? INCLUDEPATH += $$[QT_INSTALL_HEADERS] diff --git a/src/core/core_resources.qrc b/src/core/core_resources.qrc index af8448d2b44c61af20ec1e6a3f7ba100d55a6612..9dbdf90afaac4e81bc33baf7e5e5ebbea1627f2f 100644 --- a/src/core/core_resources.qrc +++ b/src/core/core_resources.qrc @@ -1,5 +1,5 @@ <!DOCTYPE RCC><RCC version="1.0"> <qresource prefix="data"> - <file alias="resources.pak">../resources/net_resources.pak</file> + <file alias="resources.pak">resources/net_resources.pak</file> </qresource> </RCC> diff --git a/src/core/devtools.qrc b/src/core/devtools.qrc index 225f88f657dbd5f7921870051f582042d88c4741..96d24761d52faf3cb41c0214d6eabf3510593aa8 100644 --- a/src/core/devtools.qrc +++ b/src/core/devtools.qrc @@ -1,6 +1,6 @@ <!DOCTYPE RCC><RCC version="1.0"> <qresource prefix="data"> - <file alias="devtools.pak">../resources/devtools_resources.pak</file> - <file alias="discovery_page.html">../resources/devtools_discovery_page.html</file> + <file alias="devtools.pak">resources/devtools_resources.pak</file> + <file alias="discovery_page.html">resources/devtools_discovery_page.html</file> </qresource> </RCC> diff --git a/src/core/gyp_configure_host.pro b/src/core/gyp_configure_host.pro index e99d1e7c5dc2da9cae09d864a699a47888d7f86f..3eb67389f3d1e8f07e3ce099097850d100c78e56 100644 --- a/src/core/gyp_configure_host.pro +++ b/src/core/gyp_configure_host.pro @@ -10,7 +10,7 @@ GYPI_CONTENTS = "{" \ " ['CXX.host', '$$which($$QMAKE_CXX)']," \ " ['LD.host', '$$which($$QMAKE_LINK)']," -GYPI_FILE = $$absolute_path('build/qmake_extras.gypi', $$QTWEBENGINE_ROOT) +GYPI_FILE = $$absolute_path('qmake_extras.gypi') !build_pass { write_file($$GYPI_FILE, GYPI_CONTENTS) } diff --git a/src/core/gyp_configure_target.pro b/src/core/gyp_configure_target.pro index 6d9f414c3debd7a67f32ff78d99452acfcdba755..4d5204407be5593a70e6769333a9f6ba18cac2a7 100644 --- a/src/core/gyp_configure_target.pro +++ b/src/core/gyp_configure_target.pro @@ -26,9 +26,9 @@ GYPI_CONTENTS += " ]," \ GYPI_CONTENTS += "}" -GYPI_FILE = $$absolute_path('build/qmake_extras.gypi', $$QTWEBENGINE_ROOT) +GYPI_FILE = $$absolute_path('qmake_extras.gypi') -!exists($$GYPI_FILE): error("-- $$GYPI not found --") +!exists($$GYPI_FILE): error("-- $$GYPI_FILE not found --") # Append to the file already containing the host settings. !build_pass { diff --git a/src/core/gyp_run.pro b/src/core/gyp_run.pro index e0c8b4af1b21ffb731342cbfa4287d4888fc0934..1ee0b1bced3498e0c28402cbd6f139ca4dfaa38a 100644 --- a/src/core/gyp_run.pro +++ b/src/core/gyp_run.pro @@ -46,7 +46,7 @@ cross_compile { !build_pass { message(Running gyp_qtwebengine $${GYP_ARGS}...) - !system("python ./gyp_qtwebengine $${GYP_ARGS}"): error("-- running gyp_qtwebengine failed --") + !system("python $$QTWEBENGINE_ROOT/tools/buildscripts/gyp_qtwebengine $${GYP_ARGS}"): error("-- running gyp_qtwebengine failed --") } ninja.target = invoke_ninja diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp index 91e9ab58563bc2a445a384549ab818d9b5646f39..e2df54afe64b6ed6ae6cb73855967c96ecf87d1e 100644 --- a/src/core/render_widget_host_view_qt.cpp +++ b/src/core/render_widget_host_view_qt.cpp @@ -53,7 +53,6 @@ #include "content/browser/renderer_host/ui_events_helper.h" #include "content/common/gpu/gpu_messages.h" #include "content/common/view_messages.h" -#include "lib/type_conversion.h" #include "third_party/WebKit/public/web/WebCursorInfo.h" #include "ui/base/events/event.h" #include "ui/gfx/size_conversions.h" diff --git a/src/core/resources/resources.pro b/src/core/resources/resources.pro index a9404f3ec383b94ef2831a10806db5a3ea0823d5..b0eba1246853c6f1fd6c35541253b385f1b6050b 100644 --- a/src/core/resources/resources.pro +++ b/src/core/resources/resources.pro @@ -2,6 +2,4 @@ # These files will then be bundled using the Qt Resource System. TEMPLATE = aux -system(python ../build/scripts/build_resources.py) - - +system("python $$QTWEBENGINE_ROOT/tools/buildscripts/build_resources.py") diff --git a/src/process/process.pro b/src/process/process.pro index 6234d839f8c3756cebd337ecc5d2a863203f289b..9c02ec70c3b58a716e29cba54cb7bdfc6077a556 100644 --- a/src/process/process.pro +++ b/src/process/process.pro @@ -12,7 +12,7 @@ qnx: QMAKE_RPATHLINKDIR += $${QNX_DIR}/$${QNX_CPUDIR}/usr/lib/qt5/lib DESTDIR = $$getOutDir()/$$getConfigDir() -INCLUDEPATH += ../lib +INCLUDEPATH += ../core SOURCES = main.cpp diff --git a/src/src.pro b/src/src.pro index bc01515369ce9981c9ea58ce629314c05896adbc..59fcce66f12b80fb60d15ba1c44e1f78c9465a25 100644 --- a/src/src.pro +++ b/src/src.pro @@ -1,64 +1,22 @@ TEMPLATE = subdirs -# The first three subdirs contain dummy .pro files that are used by qmake -# to generate a corresponding .gyp file - -# Phony pro file that extracts things like compiler and linker from qmake -qmake_extras.subdir = build/qmake_extras - -# Phony pro files that generate gyp files. Will be built by ninja. -lib.depends = qmake_extras - -# API libraries -webengine_lib.subdir = lib/quick -webengine_lib.target = sub-webengine-lib -webengine_lib.depends = build -quick_plugin_lib.subdir = lib/quick/plugin -quick_plugin_lib.target = sub-quick-plugin-lib -quick_plugin_lib.depends = webengine_lib -quick_experimental_plugin_lib.subdir = lib/quick/plugin/experimental -quick_experimental_plugin_lib.target = sub-quick-experimental-plugin-lib -quick_experimental_plugin_lib.depends = webengine_lib -widgets_lib.subdir = lib/widgets -widgets_lib.target = sub-widgets-lib -widgets_lib.depends = build - -process.depends = build -sub_examples.depends = quick_plugin_lib quick_experimental_plugin_lib -sub_tests.depends = quick_plugin_lib quick_experimental_plugin_lib - -# This is where we use the generated gypi files and run gyp_qtwebengine -build.depends = resources lib - -SUBDIRS += qmake_extras \ - resources \ - lib \ - process \ - build \ - webengine_lib \ - quick_plugin_lib \ - quick_experimental_plugin_lib +process.depends = core +webengine.depends = core +webenginewidgets.depends = core +webengine_plugin.subdir = webengine/plugin +webengine_plugin.target = sub-webengine-plugin +webengine_plugin.depends = webengine +webengine_experimental_plugin.subdir = webengine/plugin/experimental +webengine_experimental_plugin.target = sub-webengine-experimental-plugin +webengine_experimental_plugin.depends = webengine + + +SUBDIRS += core \ + process \ + webengine \ + webengine_plugin \ + webengine_experimental_plugin qtHaveModule(widgets) { - SUBDIRS += widgets_lib - sub_examples.depends += widgets_lib - sub_tests.depends += widgets_lib + SUBDIRS += webenginewidgets } - -# Ninja executable location needs to be determined early for extra targets. Should be fetched from cache most of the time anyway. -NINJA_EXECUTABLE = $$findOrBuildNinja() - -# Extra targets that invoke ninja on the desired configuration added for convenience -release.target = release -release.commands = $$NINJA_EXECUTABLE -C $$getOutDir()/Release -release.depends: qmake - -debug.target = debug -debug.commands = $$NINJA_EXECUTABLE -C $$getOutDir()/Debug -debug.depends: qmake - -QMAKE_EXTRA_TARGETS += release \ - debug - -# Move this to the beginning of the project file as soon as we moved to the src layout -load(qt_parts) diff --git a/src/webengine/plugin/experimental/experimental.pro b/src/webengine/plugin/experimental/experimental.pro index ad2e0b8a3d2950af77b1c3a052d7444b9644e8cc..fb396c34e0d6a55997df042f0a664d88e865153b 100644 --- a/src/webengine/plugin/experimental/experimental.pro +++ b/src/webengine/plugin/experimental/experimental.pro @@ -8,7 +8,7 @@ QT_PRIVATE += webengine-private qml-private quick-private gui-private core-priva qtHaveModule(v8): QT_PRIVATE += v8-private -INCLUDEPATH += $$QTWEBENGINE_ROOT/lib $$QTWEBENGINE_ROOT/lib/quick +INCLUDEPATH += $$QTWEBENGINE_ROOT/src/core $$QTWEBENGINE_ROOT/src/webengine/api SOURCES = plugin.cpp diff --git a/src/webengine/plugin/plugin.pro b/src/webengine/plugin/plugin.pro index 93e04f97a15214c7aeef6eb2b54ee5b233fbc861..9dca82fe9bae73182da4e0fb4a4e81e49d83ac9a 100644 --- a/src/webengine/plugin/plugin.pro +++ b/src/webengine/plugin/plugin.pro @@ -6,7 +6,7 @@ IMPORT_VERSION = 1.0 QT += webengine qml quick QT_PRIVATE += webengine-private qml-private quick-private gui-private core-private -INCLUDEPATH += $$QTWEBENGINE_ROOT/lib $$QTWEBENGINE_ROOT/lib/quick +INCLUDEPATH += $$QTWEBENGINE_ROOT/src/core $$QTWEBENGINE_ROOT/src/webengine/api SOURCES = plugin.cpp diff --git a/src/webengine/webengine.pro b/src/webengine/webengine.pro index 50353066bf80f54c52b7d9032c2af044a27c8a19..ccf8743580db567dd18f99b080655d5aeb743f40 100644 --- a/src/webengine/webengine.pro +++ b/src/webengine/webengine.pro @@ -1,5 +1,4 @@ TARGET = QtWebEngine -MODULE = webengine # For our export macros DEFINES += QT_BUILD_WEBENGINE_LIB @@ -10,7 +9,7 @@ QT_PRIVATE += qml-private quick-private gui-private core-private # Remove this as soon as we have a hard-dependency on Qt 5.2 qtHaveModule(v8): QT_PRIVATE += v8-private -INCLUDEPATH += ../ +INCLUDEPATH += api ../core # FIXME: all this should eventually be turned into QT += webenginecore macx:LIBPATH = $$getOutDir()/$$getConfigDir() @@ -21,14 +20,14 @@ QMAKE_RPATHDIR += $$LIBPATH #DESTDIR = $$LIBPATH SOURCES = \ - qquickwebengineview.cpp \ + api/qquickwebengineview.cpp \ render_widget_host_view_qt_delegate_quick.cpp HEADERS = \ - qtwebengineglobal.h \ - qtwebengineglobal_p.h \ - qquickwebengineview_p.h \ - qquickwebengineview_p_p.h \ + api/qtwebengineglobal.h \ + api/qtwebengineglobal_p.h \ + api/qquickwebengineview_p.h \ + api/qquickwebengineview_p_p.h \ render_widget_host_view_qt_delegate_quick.h load(qt_module) diff --git a/src/webenginewidgets/webenginewidgets.pro b/src/webenginewidgets/webenginewidgets.pro index 3338e0cf7a6628fff069d2fa6a9ba4829f7b7b6e..a78efaa6c2fde852655a03d3cb74ad4c93ce5466 100644 --- a/src/webenginewidgets/webenginewidgets.pro +++ b/src/webenginewidgets/webenginewidgets.pro @@ -20,20 +20,20 @@ QMAKE_RPATHDIR += $$LIBPATH DESTDIR = $$LIBPATH -INCLUDEPATH += Api ../ +INCLUDEPATH += api ../core SOURCES = \ - Api/qwebenginehistory.cpp \ - Api/qwebenginepage.cpp \ - Api/qwebengineview.cpp\ + api/qwebenginehistory.cpp \ + api/qwebenginepage.cpp \ + api/qwebengineview.cpp\ render_widget_host_view_qt_delegate_widget.cpp HEADERS = \ - Api/qtwebenginewidgetsglobal.h \ - Api/qwebenginehistory.h \ - Api/qwebenginepage.h \ - Api/qwebengineview.h \ - Api/qwebengineview_p.h \ + api/qtwebenginewidgetsglobal.h \ + api/qwebenginehistory.h \ + api/qwebenginepage.h \ + api/qwebengineview.h \ + api/qwebengineview_p.h \ render_widget_host_view_qt_delegate_widget.h load(qt_module) diff --git a/sync.profile b/sync.profile index a08c3d9c5cc6fdf8fa25cb8f65a09bf68617040c..a1f4dce4179edf74892a3a5c908e1e6132b4f5cf 100644 --- a/sync.profile +++ b/sync.profile @@ -1,9 +1,10 @@ %modules = ( # path to module name map - "QtWebEngine" => "$basedir/lib/quick", - "QtWebEngineWidgets" => "$basedir/lib/widgets", + "QtWebEngine" => "$basedir/src/webengine", + "QtWebEngineWidgets" => "$basedir/src/webenginewidgets", ); %moduleheaders = ( # restrict the module headers to those found in relative path - "QtWebEngineWidgets" => "Api", + "QtWebEngine" => "api", + "QtWebEngineWidgets" => "api", ); %classnames = ( ); diff --git a/tests/auto/quick/tests.pri b/tests/auto/quick/tests.pri index bdefa91598bf1a0929799fdd82c20b3cc8c3a7e5..0af8dbd7697045ec3539c35ee5c04a8348a1a07f 100644 --- a/tests/auto/quick/tests.pri +++ b/tests/auto/quick/tests.pri @@ -5,9 +5,7 @@ VPATH += $$_PRO_FILE_PWD_ TARGET = tst_$$TARGET SOURCES += $${TARGET}.cpp -INCLUDEPATH += \ - $$PWD \ - $$PWD/../Api +INCLUDEPATH += $$PWD QT += testlib network quick QT_PRIVATE += quick-private gui-private core-private diff --git a/tests/auto/widgets/tests.pri b/tests/auto/widgets/tests.pri index 4ca22969f98fda9ad1a294480e2e9f2540af0bb8..05636d279da0474bee1840f94575b5189fbe2479 100644 --- a/tests/auto/widgets/tests.pri +++ b/tests/auto/widgets/tests.pri @@ -13,9 +13,7 @@ contains(MOBILITY_CONFIG, multimedia) { } SOURCES += $${TARGET}.cpp -INCLUDEPATH += \ - $$PWD \ - $$PWD/../Api +INCLUDEPATH += $$PWD QT += testlib network webenginewidgets widgets macx: CONFIG -= app_bundle diff --git a/tools/buildscripts/build_resources.py b/tools/buildscripts/build_resources.py index 7b20aa9ad6589c1927e72ba76ed41f4926febb0e..56d8ed4040f16646a363cc0eee1505a80e34b7fc 100755 --- a/tools/buildscripts/build_resources.py +++ b/tools/buildscripts/build_resources.py @@ -48,18 +48,18 @@ import sys import string import time -qtwebengine_src = os.path.abspath(os.path.join(os.path.dirname(__file__), "../..")) +qtwebengine_root = os.path.abspath(os.path.join(os.path.dirname(__file__), "../..")) chrome_src = subprocess.check_output("git config qtwebengine.chromiumsrcdir || true", shell=True).strip() if chrome_src: - chrome_src = os.path.join(qtwebengine_src, chrome_src) + chrome_src = os.path.join(qtwebengine_root, chrome_src) if not chrome_src or not os.path.isdir(chrome_src): - chrome_src = os.path.join(qtwebengine_src, '3rdparty/chromium') + chrome_src = os.path.join(qtwebengine_root, 'src/3rdparty/chromium') print 'CHROMIUM_SRC_DIR not set, falling back to ' + chrome_src grit_tool = os.path.join(chrome_src, 'tools/grit/grit.py') -resources_subdir = os.path.join(qtwebengine_src, 'resources') +resources_subdir = os.path.join(qtwebengine_root, 'src/core/resources') def checkNeedForRebuild(grd_file): grit_files = subprocess.check_output(['python', grit_tool, '-i', grd_file, 'buildinfo']).splitlines() diff --git a/tools/buildscripts/gyp_qtwebengine b/tools/buildscripts/gyp_qtwebengine index e715cb821b1ecc5f72d876b34d72f0cf839b3b87..48491e6008653bb65f26dd6acd0116a59d16dd6c 100755 --- a/tools/buildscripts/gyp_qtwebengine +++ b/tools/buildscripts/gyp_qtwebengine @@ -7,19 +7,20 @@ import sys print 'using python: ' + sys.executable + ' version: ' + sys.version -qtwebengine_src = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) +qtwebengine_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '../..')) +qtwebengine_src = os.path.join(qtwebengine_root, 'src') chrome_src = subprocess.check_output("git config qtwebengine.chromiumsrcdir || true", shell=True).strip() if chrome_src: - chrome_src = os.path.join(qtwebengine_src, chrome_src) + chrome_src = os.path.join(qtwebengine_root, chrome_src) if not chrome_src or not os.path.isdir(chrome_src): - chrome_src = os.path.join(qtwebengine_src, '3rdparty/chromium') + chrome_src = os.path.join(qtwebengine_root, 'src/3rdparty/chromium') print 'CHROMIUM_SRC_DIR not set, falling back to ' + chrome_src script_dir = os.path.abspath(os.path.join(chrome_src, 'build')) if not os.path.isdir(script_dir): print script_dir + " is not a valid directory" sys.exit(1) -root_dir = os.path.abspath(os.path.join(os.getcwd(), os.pardir)) +root_dir = os.path.abspath(os.path.join(os.getcwd(), os.pardir, os.pardir)) sys.path.insert(0, script_dir) import gyp_helper @@ -64,10 +65,10 @@ def additional_include_files(args=[]): AddInclude(os.path.join(script_dir, 'common.gypi')) # Used for additional build tweaks such as file exclusions - AddInclude(os.path.join(qtwebengine_src, 'build', 'qtwebengine_extras.gypi')) + AddInclude(os.path.join(qtwebengine_root, 'src', 'core', 'qtwebengine_extras.gypi')) # Common stuff we generate and extract from qmake - AddInclude(os.path.join(qtwebengine_src, 'build', 'qmake_extras.gypi')) + AddInclude(os.path.join(qtwebengine_root, 'src', 'core', 'qmake_extras.gypi')) # Optionally add supplemental .gypi files if present. supplements = glob.glob(os.path.join(chrome_src, '*', 'supplement.gypi')) @@ -104,7 +105,7 @@ if __name__ == '__main__': break if not gyp_file_specified: - args.append(os.path.join(root_dir, 'qtwebengine.gyp')) + args.append(os.path.join(root_dir, 'src/core/core.gyp')) args.extend(['-I' + i for i in additional_include_files(args)]) diff --git a/tools/qmake/mkspecs/features/default_pre.prf b/tools/qmake/mkspecs/features/default_pre.prf index 1e751b74044a3ff39f876d56703d7ca19586f00d..cec9be1bdcb08d6fda9ac5ce0545940b8344dd1f 100644 --- a/tools/qmake/mkspecs/features/default_pre.prf +++ b/tools/qmake/mkspecs/features/default_pre.prf @@ -1,12 +1,12 @@ # Resolve root directories for sources -QTWEBENGINE_ROOT = $$replace(PWD, /build/qmake/mkspecs/features$,) +QTWEBENGINE_ROOT = $$replace(PWD, /tools/qmake/mkspecs/features$,) QTWEBENGINEPROCESS_NAME = QtWebEngineProcess git_chromium_src_dir = $$system("git config qtwebengine.chromiumsrcdir") # Fall back to the snapshot path if git does not know about chromium sources (i.e. init-repository.py has not been used) -isEmpty(git_chromium_src_dir): git_chromium_src_dir = "3rdparty/chromium" +isEmpty(git_chromium_src_dir): git_chromium_src_dir = "src/3rdparty/chromium" CHROMIUM_SRC_DIR = $$absolute_path("$$QTWEBENGINE_ROOT/$$git_chromium_src_dir") diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf index 9d90d67bd8afe47358ef52390adae22d9baacdab..0d0d379542399284829e3abad40ba29c6dce5705 100644 --- a/tools/qmake/mkspecs/features/functions.prf +++ b/tools/qmake/mkspecs/features/functions.prf @@ -28,7 +28,7 @@ defineReplace(findMocables) { input = $$1 for (file, input): \ infiles += $$absolute_path($$file, $$_PRO_FILE_PWD_) - mocables = $$system("python $$QTWEBENGINE_ROOT/build/scripts/find-mocables $$infiles") + mocables = $$system("python $$QTWEBENGINE_ROOT/tools/buildscripts/find-mocables $$infiles") mocables = $$replace(mocables, $$_PRO_FILE_PWD_$${QMAKE_DIR_SEP}, '') return($$mocables) } @@ -37,7 +37,7 @@ defineReplace(findIncludedMocFiles) { input = $$1 for (file, input): \ infiles += $$absolute_path($$file, $$_PRO_FILE_PWD_) - return($$system("python $$QTWEBENGINE_ROOT/build/scripts/find-included-moc-files $$infiles")) + return($$system("python $$QTWEBENGINE_ROOT/tools/buildscripts/find-included-moc-files $$infiles")) } defineReplace(mocOutput) { @@ -93,7 +93,7 @@ defineReplace(findOrBuildNinja) { !exists($$out) { git_chromium_src_dir = $$system("git config qtwebengine.chromiumsrcdir") # Fall back to the snapshot path if git does not know about chromium sources (i.e. init-repository.py has not been used) - isEmpty(git_chromium_src_dir): git_chromium_src_dir = "3rdparty/chromium" + isEmpty(git_chromium_src_dir): git_chromium_src_dir = "src/3rdparty/chromium" win32: out = $$system_path($$absolute_path("$$QTWEBENGINE_ROOT/$$git_chromium_src_dir/../ninja/ninja.exe")) else: out = $$absolute_path("$$QTWEBENGINE_ROOT/$$git_chromium_src_dir/../ninja/ninja") # If we still did not find ninja, then we bootstrap it. diff --git a/tools/qmake/mkspecs/features/gyp_generator.prf b/tools/qmake/mkspecs/features/gyp_generator.prf index d15b864c990f30bbe9e7abae6b3bf1928b56a306..ad87f5673d608802147017f53e3941aaffa1bc88 100644 --- a/tools/qmake/mkspecs/features/gyp_generator.prf +++ b/tools/qmake/mkspecs/features/gyp_generator.prf @@ -55,7 +55,7 @@ defineReplace(rccAction) { return($$contents) } -GYPI_FILE = $$replace(_PRO_FILE_, .pro$, .gyp) +isEmpty(GYPFILE): GYPFILE = $$replace(_PRO_FILE_, .pro$, .gyp) TARGET_TYPE = $$toGypTargetType() MOCABLE_HEADERS = $$findMocables($$HEADERS) @@ -196,10 +196,10 @@ GYP_CONTENTS += " ]," \ GYP_CONTENTS += " ]," \ "}" -!build_pass: write_file($$GYPI_FILE, GYP_CONTENTS) +!build_pass: write_file($$GYPFILE, GYP_CONTENTS) # Overwriting the generated gyp file seems like a good reason to re-gyp -unix: phony_variable_name_for_qmake_to_be_happy=$$system("touch $$QTWEBENGINE_ROOT/build/build.pro") +unix: phony_variable_name_for_qmake_to_be_happy=$$system("touch $$QTWEBENGINE_ROOT/src/core/gyp_run.pro") # The generated Makefile shouldn't build anything by itself, just re-run qmake if necessary TEMPLATE = aux diff --git a/tools/scripts/take_snapshot.py b/tools/scripts/take_snapshot.py index 1a6976902bd086a0158dc22b51adc3bd5f08bfa0..2a91923cad017e1ebff4650e92496abe2da39c0b 100755 --- a/tools/scripts/take_snapshot.py +++ b/tools/scripts/take_snapshot.py @@ -51,8 +51,8 @@ import shutil import git_submodule as GitSubmodule -qtwebengine_src = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) -os.chdir(qtwebengine_src) +qtwebengine_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) +os.chdir(qtwebengine_root) def isInGitBlacklist(file_path): # We do need all the gyp files. @@ -129,8 +129,8 @@ def createHardLinkForFile(src, dst): raise -third_party_upstream = os.path.join(qtwebengine_src, '3rdparty_upstream') -third_party = os.path.join(qtwebengine_src, '3rdparty') +third_party_upstream = os.path.join(qtwebengine_root, 'src/3rdparty_upstream') +third_party = os.path.join(qtwebengine_root, 'src/3rdparty') def clearDirectory(directory): currentDir = os.getcwd()