【问题标题】:Build QtWebEngine 5.9.1 with proprietary codecs使用专有编解码器构建 QtWebEngine 5.9.1
【发布时间】:2018-08-30 14:10:51
【问题描述】:

我们需要在 QtwebengineView 中支持 mp4 文件。因此,我们正在尝试使用专有编解码器在 msvc2015 x64 上构建 Qt 5.9.1 的 qtwebengine,方法是在 cmd 中使用以下命令,工作目录是源代码中的 qtwebengine。

"D:\qt-everywhere-opensource-src-5.9.1\qtbase\bin\qmake.exe WEBENGINE_CONFIG+=use_proprietary_codecs"

我们面临以下错误。

WinRT is not supported.
QtWebEngine will not be built

我们尝试点击以下链接: How to compile Qt webengine (5.11) on Windows with proprietary codecs 但这也没有用。

我们如何使用专有编解码器构建 qt 5.9.1 的 qtwebengine?

【问题讨论】:

  • 阅读:doc.qt.io/qt-5/qtwebengine-deploying.html#target-platforms,它明确指出 WinRT 不支持 QtWebEngine:在 Windows 上,Qt WebEngine 仅支持 Windows Vista 或更新的目标平台。由于在 Chromium 中使用了较新的 API,因此不支持 Windows XP。 WinRT也不支持,所以你不能使用它。
  • 是的,你是对的,但我们使用的不是 uwp 的 Qt-5.9.1。我们的是没有 uwp 支持的 windows 桌面应用程序。我们仍然得到 WinRT is not supported 错误。

标签: qt visual-c++ qtwebengine qt5.9


【解决方案1】:

我刚刚成功构建了 QtWebEngine 5.9.6

我的构建环境:

  • Windows7 x64
  • Visual Studio 2015 x64
  • jom 1.1.2

你可以参考我的构建过程。

在开始构建之前,让我们安装工具:

下载qt源码

git clone https://code.qt.io/qt/qt5.git
cd qt5
git checkout 5.9.6
perl init-repository --module-subset=qtwebengine,qtwebview

让我们开始正式的构建

cd qtwebengine
qmake.exe WEBENGINE_CONFIG+=use_proprietary_codecs
jom.exe

然后是漫长的构建过程......

构建完成后会在qt5/qtwebengine/bin目录下生成最终文件

【讨论】:

  • 谢谢,试试这个。
  • 我按照这些步骤,在 qmake 步骤,我得到:bison...yes, python2... [shows file path], gperf...yes, flex... yes, submodule initialized... no. Project ERROR: Unknown feature object private_tests in expression 'features.private_tests'. 你知道是什么导致了这个问题吗?在重建之前,我不断地删除 .cache、.stash 和 .super 文件。在 config.log 文件中:executing config test webengine-submodule test config.qtwebengine_buildtools.tests.webengine-submodule FAILED
猜你喜欢
  • 2019-11-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-10-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多