Page 2 of 2

Re: HowTo: offscreen web-rendering with cef

Posted: Tue Dec 25, 2018 8:23 am
by EricB
Sorry for the late reply, I was 700km or so away from my office to get family holiday celebrations out of the way. Didn't think my thumbs could handle typing this reply on a Blackberry.
qwertzui11 wrote:
Mon Dec 24, 2018 5:43 pm
I got all sources and after some hours I succeeded in compiling it for mac. Both APIs (Ogre3d and cef) seem to have changed, including the cmake part :)
I'm now trying to make the application work again.
Awesome to hear! And thank you so much for helping out.

Just in case you missed it, the latest version of CEF is dynamically loaded now on OS X. So don't link Chromium Embedded Framework.Framework/Chromium Embedded Framework to the two programs. In order to properly link CEF to the programs, you'll need to have the files set up the way they tell you and you'll need these bits of code in both your programs: https://bitbucket.org/chromiumembedded/ ... cv2sandbox

You probably already know that, but it took me nearly a full day to figure that out, as their tutorials or guides don't mention this. It's only buried at the bottom lines of the readme and in a single forum post...

Berkelium works fairly similar to CEF. So I had originally integrated your code into my existing class system. When that failed, I saw this thread on the CEF forums: https://magpcss.org/ceforum/viewtopic.php?f=6&t=16371 even though I am not running Mojave, I downgraded to a version that was working for them (3359) and got this error:

Code: Select all

Attempting to run unsupported native service: content_renderer.service
(I will get the exact error message when I boot up my mac in the morning... 2:30am Christmas morning here right now...)

Whereas the newer CEF 3538 spits out no errors...

To verify it wasn't my code, I commented out my main and all the headers in my game, threw in your code verbatim minus the needed changes and my helper, and same results. No onPaint called. No errors in 3538, and the same error as above on 3359.

After sunrise, I plan on trying CEF 2704 which is the oldest available binary from trusted sources. (I found some even older binary builds from various Githubs. But I am trying to avoid that.) I will let you know the results. If you need any help, have any questions, need some testing, or whatever, feel free to contact me. I should be available 24/7 for the rest of the week, and then an odd 60-100 hours per week after that.

Re: HowTo: offscreen web-rendering with cef

Posted: Tue Dec 25, 2018 6:25 pm
by EricB
The exact error I get on 3359 is

Code: Select all

[1225/092303.885191:ERROR:service_manager_context.cc(258)] Attempting to run unsupported native service: /Users/ericjones/Documents/programming/gearcity/Client-Bin/GearCity.app/Contents/Frameworks/Chromium Embedded Framework.framework/content_renderer.service
Probably won't help you any, just thought I'd share. ;)

Re: HowTo: offscreen web-rendering with cef

Posted: Tue Dec 25, 2018 10:45 pm
by qwertzui11
due to the holidays I'm not having as much time as I'd like to have for this issue. Your tip with the sandbox was quite helpful. :) I'm getting along great. I hope to have results and scripts soon.

Re: HowTo: offscreen web-rendering with cef

Posted: Wed Dec 26, 2018 12:31 am
by EricB
qwertzui11 wrote:
Tue Dec 25, 2018 10:45 pm
due to the holidays I'm not having as much time as I'd like to have for this issue. Your tip with the sandbox was quite helpful. :) I'm getting along great. I hope to have results and scripts soon.
No worries, and I thank you immensely for your efforts!

A little update on my side. I tried 2704 as I previously mentioned, and if suffers from the same issue. Everything but onPaint is called. No errors unlike 3359. I will be moving my focus over to the Linux side of things temporarily. I can switch back to OS X if you make any progress or need me to look into anything. After I get everything else updated on Linux, I'll let you know the status of the code/example on that platform.

Re: HowTo: offscreen web-rendering with cef

Posted: Sat Dec 29, 2018 8:16 pm
by Aiden
I'm about to test the latest cef with the latest Ogre 1.11 from the repo.
Wish me luck guys, I plan on using cef as the primary UI for my app, so this will be quite a challenge.

Re: HowTo: offscreen web-rendering with cef

Posted: Mon Dec 31, 2018 4:29 am
by EricB
Aiden wrote:
Sat Dec 29, 2018 8:16 pm
I'm about to test the latest cef with the latest Ogre 1.11 from the repo.
Wish me luck guys, I plan on using cef as the primary UI for my app, so this will be quite a challenge.
Great to hear! Let us know how it goes.

Re: HowTo: offscreen web-rendering with cef

Posted: Mon Dec 31, 2018 4:36 am
by EricB
An update from my end. I finally upgraded and ported my game to Ogre1.10 on Linux. Hit a little trouble with CEF. I was building with Steam's chroot which is Ubuntu 12, but CEF only supports GlibC 2.17 and newer (Ubuntu 14). This delayed my port by a couple of days as I had to redo it all... None the less I got it working, CEF and qwertzui11's example works out of the box on Linux.

So it seems the issue is only with OS X. I do hope you make a breakthrough with it qwertzui, as macs aren't my cup of tea... I imagine the issue is due to the use of a helper program. But I am not entirely sure. That's the only difference between the working code in Linux and the not working code on OSX.

Re: HowTo: offscreen web-rendering with cef

Posted: Fri Jan 04, 2019 1:41 am
by EricB
I started a thread on CEF forums about the issue with OS X. So far just the basic troubleshooting run through: https://magpcss.org/ceforum/viewtopic.p ... 505#p40505 Hopefully we'll get an answer soon.

Re: HowTo: offscreen web-rendering with cef

Posted: Fri Jan 04, 2019 7:36 pm
by EricB
I finally got it working on OSX. Good news is, it's not the example. The issue had to do with Xcode 9+, project setup, and code signature requirements depending on how you set up your program in Xcode9+.
https://magpcss.org/ceforum/viewtopic.p ... 522#p40522

If you would like qwertzui11, I can clean up my fork on github and give you a pull request with the changes needed for the latest CEF, Ogre 1.10.12, and the missing info/files for OS X.

Re: HowTo: offscreen web-rendering with cef

Posted: Sun Jan 06, 2019 8:14 pm
by Aiden
Hello,
I said it would be quite a challange to get cef on the latest ogre 1.11 but this wasn't the case.
I managed to fix the cmake script and now the project works with the latest version of Ogre 1.x branch.
I made a pull request to the original repo. My repo can be found here https://github.com/kenkit/cef_osr
Enjoy...