Closed prepare closed 7 years ago
I start on d:\projects folder
_pic 1: extract source file (1) to the folder (2) and rename (3) it to cef_binary3.3071.1647.win32
_pic 2: inside the cef_binary3.3071.1647.win32 folder, this is original source
Apply our 'Patches' to the original source BEFORE do 'cmake' since the patch will modify cmake script too.
pic 3: Run kneadium's BridgeBuilder, select patch, check original source location(1), and click LoadPatch and Apply Patch(2)
Run cmake, GUI, I use version 3.10
_pic4: specific output folder, set to cef_binary3.3071.1647.win32build (fixed name)
Select proper compiler, we use VS2015
pic5: this version need VS2015 (1), then click Finish (2)
Configure
pic 6: configure done(1) , uncheck those 3 boxes (2)
Generate
pic 7: generate (1) done (2)
cef.sln
_pic 8: cef.sln is generated in cef_binary3.3071.1647.win32build
Open cef.sln project
pic 9: we use only 2 projects, remove other projects pic 10: the 2 projects that we will use
Build the cefclient.exe, debug mode.
_pic 11, debug mode(1), Lets open mycef_buildconfig.h (2), you will see BUILT_TEST value and BUILD_TESTROOTWINDOW (3) value are 0. For cefclient.exe building , set the 2 values to 1.
cefclient's property window
pic 12: open the cefclient project's property window, ensure that now we are going to build cefclient.exe
Build it!
pic 13: just build, success, see result in small red box below
_pic 14: in output folder(1), see our result (2)
Run
pic 15: you will get cefclient run as original
change TEST_BUILD, TEST_BUILD_ROOTWINDOW to 0
pic 16: set both values back, before build in dll mode
Change to dll build
pic 17: change project property, change values2 (red box) to dll mode
Build it
pic 18: success!
Finish, we get cefclient.dll that is ready to use
pic 19: see cefclient.dll in output folder
open CefBrowser (C#), set native dll folder to load our latest cefclient.dll and run the the project. now, you will have a CefBrowser in your WindowForm app.
pic 20: 🥇 🥇 🥇
for release mode, repeat the steps similar to debug (as usual)
pic 21: CefBrowser - Chromium61
Loading screen ...
pic 22: see http://webassembly.org/demo/
Tank! Demo
pic 23: lets play!
Patching and Building cefclient.dll for kneadium
Our cefclient.dll is a 'special' version of original cefclient.exe, The original source code are patched with our 'special code'. (injected with C/C++ functions that will be used to communicate with .net side, same technique as in our Espresso project)
so, if you build as an exe and run (F5) it will run as original cefclient.exe but when you build as .dll => you get cefclient.dll PLUS 'export C' functions that will be used to 'talk' with .net in kneadium's CefBrowser (C#)
I test this with
see latest pre-built binary at https://github.com/prepare/kneadium_release_tmp
I will show the screen snaps of the described steps above.
This version, I demonstrate with
from http://opensource.spotify.com/cefbuilds/index.html