Confusion around process and subprocess loading

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.

Confusion around process and subprocess loading

Postby sirheroics » Mon Mar 29, 2021 6:31 pm

I've read through the wiki several times but I'm not completely clear on something and I was hoping someone could save me a painful struggle and clarify something for me.

I have an existing Mac app that I want to integrate CEF with. The existing app, let's call it MyBigSlowApp will be using CEF as a subprocess. It will also use CEF in a "windowless" mode.

Which of the test apps should I look at to mimic? CEFClient? CEFSimple? More specifically, which of these contain the boilerplate code that MyBigSlowApp will need to have in it?

The second question is, which of the apps can I just build and use "as-is" and point browser_subprocess_path to? cefclient Helper?
sirheroics
Techie
 
Posts: 33
Joined: Mon Mar 22, 2021 6:32 am

Re: Confusion around process and subprocess loading

Postby magreenblatt » Mon Mar 29, 2021 7:43 pm

MyBigSlowApp will be using CEF as a subprocess.

CEF requires the app bundle structure shown by the sample apps. Using CEF “as a subprocess” would mean that you launch the CEF app and use something like a custom IPC implementation to communicate with it. Is that what you meant?
magreenblatt
Site Admin
 
Posts: 12404
Joined: Fri May 29, 2009 6:57 pm

Re: Confusion around process and subprocess loading

Postby sirheroics » Mon Mar 29, 2021 8:07 pm

I don't think so. I'm trying to learn how to properly initialize CEF from my app. The app will use CEF in a sub-process. It will also use CEF with an off-screen render.

I'm inheriting a project that was built a long long time ago and so much has changed. Currently we load the CEF dll using dlopen, then call cef_intialize and cef_browser_host_create_browser_sync. We set the path for browser_subprocess_path to a helper app that was a single app (not like the helper/GPU/Plugin variants there are now).

So I'm just trying to know what the "right" way to upgrade this is.

Which apps do I look at for reference? CEFSimple? CEFClient?

Which app do i point browser_subprocess_path to?
sirheroics
Techie
 
Posts: 33
Joined: Mon Mar 22, 2021 6:32 am

Re: Confusion around process and subprocess loading

Postby magreenblatt » Mon Mar 29, 2021 10:05 pm

What is the directory structure of your app? browser_subprocess_path is only needed if you don’t have the required structure as shown by either of the sample apps. In that case browser_subprocess_path points to the main helper without suffix (e.g. full path to “myapp Helper”).
magreenblatt
Site Admin
 
Posts: 12404
Joined: Fri May 29, 2009 6:57 pm

Re: Confusion around process and subprocess loading

Postby sirheroics » Tue Mar 30, 2021 6:19 am

CEF lives outside of our app bundle entirely. We're not distributed via the mac store or anything like that.

Code: Select all
MyBigSlowApp.app/
Resources
      dlls
            mac
                   CEF
                         cefclient Helper.app/
                         cefclient Helper (GPU).app/
                         cefclient Helper (Plugins).app/
                         cefclient Helper (Renderer).app/
                         Chromium Embedded Framework/


So browser_subprocess_path should point to the location of 'cefclient Helper.app' in that setup?

And what sample app would best mirror what code needs to go into MyBigSlowApp.app in that case?
sirheroics
Techie
 
Posts: 33
Joined: Mon Mar 22, 2021 6:32 am

Re: Confusion around process and subprocess loading

Postby magreenblatt » Tue Mar 30, 2021 9:18 am

So browser_subprocess_path should point to the location of 'cefclient Helper.app' in that setup?

Yes. See also here for additional configuration requirements.

And what sample app would best mirror what code needs to go into MyBigSlowApp.app in that case?

That depends on what your app does with CEF.
magreenblatt
Site Admin
 
Posts: 12404
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 29 guests