Changes between Version 21 and Version 22 of BuildingCairoOnWindows

Sep 18, 2018 6:35:08 PM (4 years ago)
Fujii Hironori



  • BuildingCairoOnWindows

    v21 v22  
     3WinCairo port is a WebKit port for Windows, which is fully OpenSouce and redistributable unlike AppleWin port,
     4It is using Cairo for the graphics backend, libcurl for the network backend.
    36= Building on Windows =
    4 As with [wiki:"BuildingOnWindows" Apple's Windows Port], you must first follow the instructions on to install the necessary developer tools, support libraries, and check out the WebKit code.
    6 Note that it is safest to build WebKit in your Cygwin home directory (c:\cygwin\home\username\WebKit).  At the moment, there seems to be an implicit assumption in the build scripts that paths will be relative to the home directory.
     8As with [wiki:"BuildingOnWindows" Apple's Windows Port],
     9you must first follow [ the instructions] to install the necessary developer tools,
     10and check out the WebKit code.
    8 In the ~/WebKit/Tools/Scripts folder, use
     12In the top source directory, use
    10 ./build-webkit --wincairo --release
     14perl Tools/Scripts/build-webkit --wincairo --release
    12 to start the build. Don't forget to add --release (or --debug), otherwise the --wincairo switch will be ignored.
     16to start the build.
    15 == Required Libraries ==
    16 You will need to obtain a set of build requirements that are analogous to the Apple port's  If you have a source tree newer than [ r83657] you will get these libraries installed automatically when you perform a {{{update-webkit --wincairo}}} or a {{{build-webkit --wincairo}}}.  These files are now part of the normal build path.
     19== Building from within Visual Studio ==
    18 == Building from within Visual Studio ==
    19 WebKit can be built from within Visual Studio by setting two environment variables:
    20  * {{{WEBKIT_OUTPUTDIR}}} - An absolute Windows-style path pointing to the directory where you want the build products to go.
    21  * {{{WEBKIT_LIBRARIES}}} - An absolute Windows-style path pointing to the WebKitLibraries/win folder in your WebKit checkout.
     21Some environmental variables should be propagated to Visual Studio.
    23 == Common Build Errors ==
    24 === Error spawning cmd.exe ===
    25 Sometimes, Visual Studio complains that it 'cannot spawn cmd.exe'. Should this happen, check if both your `Cygwin\bin` folder and `c:\windows\sytem32` are both in the Visual Studio list of executable files (Tools -> Options -> VC++ Directories).
    27 === Bad line endings ===
    28 When you see errors in `WebCore/css/makeprops` or `WebCore/css/maketokenizer`, open those files in a suitable editor (SciTE works) and convert the line endings to LF only (Unix-style). You can also use the `dos2unix` command from the Cygwin shell. Then restart the build.
    30 === Missing Autogenerated Files ===
    31 If you have the Visual Studio IDE open while you are performing an {{{update-webkit}}}, you can sometimes run into a strange problem where Visual Studio is unable to locate the autogenerated files.  These files are usually things like `HTMLNames.cpp`, which are generated by Perl as part of the WebCoreGenerated target.
    33 The best way to resolve this is to exit from the IDE, then relaunch.  This usually fixes the problem, though you may wish to clean and rebuild the JavaScriptCoreGenerated and WebCoreGenerated projects.
    35 === Problems with Python auto-update ===
    36 You may encounter errors when the build environment attempts to install Python modules when running Cygwin in a Windows host OS inside a VMWare instance.  The errors will look like the following:
    38 webkitpy.common.system.autoinstall: INFO     Auto-installing package:
    39 webkitpy.common.system.autoinstall: INFO         From: ""
    40 webkitpy.common.system.autoinstall: INFO           To: "/cygdrive/e/Projects/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/"
    41 Traceback (most recent call last):
    42   File "/cygdrive/e/Projects/WebKit/Tools/Scripts/test-webkitpy", line 266, in <module>
    43     Tester().run_tests(sys.argv, external_package_paths)
    44   File "/cygdrive/e/Projects/WebKit/Tools/Scripts/webkitpy/test/", line 1
     24perl WebKit/Tools/Scripts/build-webkit --wincairo --release --generate-project-only
     25set WEBKIT_LIBRARIES=%cd%\WebKitLibraries\win
     26set WEBKIT_OUTPUTDIR=%cd%\WebKitBuild
     27devenv WebKitBuild\Release\WebKit.sln
    47 This seems to happen when running VMWare in NAT networking mode.  If you switch to Bridged networking, everything should work properly.
    49 === Visual C++ Express Edition ===
     31== Running the tests ==
     33XAMPP should be installed in the default install path (c:\xampp).
     34Open a command prompt as administrator because http tests need to run Apache service.
    51 1>c:\cygwin\home\admin\webkit\javascriptcore\wtf\assertions.cpp(45) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
     37set WEBKIT_LIBRARIES=%cd%\WebKitLibraries\win
     38set WEBKIT_OUTPUTDIR=%cd%\WebKitBuild
     39python Tools/Scripts/run-webkit-tests --release --wincairo --dump-render-tree
    54 If you see errors like this you probably need to install the [ platform SDK].
     42You can use Docker to run LayoutTests by mounting the host directory.
    56 == Running the tests ==
    57 After successfully building WebKit, in order to run the tests you need to:
    58   1. copy the DLLs from `%WEBKIT_LIBRARIES%\bin32\` into your build output folder, otherwise {{{jsc}}} won't run properly.
    59   1. Make sure the Cairo, JPEG, and PNG libraries are either in this directory, or in your PATH.
     45docker run -it --rm --cpu-count=8 --memory=16g -v %cd%:c:\repo -w c:\repo webkitdev/msbuild