Skip to content

Windows Build References

g40 edited this page Nov 21, 2011 · 2 revisions

General WinCairo build hints: http://www.mail-archive.com/[email protected]/msg02339.html


Building Webkit/Cairo on Windows 7x64 and VS2008

  1. Ensure Cygwin SVN is 1.7+. Earlier versions had a DLL problem which meant rebasing and consequent failure ...

N.B. Build scripts e.g U:\cygwin\home\JEvans\WebKit\Tools\MiniBrowser and some .vcproj files assume Cygwin is installed in %SYSTEMDRIVE%\Cygwin. This needs to be fixed.

  1. Ensure you can run VS2008 or VS2010 toolchain from a Cygwin bash shell. $INCLUDE will also need the paths to the Windows SDK , DirectX etc.

  2. Ensure Cygwin bash is in %PATH% so it can be accessed by Visual Studio as it is called during builds. Can also be added to executable options in VS.

  3. In Cygwin: cd ~ (go to root of home folder) svn checkout http://svn.webkit.org/repository/webkit/trunk WebKit This creates the WebKit folder in your /home directory - there are apparently some hard-coded parts of the build which depend on this directory structure (!)

  4. Ensure correct environment variables are set (2):

WEBKITOUTPUTDIR=U:\cygwin\home\JEvans\WebKit\bin WEBKITLIBRARIESDIR=U:\cygwin\home\JEvans\WebKit\WebKitLibraries\win VS80COMNTOOLS=full/path/to/your/version/of/VS/Common7/tools

The latter is to fix a hardcode environment variable in U:\cygwin\home\JEvans\WebKit\Tools\Scripts\parallelcl @ line 19

  1. From the Webkit root directory run ./Tools/Scripts/update-webkit --wincairo to get latest WinCairo(1) stuff.

  2. From the Webkit root directory run ./Tools/Scripts/build-webkit --wincairo --debug to create Visual Studio projects

  3. Step 6 will fail almost immediately as the solution created is for VS2005.

  4. Go to path/to/Webkit/Source\WebKit\win\WebKit.vcproj and open WebKit.sln. You will be prompted to OK conversion process. Do so.

  5. Set the default project to be WinLauncher.

  6. Ensure Solution Configuration is set to XXX_Cairo_CFLite where XXX is Debug or Release

  7. On W7x64U the bootstrap script fails to create U:\cygwin\home\JEvans\WebKit\bin\Debug_Cairo_CFLite\obj\WebCore\DerivedSources - also it seems to create folders that are read-only. I suspect UAC at work. You will need to do this manually else WebCoreGenerated will fail.

  8. Build ... it will probably fail if you installed Cygwin to somewhere other than c:. I use grepWin (3) to search and replace all offending files thus: %SYSTEMDRIVE% -> %CygDrive%where CygDrive is set to u: (no slash) You will need to search .cmd|.vcproj|*.vsprops

  9. Restart VS so it picks up any environment changes ...

  10. You may well have to build JavaScriptCoreGenerated twice. It seems to fail the first time around with some precision

  11. The next failure will be in WTF (yeah:). error C2220: warning treated as error - no 'object' file generated

It is set to \Wx so no .obj modules are produced when you get warnings from HashSet.h and friends ... This applies to a variety of projects so be prepared to keep resetting the /Wx switch.

  1. Another cygwin work-around mount -c /dev/fs

allows alternative drive spec: cd /dev/fs/

  1. Ensure simplejson is actually installed. If not loads of errors re jsinspector will result. See http://pypi.python.org/pypi/simplejson/

5>------ Build started: Project: Interfaces, Configuration: Debug_Cairo_CFLite Win32 ------ 5>..\Interfaces\WebKit.idl(149) : error MIDL2152 : [version] format is incorrect 5>..\Interfaces\WebKit.idl(303) : error MIDL2214 : semantic check incomplete due to previous errors

--> version(TYPELIB_VERSION) is the offender

1 Here!

2 Environment variables: Use REE http://www.rapidee.com/en/download

3 grepWin: http://code.google.com/p/grepwin/downloads/list

Clone this wiki locally