Re: Is GTK+ mature on all platforms?



On Tue, 2003-08-12 at 13:31, Charlie Root wrote:
> Hello world,
> 
> 
> We're deciding on GUI APIs for two projects we plan to start with
> requirements that only GTK+, QT and wxWindows seem to fulfill. The
> preference is definitely for GTK+ but there are a few issues.
> 
> GTK+ has not seemed to have been around for the win32 platform for
> long. The application will be used more on win32 than Linux although
> it will be used on Linux, FreeBSD and Solaris. One of the projects
> will also be ported to embedded devices most likely PDAs that run
> Linux, and that is where QT seems to have a good market. Although cost
> is not an issue for us for QT, at least I enjoy glib's interface more.

GTK for win32 is now only slightly behind GTK/X11 in terms of stability
and functionality.  It's really getting quite good.  The glib wrapper
functions really make differences in platforms quite neglible,
eliminating most of my #ifdefs.  Things like process control and file
handling, for example, are quite well done.  I understand that QT has
much more to offer in the way of a framework, but I think it's often too
much.  GTK strikes a good balance.  (Does anyone know how to ask GTK+
for the operating system directory separatoer character?)

> 
> So I guess the question is are there large applications that can run
> on win32 demonstrating the strengths of GTK+? On the flip side are
> there large GTK+ apps that do not run on win32 revealing its
> weaknesses?

GIMP is a good example, except that the new GImp 1.3 does not yet
compile under GTK/Win32 2.2.2.  I think there are some idiosyncracies
with the gimp code, though, that aren't related to gtk directly.  I've
found that when you program with win32/unix portability in mind right
from the start, things are smooth with gtk.  One of the most glaring
problems with gtk/win32 in the past was the lack of integration into the
Windows look and feel.  This has largely been fixed with a native theme
that uses native drawing calls (not quite sure what this means) on
windows (see http://gtk-wimp.sourceforge.net).  An example of a larger
program that uses this is gaim for win32 (http://gaim.sourceforge.net)
which looks really good under windows.

As for DLL hell that we had with GTK before, well, those days are pretty
much gone.  Just use the GTK runtime from the gtk-win people:
http://sourceforge.net/projects/gtk-win .  You can either compile the
libraries themselves to develop with (it is doable these days) or
download the development package from the same url that the runtime
comes from.  Using this common runtime eliminates DLL hell and generally
makes things smoother.  The development package can install on top of
the mingw/msys environment (http://www.mingw.org) or Visual Studio.

Personally, I've built a complete mingw32 cross-compiler environment on
my linux box that I use to compile my gtk apps for win32 and linux
simultaneously (and sometimes test my win version in wine! but mostly
vmware).  I have a few easy modifications that can be made to
configure.in that Glade-2 produced so that the -mms-bitfields and
-mwindows flags are used (which autoconf turns into configure) when you
target mingw32:

mkdir win32
cd win32
../configure --target=i386-mingw32 --host=i386-mingw32
make

and simultaneously in another tree:
mkdir linux
cd linux
../configure
make

When I deploy my exe, I just use the gtk-runtime package mentioned
above.  Either start the exe from the C:\Program Files\Common
Files\GTK\2.0\lib dir, or put that and bin in the global path.  Install
the wimp theme on top of that (it should be default in the runtime, in
my opinion) and you're good to go.

If anyone's interested, I also have dlls and development files for GTK--
(the c++ bindings) for the mingw32 evironment (native or cross).  I
would like to produce static libraries (because of Visual Studio vs G++
name mangling would mean the dlls only work with mingw32), but I can't
seem to convince the default packages to do this.

So yes, the tools are there, and I think it's mature enough.  If anyone
wants the cross environment (it's based on mingw32 gcc 3.2), let me know
and i can make a large tarball of all or part of it (debian has mingw
cross compilers in their apt somewhere).

On a related, but non-gtk note, I have yet to get a cygwin cross
environment working (you know, one where the binaries depend on
cygwin1.dll).  GCC always comes out being a mingw32 gcc.  If anyone
knows how to get gcc to use the cygwin dll, please let me know.

Michael


> 
> 
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
-- 
Michael Torrie <torriem chem byu edu>




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