This document assumes that you want to use MSYS in order to parse the Windows-based makefile and compile with MinGW. If you don't want to bother downloading an IDE, you've come to the right place.
Step 1: Getting MSYS
You can download Code::Blocks from its website here: MinGW - Minimal SYStem. It doesn't matter where you install MSYS, but be sure and add MSYS's /bin/ directory to your $PATH$ environment variables, which you can find in System Properties -> Advanced.
Step 2: Setting up the Compiler
You need the latest version of MinGW from this website. You need the latest stable versions of the following packages...
- mingw-runtime
- mingw32-make
- w32api
- binutils
- gcc
- g++
Download all of them and extract them to C:\mingw. If you're using Windows and don't have an archiver capable of handling tar.gz files, stop living in the stone age and download 7-Zip. If you are compiling ODAMEX for the purpose of debugging, grab gdb as well.
Step 3: Required Libraries
Step 4: Set up PATH variable
Now, we need to set up our PATH environment variable to contain the path to the compiler. Without this, the makefile will not be able to find the compiler. How to set up your PATH variable depends on what operating system you're using.
Windows 2000/XP
- Right click on My Computer and click Properties...
- Click on the Advanced tab, and then the button that says Environment Variables
- Under the System Variables section, scroll through the variables and double-click the variable named Path
- Copy paste the following onto the end of the Variable Value.
;C:\MinGW\bin\
- OK your way out of all dialog boxes.
Windows 9x/Me
Step 4: Unpack Files
- Untar ALL MinGW files from the archives you just downloaded into a single directory, then right click on My Computer->Properties->Go to Advanced Tab->Environment Variables->System Variables and scroll down till you find the Path variable, click edit and add the following line:
;drive:\mingwdir\bin
drive:\ being the drive you installed mingw to (eg c:\)
mingwdir is self-explanatory (eg mingw\)
NOTE: Include the semi-colon at the start, or else it won't work.
NOTE: In your mingw/bin dir, you should see a file named i386-mingw32-msvc-sdl-config, rename this to sdl-config.
Create a Directory for Code
- Create a new dir somewhere, right click inside it and click SVN Checkout, type in svn://odamex.net:2000/ in the url field and click OK, wait until it says Completed in the Action column of the window.
Compile with Makefile
- Open a command prompt and go to your odamex trunk dir and type: make -f Makefile.win all
HINT: To get help on the makefile, type make -f Makefile.win help
Result
- If all steps were followed correctly, Code::Blocks should output a binary into the /Bin dir of your odamex svn folder.