Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it work #39

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open

Conversation

michaelbaisch
Copy link

@michaelbaisch michaelbaisch commented Jan 15, 2018

This pull request tries to bring the setup steps down to a minimum and makes the entry barrier as small as possible. While making it work on macOS and Windows in a reproducible way. This might be the new common ground to further improve ofxCef and discuss detail problems instead of using energy on "how to compile"-problems.

  • Use apothecary to automatically build the CEF lib
  • Use the PG as much as possible to create new projects
  • There are only two (macOS) / one (windows) manual steps left to do
  • Add a way to bind JS functions to C++ methods
  • Add examples: simple, communication, and multi
  • Describe everything in the readme
  • Use ofBaseDraws to have nice drawing methods
  • Fix bug where uninitialized variables in the renderHander would lead to crashes

Closes #38 #36 #34 #32 #31 #29 #28 #27 #23

- Add ability (on render side) to bind js calls in OF
- On Windows use our `ofxCEFClientApp` class as render process
- Make `updateCEF` a global function like `initofxCEF` because it only has to run once (not per instance)
- Make 'setup` a bit smarter with url and size arguments
- Resize events can be separately dis- and enabled
- Add a `reload` method
- Add logic for creating JS function bindings
- Implemented OF mouseScrolled method
- Add some `OVERRIDE` to overridden methods
- Tell the browser when V8 context is created and released
- Correct use of `width_` and `height_` members
- Add 'CefLifeSpanHandler' to 'ofxCEFBrowserClient'
- Check for NULL pointer
- Use a more general method 'isReady()' instead of 'isRendererInitialized()'
- Update examples to reflect the changes
@anselanza
Copy link

Wow, nice. I'm definitely going to give this a try.

@rjx-ray
Copy link

rjx-ray commented Jul 24, 2018

Hi Michael,
I tried to build your fork using the apothecary, but it fails like this:

Richard@RRJ-MSI MINGW64 /c/Igloo/Dev/of_v0.10.0_vs2017_release/scripts
$ git clone https://github.com/openframeworks/apothecary
Cloning into 'apothecary'...
remote: Counting objects: 6147, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 6147 (delta 0), reused 0 (delta 0), pack-reused 6144
Receiving objects: 100% (6147/6147), 15.54 MiB | 700.00 KiB/s, done.
Resolving deltas: 100% (4130/4130), done.

Richard@RRJ-MSI MINGW64 /c/Igloo/Dev/of_v0.10.0_vs2017_release/scripts
$ cd apothecary/apothecary

Richard@RRJ-MSI MINGW64 /c/Igloo/Dev/of_v0.10.0_vs2017_release/scripts/apothecary/apothecary (master)
$ ./apothecary update ofxCef
OF: /c/Igloo/Dev/of_v0.10.0_vs2017_release/scripts/apothecary/apothecary/../../../
APOTHECARY: /c/Igloo/Dev/of_v0.10.0_vs2017_release/scripts/apothecary/apothecary
FORMULAS: /c/Igloo/Dev/of_v0.10.0_vs2017_release/scripts/apothecary/apothecary/formulas
BUILD: /c/Igloo/Dev/of_v0.10.0_vs2017_release/scripts/apothecary/apothecary/build
LIBS_DIR: /c/Igloo/Dev/of_v0.10.0_vs2017_release/scripts/apothecary/apothecary/../
ADDONS: /c/Igloo/Dev/of_v0.10.0_vs2017_release/scripts/apothecary/apothecary/../../../addons
REL_ADDONS_DIR: /c/Igloo/Dev/of_v0.10.0_vs2017_release/scripts/apothecary/apothecary/../../../addons
./apothecary: line 327: shift: too many arguments
 Skipping addon "ofxCef": no formulas found

Richard@RRJ-MSI MINGW64 /c/Igloo/Dev/of_v0.10.0_vs2017_release/scripts/apothecary/apothecary (master)

any ideas?

BTW, I wanted to raise this as an issue on your fork, but you don't have issues enabled, so I hope its OK to raise it here.

@michaelbaisch
Copy link
Author

@rjx-ray I've enabled issues on my fork now.

Just to be sure, did you switch to to the make_it_work branch?

@rjx-ray
Copy link

rjx-ray commented Jul 24, 2018 via email

@rjx-ray
Copy link

rjx-ray commented Jul 24, 2018

That was the problem, I hadn't switched to the right branch, thanks

…mmunication with helper process might not be working.
- SendProcessMessage was moved from CefBrowser to CefFrame
- OnBrowserCreated added param
- GetViewRect method changed return-type from bool to void
- Using multiple helper app bundles (GPU, Plugin, Renderer) see: https://bitbucket.org/chromiumembedded/cef/commits/e067612e55e371642188c7faf6b629df90a3b34e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants