Skip to content

Latest commit

 

History

History
104 lines (66 loc) · 3.54 KB

README.rst

File metadata and controls

104 lines (66 loc) · 3.54 KB

To build QtWebKit:

  • Windows: install:
  • 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 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 called QtWebKit.tar.gz that contains:
    • Windows:
      • [QtWebKit]/bin containing the .dll files from [QtWebKit]/lib, and icudt57.dll, icuin57.dll and icuuc57.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.