Changes between Version 91 and Version 92 of BuildingCairoOnWindows
- Timestamp:
- Mar 5, 2023 1:32:49 PM (3 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BuildingCairoOnWindows
v91 v92 1 1 [[PageOutline]] 2 2 3 W inCairo port is a WebKit port for Windows, which is fully Open Source and redistributable unlike AppleWin port.3 WebKit Windows port was formally called WinCairo port before Apple Windows port was deprecated. 4 4 It 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 .5 It supports only 64 bit Windows. 6 6 7 7 = Installing Development Tools = 8 8 9 You need CMake, Perl, Python, Ruby, gperf, the latest Windows 10 SDK and Visual Studio 2022 to build WinCairoport.10 The easiest way to install some tools is using [https://chocolatey.org/ Chocolatey] ,9 You need CMake, Perl, Python, Ruby, gperf, the latest Windows SDK and Visual Studio 2022 to build Windows port. 10 The easiest way to install some tools is using [https://chocolatey.org/ Chocolatey]. 11 11 12 12 Unfortunately, [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 toXAMPP's Perl.13 XAMPP includes Perl, and running layout tests needs XAMPP. So, let's use XAMPP's Perl. 14 14 15 15 {{{ … … 17 17 }}} 18 18 19 20 WinCairo supports CMake Ninja generator and CMake Visual Studio generator. 19 It supports both CMake Ninja generator and CMake Visual Studio generator. 21 20 Ninja is optional. 22 21 … … 26 25 27 26 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 = 32 28 33 29 To compile, run programs and run tests, you need to set some environment variables. 34 30 For 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.31 Create 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. 36 32 37 33 {{{ … … 70 66 You can replace `powershell` with `cmd` or `wt` (Windows Terminal) if you like. 71 67 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 71 In the WinKit command prompt, invoke build-webkit to start building. 72 {{{ 73 perl Tools/Scripts/build-webkit --release 84 74 }}} 85 75 … … 88 78 build-webkit automatically downloads the latest WebKitRequirements from GitHub. 89 79 It 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 .80 I'd like to recommend to use --skip-library-update for incremental build to speed up for the next time. 91 81 92 82 {{{ 93 83 python Tools\Scripts\update-webkit-wincairo-libs.py 94 perl Tools\Scripts\build-webkit -- wincairo --release --skip-library-update84 perl Tools\Scripts\build-webkit --release --skip-library-update 95 85 }}} 96 86 … … 103 93 == Building from within Visual Studio == 104 94 105 In the Win Cairocommand prompt,106 107 {{{ 108 perl Tools/Scripts/build-webkit -- wincairo --release --no-ninja --generate-project-only109 }}} 110 111 Open the generated solution file by devenv.95 In the WinKit command prompt, 96 97 {{{ 98 perl Tools/Scripts/build-webkit --release --no-ninja --generate-project-only 99 }}} 100 101 Open the generated solution file by invoking devenv command from a WebKit command prompt. 112 102 113 103 {{{ … … 117 107 Build "MiniBrowser" project. 118 108 119 = Debugging WinCairo=109 = Debugging = 120 110 121 111 * [wiki:"Debugging With Visual Studio"]. … … 124 114 = Required Libraries = 125 115 126 You will get required libraries downloaded automatically when you perform a {{{build-webkit --wincairo}}}.116 You will get required libraries downloaded automatically when you perform a {{{build-webkit}}}. 127 117 The source code is hosted in: https://github.com/WebKitForWindows/WebKitRequirements 128 118 … … 157 147 XAMPP contains openssl.exe in C:\xampp\apache\bin directory. Append the directory to your PATH. 158 148 159 Open the Win Cairocommand prompt as administrator because http tests need to run Apache service.149 Open the WinKit command prompt as administrator because http tests need to run Apache service. 160 150 161 151 Invoke run-webkit-tests. 162 152 163 153 {{{ 164 # for WebKit1165 python Tools/Scripts/run-webkit-tests --release --wincairo -1166 # for WebKit2167 154 python Tools/Scripts/run-webkit-tests --release --wincairo 168 155 }}} … … 193 180 * Download the corresponding release of WebKitRequirements. https://github.com/WebKitForWindows/WebKitRequirements/releases 194 181 195 * Unpack them, copy all DLL of W inCairoRequirements to the directory of MiniBrowser.exe182 * Unpack them, copy all DLL of WebKitRequirements to the directory of MiniBrowser.exe 196 183 * 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 197 184 … … 213 200 }}} 214 201 215 Due to the useless error message, this is a Win CairoFAQ.202 Due to the useless error message, this is a Windows port FAQ. 216 203 The error message actually means MiniBrowserLib.dll can't load required DLL of WebKitRequirements. 217 204 You 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. 218 205 219 206 220 = Compile WinCairowith Clang =207 = Compile with Clang = 221 208 222 209 clang-cl builds isn't supported anymore, see [https://bugs.webkit.org/show_bug.cgi?id=171618 Bug 171618]. … … 235 222 set CC=clang-cl 236 223 set CXX=clang-cl 237 perl Tools\Scripts\build-webkit --release -- wincairo --ninja224 perl Tools\Scripts\build-webkit --release --ninja 238 225 }}} 239 226