[[PageOutline]] WinCairo port is a WebKit port for Windows, which is fully OpenSouce and redistributable unlike AppleWin port. It is using Cairo for the graphics backend, libcurl for the network backend. = Installing Development Tools = You need CMake, Perl, Python 2.7, Ruby, gperf and Visual Studio 2019 to build WinCairo port. You can follow [https://webkit.org/webkit-on-windows/#installing-development-tools AppleWin port's instructions] to install the necessary developer tools, and check out the WebKit code. The easiest way to install some tools is using [https://chocolatey.org/ Chocolatey], {{{ choco install cmake ActivePerl python2 ruby git svn patch diffutils gperf -y pip install pywin32 }}} If you want to use Clang, install clang-cl 8 and ninja. {{{ choco install llvm --version 8.0.1 -y choco install ninja -y }}} = Building on Windows = In the top source directory, use {{{ perl Tools/Scripts/build-webkit --wincairo --release }}} to start the build. Ensure you don't have GCC in your PATH, otherwise CMake is going to use GCC and builds will fail. If you are behind http proxy, set following environment variabls for libcurl. {{{ set http_proxy=http://proxy.example.com:8080/ set https_proxy=%http_proxy% set no_proxy=localhost,127.0.0.1 }}} == Building from within Visual Studio == {{{ perl WebKit/Tools/Scripts/build-webkit --wincairo --release --no-ninja --generate-project-only }}} Some environment variables should be propagated to Visual Studio. {{{ set WEBKIT_LIBRARIES=%cd%\WebKitLibraries\win set WEBKIT_OUTPUTDIR=%cd%\WebKitBuild devenv WebKitBuild\Release\WebKit.sln }}} = Required Libraries = You will get required libraries downloaded automatically when you perform a {{{build-webkit --wincairo}}}. The source code is hosted in: https://github.com/WebKitForWindows/WinCairoRequirements = Running the tests = Install Ahem font. XAMPP should be installed in the default install path (c:\xampp). {{{ choco install Bitnami-XAMPP -y }}} If Apache service is running, stop it by using Services of Control Panel. Extensions .pl and .cgi need to be registered as CGI. Modify the following commands along your Perl path, and run them as administrator. {{{ reg add HKEY_CLASSES_ROOT\.pl\Shell\ExecCGI\Command /ve /d "C:\tools\perl\perl\bin\perl.exe -T" reg add HKEY_CLASSES_ROOT\.cgi\Shell\ExecCGI\Command /ve /d "C:\tools\perl\perl\bin\perl.exe -T" }}} Open a command prompt as administrator because http tests need to run Apache service. {{{ set WEBKIT_LIBRARIES=%cd%\WebKitLibraries\win set WEBKIT_OUTPUTDIR=%cd%\WebKitBuild # for WebKit1 python Tools/Scripts/run-webkit-tests --release --wincairo --dump-render-tree # for WebKit2 python Tools/Scripts/run-webkit-tests --release --wincairo }}} You can use Docker to run LayoutTests by mounting the host directory. {{{ docker run -it --rm --cpu-count=8 --memory=16g -v %cd%:c:\repo -w c:\repo webkitdev/msbuild }}} If you are using Japanese Windows, some layout tests fails due to form control size differences. `GetStockObject(DEFAULT_GUI_FONT)` returns `MS UI Gothic` on it. Remove `GUIFont.Facename` of `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\GRE_Initialize`. = Download build artifacts from Buildbot = * Go to [https://build.webkit.org/builders Buildbot]. * Click "WinCairo 64-bit WKL Release (Build)". * Click any "Build #" which is green. * Click "stdio" of "transfer-to-s3" of "Steps and Logfiles" * You can find "S3 URL" in the console log. * Download the zip. * Download the corresponding release of WinCairoRequirements. https://github.com/WebKitForWindows/WinCairoRequirements/releases * Unpack them, copy all DLL of WinCairoRequirements to the directory of MiniBrowser.exe * Install [https://aka.ms/vs/16/release/vc_redist.x64.exe vc_redist.x64.exe] of Microsoft Visual C++ Redistributable for Visual Studio 2019