Re: gio on win32 (was Re: Announce: gio merged)



On 04.12.2007 09:30, Alexander Larsson wrote:
> On Tue, 2007-12-04 at 00:15 +0100, Hans Breuer wrote:
> 
[...]
>> I've started something of this, but not commited yet. (I'm getting too old
>> for all these ifdefs ;)) See attahed patch.
> 
> Looks good to me.
> 
>> Again I alread started a win32 specific implementation, not commited yet
>> but attached for review.
> 
> Looks good. Does it also work for the root dir, or does
> g_path_get_dirname() fail in that case?
> 
Still need to check the root dir case, but it should work given something
like "c:\", the "c:" has the special meaning of the current directory on
the give drive which probably won't work with the API used.

>> At the moment I'm concentrating on getting gio to work at all. At some
>> points there still is working implmentation missing. My current unresolved
>> externals (i.e. some of the stuff that compiles still requires functions
>> not compiled) :
>>
The list of unresolved is now empty meaning gio compiles an links with msvc6.
> 
> All this should be possible to just ifdef out.
> The unix mount stuff is just to set the G_FILE_ATTRIBUTE_FS_READONLY
> attribute, which is not that important and done completely different on
> windows.
> 
> The localtime_r stuff is part of the implementation of the
> freedesktop.org trash spec in g_local_file_trash(). We should have a
> completely different implementation on windows. Just stub it for now.
> 
I've just commited the following:

2007-12-08  Hans Breuer  <hans breuer org>

	[gio compiles and links on win32, not sure how much already works]
	* glocaldirectorymonitor.c : ifdefed out inotify emulation for win32
	* glocalfile.c : use HAVE_UNISTD_H; implement file system size info
	base on win32 API; prefer g_lstat() over lstat(); instead of
	localtime_r() use an all GLib implementation on win32;
	get_mount_info() still needs a win32 specifc implementation
	* glocalfileinfo.c : use HAVE_*_H; start of implementation of
	win32_get_file_user_info to get owner/group info without uid/gid
	* glocalfileinputstream.c : include <io.h> on win32
	* glocalfileoutputstream.c : include <io.h> on win32 and some S_IS*
	definition, use g_win32_ftruncate() for G_OS_WIN32
	* gwin32appinfo.c : optionalize a bunch on #ifdef AssocQueryString
	it is available with mingw/w32api but a mess with the M$ Platform SDKs
	see: http://mail.gnome.org/archives/gtk-devel-list/2007-December/msg00014.html
	* makefile.msc : updated

>>> [...]
>> AssocQueryStringW is not available with the original SDK delivered with
>> msvc6. With more recent SDKs it seems to be part of some "Internet Explorer
>> SDK". I'll try to look into replacing with some less critical API.
> 
> Oh, I wasn't aware of that. I think all these calls do is sniff around
> in the registry anyway, so one can probably implement it using raw
> registry calls.
> 
Still need to take a closer look. Just #ifdefed for the moment.

-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it.                -- Dilbert


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