博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Win7 & VS2013 编译 WebKit 总结
阅读量:5773 次
发布时间:2019-06-18

本文共 4858 字,大约阅读时间需要 16 分钟。

 
[转载请注明Moon出品:  ]

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

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
          ⅰ. 
          ⅱ. 
          ⅲ. 
          ⅳ. 
          ⅴ. 
     c. Install IE10 (IE10-Windows6.1-x86-en-us.exe)
     d. Install VS2013 ( )
     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 ( ) 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"( )
     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 ( )
     b. Install Direct SDK (June 2010 DirectX SDK: )
4. Getting the Code
     a. Download Nightly Build ( ) 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 ( ) 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.
[plain]   
 
 
  1. @echo off  
  2.   
  3. echo Setting up links...  
  4. set CYGWIN_DIR=C:\cygwin  
  5.   
  6. set WEBKIT_SOURCE_DIR=%~dp0%  
  7. if "%WEBKIT_SOURCE_DIR:~-1%"=="\" set WEBKIT_SOURCE_DIR=%WEBKIT_SOURCE_DIR:~0,-1%  
  8.   
  9. for /R "delims=\" %%a in (%WEBKIT_SOURCE_DIR%) do set WEBKIT_DIR_NAME=%%~nxa  
  10. set WEBKIT_LINK_DIR=%CYGWIN_DIR%\home\%username%\%WEBKIT_DIR_NAME%  
  11.   
  12. if exist "%WEBKIT_LINK_DIR%" rmdir "%WEBKIT_LINK_DIR%"  
  13. mklink /D "%WEBKIT_LINK_DIR%" "%WEBKIT_SOURCE_DIR%"  
  14.   
  15. echo Exporting environment varibles...  
  16. set WEBKIT_OUTPUTDIR=%WEBKIT_LINK_DIR%\WebKitBuildByCygwin  
  17. set WEBKIT_LIBRARIES=%WEBKIT_LINK_DIR%\WebKitLibraries\win  
  18. set VSINSTALLDIR=%VS120COMNTOOLS%..\..  
  19. set PATH=%WEBKIT_LINK_DIR%\Tools\Scripts;%PATH%  
  20.   
  21. echo Running Cygwin...  
  22. call "%CYGWIN_DIR%\Cygwin.bat"  
  23. :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:  (WebKit Team's note on building on windows)
     b. ​WebKit Wiki: 
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>”.
你可能感兴趣的文章
ABP集成WIF实现单点登录
查看>>
模拟实现链栈
查看>>
条款9:绝不在构造和析构过程中调用virtual函数
查看>>
day8 socket编程CS模型完善错误处理
查看>>
Dzz任务板初版完成笔记-仿trello私有部署的一款轻量团队任务协作工具。
查看>>
线程基础8-quene讲解
查看>>
echarts - 使用echarts过程中遇到的问题(pending...)
查看>>
C语言字符串与字符数组
查看>>
Asp.net MVC 生成zip并下载
查看>>
POJ-2996 Help Me with the Game 模拟
查看>>
POJ-2676 Sudoku 搜索
查看>>
安装arm-linux-gcc-4.3.2
查看>>
Clear all username or password for login.
查看>>
configparser模块
查看>>
day_05、迭代器、生成器
查看>>
网络对抗技术 实验四 恶意代码技术
查看>>
2012寒假后半部分计划
查看>>
java.lang.IllegalArgumentException: Minimum column number is 0
查看>>
MongoDB学习笔记一 MongoDB安装
查看>>
Java基础学习总结(21)——常用正则表达式列表
查看>>