[Xcb] Native win32 port - working (i think :) )

Barton C Massey bart at cs.pdx.edu
Sat Apr 19 12:31:50 PDT 2008


In message <200804191022.43076.jeetu.golani at gmail.com> you wrote:
> As I've been discussing on this list, I've been working on a win32 port of XCB 
> which I think works fairly decently right now. I've thrown it test code from 
> the tutorial and those work.

That's great!!  Thanks hugely.

> I've been using MinGW on linux and so far I'm statically
> linking my test code with the xcb object files and
> testing. I've run the autogen script within linux to get
> the environment to a base system from where I've gone on
> making changes. This basically converts all of the XML
> files into the required C code,etc.

We should shortly have Python code for the XML conversions,
which should let you run that natively on Windows as well.

> I've had to make changes within xcb_conn.c, xcb_utils.c,
> xcb_in.c and xcb_out.c to support win32.

Please post your patches; we'll try to figure out what to do
to get them integrated.

> What I would like to do now is to have the Makefile make a
> DLL - I've never used MinGW for this and my knowledge of
> autotools is rudimentary at best....any pointers would be
> appreciated.

I'm afraid I have no clue :-).

> I also need to understand certain segments a little better, namely:

> - The XCB tree consists of the directories libXau,
> libXdmcp, libxcb, proto,pthread-stubs, util, x11proto. I'm
> using code from libXau and libxcb but am not using code
> from any of the other directories. Should I be?? For
> e.g. I'm using pthread-win32 and so far the code doesn't
> seem to have demanded need for stubs.c (within
> pthread-stubs).

The pthread-stubs stuff is for systems which otherwise
can't compile single-threaded XCB programs without a pthread
library.  We're not sure whether it's currently working
right anyhow, actually.  For the windows build, you should
just ignore it.

The proto stuff is just the protocol XML: it's only needed
until you've generated the C code.  I'm not sure why
libXdmcp is a dependency, actually.  util is optional code.
I'm not sure how you're getting by without the includes in
x11proto---maybe we have finally got rid of all the
dependencies on it, but I didn't think so.

> - I noticed code within libXau with preprocessor
> directives for things like Xthreads, etc. So far i'm not
> defining anything so this code is probably
> inactive.....what's the right configuration for win32 with
> the correct defines?

Don't worry about it---the only part of libXau you're using
is the crypto stuff, which shouldn't have any dependencies
on the weird defines.

> - MinGW needed the X headers within it's include directory
> which I supplied directly by copying the X headers there
> (ugly). I think the x11proto make mechanism should do that
> automatically...however I'm not too sure of this and how
> to go abouts making the necessary changes there.

Oh.  Yeah, this should just be a build configuration change.

> - What is libXdmcp? I don't seem to be using any of it's
> code. Should i be?  What're the defines that would enable
> it?

The Display Manager Control Protocol enables a client to put
up a login window on a remote X server.

> Basically I've made changes within the core XCB mechanism
> but I'm not sure of how it all should fit in together, the
> correct defines, making the DLL, setting up the autotools
> mechanism......and a basic understanding of what the hell
> should i do now ;) hahaha

Like I say, post your patches, and we'll figure this stuff
out together.  Hopefully there's someone else on this list
with more than the zero MinGW experience I have who can help
out with the build and install stuff.

> Any help would be appreciated.

Thanks hugely for your work on this!  I'm really pleased
that you were able to get it running so quickly.  We'll do
what we can.

    Bart Massey
    bart at cs.pdx.edu


More information about the Xcb mailing list