Re: GDBus support on Win32 + other platforms (Was Re: GtkApplication and argc/arv)



On Sat, 2011-02-26 at 10:37 -0500, David Zeuthen wrote:
> Hey,
> 
> On Sat, Feb 26, 2011 at 10:26 AM, Paul Davis <paul linuxaudiosystems com> wrote:
> > On Sat, Feb 26, 2011 at 10:00 AM, David Zeuthen <zeuthen gmail com> wrote:
> >> Hi,
> >>
> >> Just for the record, there's no reason that GDBus cannot be made to
> >> work very nicely on Win32 or any other platform we care about. GDBus
> >> (and D-Bus itself) was designed with this goal in mind.
> >
> > what functionality is (G)D-Bus supposed to be providing on other
> > platforms? my impression has been that on linux it provides stuff that
> > both OS X and Windows already provides (plus or minus a detail or
> > two). if that impression is correct, why would anyone run (G)D-Bus on
> > those platforms? if its not correct, what is the functionality that
> > (G)D-Bus is offering to linux that is missing from those platforms? if
> > you're talking about just a portable API to interact with various
> > system services and notifications, then fine, but that's a bit
> > different than talking about D-Bus itself, i think.
> 
> Yes, on the free desktop we use D-Bus a lot in system services
> (udisks, upower etc.) and in the sessions to implement the desktop
> itself (notifications, session management etc.) - neither of which
> (portable) apps should use. Instead apps should use the interfaces in
> GLib/GTK+.
> 
> For example, instead of speaking to udisks directly, the app should
> use GVolumeMonitor which on Linux uses udisks and on Win32 uses the
> native APIs. Ditto for pretty much everything else.
> 
> > just to be clear: i'm a big fan of the functionality that D-Bus  (at
> > least the system bus and maybe the session bus too) has made possible
> > on linux. i just don't understand why anyone would imagine using it on
> > other platforms.
> 
> One place where D-Bus is useful is for an app to provide a remote
> control interface so e.g. 3rd party apps can control it / interact
> with it. The app just says: use interface org.App.Bar on object
> /org/App/bar on the name org.App.FooApp on the session bus.
> 
> But, yeah, D-Bus isn't all that useful for apps as is it to build an
> OS... I'd argue it would still be nice to have GDBus working *out of
> the box* in Win32 and OS X. Someone just need to do the work - it's
> already 99% done...

Guys, maybe someone here can answer my question.

Does an application that uses GtkApplication work on win32/osx ?

I'm not asking for a full implementation of dbus on every platform
and I'm also not asking for a proper GApplicationImpl for every
platform.

If a glib/gtk+ application uses GtkApplication, what I expect is
that if there is no IPC backend available for that platform,
the application loses some of it's facilities and just work without
any backend present (i.e. the application is not "registered on any
bus", the application is not single instance, but at least it fires 
up and silently succeeds).

Nobody on irc seems able to answer this question for me, and from
reading the sources I can see that

 - gapplicationimpl-dbus.c seems to be compiled into gio regardless
   of the platform

 - gapplication.c seems to "just call" g_application_impl_register()
   and g_application_run() seems to "just return a failure status"
   if g_application_impl_register() happens to return NULL.

Again, I'm not asking for someone to do the work of implementing it
properly on win32 or osx, but if GApplication simply fails just because
there is no backend then it's not portable at all and either needs to
be advertized as such or it's a serious bug.

FWIW, I ported Glade to use GtkApplication following my blind trust that
if the API is in GTK+, it will at least do something reasonable on any
platform GTK+ compiles on... do I have to pull out that change while
GApplication is still unstable ?

Best Regards,
   -Tristan




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