首页 CEF系列2:打包
文章
取消

CEF系列2:打包

编译完成之后,就可以打包了:

1
2
3
4
5
6
7
8
9
cd cef\tools

make_distrib.bat --ninja-build --x64-build #在binary_distrib目录
输出:
Creating C:\code\cef_compile\6167\src\cef\binary_distrib\cef_binary_121.0.0+g2201028+chromium-121.0.6167.16_windows64 directory
...
Creating C:\code\cef_compile\6167\src\cef\binary_distrib\cef_binary_121.0.0+g2201028+chromium-121.0.6167.16_windows64\Release directory
这步报错了:
具体是combine_libs.py 生成 Release\\cef_sandbox.lib 时报 RuntimeError: lib.exe exited with status 1107

官方论坛里面有说need to use automate-git.py to create an official build, or follow the cef_sandbox build instructions:https://bitbucket.org/chromiumembedded/cef/wiki/SandboxSetup.md

1
2
3
4
autoninja -C out\Release_GN_x64_sandbox cef_sandbox #进入_sandbox目录编译下cef_sandbox
ninja: Entering directory `out\Release_GN_x64_sandbox'
[1028/1028] LIB obj/cef/cef_sandbox.lib

重新运行并添加 -minimal选项(include only release build binary files),不然会尝试打包Debug版本,如:Copying files from C:\code\cef_compile\6167\src\out\Debug_GN_x64 to C:\code\cef_compile\6167\src\cef\binary_distrib\cef_binary_121.0.0+g2201028+chromium-121.0.6167.16_windows64\Debug

或者把debug版本也编译一下

1
2
3
4
make_distrib.bat --ninja-build --x64-build --minimal
...
Creating zip archive for cef_binary_121.0.0+g2201028+chromium-121.0.6167.16_windows64_minimal...
Creating zip archive for cef_binary_121.0.0+g2201028+chromium-121.0.6167.16_windows64_minimal_release_symbols...

参考

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

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

本文由作者按照 CC BY 4.0 进行授权