Changes between Version 91 and Version 92 of BuildingCairoOnWindows


Ignore:
Timestamp:
Mar 5, 2023 1:32:49 PM (15 months ago)
Author:
Fujii Hironori
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BuildingCairoOnWindows

    v91 v92  
    11[[PageOutline]]
    22
    3 WinCairo port is a WebKit port for Windows, which is fully Open Source and redistributable unlike AppleWin port.
     3WebKit Windows port was formally called WinCairo port before Apple Windows port was deprecated.
    44It is using [https://www.cairographics.org/ Cairo] for the graphics backend, [https://curl.se/libcurl/ libcurl] for the network backend.
    5 It supports only 64 bit.
     5It supports only 64 bit Windows.
    66
    77= Installing Development Tools =
    88
    9 You need CMake, Perl, Python, Ruby, gperf, the latest Windows 10 SDK and Visual Studio 2022 to build WinCairo port.
    10 The easiest way to install some tools is using [https://chocolatey.org/ Chocolatey],
     9You need CMake, Perl, Python, Ruby, gperf, the latest Windows SDK and Visual Studio 2022 to build Windows port.
     10The easiest way to install some tools is using [https://chocolatey.org/ Chocolatey].
    1111
    1212Unfortunately, [https://community.chocolatey.org/packages/ActivePerl ActivePerl chocolatey package] has a problem and no package maintainer now.
    13 XAMPP includes Perl, and running layout tests needs XAMPP. So, install XAMPP and set PATH to XAMPP's Perl.
     13XAMPP includes Perl, and running layout tests needs XAMPP. So, let's use XAMPP's Perl.
    1414
    1515{{{
     
    1717}}}
    1818
    19 
    20 WinCairo supports CMake Ninja generator and CMake Visual Studio generator.
     19It supports both CMake Ninja generator and CMake Visual Studio generator.
    2120Ninja is optional.
    2221
     
    2625
    2726
    28 Or, you can follow the part of [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.
    29 
    30 
    31 = WinCairo command prompt =
     27= WebKit command prompt =
    3228
    3329To compile, run programs and run tests, you need to set some environment variables.
    3430For ease of development, it's recommended to create a batch file to set environment variables and open powershell.
    35 Create a batch file with the following content and put it in the top source directory, and double-click it to open powershell.
     31Create a batch file with the following content with modifying for your PC, and put it in the top source directory, and double-click it to open powershell.
    3632
    3733{{{
     
    7066You can replace `powershell` with `cmd` or `wt` (Windows Terminal) if you like.
    7167
    72 `WebKitLibraries\win` directory is the default library directory of WinCairo, but it's  a source directory and AppleWin is also using this directory.
    73 You can change it to other directory. For example,
    74 {{{
    75 set WEBKIT_LIBRARIES=%~dp0WebKitLibraries\wincairo
    76 }}}
    77 
    78 
    79 = Building WinCairo =
    80 
    81 In the WinCairo command prompt, invoke build-webkit to start building.
    82 {{{
    83 perl Tools/Scripts/build-webkit --wincairo --release
     68
     69= Building =
     70
     71In the WinKit command prompt, invoke build-webkit to start building.
     72{{{
     73perl Tools/Scripts/build-webkit --release
    8474}}}
    8575
     
    8878build-webkit automatically downloads the latest WebKitRequirements from GitHub.
    8979It checks the latest WebKitRequirements every time you invoke.
    90 I'd like to recommend to use --skip-library-update for incremental build to speed up.
     80I'd like to recommend to use --skip-library-update for incremental build to speed up for the next time.
    9181
    9282{{{
    9383python Tools\Scripts\update-webkit-wincairo-libs.py
    94 perl Tools\Scripts\build-webkit --wincairo --release --skip-library-update
     84perl Tools\Scripts\build-webkit --release --skip-library-update
    9585}}}
    9686
     
    10393== Building from within Visual Studio ==
    10494
    105 In the WinCairo command prompt,
    106 
    107 {{{
    108 perl Tools/Scripts/build-webkit --wincairo --release --no-ninja --generate-project-only
    109 }}}
    110 
    111 Open the generated solution file by devenv.
     95In the WinKit command prompt,
     96
     97{{{
     98perl Tools/Scripts/build-webkit --release --no-ninja --generate-project-only
     99}}}
     100
     101Open the generated solution file by invoking devenv command from a WebKit command prompt.
    112102
    113103{{{
     
    117107Build "MiniBrowser" project.
    118108
    119 = Debugging WinCairo =
     109= Debugging =
    120110
    121111* [wiki:"Debugging With Visual Studio"].
     
    124114= Required Libraries =
    125115
    126 You will get required libraries downloaded automatically when you perform a {{{build-webkit --wincairo}}}.
     116You will get required libraries downloaded automatically when you perform a {{{build-webkit}}}.
    127117The source code is hosted in: https://github.com/WebKitForWindows/WebKitRequirements
    128118
     
    157147XAMPP contains openssl.exe in C:\xampp\apache\bin directory. Append the directory to your PATH.
    158148
    159 Open the WinCairo command prompt as administrator because http tests need to run Apache service.
     149Open the WinKit command prompt as administrator because http tests need to run Apache service.
    160150
    161151Invoke run-webkit-tests.
    162152
    163153{{{
    164 # for WebKit1
    165 python Tools/Scripts/run-webkit-tests --release --wincairo -1
    166 # for WebKit2
    167154python Tools/Scripts/run-webkit-tests --release --wincairo
    168155}}}
     
    193180* Download the corresponding release of WebKitRequirements.  https://github.com/WebKitForWindows/WebKitRequirements/releases
    194181
    195 * Unpack them, copy all DLL of WinCairoRequirements to the directory of MiniBrowser.exe
     182* Unpack them, copy all DLL of WebKitRequirements to the directory of MiniBrowser.exe
    196183* Install the latest [https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist vc_redist.x64.exe] of Microsoft Visual C++ Redistributable for Visual Studio
    197184
     
    213200}}}
    214201
    215 Due to the useless error message, this is a WinCairo FAQ.
     202Due to the useless error message, this is a Windows port FAQ.
    216203The error message actually means MiniBrowserLib.dll can't load required DLL of WebKitRequirements.
    217204You have to set the env var WEBKIT_LIBRARIES. Or, copy all DLL of WebKitRequirements to the directory of MiniBrowser.exe as explained in the above section.
    218205
    219206
    220 = Compile WinCairo with Clang =
     207= Compile with Clang =
    221208
    222209clang-cl builds isn't supported anymore, see [https://bugs.webkit.org/show_bug.cgi?id=171618 Bug 171618].
     
    235222set CC=clang-cl
    236223set CXX=clang-cl
    237 perl Tools\Scripts\build-webkit --release --wincairo --ninja
     224perl Tools\Scripts\build-webkit --release --ninja
    238225}}}
    239226