Done.
I modified the vs2010 "webcore.vcxproj" and "webcorecommon.props" .
It works.

2012/6/19 刘斌 <liu.sa...@gmail.com>

> Thank you Erik,
> I have tried to add a method for Navigator with [supplemental ] idl
> attribute
> 1) I defined the idl file NavigatorMyHello.idl and src files
> (NavigatorMyHello.cpp and  NavigatorMyHello.h )
> module window {
>
>      interface [
>          Conditional=MY_HELLO,
>          Supplemental=Navigator
>      ] 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
> directory".
> 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 <a...@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.sa...@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@lists.webkit.org
>> > http://lists.webkit.org/mailman/listinfo.cgi/webkit-help
>> >
>>
>>
>>
>> --
>> erik
>>
>
>
_______________________________________________
webkit-help mailing list
webkit-help@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-help

Reply via email to