So I recently got to play around with Xilium CefGlue.  Xilium is fine, though it reminds me of when I was doing this in Visual Basic 6... it's more like the old Mozilla ActiveX control than the smooth WebBrowser control embedding IE, which is to say a little it's a little rough around the edges.  We've had much better luck getting Awesomium up and running quickly, though that's a price-lacking (so you have to negotiate) pay to play.


Setup
Anyhow, once you've downloaded the Xilium source from Bitbucket and the respective binaries from its home page (it's easiest to use the libcef.dll and friends you'll find there to run the demo apps), it's time to start hacking your own browser.
  1. Copy the contents of the CefGlue.Demo.WinForms folder into a new folder.
  2. Get rid of references to other projects.
  3. Replace those two project references with dlls.
    1. Xilium.CefGlue.dll
    2. Xilium.CefGlue.Demo.dll
    3. I've put them into a lib folder at the same level as the existing bin folder.
    4. Right-click "References" and browse to those dlls to include them in place of the other projects (Xilium.CefGlue.dll and Xilium.CefGlue.Demo.dll)
  4. Remove strong naming by UNCHECKING the box, below.
    • Error    1    Cryptographic failure while signing assembly
      'D:\Projects\chromeige\xiliumPMClient\obj\Debug\Xilium.CefGlue.Demo.WinForms.exe'
      -- 'Error reading key file
      'd:\Projects\chromeige\Xilium.CefGlue.snk'
      -- The system cannot find the file specified. '    CefGlue.Demo.WinForms
  5. Configuration Manager to x86 to match the x86 libcef.dll.

So that's about it. Voila, you're CEFing.

Again, at least with this wrapper, things are somewhat slow and rough.  That said, afaict, Steam, among others, uses at least libcef, so it's not like it's a dead end tech (are you listening, Camino?  ;^D).  So I'm suspicious it's the wrapper that's slowing things down, not libcef.

Note: I do need to follow this up a bit.  The demo "lite browser" projects for Windows Forms and gtk# are broken up into three projects.  This describes how to open up the Windows Forms project and hack it outside of the Xilium solution, but to really do much, you have to drill down into the CefGlue.Demo project that both Windows Forms and gtk# share, which this doesn't do yet.

Labels: , ,