First, you need to install MinGW and MSYS to be able to compile the code. Download the following:
- Automated MinGW Installer (I used MinGW-5.1.3.exe)
MinGW Runtime (I used mingw-runtime-3.13.tar.gz)
MinGW API for MS-Windows (I used w32api-3.10.tar.gz)
GNU Binutils (I used binutils-2.17.50-20060824-1.tar.gz)
MSYS: Base System (I used MSYS-1.0.10.exe)
Run the MinGW Installer first and run the MSYS: Base System Installer last. DO NOT INSTALL ANYTHING TO A DIRECTORY WITH A SPACE IN ITS NAME! (e.g. "Program Files" or "Documents and Settings"). By default I think they both try to create directories in C:\. I hate clutter so I have a directory, C:\X\ for anything that might be sensitive to path names. My MinGW installation directory is thus C:\X\MinGW and my MSYS directory is C:\X\MSYS. To install the other stuff, you should be able to extract them directly into the MinGW directory. You'll be prompted to overwrite stuff. You should be able to overwrite everything (mostly just overlapping files, shouldn't make a difference which one you keep). If you're unsure, check the READMEs or the download sites for instructions.
When you install MinGW, make sure that you select the C and C++ compilers during the dialogue. When you install MSYS, make sure that you follow the command line dialogue that pops up and that you give it the correct path to your MinGW directory, using FORWARD slashes (/)... thus I had to enter it as C:/X/MinGW.
Ok, now download the quake 1 source code files at ftp://ftp.idsoftware.com/idstuff/source/q1source.zip. You need the following files from the quake 1 source (look in q1source.zip\WinQuake\dxsdk\SDK\INC):
- ddraw.h
dinput.h
dsound.h
Create a new folder in MinGW\include\ and name it "darkplaces". Move the three files here.
Finally, go to Nexuiz\sources\ and extract the enginesource.zip (the file will contain a date in it's name, e.g. enginesource20070531.zip) file to a folder somewhere (in you created the directory C:\X\, extract the folder there... avoid placing it somewhere with a name in the path (it might work, I didn't bother to try... I was frustrated enough). Note that the desktop has a space in its path (it's in "Documents and Settings"). This folder will contain another folder, "darkplaces".
Now, open a command prompt (press the windows key and R, then type "cmd" and hit enter). (yeah, I realize that anyone who wants to compile the client from source probably knows how to open the command prompt).
Enter "cd" followed by a space and the full path name to the darkplaces directory in the folder to which you extracted the enginesource.zip file. (e.g. "cd C:\X\enginesource20070531\darkplaces").
Now you need to set the path variabe to contain the paths to the MinGW and MSYS files (so that the command prompt can find them). If you installed everything to its default locations (C:\), then enter this (provided that you have the same versions listed above):
- Code: Select all
PATH=C:\msys\1.0\bin;C:\MinGW\bin;C:\MinGW\mingw32\bin;%PATH%
If you installed everything to C:\X\ as I did, enter this.:
- Code: Select all
PATH=C:\X\msys\1.0\bin;C:\X\MinGW\bin;C:\X\MinGW\mingw32\bin;%PATH%
If you installed everything somewhere else, just replace the three paths with the correct ones. If you don't want to have to type that every time that you start a new command prompt session, you could add them to the path variable permanently (Control Panel -> System -> Advanced -> Environment Variables -> System Variables -> Path).
Now, if you placed the ddraw.h, dinput.h, and dsound.h in MinGW\include\darkplaces, and MinGW is in it's default location (C:\MinGW), enter this:
- Code: Select all
make DP_MAKE_TARGET=mingw CC="gcc -I/c/MinGW/include/darkplaces" cl-release
If you placed the files somewhere else, replace "c/MinGW/include/darkplaces" with the full path, using FORWARD SLASHES and without a colon after "c". E.g. I used this:
- Code: Select all
make DP_MAKE_TARGET=mingw CC="gcc -I/c/x/MinGW/include/darkplaces" cl-release
That should be it.
Thanks to div and esteel for their help.
If there are any mistakes, let me know right away so that I can fix them.
EDIT 08/03/29 - SDL
erroneus wrote:double yay, i got sdl to compile, i uninstalled everything and started from scratch,
the sdl libs are located here for any other people who are new to coding like me
http://www.libsdl.org/release/SDL-devel ... w32.tar.gz
all this gets copied to the mingw directory aswell as the other stuff.
the only other thing that i did, i copied the .h files from Nexuiz\Nexuiz-SDL.app\Contents\Frameworks\SDL.framework\Versions\A\Headers (included in the game)
i over wrote the files that i downloaded, i dunno if it was good or bad, but it worked on the first try.
the difference i'm looking at is the way the sdl version handled joystick input. the cvars are totally different compared to the CL version.