Difference between revisions of "Compiling using Code::Blocks"

From OdaWiki
m (Compiling on Windows with Codeblocks moved to Compiling using Codeblocks)
Line 1: Line 1:
 
<b>Overview:</b>
 
<b>Overview:</b>
 
---------
 
---------
This guide contains information on how to compile
+
The ODAMEX Source package comes with a variety of project and workspace files.
Odamex using [http://www.codeblocks.org/ Code::Blocks]
+
  
=Download SVN Utility=
+
This tutorial will show you how to build ODAMEX using the [http://www.codeblocks.org/ Code::Blocks] IDE.
  
- Download [http://tortoisesvn.tigris.org/ tortoisesvn] and <b>install</b>, then <b>restart</b>.
+
==Step 1: Getting Code::Blocks==
  
=Download MingW Files=
+
You can download Code::Blocks from its website here: [http://www.codeblocks.org/ Code::Blocks].
- Get the following <b>MinGW</b> files:
+
  
* [http://prdownloads.sf.net/mingw/gcc-core-3.4.2-20040916-1.tar.gz?download gcc-core-3.4.2-20040916-1.tar.gz]
+
* Note: Be sure to get the latest nightly build, as this is the one that works with the current project files.
  
* [http://prdownloads.sf.net/mingw/gcc-g++-3.4.2-20040916-1.tar.gz?download gcc-g++-3.4.2-20040916-1.tar.gz]
+
==Step 2: Required Libraries ==
  
* [http://prdownloads.sf.net/mingw/mingw-runtime-3.9.tar.gz?download mingw-runtime-3.9.tar.gz]
+
For ODAMEX to successfully compile, you must obtain some libraries for it, which are:
  
* [http://prdownloads.sf.net/mingw/w32api-3.6.tar.gz?download w32api-3.6.tar.gz]
+
* [http://www.libsdl.org SDL development libraries]
 +
* [http://www.libsdl.org/projects/SDL_mixer SDL_mixer development libraries]
  
* [http://prdownloads.sf.net/mingw/binutils-2.15.91-20040904-1.tar.gz?download binutils-2.15.91-20040904-1.tar.gz]
+
And unzip these libraries into your [http://www.mingw.org MinGW] directory
  
* [http://prdownloads.sf.net/mingw/mingw32-make-3.80.0-3.exe?download mingw32-make-3.80.0-3.exe]
+
==Step 3: Getting the source code for ODAMEX==
  
* [http://prdownloads.sf.net/mingw/gdb-5.2.1-1.exe?download gdb-5.2.1-1.exe]
+
This can be obtained through the [http://www.odamex.net website] or from the [[SVN]] repository
<BR>
+
using  [http://tortoisesvn.tigris.org/ tortoisesvn].
<b><u>NOTE:</u></b> Use a program like 7-zip to extract tar.gz files.
+
  
=Unpack Files=
+
==Step 4: Compiling the ODAMEX source code==
- 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>
+
<B>;drive:\mingwdir\bin</B><BR>
+
<BR>
+
drive:\ being the drive you installed mingw to (eg c:\)<BR>
+
mingwdir is self-explanatory (eg mingw\)<BR>
+
<BR>
+
<b><u>NOTE:</u></b> Include the semi-colon at the start, or else it won't work.
+
  
=Download CodeBlocks=
+
After you've extracted the source code to a directory, open the workspace file (currently named odamex.workspace)
 +
and go to the <b>Build menu</b> and click <b>Rebuild workspace</b>
  
- Download [http://prdownloads.sourceforge.net/codeblocks/codeblocks-1.0rc2.exe?download this Code::Blocks package] and install it, select mingw/gcc as your default compiler, close the IDE.
+
==Conclusion==
  
=Download SDL Packages=
+
Once its all built (and no errors have occurred), you should find some binary files located in the <b>bin</b> directory
 
+
and these are ready to use.
- Download the following SDL packages and untar/zip them to your MinGW dir.
+
 
+
* [http://www.libsdl.org/release/SDL-devel-1.2.9-mingw32.tar.gz SDL-devel-1.2.9-mingw32.tar.gz]
+
 
+
* [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 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.
+
 
+
=Opening and Compiling the Odamex Workspace=
+
 
+
- Open the <b>Odamex.workspace</b> file, wait until all projects are loaded, right click on the project you want to compile and click <B>Activate</b>, then go into the <b>Build</b> menu and click <b>Build</b>.
+
 
+
=Result=
+
 
+
- If all steps were followed correctly, Code::Blocks should output a binary into the /Bin dir of your odamex svn folder.
+

Revision as of 08:04, 19 September 2006

Overview:


The ODAMEX Source package comes with a variety of project and workspace files.

This tutorial will show you how to build ODAMEX using the Code::Blocks IDE.

Step 1: Getting Code::Blocks

You can download Code::Blocks from its website here: Code::Blocks.

  • Note: Be sure to get the latest nightly build, as this is the one that works with the current project files.

Step 2: Required Libraries

For ODAMEX to successfully compile, you must obtain some libraries for it, which are:

And unzip these libraries into your MinGW directory

Step 3: Getting the source code for ODAMEX

This can be obtained through the website or from the SVN repository using tortoisesvn.

Step 4: Compiling the ODAMEX source code

After you've extracted the source code to a directory, open the workspace file (currently named odamex.workspace) and go to the Build menu and click Rebuild workspace

Conclusion

Once its all built (and no errors have occurred), you should find some binary files located in the bin directory and these are ready to use.