I have to admit I'm new to WebKit so asking the right question is not that easy.
What I have is the WebKit from WebKit.org. It updates, builds, I can debug - I got it working on Windows.
What I'm interested in is how to generate the stub files for some IDL files that I have. I understand the high level picture:
I've specified my IDL files in "WebCore.gypi". I've specified then the path to my IDL files in "WebCore.gyp". Apparently this is not enough as building the WebKit doesn't generate the stub files for my IDL files.
I've suspected at one point that maybe my IDL files contain undefined attributes but everything seems fine.
Any tips? Also, do you know of any explicit "How to"?
Thanks!
Edit 130206:
I dug some more and apparently WebKit interacts with several build systems; for example GYP is for Chromium. I honestly didn't expect that complication so I didn't mention I needed to generate binding for Safari which has a different build system and as such its own unique "how to". So, the question would now be, how does the Safari build system work? Where do I need to place my IDL files? Thanks!
Well, I can tell you what helped me. Unfortunately I still couldn't find any documentation so a lot of trial and error was involved.
If you want to generate JS bindings for Safari you have to:
'DerivedSources.make' can be found in '\WebKit\Source\WebCore\'. Inside this make file you have to specify the following:
Build WebKit. If after this step you still can't see your JSXXX.h and JSXXX.cpp files (genererated for each XXX.IDL file) than you have to check your IDL files.
In my case nothing was generated after the build step and I got an error like this:
6>Next token should be implements, but MyModule at module MyModule {
6> IDLParser.pm:750 at /WebKit/Source/WebCore/bindings/scripts//IDLParser.pm line 129.
6> in /WebKit/Source/WebCore/MyFolder/XXX.idl at /WebKit/Source/WebCore/bindings/scripts//IDLParser.pm line 173.
6>/WebKit/Source/WebCore/DerivedSources.make:1024: recipe for target `XXX.h' failed
6>make: * [XXX.h] Error 255
The problem was that each of the IDL interfaces where enclosed in a module (namespace) called MyModule as you can see above. I've removed all this modules (keeping the interfaces of course) and at the next build everything was generated just fine. Using your own module name seems to not be as straight-forward as enclosing the IDL interfaces with it; most probably you'd be forced to write custom bindings to accomplish this (which is not recommended by the WebKit team).
So that was it for me, hope it's also helpful to you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With