⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changes between Version 70 and Version 71 of BuildingOnWindows


Ignore:
Timestamp:
Jun 5, 2026, 7:11:46 PM (31 hours ago)
Author:
darbinyan@apple.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BuildingOnWindows

    v70 v71  
    1 [[PageOutline]]
    2 
    3 Apple Windows port has been deprecated.
    4 
    5 
    6 ''See ImprovingLifeOnWindows for ideas about how to make developing WebKit on Windows easier.''
    7 
    8 = Building on Windows =
    9 
    10 Follow the instructions on http://webkit.org/building/tools.html to install the necessary developer tools, support libraries, and check out the WebKit code.
    11 
    12 Note that it is safest to build WebKit in your Cygwin home directory.  At the moment, there seems to be an implicit assumption in the build scripts that paths will be relative to the home directory.
    13 
    14 == Building from within Visual Studio ==
    15 WebKit can be built from within Visual Studio by setting two environment variables:
    16  * {{{WEBKIT_OUTPUTDIR}}} - An absolute Windows-style path pointing to the directory where you want the build products to go.
    17  * {{{WEBKIT_LIBRARIES}}} - An absolute Windows-style path pointing to the WebKitLibraries/win folder in your WebKit checkout.
    18 These environment variables should be set for you the first time you run {{{update-webkit}}}.
    19 
    20 == Common Build Errors ==
    21 === Missing Autogenerated Files ===
    22 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.
    23 
    24 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.
    25 
    26 === Bad line endings ===
    27 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 command line. Then restart the build.
    28 
    29 === Visual C++ Express Edition ===
    30 {{{
    31 Can't find various DLL's and EXE's.
     1{{{#!html
     2<div style="padding: 1em; background: #fff8c4; border-left: 4px solid #f5c842; margin: 1em 0;">
     3    <strong>⚠ This page has moved.</strong> The current documentation is at
     4    <a href="https://docs.webkit.org/Ports/WindowsPort.html">docs.webkit.org/Ports/WindowsPort</a>.
     5</div>
    326}}}
    33 
    34 This is likely due to an issue with your `PATH` variable. Make sure you have `C:\Program Files (x86)\Common Files\Apple\Apple Application Support and C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin` in your `PATH`.
    35 If you're missing `C:\Program Files (x86)\Common Files\Apple\Apple Application Support`, then you haven't installed '''Apple Application Support''' which comes with installing either [http://support.apple.com/downloads/#quicktime Quicktime] or [http://www.apple.com/itunes/ iTunes].
    36 
    37 === WebKit_Libraries ===
    38 If you see errors opening the WebKit solution in Visual Studio/Visual C++ Express that say:
    39 {{{
    40 "$(WebKit_Libraries)/tools/vsprops/common.props could not be found or failed to load"
    41 }}}
    42 (or some other .props file), you must set the "WebKit_Libraries" environment variable.  Make sure that "WebKit_Libraries" points to the "WebKitLibraries/win" directory, not the "WebKitLibraries/" directory.
    43 
    44 === Missing packages in Cygwin ===
    45 
    46 You may have had cygwin already installed before attempting to build WebKit. In this case, you should have checked your cygwin setup to make sure that you have at least the following packages installed: bison, gawk, flex, gperf, perl, zlib.  The error reports you get when you miss one such package are particularly cryptic and may not lead you to those packages.
    47 
    48 If you'd rather reconcile each package and version manually, rather than use the cygwin installer, you may find the [wiki:CygwinInstallerPackages list of packages included in the cygwin installer] useful.
    49 
    50 == Other Common Errors ==
    51 === Perl warnings when you run run-webkit-tests ===
    52 If you see Perl warnings when you run run-webkit-tests of the form:
    53 {{{
    54 readline() on closed filehandle INSTALL_DIR at /home/Administrator/Tools/Scripts/webkitdirs.pm line 1536.
    55 Use of uninitialized value $path in substitution (s///) at /home/Administrator/Tools/Scripts/webkitdirs.pm line 1537.
    56 Use of uninitialized value $path in concatenation (.) or string at /home/Administrator/Tools/Scripts/webkitdirs.pm line 1540.
    57 }}}
    58 then you must install Safari 4.0.4 or greater.
    59 
    60 === Debugging information cannot be found ===
    61 When following the instructions on http://webkit.org/building/debug.html on how to debug WebKit on Windows, Visual Studio displays the message:
    62 {{{
    63 "Debugging information for 'Safari.exe' cannot be found or does not match. No symbols loaded."
    64 }}}
    65 
    66 If you look at the modules, you should should see that symbols were loaded for JavaScriptCore.dll and WebKit.dll. In this case, you may safely ignore that message.
    67 
    68 If not, check that you followed the instructions on how to configure Visual Studio to use Apple's Safari for Windows symbol server on the bottom of http://webkit.org/building/debug.html.
    69 
    70 === Cannot find SafariTheme.dll ===
    71 
    72 Make sure that Safari (e.g. C:\Program Files (x86)\Safari) is included in your 'Path' System Environment variable.
    73 
    74 = Running the Layout Tests on Windows =
    75 
    76 == Tweaks to run tests ==
    77 
    78 Running the layout-tests without failures requires a few tweaks to the environment:
    79 
    80 === Audio-related failures ===
    81 
    82 Install [http://www.apple.com/no/quicktime/download/ QuickTime]
    83 
    84 === Font-metric-related failures ===
    85 
    86 Running layout-test on Windows requires a set of fonts not normally bundled with Windows. The full list of
    87 required fonts can be found here:
    88 
    89 https://trac.webkit.org/browser/trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp#L319
    90 
    91 Most of these fonts come from OS X, so they can't be freely redistributed as one font-package for testing-purposes.
    92 
    93 They can however be copied from your Mac (if you have one), but they have to be converted into a TrueType format Windows understands.
    94 
    95     * {{{*.ttc}}} files can be extraced using a tool from http://www.xlsoft.com/jp/products/indigorose/files/ttsdk.zip
    96     * {{{*.dfont }}} and Mac-style {{{ *.ttf}}} files can be converted using [http://www.xlsoft.com/jp/products/indigorose/files/ttsdk.zip CrossFont] (the trial edition works fine).
    97 
    98 Look in {{{/System/Library/Fonts and /Library/Fonts}}} for the source files.
    99 
    100 The rest of the fonts can be found here:
    101 
    102 https://trac.webkit.org/browser/trunk/Tools/DumpRenderTree/fonts
    103 
    104 The easiest approach is to convert all these fonts to Windows-style TrueType fonts and put them in a single folder. Then point the {{{WEBKIT_TESTFONTS}}} environment variable to that directory when running {{{run-webkit-tests}}}.
    105 
    106 Note however that you might still see metric-related failures (if anyone knows why, please update this section with more complete instructions).
    107 
    108 === Problems with Python auto-update ===
    109 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:
    110 {{{
    111 webkitpy.common.system.autoinstall: INFO     Auto-installing package: eliza.py
    112 webkitpy.common.system.autoinstall: INFO         From: "http://www.adambarth.com
    113 /webkit/eliza"
    114 webkitpy.common.system.autoinstall: INFO           To: "/cygdrive/e/Projects/Web
    115 Kit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/eliza.py"
    116 Traceback (most recent call last):
    117   File "/cygdrive/e/Projects/WebKit/Tools/Scripts/test-webkitpy", line 266, in <
    118 module>
    119     Tester().run_tests(sys.argv, external_package_paths)
    120   File "/cygdrive/e/Projects/WebKit/Tools/Scripts/webkitpy/test/main.py", line 1
    121 }}}
    122 
    123 This seems to happen when running VMWare in NAT networking mode.  If you switch to Bridged networking, everything should work properly.
    124 
    125 == Debugging DumpRenderTree on Windows ==
    126 
    127 To debug DumpRenderTree on Windows, see [wiki:'Debugging DumpRenderTree on Windows'].
    128 
    129 = Running WebKit.dll-derived Apps on Windows =
    130 
    131 In order for your application to properly derive MIME types for local files (i.e. when you supply a "file:" URL), be sure that there is a "\CFNetwork.resources" directory in the same directory as CoreFoundation.dll.  CFNetwork.resources must contain a file, '''types.plist''', an XML parameter list that describes the mapping of file extensions to MIME types. You'll also need '''Info.plist''' from this directory, but you won't need the *.lproj subdirectories.  You can find the aforementioned directory and files in the same place as you found CoreFoundation.dll in the first place.  Typically, a Safari installation will install it at
    132 
    133  C:\Program Files\Common Files\Apple\Apple Application Support\CFNetwork.resources
    134 
    135 = Locating the exports definition file on Windows =
    136 
    137 On Windows, WebKit and WebCore all export to "WebKit.dll".
    138 The associated export definitions file is located at Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in.