win 7 64位 vs2005 编译webkit

来源:互联网 发布:华为远程删除数据 编辑:程序博客网 时间:2024/05/22 06:10

         Installing the Developer Tools

 a) vs 安装

  1. 下载安装 VS 2005 英文版 打上SP1补丁

  2.  其次,装上Microsoft Visual Studio 2005 Team Suite Service Pack 1.

  3.   install Service Pack 1 Update for Windows Vista.

  4. 下载安装

       KB918559

       KB935225

       KB943969

       KB947315

  b)  下载 cygwin-downloader.zip 解压 执行cygwin-downloader.exe 完成后运行setup.exe 选在install from local

     选择路径为release

  c)  Install QuickTime SDK

      http://developer.apple.com/quicktime/download/  安装在c盘

  d) Install DirectX SDK

       Download the February 2010 DirectX SDK  安装在c盘

  e)  Install the 32-bit version of Debugging Tools for Windows

       Follow the instructions for installing the 32-bit version of Debugging Tools for Windows.

  

 Getting Code

a) download the latest nightly build  选择第三个下载 解压 

b) 下载补丁包 WebKit Support Libraries 放在上面解压的源码根目录下面

c)  启动刚安装的cygwin 

先执行cpan HTTP::Date 要不下面更新会出错  

进入源码目录 执行

 

Tools/Scripts/update-webkit  更新


    然后执行Tools/Scripts/update-webkit-support-libs 成功后可以进行下面的操作


 编译源码


a) 先设置两个环境变量WEBKITOUTPUTDIR和WEBKITLIBRARIESDIR 

   

WEBKITOUTPUTDIR 为编译目标路径 源码路径\WebKitBuild


WEBKITLIBRARIESDIR 为库以及头文件路径 源码路径\WebKitLibraries\win


b) 如果您机器上安装过Qt,那么检查一下环境变量里面是不是有QTDIR,如有,删了先;如果有这个环境变量

,Webkit的build脚本会认为要

编译Qt的port。
c) 拷贝stdint.h 头文件到vs 安装目录 你的vs 安装路径\Microsoft Visual Studio 8\VC\include 这个文件可以

再源码 里找到

b) 打开源码路径下 Source\WebCore\platform\LocalizedStrings.cpp 修改 263左右的几行为下面格式(如果你在vs 打开这个文件 那几行有乱码) 主要原因是 全角的双引号
#if USE(CF)
    RetainPtr<CFStringRef> selectedCFString(AdoptCF, truncatedStringForLookupMenuItem(selectedString).createCFString());
     return formatLocalizedString(WEB_UI_STRING("Look Up “%@”", "Look Up context menu item with selected word"), selectedCFString.get());
#else
    return WEB_UI_STRING("Look Up “<selection>”", "Look Up context menu item with selected word").replace("<selection>", truncatedStringForLookupMenuItem(selectedString));
#endif
#endif

c) 用 vs 打开源码路径下 \WebKit\win\WebKit.vcproj\WebKit.sln 在解决方案 右键propertis Configuration Manager 修改为 Debug 或者

Release 选择WinLauncher 右键 set as start project
在 class view 中修改所有项目 右键项目属性里面的 “C/C++”,将右侧的”Treat Warnings As Errors”设置为”No”。






    


原创粉丝点击