Update Chromium

772 views
Skip to first unread message

Etienne Tremblay

unread,
Dec 19, 2013, 10:46:07 AM12/19/13
to cefs...@googlegroups.com
Hi,

Is it possible to update Chromium libraries regularly or it is a lot of work each time you upgrade the chromium library?

We basically want an application we can completely control (kind of like a browser in kiosk mode) but with more specific features.  We also would like to upgrade the chromium engine when we want.  Is this something possible with this project?

Thanks!

Per Lundberg

unread,
Dec 27, 2013, 5:59:03 PM12/27/13
to cefs...@googlegroups.com
Hi,

It's a bit of work, yes, but define "a lot"? :) We are talking about hours, not days or weeks, so in that sense, it's fairly reasonable.

The way it's done it basically this:

- Update the cef-binary-repo (https://github.com/cefsharp/cef-binary) with the new content from the .zip provided by the CEF project. I usually don't build CEF from source; it's too much work & time consuming, and I'm too lazy. It's usually easier for me to just grab the .zip-ball from Marshall and use it.
- Change the compilation flags (so that we use a multi-threaded DLL version of the C/C++ MS runtime).
- Rebuild the libcef-dll-wrapper stuff, and copy the .lib file into the proper place (+ the .dll files). This part is a bit cumbersome, and we should perhaps try to streamline it. Then again, it's not that it happens that often (at least in our case - perhaps it would be yours, in which case streamlining wouldn't be such a bad idea). The problem here is that the complexity grows as we want to support more and more platforms. Right now, we have VS2010, VS2012, Debug, Release and x86 and x64. That gives 8 different .lib files which need to be compiled up with the proper VS version etc, so this is more manual right now than it could be...

With unmanaged stuff like this, it's unfortunately hard to get rid of. The .lib files are tightly connected to a particular VS version, much more than is the case with e.g. C# (which is tons more convenient in this aspect).

Does this answer your question? :)

If CefSharp isn't right for you, there's also the CefGlue project. I haven't used it myself but you can also give it a try if CefSharp doesn't fit the bill.

Best regards,
Per

Tsrifeman Tsal

unread,
May 19, 2014, 2:10:16 AM5/19/14
to cefs...@googlegroups.com
 I usually don't build CEF from source; it's too much work & time consuming, and I'm too lazy.
I know what you mean, I just tried doing it myself and it's quite a headache if you don't know where to start. Especially with all the migration going on now.

It's usually easier for me to just grab the .zip-ball from Marshall and use it.
Where do you grab this from? www.cefbuilds.com? I also plan on updating the libcef.dll that CefSharp uses rather regularly, it's important for the type of application I'm creating

Tsrifeman Tsal

unread,
May 20, 2014, 7:33:18 AM5/20/14
to cefs...@googlegroups.com
Well I did roughly what you said but the CefSharp.WindowsForms.Example program crashes immediately on startup, no compile issues though.

Here's what I did:

I downloaded the latest CEF3 branch 1916 build from http://cefbuilds.com/, which is CEF 3.1916.1706 corresponding to Chromium 35.0.1916.86 (which does in fact work, as it comes with a test application). I opened the .sln in VS2013, changed the configuration to Release, and changed the compiler flags to /MD and built the libcef_dll_wrapper.lib.

Then I downloaded the latest CefSharp revision from GitHub (deafb9c74d0199c151a61ae04a09461dabac944c), removed all references to NuGet (and uninstalled the old CEF SDK package), added the proper files as external dependencies (libcef.dll, libcef.lib, libcef_dll_wrapper.lib and the "include" folder), and encountered a few errors.

The first four were about user_style_sheet_location and author_and_user_styles, which appear to have been removed from CEF. Deleting these entries took care of that. The next one was about GetDevToolsURL which was also removed from CEF, deleting this (and commenting out the 1-2 references to it) solved that, as they both throw NotImplementedExceptions anyways. The next 2 errors were regarding SetAsOffScreen and SetTransparentPainting, which have been merged into one method, SetAsWindowless, an easy fix. The last 2 errors were for CefExecuteProcess and CefInitialize, which now have an additional parameter for sandboxing on Windows, however adding in NULL is acceptable according to the comments in cef_sandbox_win.h.

Once all those were dealt with I compiled CefSharp.Core using /MD as a .dll, which was successful. Compiling the rest of the projects was problem free, but attempting to run the CefSharp.WinForms.Example program fails as I mentioned above. I don't have a clue what I could have done wrong, or what needs to be done to fix it. Could anyone offer some insight here? I would really like a more recent CEF/Chromium version to use with CefSharp

Thanks,

~Tsrifeman

Jørn Hansen

unread,
May 20, 2014, 1:04:14 PM5/20/14
to cefs...@googlegroups.com
Hi Tsrifeman,

Welcome and thanks for sharing your detailed experiences with almost bleeding edge CEF and ahead of us CefSharp!

I don't see any mention of that you added the .pak files from Resources/ from upstream CEF. Could that be the issue? I remember seeing a crash also when doing similar for the CEF 1650 branch.

Also there might be a `debug.log` file from CEF when running which could give clues.

Finally would you - at some point - care to make a pull request out of your CefSharp modifications for the 1916 branch. It might save us repeating your work and help in getting to that branch a bit sooner for everyone.

--
Best regards,
JornH

Tsrifeman Tsal

unread,
May 20, 2014, 1:14:59 PM5/20/14
to cefs...@googlegroups.com
Oh that was it! Moving en-US.pak to the locales folder solved the crash, thanks! I'll submit a pull request shortly.

Reply all
Reply to author
Forward
0 new messages