warzone2100/COMPILE.html

171 lines
6.8 KiB
HTML
Raw Normal View History

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Warzone Compilation Guide</title>
<meta name="author" content="Christian Vest Hansen">
<meta name="Reply-to" content="karmazilla@gmail.com">
<meta name="Copyright" content="GNU Documentation License">
<meta name="date" content="2006-01-23T16:51:37+0100">
<meta http-equiv="Content-Encoding" content="UTF-8">
<style>
* {
font-family: arial, helvetica, sans-serif;
}
code {
font-family: monospace;
}
h2 {
color: #676767;
}
hr {
height: 3px;
background-color: #869cff;
border:none;
}
p {
margin-left: 1em;
}
li {
margin-left: 2em;
}
body {
margin: 1em;
}
</style>
</head>
<body>
<h1>Warzone Compilation Guide.</h1>
<hr>
<p><b>The compilation method depends on your operating system.</b></p>
<p>This guide will tell you how to compile warzone on its two main supported platforms:
<a href="#linux">Linux</a> and <a href="#windows">windows</a>.</p>
<h2>Linux Compilation:<a name="linux"></a></h2>
<p>
With the GNU autotools, compilation is straight forward. 'cd' a shell to warzones source root directory; the one containing the 'autogen.sh' file, and run the
following commands:
</p>
<ol>
<li><code>./autogen.sh</code></li>
<li><code>./configure</code></li>
<li><code>make</code></li>
<li><code>make install</code></li>
</ol>
<p>
Note that the forth command must be run as a privileged user in order to succeed.
</p>
<p>
<b>If the above commands fail,</b> you're probably not having all the required software needed to satisfy
the dependencies that warzone has on other libraries or tools. In that case, the scripts will tell
you what package you're missing.
</p>
<p>
Warzone has compile-time dependencies on the following software: autotools, gcc, make, SDL-dev,
SDL_net-dev, oggvorbis-dev, mad-dev, zlib-dev, physicsfs-dev, OpenAL-dev, libpng-dev, libjpeg-dev.
</p>
<p>
Depending on your flavor of Linux, the package names may be different.
</p>
<p>
If you are certain that you got all the packages required, but still can't compile, then try compiling
with this command instead:<br>
<code>make -f Makefile.raw</code><br>
If the compilation succeeds, then you have a problem with your autotools - please check that your
'autoheader', 'autoconf' and 'automake' symlinks are pointing to the correct versions of these
programs.<br>
If the compilation still fails, write to our mailing list at:
<a href="mailto:warzone-dev@gna.org">warzone-dev@gna.org</a>
or contact us on IRC at irc.freenode.net#warzone
</p>
<p>
</p>
<h2>Windows Compilation:<a name="windows"></a></h2>
<p>
This guide will assume that you already have the source code. When following this guide; first read
carefully what you are about to do, and then do.
</p>
<p>
<b>Note:</b> the Windows guide is based on Rodzilla's <a href="http://rodzilla.free.fr/wz2100/warzone_install/">
Installing Warzone Under Windows</a> guide.
</p>
<p>
Before you can compile warzone on Windows, you need to set up your build environment. And to do
that, you need to download the following software packages:
</p>
<ol>
<li><b>Msys:</b> <a href="http://prdownloads.sourceforge.net/mingw/MSYS-1.0.10.exe?download">http://prdownloads.sourceforge.net/mingw/MSYS-1.0.10.exe?download</a></li>
<li><b>MinGW:</b> <a href="http://prdownloads.sourceforge.net/mingw/MinGW-4.1.0.exe?download">http://prdownloads.sourceforge.net/mingw/MinGW-4.1.0.exe?download</a></li>
<li><b>MsysDTK:</b> <a href="http://prdownloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?download">http://prdownloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?download</a></li>
<li><b>Bison:</b> <a href="http://prdownloads.sourceforge.net/gnuwin32/bison-2.1.exe?download">http://prdownloads.sourceforge.net/gnuwin32/bison-2.1.exe?download</a></li>
<li><b>Flex:</b> <a href="http://prdownloads.sourceforge.net/gnuwin32/flex-2.5.4a-1.exe?download">http://prdownloads.sourceforge.net/gnuwin32/flex-2.5.4a-1.exe?download</a></li>
<li><b>Development Package:</b> <a href="http://rodzilla.free.fr/wz2100/warzone_install/dev_package.exe">http://rodzilla.free.fr/wz2100/warzone_install/dev_package.exe</a></li>
</ol>
<p>
Next, we have to install the packages. They have to be installed in the order they're listed above.
So start by running the Msys installer and let the wizard guide you through the installation. When
finished with the wizard, a command window will open to "normalize" the MSYS install <b>- do not
normalize your Msys install yet!</b> Just leave the window as we will deal with it later.
</p>
<p>
Remember the directory where you installed Msys, as it'll be useful later. A good choice for an
installation folder would be c:\msys
</p>
<p>
Next, run the MinGW setup program and choose c:\msys\mingw as your installation folder, or similar
folder depending on where you installed msys.<br>
Install the current versions of 'CORE', 'Compilers' and 'Utilities' (default options).<br>
Then select these items:
</p>
<ul>
<li>current/runtime</li>
<li>current/w32api</li>
<li>current/binutils</li>
<li>current/gcc-core</li>
<li>current/gcc-c++</li>
<li>current/mingw32-make</li>
</ul>
<p>
And the continue through the rest of the MinGW installation process.
</p>
<p>
Now it's time to do this normalisation stuff. You will be prompted for the directory where you
installed MinGW. It should be located directly inside the Msys directory.<br>
Be careful, the path notation is not exactly what you're used to with Windows.
</p>
<p>
Next, install the MsysDTK. After that, install Flex and Bison to your msys\mingw folder, and finally
install the developer package.
</p>
<p>
<b>Now, the build environment is setup, so let's put the source code into it!</b>
</p>
<p>
Locate your msys\home\[user name] folder - this is your msys home directory. Create a new folder in
it called 'warzone' and copy/move all your warzone source files to this folder (everything you get
when you check out the 'trunk' directory from the warzone revival projects subversion repository).
</p>
<p>
Alternatively, you can also make a new check of the latest source out into your newly created
'warzone' folder like so:<br>
Get and install <a href="tortoisesvn.tigris.org/download/">TortoiseSVN</a> (you don't really need
to reboot after the installation), and right-click on your 'warzone' folder. Then choose the
'SVN Checkout' option. In the 'URL of repository' field, you type:<br>
<code>http://svn.gna.org/warzone/trunk</code><br>
And press OK.<br>
Now, whenever you want the latest source code, you just right click on the 'warzone' folder and
choose 'Update'.
</p>
<p>
<b>Now we have the build environment and we have the source code - let's get it compiled!</b>
</p>
<p>
Launch Msys and navigate to the warzone directory (<code>cd warzone</code>), and compile warzone
with this command:<br>
<code>make -f Makefile.raw</code>
</p>
<p>
<b>And you're done! :)</b>
</p>
</body>
</html>