diff --git a/src/core/content_main_delegate_qt.cpp b/src/core/content_main_delegate_qt.cpp index 8fe2f337840f5f47b73971b19848b17af45f4ee6..c17459fd92735dab9b9797be0730ce9325212b46 100644 --- a/src/core/content_main_delegate_qt.cpp +++ b/src/core/content_main_delegate_qt.cpp @@ -42,6 +42,7 @@ #include "content_main_delegate_qt.h" #include "base/path_service.h" +#include "content/public/common/content_paths.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/ui_base_paths.h" #include "ui/base/resource/resource_bundle.h" @@ -62,6 +63,7 @@ static base::StringPiece PlatformResourceProvider(int key) { void ContentMainDelegateQt::PreSandboxStartup() { PathService::Override(base::FILE_EXE, WebEngineLibraryInfo::subProcessPath()); + PathService::Override(content::DIR_MEDIA_LIBS, WebEngineLibraryInfo::pluginsPath()); PathService::Override(ui::DIR_LOCALES, WebEngineLibraryInfo::localesPath()); net::NetModule::SetResourceProvider(PlatformResourceProvider); diff --git a/src/core/core.pro b/src/core/core.pro index bd228c20a72e5e0a6cd9ec877f6acbce17ec5f86..c5fe808a6ecb52dd8607867a9e7c6cb0ee3ff270 100644 --- a/src/core/core.pro +++ b/src/core/core.pro @@ -28,5 +28,17 @@ resources.files = $$REPACK_DIR/qtwebengine_resources.pak resources.CONFIG += no_check_exist resources.path = $$[QT_INSTALL_DATA] -INSTALLS += locales resources +PLUGIN_EXTENSION = .so +PLUGIN_PREFIX = lib +macx: PLUGIN_PREFIX = +win32 { + PLUGIN_EXTENSION = .dll + PLUGIN_PREFIX = +} + +plugins.files = $$getOutDir()/$$getConfigDir()/$${PLUGIN_PREFIX}ffmpegsumo$${PLUGIN_EXTENSION} +plugins.CONFIG += no_check_exist +plugins.path = $$[QT_INSTALL_PLUGINS]/qtwebengine + +INSTALLS += locales resources plugins diff --git a/src/core/web_engine_library_info.cpp b/src/core/web_engine_library_info.cpp index b996297ff881fd05f6e6afa57fe1b670af8e7817..a6b7c5d8d4b63ddd1ff14240c535cd11d506a655 100644 --- a/src/core/web_engine_library_info.cpp +++ b/src/core/web_engine_library_info.cpp @@ -86,6 +86,12 @@ static QString location(QLibraryInfo::LibraryLocation path) return QLibraryInfo::location(path); } +base::FilePath WebEngineLibraryInfo::pluginsPath() +{ + QString path = location(QLibraryInfo::PluginsPath) % QDir::separator() % QStringLiteral("qtwebengine"); + return base::FilePath(toFilePathString(path)); +} + base::FilePath WebEngineLibraryInfo::subProcessPath() { static bool initialized = false; diff --git a/src/core/web_engine_library_info.h b/src/core/web_engine_library_info.h index 0ad88b90da9e1d366fe5bd8f6db4a652c2cf8888..a2b3fab31f3b2a472c9a68627ea66e874a5ecfb7 100644 --- a/src/core/web_engine_library_info.h +++ b/src/core/web_engine_library_info.h @@ -47,6 +47,7 @@ class WebEngineLibraryInfo { public: static base::FilePath subProcessPath(); + static base::FilePath pluginsPath(); static base::FilePath localesPath(); static base::FilePath repackedResourcesPath(); };