Re: xwindows client which is a win32 executable using GTK??



Let me see if I understand you correctly. You want to write a win32 program
that uses gtk+ for its GUI, and you want to be able to compile it to either
use the local windows display or a remote x screen without modifying the
code.

Yes indeed, that's what I'm interested in.

Well, you have a couple of options. Normally, gtk+ apps written for win32
link against a win32-native build of gtk+, which then uses the regular
windows gdi to show the interface to the user. This would be your
"non-remotable" app. What you want to do in addition, I think, is to link
against a win32 native build of gtk+ that tries to connect to an X server
rather than using the windows gdi.

I think I'd rather use plain GTK+ recompiled with MSVC, as long as GTK+ only
depends on Xlib, which I already compiled for Win32, and other portable
libraries
(speaking of which I'm expecting that Glib has already been ported to Win32,
right?).
I'm seeking comments from experts who can provide an overview of GTK+
dependencies

To decide whether or not an app would be "remotable" or "non-remotable",
you
would choose which library to link against at build time.

Correct

This would allow
you to accomplish your goal without having to modify your program, but I
don't know if the second set of libraries (win32 gtk+ -> X) exists yet.

It should not be another version: it should be THE Gtk+: see above

Another option is to build your program in a cygwin environment and link
against cygwin builds of gtk+ and glib. The downside to this would be that
you would have to have cygwin and X installed on every windows machine
where
you want to use the program, and you couldn't make the program specifically
"non-remotable".

that's not entirely correct: I would only need cygwin on the client side and
possibly
many unexpensive X-servers (e.g. Microimages MI/X or XFree86 ) on the server
side.
Another downside of cygwin is that I have to make my program generally
available
through GPL license, because cygwin is released through GPL (not LGPL),
which might not
be acceptable to me and/or the party I would be selling my program to.

Also, I'm not sure if there's a working build of glib for
cygwin. I read somewhere (I believe on garnome's site) that people are
still
having problems getting glib 2.0.0 to compile under cygwin, but I don't
know
about 1.2.

That's a bit worrying to me: to say the least it means that glib is not that
much portable anyway.

There may very well be other options out there, and I'm sure other people
on
this list could comment, but that should be enough to get you looking in
the
right direction.

thanks very much for answering.

Davide Dell' Aquila




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