Compiling NXWin on Windows/Cygwin

Posted by George Wright Sun, 27 Jan 2008 00:08:00 GMT

Edit

These instructions have been confirmed not to work. While they may allow NXWin to compile, the buildsystem fails with lots of linker errors… Still scratching my head about how to fix this, but for now I’ve contacted NoMachine about it.

It turns out NXWin isn’t set to compile by default on Cygwin. Anyway, I finally managed to get it to compile inside the nx-X11 tree with a little patching to the source code, and I figured I’d better blog about it for anyone else who is interested in this, and also so that in the inevitable outcome where I forget how I did it, I can fall back on this blog.

First off, you need to edit config/cf/host.def and set the following:

#define NXWinServer YES
#define XWinServer YES

The XWinServer define is probably not needed, but as this machine’s quite a slow compiler I’m not going to change it and see, as contrary to popular belief I don’t like sitting around watching stuff compile.

However, the real fun starts when trying to compile NXWin itself. Turns out it’s broken - I have no idea why, or even how NoMachine themselves compile it, but I had to patch a few lines in various files before it would compile.

The following are the changes I made in programs/Xserver/hw/nxwin:

NXwindow.c:3537
Line should be:
  pWin = SaveSetWindow(client->saveSet[j]);

NXdispatch.c:228-229
Lines should be:
  volatile char dispatchException = 0;
  volatile char isItTimeToYield;

NXdispatch.c:871
Line should be:
  result = AlterSaveSetForChildren(client, pWin, stuff->mode, FALSE, TRUE);

NXevent.c:215
Comment out the struct for HotSpot

winmsg.h:74
Comment out the enum for MessageType

You can then just go ahead and compile with make World.

Most of the inspiration for these little patches were taken from the dix/ server.

This, obviously, isn’t ideal, but there’s a dire lack of any documentation for NX on Windows. I know that NoMachine use Cygwin to compile their stuff, but it all seems very hacky (which, to be honest, is the general impression I get of Cygwin) and unpolished.

If anybody who actually knows how to build the NX packages on Windows is reading this, if they could contact me and let me know what the preferred method of compiling NX’s open source components is I’d be most grateful.

Posted in  | 12 comments

Comments

  1. Ryan Pavlik said 39 minutes later:

    I have no experience in particular with NX, but a fair amount with Unixy compiling on Windows. Your description of Cygwin as hacky is correct - it provides basically a Unix compatibility layer, cygwin1.dll, that is needed by everything compiled using the cygwin compiler. (There are ways to use just the shell, make, etc, and use, say, the MS Visual C++ compiler, but I don’t do that so I don’t have more info - maybe see www.abisource.com and the old Windows build docs for info on that.)

    If you want to make an honest-to-goodness, real Windows binary, your best bet is MinGW (a native Windows GCC) and MSYS (a corresponding unixish environment to compile in). There are several (many?) projects who produce their Windows binaries this way, since it allows you to use the tools you’re used to (make, auto*, pkg-config) yet still end up with a real Windows binary, not a pseudo-Unix binary with a clumsy dependency.

    I’ve got build instructions for some common FOSS libraries and such on my web site - I do the building for AbiWord so have to build some of its deps too. Might be worth a look.

    Good luck!

  2. replacement windows mechanicsburg pa said over 2 years later:

    Hey george i liked the points that you have discussed.

  3. fake cheap sunglasses said over 2 years later:

    I like your site very much.34254

  4. fake cheap sunglasses said over 2 years later:

    I like your site very much.23143

  5. fake ugg outlet said over 2 years later:

    I like your site very much.2354

  6. fake ugg outlet said over 2 years later:

    I like your site very much.324345

  7. sanning this website then you will get good things. <a Href=" http://www.fivefingers2011.com/mens-fivefingers-classic">Five Fingers Classic Mens</a> said over 3 years later:

    sanning this website then you will get good things. http://www.fivefingers2011.com/mens-fivefingers-classic">Five Fingers Classic Mens

  8. Tiffany Sale said over 3 years later:

    We’ve go through your own exceptional blog which posting on-line, have numerous good friends combined with me to examining your own article content. Whatever we are, as well as whatever we would like, the principle concept you’ve recently been displayed was satisfied by us. Thanks much for sharing so perfect point of view, and it create us get a feeling of relaxed and ease.

  9. Prada Pas Cher said over 3 years later:

    Web Builder technologie vous permet toujours de construire votre site sur mesure avec tous les outils que vous pourriezdemander à un concepteur de sites Web pour, mais vous arrivez à assembler le produit final yourself

  10. New Balance Pas Cher said over 3 years later:

    Got dette de carte de crédit? Transfert de votre dette sur une carte avec un taux d’intérêt inférieur peut sembler la solution idéale et elle peut être. Mais le secret réside dans une attention aux détails lorsque vous demandez une carte de crédit de transfert de solde

  11. hair extensions said over 3 years later:

    I love you not for who you are, but for who I am with you.

  12. 1603602377@qq.com said over 3 years later:

    I very light given you of the article, very good,

(leave url/email »)

   Comment Markup Help Preview comment