WebKit内核编译实在是一项折磨人的事情,虽然webkit.org官方有一个文档,但是有时候机器本身配置环境还是和教程有差别。
经过三天三夜平均每天2点钟的奋斗,今天终于搞定了。
其实,官方的描述已经非常到位,只要保证每一步都执行了,差别应该不大,需要多加处理的就是本机实际环境导致的具体问题。
首先按照官方文档进行操作
http://www.webkit.org/building/tools.html
一、安装Visual 2005
-
If you own Visual Studio 2005 (newer versions of Visual Studio are currently unsupported):
Install Microsoft Visual Studio 2005 Team Suite Service Pack 1.
If you are building from Vista, install Service Pack 1 Update for Windows Vista.
Install Visual Studio 2005 Service Pack 1 ATL Security Update.
Install the following hotfixes to improve Visual Studio's performance and responsiveness:
Use the default options for these installations.
二、安装cygwin
-
Install Cygwin
Cygwin is a collection of utilities for Windows that includes not only a Subversionclient, but also additional tools that are required to build the WebKit source. Wehave made a downloader available that automatically collects all of the requiredpackages.
Download cygwin-downloader.zip.
Extract the content of the archive to some folder and start
cygwin-downloader.exe
from that folder.This will download all the Cygwin packages you need.When all the packages have finished downloading, the Cygwin installer will launch. ChooseInstall from Local Directory, then clickNext until theinstall is complete. If you are running Vista, the installer won't be able to launch automatically, so you will have to manually launch Cygwin's Setup.exe.
Note: If you are behind a proxy you need to set the
http_proxy
environment variable to the URL of the proxy. This wouldlikely match this pattern:http[s]://[username[:password]@]somehost.com[:port]
. Where the square brackets ([]) are not part of the url but enclose url elements that are optional indicating that those elements might be missing in your case together with their enclosed delimiter such as @ and :.Note: Vista may warn you that Cygwin did not install correctly. Ignore this warning and tell Vista that the install was successful.
Warning: If you are running Vista or Windows 7, Cygwin may have trouble with implementing
fork
(the POSIX function frequently used to start child processes, needed by many of the WebKit build tools).In order to enablecygwin1.dll
to implement fork successfully it is better if no DLL loaded in the parent process is relocated at runtime.One way to achive this is to rebase all cygwin dlls exceptcyglsa64.dll
andcygwin1.dll
to base addresses that cause them to not overlap in memory.In order to rebase all cygwin dlls a
rebaseall
script is provided in the cygwin installation'sbin
directory(usuallyC:\cygwin\bin
).This script must be run fromash.exe
(found in the same directory) while no other cygwin application is running.
ash.exe
has very limited command line editing features so cutting and pasting to the commandline is recommended.
ThePATH
environment variable may not contain the/bi