diff options
-rw-r--r-- | src/core/content_main_delegate_qt.cpp | 21 | ||||
-rw-r--r-- | src/core/core_gyp_generator.pro | 6 | ||||
-rw-r--r-- | tools/qmake/mkspecs/features/gyp_generator.prf | 14 |
3 files changed, 14 insertions, 27 deletions
diff --git a/src/core/content_main_delegate_qt.cpp b/src/core/content_main_delegate_qt.cpp index 9798d6f70..c967cfd48 100644 --- a/src/core/content_main_delegate_qt.cpp +++ b/src/core/content_main_delegate_qt.cpp @@ -46,27 +46,30 @@ #include "ui/base/ui_base_paths.h" #include "ui/base/resource/resource_bundle.h" #include <QByteArray> +#include <QDir> +#include <QFileInfo> #include <QLibraryInfo> #include <QStringBuilder> #include "content_client_qt.h" #include "type_conversion.h" -static QByteArray subProcessPath() { - static bool initialized = false; -#ifdef QTWEBENGINEPROCESS_PATH - static QByteArray processPath(QTWEBENGINEPROCESS_PATH); -#else - static QByteArray processPath; +#ifndef QTWEBENGINEPROCESS_NAME +#error "No name defined for QtWebEngine's process" #endif +static QString subProcessPath() { + static bool initialized = false; + static QString processPath (QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath) + % QDir::separator() % QStringLiteral(QTWEBENGINEPROCESS_NAME)); if (initialized) return processPath; + // Allow overriding at runtime for the time being. const QByteArray fromEnv = qgetenv("QTWEBENGINEPROCESS_PATH"); if (!fromEnv.isEmpty()) - processPath = fromEnv; - if (processPath.isEmpty()) - qFatal("QTWEBENGINEPROCESS_PATH environment variable not set or empty."); + processPath = QString::fromLatin1(fromEnv); + if (processPath.isEmpty() || !QFileInfo(processPath).exists()) + qFatal("QtWebEngineProcess not found at location %s. Try setting the QTWEBENGINEPROCESS_PATH environment variable.", qPrintable(processPath)); initialized = true; return processPath; } diff --git a/src/core/core_gyp_generator.pro b/src/core/core_gyp_generator.pro index a13e8e26e..f03757a3a 100644 --- a/src/core/core_gyp_generator.pro +++ b/src/core/core_gyp_generator.pro @@ -20,10 +20,8 @@ qtHaveModule(v8): QT_PRIVATE += v8-private # Defining keywords such as 'signal' clashes with the chromium code base. DEFINES += QT_NO_KEYWORDS \ - Q_FORWARD_DECLARE_OBJC_CLASS=QT_FORWARD_DECLARE_CLASS - -# We need a way to tap into gyp´s Debug vs. Release configuration -PER_CONFIG_DEFINES = QTWEBENGINEPROCESS_PATH=\\\"$$getOutDir()/%config/$$QTWEBENGINEPROCESS_NAME\\\" + Q_FORWARD_DECLARE_OBJC_CLASS=QT_FORWARD_DECLARE_CLASS \ + QTWEBENGINEPROCESS_NAME=\\\"$$QTWEBENGINEPROCESS_NAME\\\" # Keep Skia happy CONFIG(release, debug|release): DEFINES += NDEBUG diff --git a/tools/qmake/mkspecs/features/gyp_generator.prf b/tools/qmake/mkspecs/features/gyp_generator.prf index 6ae886a33..e41b2de50 100644 --- a/tools/qmake/mkspecs/features/gyp_generator.prf +++ b/tools/qmake/mkspecs/features/gyp_generator.prf @@ -119,20 +119,6 @@ GYP_CONTENTS += " ]," \ for (define, DEFINES): GYP_CONTENTS += " '$$define'," GYP_CONTENTS += " ]," } -!isEmpty(PER_CONFIG_DEFINES) { - GYP_CONTENTS += " 'configurations': {"\ - " 'Release': {" \ - " 'defines': [" - for (define, PER_CONFIG_DEFINES): GYP_CONTENTS += " '$$replace(define,%config,Release)'," - GYP_CONTENTS += " ]," \ - " }," \ - " 'Debug': {" \ - " 'defines': [" - for (define, PER_CONFIG_DEFINES): GYP_CONTENTS += " '$$replace(define,%config,Debug)'," - GYP_CONTENTS += " ]," \ - " }," \ - " }," -} !isEmpty(GYP_DYLIB_INSTALL_NAME_BASE) { GYP_CONTENTS += " 'xcode_settings': {" \ " 'DYLIB_INSTALL_NAME_BASE': '$$GYP_DYLIB_INSTALL_NAME_BASE'," \ |