浏览器家园

TAG标签|网站导航| 手机访问:m.liulanqi.com

当前位置:首页ChromeChrome开发 → 在windows上编译chrome浏览器Building Chromium for Windows

在windows上编译chrome浏览器Building Chromium for Windows

时间:2023-06-27 11:02:36来源:整理作者:浏览器知识手机版

web端用webRTC实现的一对一视频,互动直播和会议。https://github.com/starrtc/an…

Chromium requires Visual Studio 2017 (15.7.2) to build.
错误:Exception: Visual Studio Version 2017 (from GYP_MSVS_VERSION) not found.
安装“使用C ++进行桌面开发”组件和“MFC和ATL支持”子组件。

您必须安装版本10.0.17134 Windows 10 SDK。可以通过选中Visual Studio Installer中的相应框来安装。
还必须安装SDK调试工具(The SDK Debugging Tools)。如果通过Visual Studio安装程序安装了Windows 10 SDK,则可以通过以下方式安装它们:控制面板→程序→程序和功能→选择“Windows软件开发工具包”→更改→更改→检查“Windows调试工具(Debugging Tools For Windows)” “→改变。

安装 depot_tools
https://storage.googleapis.co…
添加PATH,放在开头

DEPOT_TOOLS_WIN_TOOLCHAIN system variable in the same way, and set it to 0.
这告诉depot_tools使用本地安装的Visual Studio版本(默认情况下,depot_tools将尝试使用google内部版本)

GYP_MSVS_VERSION = 2017
GYP_MSVS_OVERRIDE_PATH = D:Program Files (x86)Microsoft Visual Studio2017Enterprise

disable Windows Indexing.
Click on “Indexing Options也可以在控制面板中打开索引选项” that should come up in the search
When the Indexing Options box comes up, Click on the Modify button. This will pop up an Indexed Locations dialog, where you should see a list of some “locations”, with your hard drive(s) being in the list.
Expand the desired hard drive, down to the root folder of the files you’re using SVN with, and make sure the box is unchecked. Also note that the hard drive will most likely be collapsed, and will have its box unchecked, even though once you expand it, you may find checked boxes.

如果有其它版本python,最好先卸载掉

From a cmd.exe, run the command gclient (without arguments). On first run, gclient will install all the Windows-specific bits needed to work with the code, including msysgit and python.

where python

获取代码
首先,配置Git
$ git config –global user.name “My Name”
$ git config –global user.email “my-name@chromium.org”
$ git config –global core.autocrlf false
$ git config –global core.filemode false
$ git config –global branch.autosetuprebase always

mkdir chromium && cd chromium
如果您不想要完整的仓库历史记录,可以通过添加–no-history标记来节省大量时间
fetch –no-history chromium
webrtc 下载只需要把chromium改成webrtc即可,chromium大概有10几个G,webrtc有6个G左右。
中间断了的话,可以通过gclient sync来同步代码

The remaining instructions assume you have switched to the src directory
cd src
use GN to generate .ninja files.

gn gen out/Default
out目录是可以删除的,刚开始是空的

autoninja -C outDefault chrome
(花了将近5个小时编译出来了 chrome.exe 不过又多出来了50多个G的编译临时文件,在out目录)
传递给Ninja,前面没有“//”(因此//chrome/test:unit_tests使用ninja -C out / Default chrome / test:unit_tests`)。

run the browser:
$ outDefaultchrome.exe

update an existing checkout, you can run
在 src同级目录
$ git rebase-update
$ gclient sync

生成vs2017解决方案:
$ gn gen –ide=vs outvs
$ devenv outDefaultall.sln

之前就有4701多个projects
will be very slow to load.
gn gen –ide=vs –filters=//chrome –no-deps outDefault
其它:–filters=//chrome;//third_party/WebKit/;//gpu/


错误:
Exception: Visual Studio Version 2017 (from GYP_MSVS_VERSION) not found.
please supply those settings in a .boto file pointed to by the NO_AUTH_BOTO_CONFIG environment var.

这个一般是running hooks造成的
在src/DEPS的hooks = [ 区域里面,这个主要下载一些文件
因为在老版的指南https://www.chromium.org/deve…
Run hooks to fetch everything needed for your build setup.
gclient runhooks

Failed to fetch file gs://chromium-gn/22d302b1658a293a4997205350751ff309b138c9 for src/buildtools/win/gn.exe,

gn.exe.sha1里面内容为
22d302b1658a293a4997205350751ff309b138c9

gs:// 替换为 https://storage.googleapis.com/ 就可以直接在浏览器下载了。前提当然是你还开着翻墙代理。所以任务就变成了下载下面这个地址的文件到刚刚那个目录。
https://storage.googleapis.co…

wget –no-check-certificate https://storage.googleapis.co… -O src/buildtools/mac/gn

http://www.debugrun.com/a/86K…
https://idom.me/articles/843….
放在src同级目录下
chmod +x ./gs
./gs src/DEPS
windows下
node gs.js src/DEPS

_downloader_worker_thread使用封装类gsutil实现对google云存储的访问。上述代码中file_url代表下载的url,是gs://格式的。该方法首先采用gsutil.check_call(‘ls’, file_url)检查目标文件是否存在,之后采用gsutil.check_call(‘cp’, file_url, output_filename)将file_url下载到目标文件output_filename。
上述的方法均要访问gs://,我们的代理目前访问不了这个地址,

You have unstaged changes.
Please commit, stash, or reset.

gclient sync -f
Failed to fetch file gs://chromium-clang-format/c8455d43d052eb79f65d046c6b02c169857b963b for src/buildtools/win/clang-format.exe

gs://chromium-browser-clang/rc/ba51d69039ffb88310b72b6568efa9f0de148f8f for src/build/toolchain/win/rc/win/rc.exe

gs://chromium-fonts/a22de844e32a3f720d219e3911c3da3478039f89 for src/third_party/test_fonts/test_fonts.tar.gz
并解压

gs://chromium-browser-clang/orderfiles/f7e302e7d120961ef0cda7faeb1f53bcdad01a33 for src/chrome/buildchrome_child.x86.orderfile

gs://chromium-browser-clang/orderfiles/a0ff6a0859090f8a990b54acf18310a9bd8b2c85 for src/chrome/buildchrome_child.x64.orderfile

错误2
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xb0 in position

mimetypes.py文件

if sys.getdefaultencoding() != ‘gbk’:

reload(sys)
sys.setdefaultencoding('gbk')

chromium的编译和webrtc的编译方式相同,webrtc官网也是使用的chromium的编译文档

https://www.cnblogs.com/Forev…
https://chromium.googlesource…

相关文章

  • 鸥朋浏览器,快速浏览网页,选择鸥朋浏览器!

    引言随着互联网技术的不断发展,人们浏览网页的习惯也在不断变化。在众多浏览器中,鸥朋浏览器受到越来越多的用户青睐。本文将介绍鸥朋浏览器的特点和优势,帮助大家更好地利用这一工具。2.鸥朋浏览器的特点鸥朋浏览器是一款专注于个性化定制的浏览器,在功能和用户体验上具有独特的特点。-高速浏览:鸥朋浏览器基于谷歌浏览器内核,拥有高速的页面加载速度和稳定性,不卡顿不崩溃,用户体验非常好。-安全保护:鸥朋浏览器在用户隐私保护方面非常重视,支持防止恶意插件、广告拦截、隐身模式等多项安全保护功能。-多样化定制:鸥朋浏览器提..
  • 电脑图片浏览器下载,电脑图片查看器免费下载,方便快捷的图片管理工具

    电脑图片浏览器下载电脑是我们最常用的工具之一,对于爱好摄影、美图制作的人来说,图片管理工具是非常必要的。在电脑上浏览图片时,我们需要一个好用的图片浏览器。在网上搜索,可以找到各种各样的图片浏览器。然而,为了避免下载带病毒或虚假的软件,我们需要选择安全可信的下载源,并仔细查看软件版本和说明以确保所下载的软件适用于我们的操作系统。2.电脑图片查看器免费下载有些好的图片浏览器需要购买才能使用。但在我们寻找图片查看器时,我们可以选择一些免费软件,例如GooglePhotos、Picasa等。这些图片软件带有许..

Copyright 2019-2029 www.liulanqi.com 【浏览器家园】 版权所有

浏览器家园_下载浏览器就到浏览器家园 | 专注MAC浏览器和Windows浏览器下载和使用介绍

声明: 所有软件和文章收集整理来自互联网 如有异议 请与本站联系 本站为非赢利性网站 不接受任何赞助和广告