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

From OdaWiki
(Not complete)
Line 4: Line 4:
 
Odamex using [http://www.codeblocks.org/ Code::Blocks]
 
Odamex using [http://www.codeblocks.org/ Code::Blocks]
  
=Download=
+
=Download SVN Utility=
  
*Download [http://tortoisesvn.tigris.org/ tortoisesvn] and <b>install</b>, then <b>restart</b>.
+
- Download [http://tortoisesvn.tigris.org/ tortoisesvn] and <b>install</b>, then <b>restart</b>.
  
=MingW Files=
+
=Download MingW Files=
*Get the following <b>MinGW</b> files:
+
- Get the following <b>MinGW</b> files:
  
[url=http://prdownloads.sf.net/mingw/gcc-core-3.4.2-20040916-1.tar.gz?download/
+
* [http://prdownloads.sf.net/mingw/gcc-core-3.4.2-20040916-1.tar.gz?download gcc-core-3.4.2-20040916-1.tar.gz]
        gcc-core-3.4.2-20040916-1.tar.gz]
+
  
[li][url=http://prdownloads.sf.net/mingw/gcc-g++-3.4.2-20040916-1.tar.gz?download]
+
* [http://prdownloads.sf.net/mingw/gcc-g++-3.4.2-20040916-1.tar.gz?download gcc-g++-3.4.2-20040916-1.tar.gz]
        gcc-g++-3.4.2-20040916-1.tar.gz[/url][/li]
+
[li][url=http://prdownloads.sf.net/mingw/mingw-runtime-3.9.tar.gz?download]
+
        mingw-runtime-3.9.tar.gz[/url][/li]
+
[li][url=http://prdownloads.sf.net/mingw/w32api-3.6.tar.gz?download]
+
        w32api-3.6.tar.gz[/url][/li]
+
[li][url=http://prdownloads.sf.net/mingw/binutils-2.15.91-20040904-1.tar.gz?download]
+
        binutils-2.15.91-20040904-1.tar.gz[/url][/li]
+
[li][url=http://prdownloads.sf.net/mingw/mingw32-make-3.80.0-3.exe?download]
+
        mingw32-make-3.80.0-3.exe[/url][/li]
+
[li][url=http://prdownloads.sf.net/mingw/gdb-5.2.1-1.exe?download]
+
        gdb-5.2.1-1.exe[/url][/li]
+
[/list]
+
  
==Community==
+
* [http://prdownloads.sf.net/mingw/mingw-runtime-3.9.tar.gz?download mingw-runtime-3.9.tar.gz]
* [[Policy]]
+
  
 +
* [http://prdownloads.sf.net/mingw/w32api-3.6.tar.gz?download w32api-3.6.tar.gz]
  
 +
* [http://prdownloads.sf.net/mingw/binutils-2.15.91-20040904-1.tar.gz?download binutils-2.15.91-20040904-1.tar.gz]
  
== External links ==
+
* [http://prdownloads.sf.net/mingw/mingw32-make-3.80.0-3.exe?download mingw32-make-3.80.0-3.exe]
  
* [http://bugs.odamex.net/ Odamex Bug Tracker]
+
* [http://prdownloads.sf.net/mingw/gdb-5.2.1-1.exe?download gdb-5.2.1-1.exe]
 +
<BR>
 +
<b><u>NOTE:</u></b> Use a program like 7-zip to extract tar.gz files.
 +
 
 +
=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>
 +
<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=
 +
 
 +
- 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.
 +
 
 +
=Download SDL Packages=
 +
 
 +
- 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 21:52, 28 March 2006

Overview:


This guide contains information on how to compile Odamex using Code::Blocks

Download SVN Utility

- Download tortoisesvn and install, then restart.

Download MingW Files

- Get the following MinGW files:


NOTE: Use a program like 7-zip to extract tar.gz files.

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.

Download CodeBlocks

- Download this Code::Blocks package and install it, select mingw/gcc as your default compiler, close the IDE.

Download SDL Packages

- Download the following SDL packages and untar/zip them to your MinGW dir.

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.

Opening and Compiling the Odamex Workspace

- Open the Odamex.workspace file, wait until all projects are loaded, right click on the project you want to compile and click Activate, then go into the Build menu and click Build.

Result

- If all steps were followed correctly, Code::Blocks should output a binary into the /Bin dir of your odamex svn folder.