Re: libseed-list GIR, compatibility, etc.. (was Re: g_async_queue)



I would be very tempted to use your own gir's initially, hopefully this situation will begin to stabilize more as introspection get's more users (very likely with Python making it the default way to use GTK)

Regards
Alan

 --- On 30/Jun/2010, Jonatan Liljedahl wrote: 
> Alan Knowles wrote:
> >  
> >> Perhaps you should link to your site from the main seed webpage?
> > The documents are linked, but I guess it would be good to add some explaination or FAQ to the Seed site, about why some calls do not work
> > 
> >> So, does that mean that I need to have the latest checkout of GLib etc 
> >> to use your GIR files?
> > 
> > Usually not, they should work with the currently installed .so's, you need to compile typelibs from them
> > g-ir-compiler GLib-2.0.gir -o /usr/lib/girepostory-1.0/GLib-2.0.typelib
> 
> Ok, I see.
> 
> >> Yes, it seems a bit of a slow process... Personally I'm hoping to 
> >> release a cross-platform (linux & OS X) software built with seed and 
> >> custom C modules in a couple of months or so, and I'm a bit worried 
> >> about how to keep everything together and compatible. Any tips?
> > 
> > The only way I could think of doing this is using GIRepository calls in seed to verify that the particular API that you know might have changed is the same as the one you are using.. - even the versioning on the GIR files does not help that much.
> 
> Sounds messy :)
> Would it be possible (but perhaps not a good idea) to ship with 
> GIR-files and compile them to a custom typelib folder at build time?
> 
> >> On OS X I will probably put seed and all the needed g-libs with their 
> >> GIRs in the app bundle, but linking with the already-installed 
> >> WebKit/JavaScriptCore..
> > 
> > I'd be interested to see if that works. 
> > as long as GIRepository was installed on the system, then you could use this to use another location for the typelib files.
> > GIRepository.IRepository.prepend_search_path
> 
> I think it should be possible. I did it with glib, gtk and cairo (and 
> dependencies), with a gtk quartz build (no X11) bundled with my app 
> AlgoScore, as described here: 
> http://download.gna.org/algoscore/Help/algoscore-manual.html#osxbuild
> 
> Good to know about IRepository search_path.
> 
> /Jonatan
> 
> > Regards
> > Alan
> >> /Jonatan
> >>
> >> Alan Knowles wrote:
> >>> Sorry
> >>>
> >>> The API that is exposed to Seed/GJS/Pygi etc.. via GIR's for Glib are
> >>> still changing
> >>>
> >>> Probably as they realize how it is currently exposed, and consider
> >>> how they would like it to be exposed.
> >>>
> >>> The GIR files on my site, are generated every so often using a git
> >>> checkout of the development head - it's a build box set up to
> >>> specifically build from git. (although I've forced it to support only
> >>> Gtk-2 at present, as otherwise most of the GIR's become useless for
> >>> day-to-day work..)
> >>>
> >>> Hence when you use that GIR -it's either the latest intention of what
> >>> the API is going to be (with the latest fixes etc.) - or broken due
> >>> to someone commiting a borked patch ;)
> >>>
> >>> The 'where do I get my gir' question is a bit problematic eg. a) from
> >>> my distro.. - usually out of date, and quite a few of the edge cases
> >>> are broken (eg. gtktreeview etc.. are unusable) b) build yourself ..
> >>> - best, but most painfull... - jhbuild seems to be the best tool for
> >>> this. c) just grab them from my site - not great, but it works most
> >>> of the time ;)
> >>>
> >>> g-ir-repository was a stopgap solution until the upstream projects
> >>> include GIR's into the build systems. (I got avahi to include theirs
> >>> this week)
> >>>
> >>> One of the problems is that since it's all 'source generated' - if
> >>> there is a bug in the source, then you have to modify the source, -
> >>> send patch to maintainer, wait for release, hope distro's update, and
> >>> eventually get it on a machine..
> >>>
> >>> Since alot of the time, it's just a matter of changing a small part
> >>> of the GIR, it's rather a long road to go down to get results. I'd
> >>> love to see a better solution.. but that takes someone's time....
> >>>
> >>> Regards Alan
> >>>
> >>> --- On 29/Jun/2010, Jonatan Liljedahl wrote:
> >>>> Alan Knowles wrote:
> >>>>> You might have better luck with the new Gir file 
> >>>>> http://devel.akbkhome.com/seed/GLib-2.0.gir
> >>>>>
> >>>>> Which uses the new API 
> >>>>> http://devel.akbkhome.com/seed/GLib.AsyncQueue.html
> >>>> Is the new API == current seed git?
> >>>>
> >>>> Also, excuse my ignorance but is the new Gir file something
> >>>> specific for seed or improvements for the official GLib Gir-file?
> >>>> I'm not sure I entirely understand the system for all this
> >>>> gir-stuff, but I thought the files where generated from the actual
> >>>> libs somehow.. Also there was a gir-repository, is that the place
> >>>> to get them from or how does it work?
> >>>>
> >>>>> pushing/pulling pointers though is going to be difficult to
> >>>>> define an expected behaviour..
> >>>>>
> >>>>> We could have some limited support, eg. only supporting gobject
> >>>>> types both ways, but Gobject/structs as in arguments. convert JS
> >>>>> -> void* ==> wrapped Gobject/struct => pointer (this has some
> >>>>> partial support now) convert void* -> JS ==> only support Gobject
> >>>>> types (this is not supported at present)
> >>>>>
> >>>>> That way GString could be used to send data as raw data. and
> >>>>> GValues could be used to store/retrieve JS data..
> >>>> Wouldn't it work to just push the JSValueRef pointer as it is, and
> >>>>  perhaps protect it from the GC while it's in the queue? Then one
> >>>> could just push whatever JS value to the queue and get it back as
> >>>> it was. But I'm surely missing something...
> >>>>
> >>>> /Jonatan
> >>>>
> >>>>> Regards Alan
> >>>>>
> >>>>>
> >>>>> --- On 24/Jun/2010, Jonatan Liljedahl wrote:
> >>>>>> I'd like to use a GAsyncQueue to communicate between threads,
> >>>>>> but:
> >>>>>>
> >>>>>>> a = new GLib.AsyncQueue
> >>>>>> ** (seed:2468): CRITICAL **: Struct/union of type: AsyncQueue
> >>>>>> has size 0 in introspection data. Please check GIR Segmentation
> >>>>>> fault
> >>>>>>
> >>>>>> Trying the other way:
> >>>>>>
> >>>>>>> a = GLib.async_queue_new()
> >>>>>> [object seed_struct]
> >>>>>>> GLib.async_queue_push(a,"hejsan") GLib.async_queue_length(a)
> >>>>>> 1
> >>>>>>> GLib.async_queue_push(a,"hejsan") x=GLib.async_queue_pop(a) 
> >>>>>>> typeof x
> >>>>>> undefined
> >>>>>>> GLib.async_queue_length(a)
> >>>>>> 0
> >>>>>> How can I get it to work?
> >>>>>>
> >>>>>> It's a bit frustrating that the GLib/GObject bridge is only
> >>>>>> working for some stuff, and other times it requires a bit of
> >>>>>> guessing to figure out how to use them (like functions
> >>>>>> returning things to a pointer supplied as an arg, etc..)
> >>>>>>
> >>>>>> /Jonatan
> >>>>>>
> >>>>>> _______________________________________________ libseed-list
> >>>>>> mailing list libseed-list gnome org 
> >>>>>> http://mail.gnome.org/mailman/listinfo/libseed-list
> >>>>> _______________________________________________ libseed-list
> >>>>> mailing list libseed-list gnome org 
> >>>>> http://mail.gnome.org/mailman/listinfo/libseed-list
> > 
> > _______________________________________________
> > libseed-list mailing list
> > libseed-list gnome org
> > http://mail.gnome.org/mailman/listinfo/libseed-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]