Building WebKit with Qt 5.6 beta on Windows 8.1 x64

From Qt Wiki
Jump to: navigation, search

What need to be done before starting build

  1. Install msys2. Note you add path to the msys2 to the %PATH% variable by hands
  2. Build and install ICU 54 with mingw32 that can be found in msys2. During the configuration process you might face an unknown platform issue. This issue can be solved by using
    gcc -dumpmachine
    
    and then by putting the output to the --build argument. In other words, the final configure command should look like this:
    ./configure --build=x86_64-w64-mingw32
    
  3. Add paths to include and lib in ICU into the %PATH% variable (I built ICU on disk C):
    C:\icu\dist\lib
    
    and
    C:\icu\dist\include
    
  4. Make sure you did set add path to the gnuwin32/binItalic text inside the Qt SDK 5.6 beta source into the %PATH% variable. It might solve some issues during the build process.
  5. Download the source code of the sqlite3 and binaries of the sqlite3 for Windows (32 bit version). I used those guys to build WebKit: Source code sqlite3 and Sqlite.dll win32-x86
  6. Download OpenSsl.

Build Qt 5.6 beta with ICU and OpenSsl support

  1. Download a Qt 5.6 beta SDK (In this build qt-everywhere-enterprise-src 5.6.0 beta was used. However, the same can be applied to the source code downloaded HERE, it was tested)
  2. Create a build directory.
  3. Go to build directory.
  4. Open command window in this directory (press left shift and then mouse right button. In context menu you will see the option: "Run command prompt here")
  5. Assuming you have side-by-side directories (build and source code), run this configure command:
..\qt-everywhere-enterprise-src-5.6.0-beta\configure -prefix %CD%\qtbase -commercial -nomake tests -release -icu -I C:\icu\dist\include -L C:\icu\dist\lib -openssl -I C:\OpenSSL-Win32\include -L C:\OpenSSL-Win32\lib -opengl desktop -no-angle

This was tested with shadow-build only with release flag set.

7. run
mingw32-make -j8

8. Wait till build is ready. Make sure, in <path_to_build_directory>\qtbase\lib you have both libQt5Positioning.a library and libQt5WebChannel.a library. Sometimes they are just missing for some strange reasons.


Qt Declarative source code is not removed from the Qt repository and still can be found in 5.6 branch.

Build WebKit

  1. First download WebKit module from git. Second install all needed dependencies described here Windows requirements
  2. Unpack Webkit and open a command prompt in WebKit directory
  3. Run this command
    SET SQLITE3SRCDIR=<path\to>\qtbase\src\3rdparty\sqlite
    
  4. Copy and paste header file from sqlite3 source code to this directory <path to built 5.6 beta release>\qtbase\plugins\sqldrivers
  5. Copy and paste sqlite3 library files (binary previously downloaded) to this directory <path to built 5.6 beta release>\qtbase\lib. This will solve possible linking issue in the end of WebKit building
  6. Run in command prompt
    <full_path_to_56beta_build_qtbase_bin_directory>\qmake -r CONFIG+=release
    
  7. Make sure, no warnings or error messages showed up. If errors occurred - fix them and start from the fresh source code of the WebKit module
  8. Run mingw32-make -j8. Build will take about 1.5 hours. However, I would recommend from time to time check it.
  9. Now you should be able to use WebKit with Qt SDK 5.6 beta.