chromium编译

@echo off
 
:: 01 设置工具、源代码放置目录;由于源代码体积较大,编译也会占用很大空间,所以应找一个空余空间较多的磁盘来放置源代码。磁盘剩余空间最好不少于100G。git_cmdexe_path,修改成你的机器上 git.exe 的位置 
set "CurrentCD=%~dp0"
set "CurrentCDDisk=%CurrentCD:~0,2%"
set "CurrentCDPath=%CurrentCD:~3%"
cd\
%CurrentCDDisk%
cd\
cd "%CurrentCDPath%"
set "dept_tools_path=%CurrentCD%dept_tools"
set "chromiumsrcpath=%CurrentCD%chromium"
set "git_cmdexe_path=D:\GIT\Git\cmd"
:: 02 设置系统代理 <IP,Port 得修改成你的VPN的IP和Port>
set httpProxyIP=127.0.0.1
set httpProxyPort=1080
netsh winhttp set proxy http://%httpProxyIP%:%httpProxyPort%
@echo [Boto]>%CurrentCD%boto.cfg
@echo proxy=http://%httpProxyIP%>>%CurrentCD%boto.cfg
@echo proxy_port=%httpProxyPort%>>%CurrentCD%boto.cfg
set NO_AUTH_BOTO_CONFIG=%CurrentCD%boto.cfg
set http_proxy=%httpProxyIP%:%httpProxyPort%
set https_proxy=%httpProxyIP%:%httpProxyPort%
:: 03 设置系统环境变量
set DEPOT_TOOLS_WIN_TOOLCHAIN = 0
set GYP_MSVS_VERSION = 2017
set GYP_MSVS_OVERRIDE_PATH = "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise"
set Path=C:\Windows\System32\WindowsPowerShell\v1.0\;%git_cmdexe_path%;%dept_tools_path%
:: 04 下载 depot_tools
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git %dept_tools_path%
gclient
:: 05 下载 chromium 源代码
md %chromiumsrcpath%
cd %chromiumsrcpath%
fetch chromium
gclient sync 
:: 06 用 ninja  编译 chromium < 较快 >
gn gen out/Default --args="is_component_build = false is_debug = false"
ninja -C out/Default chrome
:: 06 用 VS2017 编译 chromium < 较慢 >
gn gen out/VS2017 --args="is_component_build = false is_debug = false" --ide=vs
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值