[转载请注明Moon出品: http://blog.csdn.net/lzl124631x]

距离上次编译WebKit(实际日期是2012年10月)已经过去一年多了, 这期间有很多人问我编译相关的问题, 我由于时间关系没有回复这些朋友, 先在这里说声抱歉.
这几天我再次编译了一下WebKit, 发现编译它已经要求VS2013了, 而且很多地方都变化了. 再次经过一番尿血的尝试, 终于再次得到升天...此次编译版本是WebKit-r161524 (2014-01-09 02:29:27 GMT), 编译成功于2014-01-10, 可以说还是热乎的.
全部编译过程如下, 先弄了个英文版, 稍后添加中文版. 这次省略了介绍什么的, 如果大家感兴趣请看第一篇编译总结. 本篇文章内容还仅是Cygwin下的编译, 稍后进行VS2013下的编译和断点调试.
我将编译的Log文件和此文档的html版本上传到CSDN资源了(http://download.csdn.net/detail/lzl124631x/6835631), 大家可以去下载, 也许有帮助吧.
最后, 还望大家多多支持, 谢谢!

Special thanks to Roger Fong for his generous help and patience.
 
Environment:
     Operating System:     Windows 7 Ultimate 32-bit
     Processor:               Intel Core i7 860
     Installed Memory:     4.00 GB

1. Installing VS2013:
     a. Install Win7 SP1 (windows6.1-KB976932-X86.exe)
     b. Install 5 patches for IE10
          ⅰ. Windows6.1-KB2533623-x86.msu
          ⅱ. Windows6.1-KB2670838-x86.msu
          ⅲ. Windows6.1-KB2729094-v2-x86.msu
          ⅳ. Windows6.1-KB2731771-x86.msu
          ⅴ. Windows6.1-KB2786081-x86.msu
     c. Install IE10 (IE10-Windows6.1-x86-en-us.exe)
     d. Install VS2013 (VS2013_RTM_ULT_ENU.iso)
     e. Right click on "C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe", "Properties", "Compatibility", check "Run this program as an administrator".

2. Installing Cygwin
     a. Download cygwin-downloader.zip (http://svn.webkit.org/repository/webkit/trunk/Tools/CygwinDownloader/cygwin-downloader.zip) and unzip it.
     b. Run cygwin-downloader.exe and wait...
     c. Run setup.exe, select "Install from Local Directory" and install.
     d. Run setup.exe, select "Install from Internet"
          i. In steps before "Select Packages", just select default folders, whatever connection and download site.
          ⅱ. Select Packages: Search "gcc", expand Devel, select "gcc-g++: GNU Compiler Collection(C++)"
          ⅲ. Select Packages: Search "gdb", expand Devel, select "gdb: The GNU Debugger"
     See more at "Installing gcc with Cygwin"(http://www.eecg.utoronto.ca/~aamodt/ece242/cygwin.html)
     e. Open C:\cygwin\etc\profile
          ⅰ. Modify line 32 to PATH="/bin:${PATH}"
          ⅱ. Comment line 44-50 (related to TMP variable) by adding '#' at the beginning of each line.

3. Installing SDKs
     a. Install QuickTime SDK (https://developer.apple.com/quicktime/)
     b. Install Direct SDK (June 2010 DirectX SDK:http://www.microsoft.com/en-us/download/details.aspx?id=6812)

4. Getting the Code
     a. Download Nightly Build (http://nightly.webkit.org/) and unzip it. My version is WebKit-r161524.
     b. Suppress Warning 4309: Open "WebKitLibraries/win/tools/vsprops/common.props", find tag <DisableSpecificWarnings>, add 4309.
     c. Download Support Library (https://developer.apple.com/opensource/internet/webkit_sptlib_agree.html) and copy it into WebKit-r161524. DO NOT unzip it.
     d. Open Source/WebCore/platform/LocalizedString.cpp, search "Look Up", delete the DOUBLE-BYTE double quotation marks around “%@” and “<selection>”.

5. Save the following lines as a .cmd/.bat file (Build.cmd, for example), and put it into the WebKit-r161524 directory.

  1. @echo off
  2. echo Setting up links...
  3. set CYGWIN_DIR=C:\cygwin
  4. set WEBKIT_SOURCE_DIR=%~dp0%
  5. if "%WEBKIT_SOURCE_DIR:~-1%"=="\" set WEBKIT_SOURCE_DIR=%WEBKIT_SOURCE_DIR:~0,-1%
  6. for /R "delims=\" %%a in (%WEBKIT_SOURCE_DIR%) do set WEBKIT_DIR_NAME=%%~nxa
  7. set WEBKIT_LINK_DIR=%CYGWIN_DIR%\home\%username%\%WEBKIT_DIR_NAME%
  8. if exist "%WEBKIT_LINK_DIR%" rmdir "%WEBKIT_LINK_DIR%"
  9. mklink /D "%WEBKIT_LINK_DIR%" "%WEBKIT_SOURCE_DIR%"
  10. echo Exporting environment varibles...
  11. set WEBKIT_OUTPUTDIR=%WEBKIT_LINK_DIR%\WebKitBuildByCygwin
  12. set WEBKIT_LIBRARIES=%WEBKIT_LINK_DIR%\WebKitLibraries\win
  13. set VSINSTALLDIR=%VS120COMNTOOLS%..\..
  14. set PATH=%WEBKIT_LINK_DIR%\Tools\Scripts;%PATH%
  15. echo Running Cygwin...
  16. call "%CYGWIN_DIR%\Cygwin.bat"
  17. :exit

6. Build
     a. run Build.cmd
     b. update-webkit
     c. build-webkit --debug | tee WebKit-r161524/log.txt

Other Material:
     a. Building on Windows:http://trac.webkit.org/wiki/BuildingOnWindows (WebKit Team's note on building on windows)
     b. ​WebKit Wiki: http://trac.webkit.org/wiki/WikiStart

Error Solutions:
---------------------------------------------------------------------
Error Message:
     17>     sh: /usr/bin/gcc: No such file or directory
     17>     Failed to read names from file: /cygdrive/g/WEBKIT~1/Source/WebCore/html/HTMLTagNames.in at /cygdrive/g/WEBKIT~1/Source/WebCore/dom/make_names.pl line 324.
     17>     /cygdrive/g/WEBKIT~1/Source/WebCore/DerivedSources.make:942: recipe for target 'HTMLElementFactory.cpp' failed
     17>     make: *** [HTMLElementFactory.cpp] Error 127
     17>     make: *** Waiting for unfinished jobs....
     17>     ./CSSGrammar.y:62.1: error: syntax error, unexpected end of file
Solution:
     Install gcc to Cygwin (step 2.d).
---------------------------------------------------------------------
Error Message:
     17>     build-generated-files.sh: line 59: cd: /home/Moon/WEBKIT~1/WEBKIT~2/Debug/obj32/WebCore/DerivedSources: Permission denied
     18>     c1xx : fatal error C1083: Cannot open source file: 'C:\cygwin\home\Moon\WebKit-r161524\WebKitBuildByCygwin\Debug\obj32\WebCore\DerivedSources\CSSPropertyNames.cpp': No such file or directory
Solution:
     Right click on "C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe", "Properties", "Compatibility", check "Run this program as an administrator"
---------------------------------------------------------------------
Error Message:
     ..\platform\LocalizedStrings.cpp(248): error C2001: newline in constant
Or
     ..\platform\LocalizedStrings.cpp(250): error C2001: newline in constant
Solution:
     Open Source/WebCore/platform/LocalizedString.cpp, search "Look Up", delete the DOUBLE-BYTE double quotation marks around “%@” and “<selection>”.

Win7 & VS2013 编译 WebKit 总结的更多相关文章

  1. win7、vs2013编译webkit总结

    在windows7.vs2013环境下编译webkit,本人测试成功 1.解压cygwin到C盘下(建议放在C盘更目录下,否则编译期间会有部分文件找不到) 启动命令:C:\cygwin\bin\min ...

  2. 使用VS2013编译webkit

    环境: win7_x64.VS2013 开始: 一.下载webkit 从网站"https://github.com/WebKit/webkit"下载webkit,我下载的版本最后的 ...

  3. VS2013编译WEBKIT

    0,安装VS2013:DXSDK_Jun10.exe:QuickTimeSDK.exe 1,WebKit-r174650.tar.bz2 以管理员解压(非管理员解压最后几下总是报错) 2,设置环境变量 ...

  4. Win7+VS2013初试Thrift

    win7环境下VS2013编译boost_1_58_0步骤: 官网下载boost_1_58_0(直接下载),解压 cmd窗口cd到boost_1_58_0,执行bootstrap.bat cmd窗口获 ...

  5. cocos2d-x -3.81+win7+vs2013开发环境创建新的项目

    cocos2d-x -3.81+win7+vs2013开发环境创建新的项目 1.准备阶段 (1) vs2013下载及安装 (2)cocos2d-x 3.8.1下载及解压 (3)python下载及安装( ...

  6. VS2013编译google protobuf 出现问题error C3861: “min”:

    问题描述: 今天用vs2013编译protobuf 2.4.1 报错: 错误 3 error C3861: "max": 找不到标识符 f:\google\protobuf\pro ...

  7. Vs2012(Vs2013) 编译 64位 Qt (动态库), 并使用自编译Qt建立工程(悲催经历)。(含遗留问题)

    仅供参考. 体会:我个人此次编译不该使用Vs2013编译Qt. 使用以下程序: Qt : qt-opensource-windows-x86-msvc2012_64_opengl-5.2.1.exe ...

  8. vs2013编译boost1.55.0 32/64位

    在使用vs2013编译boost-1.55.0之前,先要给boost做下修改: boost_1_55_0\boost\intrusive\detail\has_member_function_call ...

  9. VS2013编译python源码

    系统:win10 手头有个python模块,是用C写的,想编译安装就需要让python调用C编译器.直接编译发现使用的是vc9编译,不支持C99标准(两个槽点:为啥VS2008都还不支持C99?手头这 ...

随机推荐

  1. 《高性能MySQL》读书笔记--锁、事务、隔离级别 转

    1.锁 为什么需要锁?因为数据库要解决并发控制问题.在同一时刻,可能会有多个客户端对表中同一行记录进行操作,比如有的在读取该行数据,其他的尝试去删除它.为了保证数据的一致性,数据库就要对这种并发操作进 ...

  2. HTTP 传输内容的压缩

    一.HTTP压缩和内容编码的区别 HTTP压缩,在HTTP协议中,其实是内容编码的一种. 在http协议中,可以对内容(也就是body部分)进行编码, 可以采用gzip这样的编码. 从而达到压缩的目的 ...

  3. 【经典】C++&RPG对战游戏

    博文背景: 还记大二上学期的时候看的这个C++&RPG游戏(博主大一下学期自学的php,涵盖oop内容),一个外校的同学他们大一学的C++,大二初期C++实训要求做一个程序填空,就是这个 RP ...

  4. 轻取帝国CMS管理员密码

    “帝国”CMS是一套著名的PHP整站程序,是国内使用人数最多的PHPCMS程序之一.令人无奈的是,“帝国”虽然把势力壮大了,却忽略了自身防护的建设,结果在黑客攻击下,“帝国”沦陷了.“帝国”CMS曝出 ...

  5. Java并发编程核心方法与框架-Future和Callable的使用

    Callable接口与Runnable接口对比的主要优点是Callable接口可以通过Future获取返回值.但是Future接口调用get()方法取得结果时是阻塞的,如果调用Future对象的get ...

  6. elasticsearch集群管理工具head插件(转)

    elasticsearch-head是一个elasticsearch的集群管理工具,它是完全由html5编写的独立网页程序,你可以通过插件把它集成到es 插件安装方法1: 1.elasticsearc ...

  7. java在继承中父类的成员变量是否会被子类所覆盖

    假如 父类 int num =7:子类 int num =9:父类是否会被子类所覆盖? 给你看两个例子: 第一个例子: 第二个例子: 这两个例子的区别只有一句话   由此证明了子类从父类继承的时候   ...

  8. 30 分钟开发一个简单的 watchOS 2 app <oneVcat>

    Apple Watch 和 watchOS 第一代产品只允许用户在 iPhone 设备上进行计算,然后将结果传输到手表上进行显示.在这个框架下,手表充当的功能在很大程度上只是手机的另一块小一些的显示器 ...

  9. ManualResetEvent详解

    原文来自:http://www.cnblogs.com/tianzhiliang/archive/2011/03/04/1970726.html 1. 源码下载: 下载地址:http://files. ...

  10. Sublime Text 3初阶

    本文主要介绍一些Sublime Text3的初级阶段,主要从最初的安装,到插件,还有主题这三个方面介绍,还会提到一些关于使用ST3的一些小小经验... 一:安装 首先进入sublime的官方地址去下载 ...