-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating new WebKitGTK bindings #26
Comments
Hey, sorry, just came back from a loooong trip. Looks like it's not finding some of the types it needs. Is this webkitgtk version different from what https://github.com/stsundermann/webkitgtk-sharp is binding? |
Compilation errors probably rise because the WebView class is not found because it contains errors and as a result is not generated.
This is because in gtk-sharp the interface has been named differently what's in the gobject-introspection data. For my webkitgtk bindings I used this file to align the names with gtk-sharp. You should be able to just copy and paste it in to your bindings. (Maybe remove the soup-sharp file if you don't need soup-sharp or didn't bind it) https://github.com/stsundermann/webkitgtk-sharp/blob/master/sources/webkitgtk-sharp.metadata |
Thanks for the replies. :) @shana I'm trying to bind webkit2gtk-4.0, as that's shipped in the gnome-sdk runtime: https://github.com/GNOME/gnome-sdk-images/blob/master/org.gnome.Sdk.json#L558 @stsundermann I copied in the file and got it to fix some of the errors. Some of the warnings mention parameters and I'm not sure how to fix that. Is there a spec for how the metadata file works? For example: Gdk.Event exists in gtk-sharp:
I'll work my way through the API and report back. |
You can try adding
|
It built! :) This seems to have been enough: <?xml version="1.0"?>
<metadata>
<attr path="/api/namespace/object[@name='WebView']/implements/interface[@cname='GtkBuildable']" name="hidden">true</attr>
<attr path="/api/namespace/object[@name='WebViewBase']/implements/interface[@cname='GtkBuildable']" name="hidden">true</attr>
<attr path="/api/namespace/object[@name='WebView']/implements/interface[@cname='Atk.ImplementorIface']" name="cname">AtkImplementor</attr>
<attr path="/api/namespace/object[@name='WebViewBase']/implements/interface[@cname='Atk.ImplementorIface']" name="cname">AtkImplementor</attr>
<attr path="/api/namespace//object/field[@cname='parent_instance']" name="hidden">true</attr>
<attr path="//field[@name='Parent']" name="hidden">true</attr>
</metadata> Now I'll try to get this to run and implement the other objects after work. |
Another question: are the dos2unix and unix2dos actually needed? I don't see them in configure.ac in @stsundermann's bindings, so wondering if they're safe to remove. |
@hbons They're used to output generated csproj files with CRLF line endings. It's not strictly required, it's just to make it easier to diff generated files. VS is not going to complain if the files use different line endings, nor is Monodevelop or the command line tools. TL;DR: feel free to remove it if you want 😄 |
Making progress. :) What about mdtool? I've disabled it for now, and it seems to still compile bindings just fine. MonoDevelop is quite a big dependency for just this. Seems it just converts the .csproj to a different format? |
@hbons xsltproc, mdtool and unix2dos are all dependencies introduced with 6eb7e95 These are there to make life easier for people working with VS or MD while developing bindings, and they're used with |
@shana ok, i'll create a flag to make it easier for build systems and make a new PR. Now I'm hitting this "not implemented" error: Stephan's for does have it implemented: https://github.com/stsundermann/bindinator/blob/master/bindinate/Makefile.am.template#L47 What's the story behind that one? :) |
Hmm, looks like @antoniusriha disabled those in 398cc19. Stephan is on the original implementation, which has those enabled. @antoniusriha Do you remember what was broken about those targets? |
Sorry, don't remember. I suppose, I may have disabled them, because they didn't work with the multi-version support I introduced. I probably had the intention to fix this later, but never did. |
@hbons I've pushed a couple of things to fix the install targets and make mdtool and unix2dos dependencies optional (and remove the perl dependency). Give it a whirl! |
@shana wow thanks! Will try it soon. :) Here's what happens on make install with Stephan's makefile, seems that the DLL var passed to Making install in sources
make[1]: Entering directory '/run/build/webkit2-sharp/sources'
make[2]: Entering directory '/run/build/webkit2-sharp/sources'
make[2]: Nothing to be done for 'install-exec-am'.
echo "/app/bin/gacutil /i /f /package webkit2-sharp /root /app/lib"; \
/app/bin/gacutil /i /f /package webkit2-sharp /root /app/lib || exit 1;
/app/bin/gacutil /i /f /package webkit2-sharp /root /app/lib
Option /i takes 1 argument
Makefile:612: recipe for target 'install-data-local' failed
make[2]: *** [install-data-local] Error 1
make[2]: Leaving directory '/run/build/webkit2-sharp/sources'
Makefile:458: recipe for target 'install-am' failed
make[1]: *** [install-am] Error 2
make[1]: Leaving directory '/run/build/webkit2-sharp/sources'
Makefile:478: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
error: Child process exited with code 2 |
@shana compiles and installs! 👍 |
Now the app compiles, but it's missing the glue file. How do I make sure that's found?
|
@hbons where did |
I got it working. Not sure how. :) I'll post proper webkit2-sharp bindings soon. |
Yay!
|
@shana I'm seeing this same issue with sparkleshare, and running ldconfig does not seem to be helping. Any other ideas about how to approach this? |
I guess I will try a reboot |
I'm not sure if this is the right place to ask, but I don't know where else to go. :)
I'm trying to create new WebKitGTK bindings using bindinator. The GNOME platform provides binaries for 2.4, which I'd like to make use to create an app bundle of SparkleShare, instead of going on the impossible road of trying to compile WebKit myself.
However, I get errors and I've no idea where to begin to start fixing them.
Here's how bindinator got configured:
I changed the compiler command in bindinate/configure.ac.template to work with the new mono:
Bindinate runs fine and creates the directory
WebKit2-4.0
:Configure the bindings:
But compiling fails with this error:
Help appreciated lots!
The text was updated successfully, but these errors were encountered: