From e453be82f510303e41a24c0093bd03c7f8374f75 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 25 Apr 2017 12:46:36 +0200 Subject: Make python2 usage more robust After configuring Qt there will be an error message if a suitable python version could not be found. Add python2 configure test that - first looks for python2 in PATH - then looks for python in PATH - checks the Python version - stores the result in QMAKE_PYTHON2 Use $$QMAKE_PYTHON2 everywhere where we call python. Pass $$QMAKE_PYTHON2 to gn for its exec_script feature. Task-number: QTBUG-60164 Change-Id: I33de1273cbd20a787b3c8889d35280784dbcd5ae Reviewed-by: Oswald Buddenhagen Reviewed-by: Michal Klocek --- src/core/gn_run.pro | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/gn_run.pro b/src/core/gn_run.pro index 07635d04c..b6966a51d 100644 --- a/src/core/gn_run.pro +++ b/src/core/gn_run.pro @@ -51,7 +51,8 @@ build_pass|!debug_and_release { gn_args = $$shell_quote($$gn_args) gn_src_root = $$shell_quote($$shell_path($$QTWEBENGINE_ROOT/$$getChromiumSrcDir())) gn_build_root = $$shell_quote($$shell_path($$OUT_PWD/$$getConfigDir())) - $$runGn($$gn_binary gen $$gn_build_root --args=$$gn_args --root=$$gn_src_root) + gn_python = "--script-executable=$$pythonPathForSystem()" + $$runGn($$gn_binary gen $$gn_build_root $$gn_python --args=$$gn_args --root=$$gn_src_root) runninja.commands = $$NINJA \$\(NINJAFLAGS\) -C $$gn_build_root QtWebEngineCore QMAKE_EXTRA_TARGETS += runninja -- cgit v1.2.3 From 9df14dff86fcc2daa0d9342174dba62ec32169bc Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Wed, 26 Apr 2017 15:39:33 +0200 Subject: Clean "system" calls to build&run gn and ninja There was a time when gn build was called during make step, however this was not working with recursive qmake calls. Clean up leftovers and fix path and warnings like "Conditional must expand to exactly one word." during builds. Change-Id: I8546520345a5f89ee829558fa0fd9183587848b3 Reviewed-by: Joerg Bornemann --- src/core/gn_run.pro | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'src/core') diff --git a/src/core/gn_run.pro b/src/core/gn_run.pro index b6966a51d..ee4e7892e 100644 --- a/src/core/gn_run.pro +++ b/src/core/gn_run.pro @@ -5,13 +5,6 @@ isQtMinimum(5, 8) { TEMPLATE = aux -defineReplace(runGn) { - message("Running: $$1") - !system($$1) { - error("GN run error!") - } -} - qtConfig(debug_and_release): CONFIG += debug_and_release build_all qtConfig(system-ninja) { @@ -42,17 +35,22 @@ build_pass|!debug_and_release { gn_args += is_debug=false } - gn_args += "qtwebengine_target=\"$$shell_path($$OUT_PWD/$$getConfigDir()):QtWebEngineCore\"" + gn_args += "qtwebengine_target=\"$$system_path($$OUT_PWD/$$getConfigDir()):QtWebEngineCore\"" !qtConfig(system-gn) { - gn_binary = $$shell_quote($$shell_path($$gnPath())) + gn_binary = $$system_quote($$system_path($$gnPath())) } - gn_args = $$shell_quote($$gn_args) - gn_src_root = $$shell_quote($$shell_path($$QTWEBENGINE_ROOT/$$getChromiumSrcDir())) - gn_build_root = $$shell_quote($$shell_path($$OUT_PWD/$$getConfigDir())) + gn_args = $$system_quote($$gn_args) + gn_src_root = $$system_quote($$system_path($$QTWEBENGINE_ROOT/$$getChromiumSrcDir())) + gn_build_root = $$system_quote($$system_path($$OUT_PWD/$$getConfigDir())) gn_python = "--script-executable=$$pythonPathForSystem()" - $$runGn($$gn_binary gen $$gn_build_root $$gn_python --args=$$gn_args --root=$$gn_src_root) + gn_run = $$gn_binary gen $$gn_build_root $$gn_python --args=$$gn_args --root=$$gn_src_root + + message("Running: $$gn_run ") + !system($$gn_run) { + error("GN run error!") + } runninja.commands = $$NINJA \$\(NINJAFLAGS\) -C $$gn_build_root QtWebEngineCore QMAKE_EXTRA_TARGETS += runninja -- cgit v1.2.3 From b53896d1e7f3cad971edd56f303a32058cefde48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Wed, 26 Apr 2017 11:43:22 +0200 Subject: Detect the scenegraph software backend when it was set programatically Since 5.8, it is possible to set the Qt Quick scenegraph backend using QQuickWindow::setSceneGraph backend. However, this is not detectable by WebEngine's implementation as it relied on environment variables or command line options being specified. Task-number: QTBUG-60232 Change-Id: I53291510887ec5c75a15d5927a84e91fb5859e26 Reviewed-by: Kai Koehne --- src/core/web_engine_context.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core') diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index 81f968d11..60622b4ae 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -91,6 +91,7 @@ #ifndef QT_NO_OPENGL # include #endif +#include #include #include #include @@ -157,6 +158,8 @@ bool usingQtQuick2DRenderer() } } + if (device.isEmpty()) + device = QQuickWindow::sceneGraphBackend(); if (device.isEmpty()) device = QString::fromLocal8Bit(qgetenv("QT_QUICK_BACKEND")); if (device.isEmpty()) -- cgit v1.2.3 From f10db97d7a1d43a7c9119c697831cb964ed3ab92 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 3 Apr 2017 17:54:14 +0200 Subject: Improve Qt Creator indexing Includes gn sources, headers and defines Change-Id: I2abfb2c5238211a2305f6bdbcd082e832c048a2b Reviewed-by: Joerg Bornemann --- src/core/core.pro | 2 +- src/core/core_common.pri | 4 ---- src/core/core_module.pro | 3 --- src/core/core_project.pro | 17 ++++++++++++++++- 4 files changed, 17 insertions(+), 9 deletions(-) (limited to 'src/core') diff --git a/src/core/core.pro b/src/core/core.pro index 91c5044b6..6cc8080e0 100644 --- a/src/core/core.pro +++ b/src/core/core.pro @@ -41,7 +41,7 @@ core_api.depends = gn_run # A fake project for qt creator core_project.file = core_project.pro -core_project.depends = core_headers +core_project.depends = gn_run SUBDIRS += \ core_headers \ diff --git a/src/core/core_common.pri b/src/core/core_common.pri index 9c29aea71..370fe4d2a 100644 --- a/src/core/core_common.pri +++ b/src/core/core_common.pri @@ -5,8 +5,4 @@ TARGET = QtWebEngineCore QT += qml quick webchannel QT_PRIVATE += quick-private gui-private core-private webenginecoreheaders-private -# Make QtCreator happy. -CHROMIUM_SRC_DIR = $$QTWEBENGINE_ROOT/$$getChromiumSrcDir() -INCLUDEPATH += $$CHROMIUM_SRC_DIR - qtHaveModule(positioning):QT += positioning diff --git a/src/core/core_module.pro b/src/core/core_module.pro index f4f3fb736..44e8ac613 100644 --- a/src/core/core_module.pro +++ b/src/core/core_module.pro @@ -130,9 +130,6 @@ icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat } OTHER_FILES = \ - $$files(../3rdparty/chromium/*.h, true) \ - $$files(../3rdparty/chromium/*.cc, true) \ - $$files(../3rdparty/chromium/*.mm, true) \ $$files(../3rdparty/chromium/*.py, true) \ $$files(../3rdparty/chromium/*.gyp, true) \ $$files(../3rdparty/chromium/*.gypi, true) \ diff --git a/src/core/core_project.pro b/src/core/core_project.pro index 8418ab22b..c046ce1ff 100644 --- a/src/core/core_project.pro +++ b/src/core/core_project.pro @@ -1,3 +1,18 @@ TEMPLATE = lib +# Fake project to make QtCreator happy. -include(core_chromium.pri) +include(core_common.pri) + +linking_pri = $$OUT_PWD/$$getConfigDir()/$${TARGET}.pri + +!include($$linking_pri) { + error("Could not find the linking information that gn should have generated.") +} + +CHROMIUM_SRC_DIR = $$QTWEBENGINE_ROOT/$$getChromiumSrcDir() +INCLUDEPATH += $$CHROMIUM_SRC_DIR \ + $$OUT_PWD/$$getConfigDir()/gen + +SOURCES += $$NINJA_SOURCES +HEADERS += $$NINJA_HEADERS +DEFINES += $$NINJA_DEFINES -- cgit v1.2.3