Difference between revisions of "Compiling using MSYS"
From OdaWiki
Line 2: | Line 2: | ||
− | + | 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: [http://www.codeblocks.org/ 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 [http://www.mingw.org/download.shtml 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 [http://www.7-zip.org/ 7-Zip]. If you are compiling ODAMEX for the purpose of debugging, grab gdb as well. | ||
− | == | + | ==Step 3: Unpack Files== |
- Untar <b>ALL MinGW</b> files from the archives you just downloaded into a single directory, then right click on <i>My Computer->Properties->Go to Advanced Tab->Environment Variables->System Variables</i> and scroll down till you find the Path variable, click edit and add the following line:<BR> | - Untar <b>ALL MinGW</b> files from the archives you just downloaded into a single directory, then right click on <i>My Computer->Properties->Go to Advanced Tab->Environment Variables->System Variables</i> and scroll down till you find the Path variable, click edit and add the following line:<BR> | ||
<BR> | <BR> | ||
Line 29: | Line 29: | ||
<b><u>NOTE:</u></b> In your mingw/bin dir, you should see a file named <b>i386-mingw32-msvc-sdl-config</b>, rename this to <b>sdl-config</b>. | <b><u>NOTE:</u></b> In your mingw/bin dir, you should see a file named <b>i386-mingw32-msvc-sdl-config</b>, rename this to <b>sdl-config</b>. | ||
− | == | + | ==Step 4: Download SDL Packages== |
- Download the following SDL packages and untar/zip them to your MinGW dir. | - Download the following SDL packages and untar/zip them to your MinGW dir. | ||
Line 36: | Line 36: | ||
* [http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-devel-1.2.6-VC6.zip SDL_mixer-devel-1.2.6-VC6.zip] | * [http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-devel-1.2.6-VC6.zip SDL_mixer-devel-1.2.6-VC6.zip] | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
===Create a Directory for Code=== | ===Create a Directory for Code=== | ||
− | |||
- Create a new dir somewhere, right click inside it and click <b>SVN Checkout</b>, type in <b>svn://odamex.net:2000/</b> in the url field and click OK, wait until it says <b>Completed</b> in the Action column of the window. | - Create a new dir somewhere, right click inside it and click <b>SVN Checkout</b>, type in <b>svn://odamex.net:2000/</b> in the url field and click OK, wait until it says <b>Completed</b> in the Action column of the window. | ||
===Compile with Makefile=== | ===Compile with Makefile=== | ||
− | |||
- Open a command prompt and go to your odamex trunk dir and type: <b>make -f Makefile.win all</b> | - Open a command prompt and go to your odamex trunk dir and type: <b>make -f Makefile.win all</b> | ||
Line 54: | Line 46: | ||
===Result=== | ===Result=== | ||
− | |||
- If all steps were followed correctly, Code::Blocks should output a binary into the /Bin dir of your odamex svn folder. | - If all steps were followed correctly, Code::Blocks should output a binary into the /Bin dir of your odamex svn folder. |