zoukankan      html  css  js  c++  java
  • 获取 Chromium 源代码以及环境配置

    一、获取代码

    a) 不下载代码,直接浏览,到这里:http://src.chromium.org/viewvc/chrome/ 或者这里:http://code.google.com/p/chromium/source/search 

    b) 快速下载代码包(tarball),到这里:http://chromium-browser-source.commondatastorage.googleapis.com/chromium_tarball.html , 下载完代码包之后也可以继续使用步骤 c 来完成操作。 

    c) 使用工具gclient check out代码,下载这个工具:https://src.chromium.org/svn/trunk/tools/depot_tools.zip 

    i. 解压,加入path环境变量

    ii. 运行下面的命令行取代码

    cd c:chromiumtrunk

    gclient config https://src.chromium.org/chrome/trunk/src 

    gclient sync

    iii. 运行下面的命令行生成sln文件

    gclient runhooks --force

    iv. 工具的具体使用看这里:http://www.chromium.org/developers/how-tos/depottools 

     http://hovertree.com/

    二、配置windows编译环境,编译代码(原文地址:http://www.chromium.org/developers/how-tos/build-instructions-windows )

    a) 安装vs2010

    b) 安装vs2010 sp1

    c) 安装win sdk 8

    i. 如果你的安装目录不是默认的目录,要增加以下的环境变量

    GYP_DEFINES=windows_sdk_path="path to sdk"

    d) 安装dxdsdk jun10

    i. 添加 $(DXSDK_DIR)include; to the beginning of the 'IncludePath' property in %LOCALAPPDATA%MicrosoftMSBuildv4.0Microsoft.Cpp.Win32.user.props. 

    ii. 添加  $(DXSDK_DIR)libx86; to the beginning of the 'LibraryPath' property in the same file. At this point the .props file will look like this:

    <?xml version="1.0" encoding="utf-8"?>
    <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup>    <IncludePath>$(DXSDK_DIR)include;$(IncludePath)</IncludePath>    <LibraryPath>$(DXSDK_DIR)libx86;$(LibraryPath)</LibraryPath>

      </PropertyGroup>
    </Project> 

    iii. 同样的编辑文件: %LOCALAPPDATA%MicrosoftMSBuildv4.0Microsoft.Cpp.x64.user.props: 

    <?xml version="1.0" encoding="utf-8"?>
    <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">  <PropertyGroup>
      <IncludePath>$(DXSDK_DIR)include;$(IncludePath)</IncludePath> <LibraryPath>$(DXSDK_DIR)libx64;$(LibraryPath)</LibraryPath>
    </PropertyGroup>
    </Project> 

    iv. 不要用vs来编辑,直接用记事本吧,因为vs会增加一些编码。

    v. 保证DirectX的SDK在查找顺序的第一位,否则会出现一些编译错误。

    打开chrome.sln进行编译,初次编译预计5小时以上,看机器性能。

    推荐:http://www.cnblogs.com/roucheng/p/texiao.html

  • 相关阅读:
    Flask 请求源码分析
    Flask 上下文管理
    flask-基础知识
    分布式爬虫
    数据结构
    webpack安装和入门
    vue相关
    vue入门
    修改npm全局安装模式的路径
    Vue2+VueRouter2+Webpack+Axios
  • 原文地址:https://www.cnblogs.com/roucheng/p/Chromium.html
Copyright © 2011-2022 走看看