Page 2 of 2

Re: Empty project based on CEF

PostPosted: Thu Dec 06, 2012 3:54 pm
by Istehad
I need to do to the same thing (although in windows). I tried the dropbox link but that seems to be invalid now. Can someone point me to a valid link please

Re: Empty project based on CEF

PostPosted: Fri Dec 21, 2012 12:41 am
by rhayes
I, too, would be very grateful to have a minimal XCode project that used a precompiled CEF, in a separate and configurable location.

Re: Empty project based on CEF

PostPosted: Fri Jan 11, 2013 8:21 am
by snyder

Re: Empty project based on CEF

PostPosted: Sat Jan 19, 2013 12:34 am
by aphistic
snyder wrote:check this, its for CEF 1

https://github.com/acristoffers/CEFSimpleSample


It looks like we had the same idea.

After many hours of trying to get CEF3 working for me, I finally managed to get it done. The dropbox link from earlier in the thread didn't seem to work any more, so I thought I'd try my hand at it.

I've created a minimal, bare bones version of CEF3 and put it up on github: https://github.com/aphistic/cef3barebones

I also wrote a blog post about it if anyone is interested in looking: http://blog.erikd.org/2013/01/14/chromi ... are-bones/

Hopefully it helps anyone who finds this thread like I did!

Re: Empty project based on CEF

PostPosted: Sat Jan 19, 2013 4:09 pm
by magreenblatt
Good blog post. A few comments:

1. Windows uses standard WinAPI HWND handles. There are no MFC dependencies.
2. You don't need to call get() when passing a CefRefPtr<> unless the type stored in the CefRefPtr<> changes (for example from MyClient to CefClient).
3. You can put the CEF header files in whatever directory you like (for example /path/to/cef/include) and use the compiler include path directive to point to the correct location (for example -I/path/to/cef).
4. The libcef_dll_wrapper.a static library should contain all of the object code (.o files). If it doesn't then there may be a bug in how we're creating the static library.

Re: Empty project based on CEF

PostPosted: Sun Jan 20, 2013 1:09 am
by aphistic
magreenblatt wrote:Good blog post. A few comments:

1. Windows uses standard WinAPI HWND handles. There are no MFC dependencies.
2. You don't need to call get() when passing a CefRefPtr<> unless the type stored in the CefRefPtr<> changes (for example from MyClient to CefClient).
3. You can put the CEF header files in whatever directory you like (for example /path/to/cef/include) and use the compiler include path directive to point to the correct location (for example -I/path/to/cef).
4. The libcef_dll_wrapper.a static library should contain all of the object code (.o files). If it doesn't then there may be a bug in how we're creating the static library.


Thanks for your response! I'll be sure to get the post and code updated.

1. The Windows reference is probably due to my lack of experience with Windows development. It's good to know it doesn't require MFC.
2. Oh, ok. I didn't look at how CefRefPtr<> works internally, I'll get this updated.
3. This is what I'm doing now, I think. If you take a look at the git repo (https://github.com/aphistic/cef3barebones) I have an include directory with my project's header files and then a cef3/ directory with an additional include/ directory with the CEF include files. The change I mentioned would allow me to put the CEF headers in my project's include/ directory (under something like include/cef/) so I can still keep those files separate, but only have one include/ directory. If the way it is currently is the standard way of including external libraries, I apologize. I spend most of my time in the .Net realm and don't work with C++ as much as I would like.
4. It could be the location I pulled the static library from (chromium/src/out/Release/obj.target/cef/libcef_dll_wrapper.a). This was the only place I could find the file after running a build (I did a manual build with: make BUILDTYPE=Release -j4 cefclient). I'm also using 1271 and not the latest version, so it could also be that.

I appreciate you spending the time to read my post! It's great to see all your posts on the forum and your dedication to the project. :)

Re: Empty project based on CEF

PostPosted: Sun Jan 20, 2013 11:36 am
by magreenblatt
@#3: There isn't really a standard way that I'm aware of. When I was setting up the CEF directory structure I took a quick survey of other projects' organization and chose the most common structure that also seemed to make sense for CEF.

@#4: Did you try using the tools/make_distrib.sh script? It should gather all of the necessary files (includes, libcef.so, sources for libcef_dll_wrapper) into a binary distribution similar to what we place on the project downloads page for Windows and Mac. The only part missing from the distribution for Linux are makefiles, but is should be possible to copy those from the CEF build with some minor modifications.