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

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

问题描述

提到编译的文档,我必须遵循这个Windows指令:



第1步:

  C:\> mkdir文件夹
C:\> cd文件夹
C:\>解压缩https://src.chromium.org/svn/ trunk / tools / depot_tools.zip
C:\文件夹> dir
C:\文件夹的目录
18/04/2015 02:59< DIR> depot_tools
0文件0字节
3 Dir(s)67 387 064 320字节免费

第2步:

  C:\folder\depot_tools> git config --global user.name John Doe
C:\folder\depot_tools> git config --global user.emailjdoe@email.com
C:\folder\depot_tools> git config --global core.autocrlf false
C:\folder\depot_tools> git config --global core.filemode false
C:\folder\depot_tools> git config --global color.ui true $ b第三步:

 <$> c $ c $ / b 
注意:A)将这些添加到环境变量

C:\ Users \folder> echo%PATH%
C:\ ProgramData \Oracle\Java\javapath; C:\windows\system32; C:\ windows; C:\ windows \Sy
stem32\Wbem; C:\ windows \ System32 \WindowsPowerShell\v1.0\; C:\Progr am文件(x86)\
kype\Phone\; C:\ Go\bin; C:\程序文件(x86)\QuickTime\QTSystem\; C:\程序文件
s(x86)\Windows Kits\8.1\Windows Performance Toolkit\; C:\folder\depot_tools

注意:B)将这些添加到环境变量

C:\文件夹>设置DEPOT_TOOLS_WIN_TOOLCHAIN = 0
C:\文件夹> echo%DEPOT_TOOLS_WIN_TOOLCHAIN%
0
* /


C:\> cd文件夹
C:\文件夹>获取铬
//或使用获取 - 无历史记录铬
// .... (等待:1小时或3小时等待?并关闭)
C:\folder\chromium> gclient sync
C:\folder\chromium> gclient runhooks

第4步:

  C:\folder\chromium\ src> ninja -C out \Debug chrome&& out\Debug\chrome.exe 
//注意:这需要几个小时

SUCCESS:



可选注意:


  • 空间。否则编译/编译失败






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





  • 在哪里开始使用代码?



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:\tpt\depot_tools>mkdir out\Debug

C:\tpt\depot_tools>ninja -C out\Debug chrome
ninja: error: loading 'build.ninja': Het systeem kan het opgegeven bestand niet
vinden.

ninja: Entering directory `out\Debug'

解决方案

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:\folder\depot_tools>git config --global user.name "John Doe"
C:\folder\depot_tools>git config --global user.email "jdoe@email.com"
C:\folder\depot_tools>git config --global core.autocrlf false
C:\folder\depot_tools>git config --global core.filemode false
C:\folder\depot_tools>git config --global color.ui true

Step 3:

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

C:\Users\folder>echo %PATH%
C:\ProgramData\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\Sy
stem32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\S
kype\Phone\;C:\Go\bin;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program File
s (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\folder\depot_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:\folder\chromium>gclient sync
C:\folder\chromium>gclient runhooks

Step 4:

C:\folder\chromium\src>ninja -C out\Debug chrome && out\Debug\chrome.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天全站免登陆