summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/content_main_delegate_qt.cpp21
-rw-r--r--src/core/core_gyp_generator.pro6
2 files changed, 14 insertions, 13 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