[webkit-help] How webkit compile generated js binding src?

刘斌 liu.samba at gmail.com
Mon Jun 18 19:40:14 PDT 2012

Thank you Erik,
I have tried to add a method for Navigator with [supplemental ] idl
1) I defined the idl file NavigatorMyHello.idl and src files
(NavigatorMyHello.cpp and  NavigatorMyHello.h )
module window {

     interface [
     ] NavigatorMyHello {
         DOMString MySayHello();


2) Move the 3 files into WebCore/Modules/myhello/  directory.

3) Add the NavigatorMyHello.cpp and NavigatorMyHello.h into WebCore project
by vs2010.

4) Add WebCore/Modules/myhello/ as include path of WebCore project by vs2010

5) Modify source/WebCore/DerivedSources.make to add the idl directory and
idl file name
6) run "build-webkit --wincairo"

I noticed the binding script has changed the JSNavigator.cpp with the
correct binding code.

But when MSBuild compile JSNavigator.cpp, it complains that "fatal error
C1083: could not open include file: 'NavigatorMyHello.h': No such file or
I have added the include path "WebCore/Modules/myhello/" into webcore
project with vs2010, but it continues the complains.

Did I make any mistake or lose any step?
Thank you.

2012/6/19 Erik Arvidsson <arv at chromium.org>

> The h/cpp files are generated using CodeGeneratorJS.pm by reading idl
> files.
> Usually it is enough to just modify an idl file or add a new idl file.
> Try looking at the change history of one the newer idl files and you
> should be able to figure out what you need to do to add a new idl
> file.
> On Fri, Jun 15, 2012 at 8:41 PM, 刘斌 <liu.samba at gmail.com> wrote:
> > Hi, friends
> > I am trying to extend webkit js api for my project,  my development tools
> > are VS2010+cygwin+webkit+cairo port.
> > And i am confused that how to compile generated js binding src, such as
> > JSxxx.cpp and JSxxxCustom.cpp.
> > I found the two files: JSBindingsAllInOne.cpp and DerivedSources.cpp in
> the
> > webkit source directory which includes all JSxxx.cpp and JSxxxCustom.cpp
> > files.
> > I supposed that build system's script will modified these two files to
> > insert the new generated binding files,
> > but i noticed that these two files are not touched by script when I
> compile
> > the webkit.
> > Should I insert the JSxxx.cpp/JSxxxCustom.cpp into them by manual or may
> I
> > just made a mistake?
> >
> > Any reference about extending js are welcomed.
> >
> > Thank you
> >
> > _______________________________________________
> > webkit-help mailing list
> > webkit-help at lists.webkit.org
> > http://lists.webkit.org/mailman/listinfo.cgi/webkit-help
> >
> --
> erik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20120619/1dbe86fb/attachment.html>

More information about the webkit-help mailing list