OS X implementation using a .dylib vs an app

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.

OS X implementation using a .dylib vs an app

Postby callum » Tue Mar 31, 2015 12:30 pm

I'm trying to integrate CEF into an existing platform so my architectural choices are somewhat constrained.

The CEF based code has to go inside a plugin that is loaded at arbitrary times during the life on the main application.

I've gotten the Windows version (DLL) working and I'm happy to say it performs extremely well.

Next up is the OS X version and I'm struggling because (a) I know nothing about Xcode or OS X programming and (b) the constraints on app structure seem much more rigorous on OS X than Windows.

First thing I'd like to understand before I go too far down the rabbit hole is how the documented structure inside an application bundle can be applied to code hosted in a .dylib? Is that even possible?
callum
Expert
 
Posts: 326
Joined: Mon Feb 23, 2015 6:19 pm

Re: OS X implementation using a .dylib vs an app

Postby magreenblatt » Fri Apr 17, 2015 6:11 am

callum wrote:]First thing I'd like to understand before I go too far down the rabbit hole is how the documented structure inside an application bundle can be applied to code hosted in a .dylib? Is that even possible?

It is theoretically possible but you'll need to help Chromium/CEF find the correct paths to sub-resources (pak files, etc). Some of these can be customized via CefSettings and some will (currently) require changes to Chromium/CEF. See https://bitbucket.org/chromiumembedded/ ... ath-to-cef for an example of the types of problems you'll need to resolve.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: OS X implementation using a .dylib vs an app

Postby DanKegel » Fri Apr 17, 2015 11:54 am

I'm working around this currently by installing the framework to the dylib's install area.
The dylib is not a framework, just a plain old shared library.
Apps that want to use the dylib have to make four symlinks next to the app's binary, e.g.

# Temporary kludge until we patch chromium to search for these more sanely
for f in chrome-sandbox icudtl.dat natives_blob.bin snapshot_blob.bin
do
ln -sf $MY_DYLIB_PREFIX/bin/$f $f
done

I'll try out that patch, maybe it'll let me get rid of those four symlinks.
(The exact number of symlinks varies between branch, btw.)
DanKegel
Mentor
 
Posts: 59
Joined: Fri Nov 08, 2013 12:46 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 64 guests

cron