To build QtWebKit:
- Windows: install:
- Perl 5.22;
- Python 2.7;
- Ruby >= 1.9;
- Bison and Flex (make a copy of
win_flex.exe
and name itflex.exe
); - gperf; and
ICU (uncompress the binaries to
C:\icu
).Note: the GnuWin32 version of Flex is not suitable, hence we must use Win flex-bison instead.
Linux: run the following command from the terminal:
sudo apt-get install bison flex gperf libicu-dev libsqlite3-dev libxrender-dev
and build ICU from source and from there:
cd [ICU] mkdir build cd build ../source/runConfigureICU Linux --prefix=[ICU]/install make sudo make install
Note: regarding ICU, make sure to get/build the version used by Qt (check using find /opt/Qt -name *icu*
).
From there, do the following from the command prompt or terminal:
Command prompt:
cd [QtWebKit] SET INCLUDE=C:\icu\include;%INCLUDE% SET LIB=C:\icu\lib64;%LIB% SET PATH=C:\icu\lib64;%PATH% SET SQLITE3SRCDIR=C:\Qt\5.6\Src\qtbase\src\3rdparty\sqlite qmake jom
Terminal (Linux):
cd [QtWebKit] export PKG_CONFIG_PATH=[ICU]/install/lib/pkgconfig:$PKG_CONFIG_PATH qmake make -j 2
Terminal (macOS):
cd [QtWebKit] qmake make -j 4 release
Once QtWebKit is fully built:
- For each supported platform:
- Copy the contents of
[QtWebKit]/lib/cmake
to[OpenCOR]/src/3rdparty/QtWebKit/cmake/[PlatformDir]
; Replace
get_filename_component(_qt5WebKit_install_prefix "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
with
set(_qt5WebKit_install_prefix ${CMAKE_SOURCE_DIR}/src/3rdparty/QtWebKit)
in [OpenCOR]/src/3rdparty/QtWebKit/cmake/[PlatformDir]/Qt5WebKit/Qt5WebKitConfig.cmake; and
Replace
get_filename_component(_qt5WebKitWidgets_install_prefix "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
with
set(_qt5WebKitWidgets_install_prefix ${CMAKE_SOURCE_DIR}/src/3rdparty/QtWebKit)
in
[OpenCOR]/src/3rdparty/QtWebKit/cmake/[PlatformDir]/Qt5WebKitWidgets/Qt5WebKitWidgetsConfig.cmake
.
- Copy the contents of
- Copy the macOS contents of
[QtWebKit]/lib/QtWebKit.framework/Headers
to[OpenCOR]/src/3rdparty/QtWebKit/include/QtWebKit
and the macOS contents of[QtWebKit]/lib/QtWebKitWidgets.framework/Headers
to[OpenCOR]/src/3rdparty/QtWebKit/include/QtWebKitWidgets
; and - For each supported platform, create and upload to the OpenCOR website (under
[OpenCOR]/binaries/src/3rdparty/QtWebKit/[PlatformDir]
) a file calledQtWebKit.tar.gz
that contains:- Windows:
[QtWebKit]/bin
containing the.dll
files from[QtWebKit]/lib
, andicudt57.dll
,icuin57.dll
andicuuc57.dll
from the ICU library; and[QtWebKit]/lib
containing only the original.lib
files;
- Linux:
[QtWebKit]/lib
containing only the original.so*
files; and - macOS:
[QtWebKit]/lib
containing only the original.framework
folders.
- Windows: