下載 depot_tools 解壓,加入到環境變量
進入cmd(管理員)運行 gclient 獲取 python和git,svn,設置python環境變量
創建新文件夾
mkdir chromium && cd chromium
把 automate-git.py 保存到文件夾根目錄
然后運行命令:
set GYP_GENERATORS=ninja,msvs-ninja set GYP_MSVS_VERSION=2013 set GYP_DEFINES=proprietary_codecs=1 ffmpeg_branding=Chrome
python automate-git.py --download-dir=chromium --depot-tools-dir=depot_tools路徑 --branch=2623 --no-debug-build --force-build --no-update
* GYP_MSVS_VERSION是vs 的版本 2013/2015
* 如果是獲取主分支可以去掉 --branch參數
可以用set GYP_DEFINES=proprietary_codecs=1 ffmpeg_branding=Chrome 這種方式設置支持MP3、MP4也可以用修改文件的方法:
打開e:\ws\source\chromium\src\cef\cef.gypi,variables節下添加如下即可支持mp3。
'proprietary_codecs': 1,
'ffmpeg_branding': 'Chrome',
問題:
1.屏蔽編譯時的警告,編譯的時候出現警告會暫停編譯
在src\build\common.gypi文件中:(不存在的加入進去)
msvs_disabled_warnings':
],
2.gl_bindings_skia_in_process.cc(684) : error C2679: binary '=' : no operator found which takes a right-hand operand of ty
pe 'overloaded-function' (or there is no acceptable conversion)
解決:gl_bindings_skia_in_process.cc和 gl_bindings_skia_in_process.hh已經死代碼了。
ui/gl/BUILD.gn和gl.gyp去除這兩個引用詳見https://codereview.chromium.org/1673323002
3.egl語法/類型錯誤
#解決egl語法錯誤
#修改h:\ws\source\chromium\src\third_party\swiftshader\include\egl\eglext.h
#在62行后加入
typedef EGLAttribKHR EGLAttrib;
已經生成的一個:
內核版本:49 分支2623
http://pan.baidu.com/s/1o7QmQKi
cefsharp版本:49
https://github.com/cefsharp/CefSharp/tree/cefsharp/49
參考鏈接:
http://blog.csdn.net/ljm198745/article/details/40502599
https://gist.github.com/apla/f7ca2aeda6f15b41f60d2d1f29be1de0
https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md
https://github.com/cefsharp/cef-binary/wiki/Building-Cef-from-source