Search |
Building QtWebKit on WindowsWhen I tried to build QtWebKit on Windows the first time, I realized it was a more complex task than on Linux. I experimented a lot to make building, testing and WebKit scripts work correctly. I decided that I would fix imperfect scripts and write a blogpost about this topic to relieve WebKit developers sufferings. Previously build-webkit script was unable to create WebKitBuild\Release directory, developers had to create it manually. Additionally you had to copy jsc.exe from WebKitBuild\Release\JavaScriptCore\release\ to WebKitBuild\Release\JavaScriptCore\ for testing (run-sunspider, run-javascriptcore-tests), because these scripts determined the path of jsc.exe badly. Several scripts didn't work, because they used /dev/null as null device, but it didn't work on Windows. Invoking another perl script from a perl script didn't work. (eg. run-sunspider calls sunspider script) Several patches to fix these errors have been landed, and now it seems the build environment works correctly like on Linux. If you would like to build QtWebKit on Windows, first of all you should download and install all necessary tools and libraries. WebKit needs bison, gperf, flex and libiconv. You can download them from GNUWin32 open source project:
If you have all the needed dependencies installed, you have to decide which compiler you would like to use. MinGW or MSVC? If you choose MSVC or MinGW-gcc-4.x, you have to build Qt from source. If you use MinGW-gcc-3.x, you don't have to build Qt, you can use the Qt binary package downloaded from QtSoftware, because Qt-4.5.3 binary is built with MinGW-gcc-3.x. It is very important to use that compiler for building WebKit which was used for building Qt, else you will get strange build error messages. But you have to know, JavaScript execution will be 3-7x slower if you use MinGW-gcc-3.x, beacuse for some reason, JavaScriptCore's JIT support (Just In Time compilation) must be disabled with this version of gcc. Additionally WebKit doesn't support MinGW-3.x officially. Oliver Hunt, one of the core WebKit developers said: "... webkit requires gcc-4.x or higher to build ..." #28391. Qt guys told me, they would try to switch for MinGW-4.x when the newest Qt-4.6.0 would be released, but Qt 4.6.0 Beta is still built with minGW 3.4. I have one more problem with MinGW-3.x. When I tried to build QtWebKit in debug mode, the linker ran out of memory when it linked QtLauncher.exe, because a Windows process can only use 2 Gbs of memory. This is one more reason for me not to use MinGW-3.x. Runnig time with different JavaScript execution models
Getting MinGW
Getting QtYou can download Qt 4.5.3 from here Building Qt with MinGWIn Qt source directory:
Before building Qt and WebKit with MSVC
Setting compiler environment for building with MSVC
Building Qt with MSVCSetting environment:
Building:
Building WebKit with MSVCSetting environment:
Building:
Building WebKit with MinGWSetting environment:
Building:
Testing JavaScriptCore
|
Monthly archive
|
Anonymous (not verified) - 04/12/2010 - 18:45
Hello,
I would like to know if you have an inplementation of qtWebkit JIT For wince.
Thanks,
Best Regards
Leonardo
akos.kiss - 04/27/2010 - 18:22
We did not try our JIT on WinCE. Yet.
Anonymous (not verified) - 08/22/2011 - 07:26
Can we build webkit with v8 library?
Peter Varga (not verified) - 08/22/2011 - 09:37
Currently we can't. I have detailed the problem in this thread: https://lists.webkit.org/pipermail/webkit-qt/2011-August/001762.html
Post new comment