Empty project based on CEF

Having problems with building or using CEF? This forum is here to help. Please do not post bug reports or feature requests here.

Empty project based on CEF

Postby smaant » Sat Jul 30, 2011 7:10 pm

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?
smaant
Newbie
 
Posts: 8
Joined: Thu Jul 28, 2011 2:30 pm

Re: Empty project based on CEF

Postby cagret » Sun Jul 31, 2011 1:06 am

"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.
User avatar
cagret
Techie
 
Posts: 41
Joined: Fri Mar 11, 2011 11:42 am
Location: Poland

Re: Empty project based on CEF

Postby smaant » Sun Jul 31, 2011 4:36 am

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.. :(
smaant
Newbie
 
Posts: 8
Joined: Thu Jul 28, 2011 2:30 pm

Re: Empty project based on CEF

Postby pauldix » Mon Aug 01, 2011 10:26 am

+1 for creating a super basic example
pauldix
Newbie
 
Posts: 3
Joined: Mon Aug 01, 2011 10:23 am

Re: Empty project based on CEF

Postby smaant » Wed Aug 03, 2011 1:31 pm

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!
smaant
Newbie
 
Posts: 8
Joined: Thu Jul 28, 2011 2:30 pm

Re: Empty project based on CEF

Postby magreenblatt » Wed Aug 03, 2011 2:08 pm

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
magreenblatt
Site Admin
 
Posts: 8421
Joined: Fri May 29, 2009 6:57 pm

Re: Empty project based on CEF

Postby smaant » Thu Aug 04, 2011 12:03 pm

Marshall, hope it'll help! Thank you for your great job!
smaant
Newbie
 
Posts: 8
Joined: Thu Jul 28, 2011 2:30 pm

Re: Empty project based on CEF

Postby ather0s » Tue Oct 23, 2012 12:01 am

I'm interested in checking this minimal cef out, if you could repost it someplace I would be sooo happy :)
ather0s
Newbie
 
Posts: 1
Joined: Tue Oct 23, 2012 12:00 am

Re: Empty project based on CEF

Postby snyder » Tue Nov 20, 2012 3:35 pm

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.
snyder
Newbie
 
Posts: 2
Joined: Tue Nov 20, 2012 3:32 pm

Re: Empty project based on CEF

Postby bushd » Mon Nov 26, 2012 3:42 pm

I'm also interested in a minimalistic xcode project, possibly with a precompiled libcef.
bushd
Newbie
 
Posts: 1
Joined: Mon Nov 26, 2012 2:00 pm

Next

Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 21 guests