How do I compile the client on WinXP using MinGW?

Post anything to do with editing Nexuiz here. Whether its problems you've had, questions, or if you just want to show off your work.

Moderators: Nexuiz Moderators, Moderators


  • Other than incredibly simple programs ("Hello World" etc), I haven't compiled anything. I installed MinGW a few days ago for something else and I would now like to know how I can compile the client with it on a WinXP system.

    A checklist and step-by-step instructions would be appreciated. :)


    Thanks.
    Xeno
    peregrinus originis incognitae
     
    Posts: 396
    Joined: Wed Nov 15, 2006 10:42 pm

Tue Jul 24, 2007 8:55 pm

  • torus wrote:... that said, I assume you just want to build the editor for kicks, and you do know that there are precompiled packages for Win32. :o

    Judging from the topic, i guess he's talking about the darkplaces engine, not gtkradiant.

    But the question is still: why? ;)
    esteel's last try to talk someone through the compilation process on irc took several hours iirc...

    If you just wanna test new engine features: there are beta builds available at http://141.2.16.3/nex/ and http://kadaverjack.planetnexuiz.de/nex
    User avatar
    KadaverJack
    Site admin and forum addon
     
    Posts: 1102
    Joined: Tue Feb 28, 2006 9:42 pm

Tue Jul 24, 2007 9:11 pm

  • I mostly just want to do it for the sake of doing it. I appreciate the other suggestions of other things that I could do, but I really want to have a clear set of instructions to compile it from source on WinXP.
    Xeno
    peregrinus originis incognitae
     
    Posts: 396
    Joined: Wed Nov 15, 2006 10:42 pm

Tue Jul 24, 2007 10:43 pm

  • Install the DirectX headers into it (my mingw cross compiler came with them) and put mingw's bin directory into the PATH environment variable (my computer -> properties allows you to set that at some place).

    Then, open a command prompt and cd into the DP source directory. In there, type:

    make cl-nexuiz

    That should be it, if not, post the errors.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Wed Jul 25, 2007 6:44 am

  • A detailed guide how to setup MinGW and MSYS can be found here: http://max.berger.name/howto/cdt/

    Make sure that you find that MinGW 5.1.3 Setup.exe on the download page (on Source Forge), you may have to search a bit for it as they can hide it pretty well^^

    This guide also explains how to set the path variable. After that I'd recommend you to create a new batch file that compiles the binary for you, content will e.g. be:
    @echo off
    pushd C:\path_to\darkplaces_source
    mingw32-make cl-release

    Make sure you have a new line after the last line from this quote. You can also compile something different than cl-release. To see the options, just enter mingw32-make when you are in the correct DarkPlaces-source directory.
    IRC quote:
    [kojn] I've been coming a bit more recently
    [kojn] she took it the dirty way
    GreEn`mArine
    Forum addon
     
    Posts: 1509
    Joined: Tue Feb 28, 2006 9:33 pm
    Location: Germany

Wed Jul 25, 2007 8:30 pm

  • All I need is the source in the Nexuiz directory, right? I created a new directory and extracted the source zip files to seperate directories in it. Which directory do I need to be in to run it?

    If I run "mingw32-make cl-release" or "mingw32-make cl-nexuiz" (or both with just "make") in the darkplaces folder, the first error that I see is
    Code: Select all
    vid_glx.c:22:19: dlfcn.h: No such file or directory
    .

    Is that one of the directx headers that I need? What do I need to install if that's the case? I don't want to rummage around on micro$oft's site for some bloated exe that will dump loads of shit on my system... I already have WinXP... that's enough :P


    MinGW and MSYS are both installed and working (with their paths added to my ever-growing path variable).




    Thanks for the help.
    Xeno
    peregrinus originis incognitae
     
    Posts: 396
    Joined: Wed Nov 15, 2006 10:42 pm

Wed Jul 25, 2007 9:00 pm

  • It apparently failed to autodetect the operating system. Try:

    mingw32-make DP_MAKE_TARGET=mingw cl-nexuiz

    to force the right platform.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Thu Aug 02, 2007 6:42 pm

  • My last try to talk someone into compiling DP took very long because it was a while back since i used windows and installed msys :). And iirc you also need msys and mingw and back then i was not sure about the order in which to install them. But yeah for some reason the OS detection is not working.. I used this inside a cmd.exe (shell) to finally compile DP:

    PATH=c:\msys\1.0\bin;c:\MinGW\bin;c:\MinGW\mingw32\bin;%PATH%
    pushd files\vc\twilight\trunk\darkplaces
    make DP_MAKE_TARGET=mingw cl-release
    copy darkplaces.exe ..\..\nexuiz\svn /y
    User avatar
    esteel
    Site admin and forum addon
     
    Posts: 3924
    Joined: Wed Mar 01, 2006 8:27 am

Sat Aug 18, 2007 12:12 pm

  • Ok, I'm back to trying this again. I followed the previous intructions and added the includes from the quake1 source that causes the errors after that. Here's my latest compilation error:

    Code: Select all
    windres -o darkplaces.o darkplaces.rc
    'c:\Program' is not recognized as an internal or external command, operable program or batch file.
    c:\Program Files\MinGW\bin\windres.exe: no resources
    make[2]: *** [darkplaces.o] Error 1


    The initial call to windres is working (I get a notification fhat it's trying to use the cmd.exe), but then whatever it passes to the command line chokes on the space in "Program Files". I don't want to move everything and create yet another directory in C:\ just to work around the problem. Is there any parameter that I can add or a way to change the path to the short version somewhere in the make file or wherever it's getting the damn path?

    Thanks for all the help so far. It's the only thing keeping me from going completely insane over this.
    Xeno
    peregrinus originis incognitae
     
    Posts: 396
    Joined: Wed Nov 15, 2006 10:42 pm

Sat Aug 18, 2007 12:16 pm

  • Yes, use c:\progra~1\ which serves as an alias to Program Files. But no idea how you can change that. "make" is known to not work with spaces in directory names.

    Didn't you get a warning when installing into this folder?
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Sat Aug 18, 2007 12:28 pm

  • divVerent wrote:Yes, use c:\progra~1\ which serves as an alias to Program Files. But no idea how you can change that. "make" is known to not work with spaces in directory names.

    Didn't you get a warning when installing into this folder?


    I replaced all instances of "Program Files" in the path variable with the short version but that didn't help.

    No, there were no warnings when I installed minGW or MSYS about the space.
    Xeno
    peregrinus originis incognitae
     
    Posts: 396
    Joined: Wed Nov 15, 2006 10:42 pm

Sat Aug 18, 2007 12:46 pm

  • Reinstall it to another directory, apparently nothing else will help.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Sat Aug 18, 2007 1:30 pm

  • i told him that, it must be a bug in mingw when it doesn't like spaces in directory names.
    Install it into a directory where you have no single space in the full path ;)

    And div, why did your mingw cross compiler come with directx headers and mine didn't? darn :P i copied them later :>
    User avatar
    Blµb
    Alien trapper
     
    Posts: 277
    Joined: Thu Mar 29, 2007 1:49 pm

Sat Aug 18, 2007 4:24 pm

  • No idea why. I have two completely different mingw cross environments here (one with gcc3 and one with gcc4) and I have no idea where I got either from. But only the gcc3 one came with the DX headers included.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Fri Oct 05, 2007 5:09 pm

  • Ok, here we go again.

    This is what I've done:
    I uninstalled MinGW and MSYS from my "Program Files" directory
    I installed Cygwin (c:\cygwin) (for something else actually, which gave me the idea to try this again)
    I re-installed MinGW (c:\X\mingw) but not MSYS (Cygwin should contain all the MSYS functionality, shouldn't it?).

    I've set the environmental path variable to include the following
    Code: Select all
    c:\X\mingw\bin
    C:\cygwin\bin;
    C:\cygwin\usr\bin;
    C:\cygwin\usr\local\bin;

    and in that order.

    I have the following files in "C:\cygwin\usr\local\include\darkplaces".
    Code: Select all
    dinput.h
    dsound.h
    ddraw.h


    I should have everything that I need to compile from source I think. I've tried several permutations of everything listed in this thread. Can someone please tell me what I'm supposed to do. Above all it would be great if someone could give me confirmed instructions but I'm willing to try informed guesses.

    Thanks.
    Xeno
    peregrinus originis incognitae
     
    Posts: 396
    Joined: Wed Nov 15, 2006 10:42 pm

Fri Oct 05, 2007 7:01 pm

  • Xeno The Blind wrote:I have the following files in "C:\cygwin\usr\local\include\darkplaces".

    I don't think that's the right path (unless you edited the makefile...)
    Put them where your other mingw headers are (and don't create a new directory).

    Or install dev c++, put the headers in Dev-Cpp/include, open darkplaces.dev, click "compile" and rename darkplaces.exe to nexuiz.exe afterwards...
    User avatar
    KadaverJack
    Site admin and forum addon
     
    Posts: 1102
    Joined: Tue Feb 28, 2006 9:42 pm

Fri Oct 05, 2007 7:30 pm

  • KadaverJack wrote:I don't think that's the right path (unless you edited the makefile...)
    Put them where your other mingw headers are (and don't create a new directory).

    Or install dev c++, put the headers in Dev-Cpp/include, open darkplaces.dev, click "compile" and rename darkplaces.exe to nexuiz.exe afterwards...


    Thanks, but there is a command-line argument for make and mingw32-make that enables me to specify additional include directories... I'd prefer to avoid a chaotic include dump directory.
    Xeno
    peregrinus originis incognitae
     
    Posts: 396
    Joined: Wed Nov 15, 2006 10:42 pm

Mon Oct 08, 2007 10:48 am

  • I just found this thread whilst looking up something else. In an ongoing effort to resolve the mystery meat of exploits I built & tested modified builds under Archlinux (can't remember which gcc - whatever's latest in what used to be called their "current" pkg set) - which was quite simple after finding the pkgs containing a few headers I needed (probably for sdl related junk).

    When I got around to doing this under WinXP, I ran into the same array of wildly unhelpful errors. As I told John Galt "3 SDKs and 3 hours later it is still a total clusterf*ck" - all this with various versions/combos of MinGW and MSys. Hell, I even tried cygwin after editing the makefiles to specifically build the windoze port - which, funny enough, is as close as I came to getting it right. Somewhere along the way I *did* manage to get the whole shebang built, by accident. But since I had no idea how it happened *and* they got built under my modified copy from svn (God alone knows what state the source was in when it happened), I discarded the binaries as useless.

    So, any help here would also be appreciated.
    User avatar
    nexbender
    Alien
     
    Posts: 138
    Joined: Tue Jun 26, 2007 12:35 am
    Location: Kal E Forn Ya

Mon Oct 15, 2007 10:50 pm

  • *bump*


    Don't hate us because we're using windoze. :(
    Xeno
    peregrinus originis incognitae
     
    Posts: 396
    Joined: Wed Nov 15, 2006 10:42 pm

Mon Oct 15, 2007 10:56 pm

  • We simply don't have it.

    If mingw on Win32 is any similar to mingw on Linux (and it should be), the included Makefile should work out of the box. We also got reports of people building it on Dev-C++, which is an IDE using mingw.

    Can you try posting the errors you get? Also, don't use spaces in folder names :P
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Mon Oct 15, 2007 11:17 pm

  • divVerent wrote:We simply don't have it.

    If mingw on Win32 is any similar to mingw on Linux (and it should be), the included Makefile should work out of the box. We also got reports of people building it on Dev-C++, which is an IDE using mingw.

    Can you try posting the errors you get? Also, don't use spaces in folder names :P


    I've created directories just to avoid paths with spaces in them. :|
    Xeno
    peregrinus originis incognitae
     
    Posts: 396
    Joined: Wed Nov 15, 2006 10:42 pm

Fri Nov 02, 2007 8:47 pm

  • Well its some time since i really used that mingw installation to compile the engine and i never bothered to install all that SDL stuff so i just could compile nexuiz.exe but i basicly installed msys and mingw and did this from a cmd.exe:

    pushd "PATH\TO\\darkplaces"
    PATH=c:\msys\1.0\bin;c:\MinGW\bin;c:\MinGW\mingw32\bin;%PATH%
    make DP_MAKE_TARGET=mingw cl-release

    simply works :) well maybe it does help..
    User avatar
    esteel
    Site admin and forum addon
     
    Posts: 3924
    Joined: Wed Mar 01, 2006 8:27 am

Sat Nov 03, 2007 1:09 am

  • FUCKING WOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOT!!!!!!!

    I finally managed to compile it... I'll try to summarize all the steps and post a thread with instructions later.
    Xeno
    peregrinus originis incognitae
     
    Posts: 396
    Joined: Wed Nov 15, 2006 10:42 pm

Sun Nov 04, 2007 3:08 am

Sun Nov 04, 2007 4:59 am

  • Out of masochistic curiosity, how would I do that?
    Xeno
    peregrinus originis incognitae
     
    Posts: 396
    Joined: Wed Nov 15, 2006 10:42 pm

Sun Nov 04, 2007 10:01 am

  • You go to www.libsdl.org
    Under download you click SDL-1.2
    There you select SDL-devel-1.2.12-mingw32.tar.gz
    Or you simply use this direct link XD http://www.libsdl.org/release/SDL-devel ... w32.tar.gz

    hrhr

    Then you put the header files into your include directory, so that in there you have SDL/SDL.h SDL/SDL_***.h etc.
    the libs into your library dir

    and then `make sdl-release` should work, I guess :>
    User avatar
    Blµb
    Alien trapper
     
    Posts: 277
    Joined: Thu Mar 29, 2007 1:49 pm



Return to Nexuiz - Editing




Information
  • Who is online
  • Users browsing this forum: No registered users and 1 guest