Hi,

On a couple of different occasions I have attempted to make a gtkg win32
build.  The last time I got it compiling and running but I must have
done something wrong with the win32 networking/sockets api because I
could never connect to anything.  I was going to clean up my code and
submit it so people could at least have a base in the future, but I
never got around to doing that.

It's something that has been sort of in the back of my mind forever but
I never get around to doing it :)  Anyway, I am not sure how far along
Jeroen is but I thought I mention a couple of things that I got stuck
on, maybe they will help someone.

1. Files - all the file accesses we use should be converted to glib
functions if they aren't already.  Glib automatically converts unix
style directory names to win32 but I remember there being a problem with
home directories and file creation, etc.  I am pretty sure I just
converted all the unix style fopen, etc. calls to the glib equivalents.

2. Resources - all the functions in resource.h weren't ported to mingw
(and probably still aren't).  I actually just commented out these
calls/hacked up static values for available memory/etc. and "was going
to deal with it later".  I think we might be able to do this properly
with the win32 API, but I am not sure if all of the API is available
under mingw.  Anyway, this is where we need to look (unless someone in
the wide world has done a mingw resource.h library already).

3. Networking - there are no glib functions for networking (quel
dommage!).  There are mingw/win32 API functions equivalent to the unix
socket functions but as I remember they have different function
parameters.  This means a bunch of "#ifndef _MINGW_W32_"'s with
alternative calls to socket functions.  Also, on W32 before your
application can actually use any sockets, you need to call a socket
initializing function.  WSAStartup I think.

The good news is that aside from these three things, things were easy to
get working.  The GUI was fine and the non-networking part of the
backend (which is unfortunately not much of it) seemed to be
operational.  I should have kept at it or sent it in because I am sure
the only problem was my dismal attempt at windows sockets.

I've done a few cross-platform apps in gtk now though, maybe I should
try it again...  In any case, I hope this helps you out somewhat.  Good
luck!

Emilie



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Gtk-gnutella-devel mailing list
Gtk-gnutella-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel

Reply via email to