5

Has anyone successfully built Qt's WebEngine / QtWebEngine / QWebEngine on Windows using Microsoft Visual Studio C++ 2015?

What prerequisites are necessary?

I managed to build Qt itself, but QtWebEngine was skipped, so I tried nmake module-qtwebengine which fails for several reasons.

Arc
  • 11,143
  • 4
  • 52
  • 75
  • Let me point you to https://stackoverflow.com/help/on-topic: _"if your question generally covers… software tools commonly used by programmers; and is a practical, answerable problem that is unique to software development … then you’re in the right place to ask your question!"_ I'd dare say Qt is at least sometimes used by programmers, and that this is a practical question. – Arc Sep 23 '15 at 10:59
  • @SaZ, I could also ask more directly: How did **you** get PyQt 5 to work with QtWebEngine under Windows, as you're obviously a Qt / PyQt guru? Would that be more on-topic? – Arc Sep 23 '15 at 11:17

1 Answers1

7

This is only a partial answer as of now intended to give anyone interested some pointers in the right direction.

First, Qt 5.5.0 does not support Microsoft Visual C++ 2015 at all.

That said, we can patch qtwebengine\tools\qmake\mkspecs\features\functions.prf and change the few occurrences of win32-msvc2013 to win32-msvc2015 to ignore the error that we are not using MSVC 2013.

You need Python 2.x in your path for building. Python 3 will not work.

Open a Visual Studio 2015 Command Prompt and change to your Qt source directory root.

To utilize multiple cores on your machine, do set CL=/MP.

Run configure -release -confirm-license -nomake examples -opensource. Note that -debug may fail.

Run nmake module-qtwebengine.

Now, when we try to build it, it will probably fail because it cannot find a ninja -- yet another build tool to complicate things, and included in the Qt source. You can either try to build it, or you get a binary for Windows from GitHub and save ninja.exe as qtwebengine\src\3rdparty\ninja\ninja.exe.

Looks like I am not the only one having problems... and one reason seems to be Chromium itself, and that looks like unfinished work.

does anybody now if and when QtWebEngine will build with VS1025?

When Chromium starts supporting building with VS2015. So far it doesn't looks like it will be in 5.6

http://lists.qt-project.org/pipermail/development/2015-July/022723.html

HERE BE DRAGONS

to be continued...

Arc
  • 11,143
  • 4
  • 52
  • 75
  • Qt 5.5 aleady has `win32-msvc2015` in mkspecs. – Dmitry Sazonov Sep 23 '15 at 10:24
  • So you apparently did not try to build it. – Arc Sep 23 '15 at 10:56
  • I just managed to compile Qt 5.5 with Visual Studio 2015 [link](http://stackoverflow.com/questions/15826893/building-qt5-with-visual-studio-2012-visual-studio-2013-and-integrating-with/32741509#32741509) – Hamid Sep 23 '15 at 14:04
  • 2
    @hatranpro I managed to compile Qt as well with MSVC 2015, however it did not build QtWebEngine. Did yours build? – Arc Sep 23 '15 at 16:25
  • @Archimedix No, it did not compiled, perhaps you should specify it in the configure. – Hamid Sep 24 '15 at 23:18
  • Seems default build of `QtWebEngine` not support play `mp3` files. What flag should be added to support it? – zhm Nov 18 '16 at 13:14