working version of GTK for win64



 Hello all,

 I've tried to build and run gtk for 64-bit Windows. At last I can upload 
working version for usage:

http://rapidshare.com/files/130142295/gtk-2.12.9-win64-devel.zip.html
http://rapidshare.com/files/130142294/gtk-2.12.9-win64-src.tar.bz2.html

 As usual devel file contains executable and development files, src file - 
complete development tree.

 For build I've use cross-compile mode for mingw compiler:

http://downloads.sourceforge.net/mingw-w64/mingw-w64-bin_x86-64-linux_20080705.tar.bz2

with CFLAGS="-s -O2 -mms-bitfields".

 One can build gtk applications using the same compiler or prepare MS Visual 
Studio 2008 libraries from above with "lib.exe /MACHINE:x64 /DEF:file.def". 
Both methods are working.

 According to my experience of porting I suggest the following patch in source 
code of gtk and related libraries:

 1) for all ltmain.sh files in all packages glib, atk, cairo, pango, gtk in 
function func_win32_libid () replace string

$EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then

to

$EGREP -e 'file format pe-(.*architecture: i386)?' >/dev/null ; then

  It allows libtool to recognize 64-bit dll files as shared libraries. Of 
course win32 version also works with this perfectly.

 2) use the following main types definitions:

#define GLIB_SIZEOF_LONG   4
#define GLIB_SIZEOF_SIZE_T 8

and in glib/gmain.h for polling:

struct _GPollFD
{
#ifdef G_OS_WIN32
  void*         fd;
#else
  gint          fd;
#endif
  gushort       events;
  gushort       revents;
};

 3) for all Windows API calls in gtk/gdk/win32 use new declarations:
SetWindowLongPtr instead of SetWindowLong, GWLP_HWNDPARENT for
GWL_HWNDPARENT and so on.

 4) remove or disable c++ example (namely autotestkeywords.cc) in gtk/tests.

 In the development tree all my changes have copies of original files with 
extentions .orig. Applications with 64-bit are tested on Windows Compute 
Cluster Server 2003 (wccs). The same code is running successfully for win32 
and wine with mingw for win32.

 If someone are interested in this version of code I can add same extra 
descriptions or details. From my point of view it will be very useful to 
incorporate code changes or some cleanups which work with win32 and win64 
versions of gtk and we'll continue to use gtk libraries in more areas and 
applications.

 Thanks in advance!

 Oleg Tchij,
 Head of High Performance Laboratory,
 UIIP NASB, Surganova 6,
 Minsk, Belarus
 http://uiip.bas-net.by/
 +375-17-2842904







 


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