当前位置:网站首页>CEF download, compile project
CEF download, compile project
2022-07-03 09:47:00 【L-Super】
If you want to use CEF, Need to download CEF. There are generally two ways :
- Compiled source code : Need to use svn perhaps git download Chromium and CEF Source code .
- Build versions automatically : Use the semi-finished product of compiled kernel , This version provides most of the compiled dynamic libraries and resources , Developers only need to compile one manually wrapper Static library is ok .
In order to simplify the operation , More convenient experience CEF, Instead of wasting a lot of time compiling source code , Take the second way .
download CEF
Official download website :https://cef-builds.spotifycdn.com/index.html
CEF Automatically build multiple platforms and versions , Choose here Windows 64 Platform Standard Distribution file .( The download of domestic environment is a little slow , Special means can be used to speed up the download .)
Different platforms have a common structure , Introduce to you Standard Distribution Folder structure of version :
- cmake: Include all targets shared CMake The configuration file .
- Debug: contain libcef.dll、 libcef.lib And build run based on CEF Debug versions of other components required by the application . By default , These files should be placed in the same directory as the executable , And copy it there as part of the build process .CEF Dynamic library (libcef.dll on Windows, libcef.so on Linux, “Chromium Embedded Framework.framework” on OS X)
- include: Include all necessary CEF The header file .
- libcef_dll: contain libcef_dll_wrapper The source code of the static library , All use CEF C++API All applications must link to the Library .
- Release: Same as Debug. contain libcef.dll、 libcef.lib And others need to build and run based on CEF Release version of the application
- Resources: contain libcef.dll Resources needed
- tests: demonstration CEF Usage of demo And test cases .
Each binary package contains a README.txt Documents and a LICENSE.txt file ,README.txt To describe the details related to the platform , and LICENSE.txt contain CEF Of BSD copyright . If you publish based on CEF Application , The copyright notice should be included somewhere in the application .
Please refer to README.txt file , Know which files are required , What can be safely omitted .
CMake structure
Use CMake Conduct CEF Project construction , stay Where is the source code
Box, select the downloaded and unzipped cef Folder , stay cef Create a folder in the folder “build”, stay Where to build binaries
Select this... In the box build Folder
In turn, click CMake At the bottom of the Configure
Button ,Generate
Button generate file , What I use here is VS2022, meanwhile , hold CMAKE_INSTALL_PERFIX
The path has been changed ( at will )
And then click Open Project
Will use VS Open the project
- ALL_BUILD And ZERO_CHECK: yes cmake Automatically generated auxiliary engineering .
- cef_gtest and ceftests: Are all test modules
- cefclient: A contain CEF Various API Demo browser program Demo.
- cefsimple: A simple CEF Browser program Demo.
- libcef_dll_wrapper: Yes libcef Library C++ Code encapsulation . Above cefclient And cefsimple You can use it .
Here you can directly answer cefclient Right click to set as startup item ,Ctrl + F5
Start the program .
Wait a moment , Then the program is executed , By default, Google home page is opened , If open blank , It's because you can't access Google .
Can be directly in VS Mid search www.google.com
To change the code , Found it in cefclient-browser-main_context_impl.cc
In the document , Changed it to www.baidu.com
Run again and it will be normal .
cefsimple Empathy , stay cefsimple->simpleapp.cc
in
url = command_line->GetSwitchValue("url");
if (url.empty())
url = "http://www.google.com";// Change to another website
);
compile libcef_dll_wrapper
In fact, the most important thing is libcef_dll_wrapper Is it found that it has not been compiled , Of course not. , We're compiling cefclient When , By the way .
Path is generated
build\libcef_dll_wrapper\Debug\libcef_dll_wrapper.lib
We can also view items , You will find that this library has already been set in the project properties .
边栏推荐
- Chromium Embedded Framework (CEF) 介绍
- Jetson nano custom boot icon kernel logo CBOOT logo
- SSB Introduction (PbCH and DMRs need to be supplemented)
- Successful graduation [3]- blog system update...
- 【22毕业季】我是毕业生yo~
- DSP data calculation error
- 1922. Count Good Numbers
- Matlab reads hexadecimal numbers and converts them into signed short
- Convert IP address to int
- 内存数据库究竟是如何发挥内存优势的?
猜你喜欢
STM32 interrupt priority management
C language enumeration type
MySQL data manipulation language DML common commands
Flink learning notes (XI) table API and SQL
Common software open source protocols
Electronic product design
Fundamentals of Electronic Technology (III)_ Integrated operational amplifier and its application__ Basic arithmetic circuit
Leetcode daily question (2090. K radius subarray averages)
开学实验里要用到mysql,忘记基本的select语句怎么玩啦?补救来啦~
万字手撕七大排序(代码+动图演示)
随机推荐
Leetcode daily question (1362. closest divisors)
Schematic diagram and connection method of six pin self-locking switch
[CSDN] C1 training problem analysis_ Part IV_ Advanced web
Fundamentals of Electronic Technology (III)__ Logic gate symbols in Chapter 5
Difference of EOF
解决Editor.md上传图片获取不到图片地址问题
软件测试工程师是做什么的 通过技术测试软件程序中是否有漏洞
Leetcode daily question (516. long palindromic subsequence)
一款开源的Markdown转富文本编辑器的实现原理剖析
Nodemcu-esp8266 development (vscode+platformio+arduino framework): Part 3 --blinker_ MIOT_ Light (lighting technology app control + Xiaoai classmate control)
MySQL Data Definition Language DDL common commands
2021-09-26
Patent inquiry website
Nodemcu-esp8266 development (vscode+platformio+arduino framework): Part 4 --blinker_ DHT_ WiFi (lighting technology app control + temperature and humidity data app display)
What do software test engineers do? Pass the technology to test whether there are loopholes in the software program
Vscode Arduino installation Library
Raspberry pie installation SciPy
Jestson Nano自定义根文件系统创建(支持NVIDIA图形库的最小根文件系统)
MySQL environment variable configuration
Solve editor MD uploads pictures and cannot get the picture address