Google Chrome - 如何在 Windows 中编译 Google Chrome? [英] Google Chrome - How to compile Google Chrome in Windows?

查看:48
本文介绍了Google Chrome - 如何在 Windows 中编译 Google Chrome?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

提到要编译的文档我必须遵循 Windows 的此说明:

第 1 步:

C:>mkdir 文件夹C:>cd 文件夹C:> 解压 https://src.chromium.org/svn/trunk/tools/depot_tools.zipC:文件夹>目录C:文件夹的目录18/04/2015 02:59 <DIR>depot_tools0 文件 0 字节3 目录 67 387 064 320 字节空闲

第 2 步:

C:folderdepot_tools>git config --global user.name "John Doe"C:folderdepot_tools>git config --global user.email "jdoe@email.com"C:folderdepot_tools>git config --global core.autocrlf falseC:folderdepot_tools>git config --global core.filemode falseC:folderdepot_tools>git config --global color.ui true

第 3 步:

/*注意:A)在环境变量中添加这些C:Usersfolder>echo %PATH%C:ProgramDataOracleJavajavapath;C:windowssystem32;C:windows;C:windowsSystem32Wbem;C:windowsSystem32WindowsPowerShellv1.0;C:Program Files (x86)SkypePhone;C:Goin;C:Program Files (x86)QuickTimeQTSystem;C:Program Files (x86)Windows Kits8.1Windows Performance Toolkit;C:folderdepot_tools注意:B)在环境变量中添加这些C:文件夹>设置 DEPOT_TOOLS_WIN_TOOLCHAIN=0C:folder>echo %DEPOT_TOOLS_WIN_TOOLCHAIN%0*/C:>cd 文件夹C:folder>fetch 铬//或使用 fetch --no-history 铬//.....(等待:1 小时或 3 小时就等???然后闭嘴)C:folderchromium>gclient 同步C:folderchromium>gclient 运行挂钩

第 4 步:

C:folderchromiumsrc>ninja -C outDebug chrome &&出调试chrome.exe//注意:这需要几个小时

成功:

可选说明:

  • 您需要有足够的磁盘空间.否则编译/构建失败

  • 您需要有足够的内存空间.否则它也会失败

  • 从哪里开始使用代码?

https://www.chromium.org/developers/how-tos/getting-around-the-chrome-source-code

Documentation mentioned to compile i have to follow this instruction for Windows: http://www.chromium.org/developers/how-tos/build-instructions-windows

So i did all the steps, but the following is failing how can i resolve it?

C:	ptdepot_tools>mkdir outDebug

C:	ptdepot_tools>ninja -C outDebug chrome
ninja: error: loading 'build.ninja': Het systeem kan het opgegeven bestand niet
vinden.

ninja: Entering directory `outDebug'

解决方案

DONE. Windows 8.1 Pro 64-bit. Visual Studio 2013 Community edition

Install git https://git-scm.com/download/win

Step 1:

C:>mkdir folder
C:>cd folder
C:>unzip https://src.chromium.org/svn/trunk/tools/depot_tools.zip
C:folder>dir
 Directory of C:folder
18/04/2015  02:59    <DIR>          depot_tools
               0 File(s)              0 bytes
               3 Dir(s)  67 387 064 320 bytes free

Step 2:

C:folderdepot_tools>git config --global user.name "John Doe"
C:folderdepot_tools>git config --global user.email "jdoe@email.com"
C:folderdepot_tools>git config --global core.autocrlf false
C:folderdepot_tools>git config --global core.filemode false
C:folderdepot_tools>git config --global color.ui true

Step 3:

/*
NOTE: A) Add those in the environment variable

C:Usersfolder>echo %PATH%
C:ProgramDataOracleJavajavapath;C:windowssystem32;C:windows;C:windowsSy
stem32Wbem;C:windowsSystem32WindowsPowerShellv1.0;C:Program Files (x86)S
kypePhone;C:Goin;C:Program Files (x86)QuickTimeQTSystem;C:Program File
s (x86)Windows Kits8.1Windows Performance Toolkit;C:folderdepot_tools

NOTE: B) Add those in the environment variable

C:folder>set DEPOT_TOOLS_WIN_TOOLCHAIN=0
C:folder>echo %DEPOT_TOOLS_WIN_TOOLCHAIN%
0
*/


C:>cd folder
C:folder>fetch chromium
// or use fetch --no-history chromium 
//.....(wait: 1 hour or 3 hour just wait??? and shut up)
C:folderchromium>gclient sync
C:folderchromium>gclient runhooks

Step 4:

C:folderchromiumsrc>ninja -C outDebug chrome && outDebugchrome.exe 
// NOTE: this takes several hours

SUCCESS:

OPTIONAL NOTE:

  • you need to have enough disk space. otherwise the compile/build fails

  • you need to have enough memory space. otherwise it also fail

  • where to get started with code?

https://www.chromium.org/developers/how-tos/getting-around-the-chrome-source-code

这篇关于Google Chrome - 如何在 Windows 中编译 Google Chrome?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆