linux下编译cef

不建议在linux下使用qt+cef3的模式。我是没搞定。所以白编译了,就这样。

在有代理的情况下出现:

RPC failed transiently. Will retry in 4m16s {"error":"rpc error: code = Internal desc = prpc: when sending request: Post "https://chrome-infra-packages.appspot.com/prpc/cipd.Repository/ResolveVersion": proxyconnect tcp: EOF", "host":"chrome-infra-packages.appspot.com", "method":"ResolveVersion", "service":"cipd.Repository", "sleepTime":"4m16s"}

需要设置export HTTPS_PROXY=127.0.0.1:8888

注意IP跟端口号是你自己代理的ip和端口。

另外这个参数,在不同发行版应该是不行的。

我以前设置的export HTTPS_PROXY=http://127.0.0.1:8888

就会出现问题,把http去掉就OK了。

之后代理掉线反复重新执行命令即可。

我是用了

use_sysroot=true

一定要参考这篇文章,修改文件。

https://www.jianshu.com/p/c82586b97c8a

我把

  /code/chromium_git/chromium/src/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.h

  /code/chromium_git/chromium/src/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.h

都做了修改。

按照搜索到的其他文章,不修改对应的的文件编译出来是不支持H264的。

这个选项,构建命令为

ninja -C out/Debug_GN_x64 cefsimple ceftests chrome_sandbox(去掉了cefclient)

然而我编译出来的貌似还有些问题。可以播放youtube的视频,但B站会提示没有安装flash。。。崩溃。

之后碰到了问题

link error undefined symbol: apps::UninstallDialog::OnDialogClosed
解决方式为:

https://magpcss.org/ceforum/viewtopic.php?f=6&t=18265

最后打包的时候,命令为:

./make_distrib.sh --ninja-build --minimal --x64-build

之后需要在目标机器构建libcef_dll_wrapper.

原文地址:https://www.cnblogs.com/xiaoBay/p/15375987.html