Page 1 of 2

Empty project based on CEF

PostPosted: Sat Jul 30, 2011 7:10 pm
by smaant
Hi,

I'm trying to create some simple CEF-based app (just an empty window with some opened url inside) and using cefclient as a reference now. So I created new _empty_ project in XCode, copied cef include files, cef static library, cefclient_mac.mm as a start point and start cutting it. But now I'm really stuck how to make it compilable since there are lots of dependencies and I really don't understand how to deal with it.
So I wonder is it possible to just grab some cef includes, libraries (static or dynamic) put it to an empty project and make simple app? Is there any tutorial how to do it? Or I have to have all Chromium and CEF sources (almost 5Gb) every time I want to use CEF?

Re: Empty project based on CEF

PostPosted: Sun Jul 31, 2011 1:06 am
by cagret
"cefclient" folder in the zip is what you are looking for, it is an example application.
Don't worry about all those files in that folder, most of them are just tests that can be run from the menu. The are only a few required files:
  • cefclient_win.cpp - the main file
  • client_handler.cpp
  • client_handler_win.cpp
Most of the code in these files could be removed cause it is related to the tests and to the "browsing" feature in the cefclient that you don't need.

Marshall, what do you think about creating a "cefminimal" (or cefhello, cefsimple) folder in the release zip and put there only functions required to run a local html file with only "Hello World!" ? In this simple app there would be no buttons, no tests, just the minimal stuff to be able to display the html file containing only "Hello World!". So developers could use it as a skeletion for their app and when they need to add some feature they would look at the "cefclient" source code of how to do it. It would be a lot easier to start with CEF that way, I think.

Re: Empty project based on CEF

PostPosted: Sun Jul 31, 2011 4:36 am
by smaant
cagret, I agree with you, such cefminimal will be very helpful for newbies for fast start.
Unfortunately I can't use zip since I use mac and XCode, but looks like it's what I really need.. but for mac =)
And just to explain in another way - I'm talking about some kind of CEF SDK with pre-builded required libraries, includes and some minimal example.
Can anybody help me with it or point to the way how to do it by myself?

ps. somehow I solved issues with compilation, but I have huge amount of issues with linking now.. :(

Re: Empty project based on CEF

PostPosted: Mon Aug 01, 2011 10:26 am
by pauldix
+1 for creating a super basic example

Re: Empty project based on CEF

PostPosted: Wed Aug 03, 2011 1:31 pm
by smaant
Uuhaaa! I've done it! =)
Really it wasn't so difficult, but not for newbie in XCode and mac programming.
So now I have simple cef project without huge amount of chromium sources and all others stuff, just cef libraries and few src files. After running it will show window with google inside. It's possible to make it more simple in code perspective (since I just commented needless parts now) but it may be already helpful for first run.
I've placed project bundle in my dropbox since this forum didn't allow me to upload it here.
http://dl.dropbox.com/u/2298199/cef_helloworld.zip
If you think you can improve it - feel free!

Re: Empty project based on CEF

PostPosted: Wed Aug 03, 2011 2:08 pm
by magreenblatt
smaant wrote:Uuhaaa! I've done it! =)
Really it wasn't so difficult, but not for newbie in XCode and mac programming.
So now I have simple cef project without huge amount of chromium sources and all others stuff, just cef libraries and few src files. After running it will show window with google inside. It's possible to make it more simple in code perspective (since I just commented needless parts now) but it may be already helpful for first run.
I've placed project bundle in my dropbox since this forum didn't allow me to upload it here.
http://dl.dropbox.com/u/2298199/cef_helloworld.zip
If you think you can improve it - feel free!

Thank you for sharing this. I'm starting Mac binary releases in the near future and your work will be a useful reference for me.

Regards,
Marshall

Re: Empty project based on CEF

PostPosted: Thu Aug 04, 2011 12:03 pm
by smaant
Marshall, hope it'll help! Thank you for your great job!

Re: Empty project based on CEF

PostPosted: Tue Oct 23, 2012 12:01 am
by ather0s
I'm interested in checking this minimal cef out, if you could repost it someplace I would be sooo happy :)

Re: Empty project based on CEF

PostPosted: Tue Nov 20, 2012 3:35 pm
by snyder
Yes, could please someone place this file somewhere where it can be downloaded? I would then create an open git repository of this template for future use. Thanx in advance.

Re: Empty project based on CEF

PostPosted: Mon Nov 26, 2012 3:42 pm
by bushd
I'm also interested in a minimalistic xcode project, possibly with a precompiled libcef.