Has anybody used UPX to compress libCEF?

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Has anybody used UPX to compress libCEF?

Postby synth » Sat Dec 16, 2017 10:36 am

Hi,

In a bid to reduce the massive debug libCEF from 117MB to something lesser, I applied UPX on it: https://upx.github.io/

It reduces the debug dll to 43MB and the release DLL to about 35MB. But at least with the debug dll in 64 bit mode my simple application crashes(it works fine with the uncompressed debug libCEF.dll):
Code: Select all
[1216/205658.853:FATAL:iat_patch_function.cc(251)] Check failed: is_patched().
glcef.exe has triggered a breakpoint.
Exception thrown at 0x000007FEFCA0A06D (KernelBase.dll) in glcef.exe: 0x800706B5: The interface is unknown.


I do get the following calls:
OnAfterCreated
GetViewRect() multiple times
OnLoadingStateChange() twice

Are there any other options to reduce the 95 MB release dll libCEF? Built on VS 2015, 64 bit mode with /MTd option.
synth
Newbie
 
Posts: 7
Joined: Wed Dec 13, 2017 1:19 pm

Re: Has anybody used UPX to compress libCEF?

Postby magreenblatt » Sat Dec 16, 2017 11:47 am

Sounds like you'll need to disable the sandbox to use UPX. It's better to create an installer for your application that compresses the files for distribution and installs them uncompressed on disk.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Has anybody used UPX to compress libCEF?

Postby synth » Sat Dec 16, 2017 1:03 pm

Thanks. Is it possible to disable the sandbox in Windows using an option in CefSettings?

Or do I need to compile libcef_dll_wrapper.dll with a special option?

-----------

Ok got it, CefSettings.no_sandbox = true

----------

Nope still crashing. Ok I'll skip compressing libCEF.
synth
Newbie
 
Posts: 7
Joined: Wed Dec 13, 2017 1:19 pm

Re: Has anybody used UPX to compress libCEF?

Postby synth » Sat Dec 16, 2017 1:19 pm

I actually need CEF to make UIs. So I ll probably only need the HTML rendering, access to the DOM to set text in textboxes, buttons etc, the excellent V8 javascript support and catching button and link clicks. If this functionality could be separated out from all the other usual Chrome features that would be great.

I already am planning to remove the libEGL and d3d related DLLs.
synth
Newbie
 
Posts: 7
Joined: Wed Dec 13, 2017 1:19 pm

Re: Has anybody used UPX to compress libCEF?

Postby HarmlessDave » Sat Dec 16, 2017 2:08 pm

synth wrote:I actually need CEF to make UIs. So I ll probably only need the HTML rendering, access to the DOM to set text in textboxes, buttons etc, the excellent V8 javascript support and catching button and link clicks. If this functionality could be separated out from all the other usual Chrome features that would be great.

I already am planning to remove the libEGL and d3d related DLLs.


CEF is a layer above Google's Chromium, and Google doesn't seem to have much interest in offering Chromium as a pick-and-choose set of selectable features instead of as a monolithic browser component. Which seems fair since they'd gain no benefit from the extra work, and are under no obligation to let us use Chromium for our own projects.
HarmlessDave
Expert
 
Posts: 370
Joined: Fri Jul 11, 2014 2:02 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 23 guests