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

How do I compile the client on WinXP using MinGW?

Postby Xeno » Tue Jul 24, 2007 8:35 pm

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

Postby KadaverJack » 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
KadaverJack
Site admin and forum addon
 
Posts: 1102
Joined: Tue Feb 28, 2006 9:42 pm

Postby Xeno » 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

Postby divVerent » 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.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby GreEn`mArine » 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

Postby Xeno » 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

Postby divVerent » 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.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby esteel » 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
esteel
Site admin and forum addon
 
Posts: 3924
Joined: Wed Mar 01, 2006 8:27 am

Postby Xeno » 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

Postby divVerent » 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.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Next

Return to Nexuiz - Editing

Who is online

Users browsing this forum: No registered users and 1 guest

cron