Windows Development System

Everything here is outdated. You should better follow the instructions at Windows Development. Yes, confusing page names. Sorry.

You'll find step by step instructions here how you can turn your boring Windows box into a full featured Armagetron Advanced Hacking, err, Development system without spending a dime.

The information here was originally collected by Z-Man on his last Windows reinstallation.

The Sources

You need a copy of armagetronad-<VERSION>.src.zip and armagetronad-winlibs-<VERSION>.zip. If you want to build the latest development code, ignore this and use subversion to checkout a copy. Check the page on Working_with_SVN for details. The versions don't have to match, take a winlibs with the largest version that is not later than the armagetronad version. Extract them both into the same folder. Inside the armagetronad-<VERSION>, you'll find the project files armagetronad.workspace (for Code::Blocks) and armagetronad.dsw (for Visual Studio). Open it with the IDE of your choice. Visual Studio 2005 will ask whether it should transform the project to its own format, answer with "yes to all".

  1. Before you build Armagetronad call armagetronad\win32\update_version.bat from the armagetronad\win32\ subfolder. This step generates the correct version. (Only required for CVS/SVN builds)
  2. Build Armagetronad - select a target and build
  3. Now you need to update the build target directories. Code::Blocks (and other IDEs) put the compiled code into armagetronad\build\{target} and winlibs projects use winlibs\build\{target}. Call armagetronad\win32\makedist.bat to copy all resources and DLL files to armagetronad\build\{target} and get a working version.

You need to have Python installed if you want to build from CVS/SVN source. If makedist.bat tells you python is missing then edit armagetronad\win32\python.bat to point to your python binary. Project files for IDEs are inside armagetronad/win32 and winlibs/win32. Code::Blocks project files are inside the "code_blocks" subfolder. Currently no developer maintains Visual Studio project files. Oh, but wait, you haven't got any IDE installed yet.

Notes

  • Latest: ArmagetronAd source zip contains project files in armagetronad\win32(\code_blocks). Winlibs source zip contains project files in winlibs\win32(\code_blocks).
  • 0.3.0_alpha4872 - 0.3.0_alpha4941: winlib's Code::Blocks project files are inside the Armagetronad source zip (folder armagetronad/win32).
  • 0.2.8.x_alphaYYYYMMDD - 0.2.8.2: Visual Studio or Code::Blocks project files are inside the armagetronad_build_{IDE} folder of the Armagetronad source zip.
  • 0.2.8.0_beta2 - 0.2.8.2: Visual Studio project and Code::Blocks project files are inside the armagetronad folder of the ArmagetronAd source zip.
  • 0.2.7.0 - 0.2.7.x: Visual Studio project files are inside the armagetronad\VisualC folder of the ArmagetronAd source zip.
  • 0.2.5.x - 0.2.6.2: Visual Studio project files are inside the armagetron\VisualC folder of the Armagetron source zip.
  • See Used Libraries for a list of all libraries used by Armagetron Advanced (useful if you need to update a library)

IDEs (You need only one)

Visual Studio 6.0

Not supported by us for much longer and not available for free. Avoid if you can.

Code::Blocks

This is by far the easiest way to get Armagetronad built. And it's the official way. Free Tools for Free Software, yay!

Available for download here. joda.bot currently uses Code::Blocks CB_20060826_rev2910_win32.7z. You also need a python binary. Either install pyhton for windows, you can download it here, or use cygwin's python. Don't add the CVS/SVN support in third party plugins, there is a warning on the Download page saying it's broken; that information is correct. CVS/SVN support will be restored as soon as possible or once 1.0 is released.

Install Instructions for Code::Blocks Nightly Builds

(MinGW seems to have major problems on Windows Vista)

Note: you don't need any of the Microsoft SDKs or compilers below if you have Code::Blocks. The headings are just formatted misleadingly in some web browsers.

Microsoft's Free Stuff

A quirk of this setup: We haven't found a way yet to redistribute the binaries produced with this. Two support libraries are required, and they need to be installed differently on Windows 2000 and Windows XP.

Also, you'll need at least Windows 2000 to run these, and since Code::Blocks is our primary IDE in Windows, the project files for VisualC have a higher chance of being out of date and broken.

Platform SDK

Search for it at Microsoft (the links don't look permanent to me). Chose the Microsoft Windows Server 2003 Platform SDK or anything that looks more recent. Get it, install, and remember the path you installed it to for later, you'll have to make it known to your IDE. You can choose "custom installation" and throw out a lot of junk we don't need: We only need the Configuration Options and Core SDK, and you can throw out the platforms that don't apply to you from Core.

DirectX SDK

The current DirectX SDK is very big (400+ MB). Don't worry the DirectX headers are included in the winlibs sources provided by ArmagetronAd. If you still need DirectX Headers compatible with SDL you can download them here. Most DirectX headers are from DirectX 5.0 and thus rather old. The SDL team patched them to work well with SDL and still support Windows NT which only has DirectX 5.0. TODO: Write down exact DirectX Version required to run the game. TODO: Check Windows NT with DirectX 5.0 is supported.

Visual C++ 2005 Express Edition

Currently available as a free donwload from Microsoft. The regular installation requires a Passport account, but the manual installation instructions also give ISO downloads. The SQL stuff isn't needed for our purposes, the installation is fat enough without it.

You'll need to set the paths to the SDK now. Go to Tools/Options/Projects and Solutions/VC++ Directories. Add <Memorized SDK Path>/Include and <Memorized SDK Path>/Include/mfc to "Include Files" and <Memorized Path>/Lib to "Library Files". Insert both at the bottom. Repeat for the DirectX SDK path.

Now, open the Armagetronad.dsw file from the zip source distribution or the armagetronad_build_visualc CVS module. Be sure to also have the _winlibs module. You'll have to click away two messages; first, you have to choose to convert all projects to the VC8 format, then you have to choose to disable version control.

If you try to build now, linking will probably fail with some missing symbols. The conversion threw away some libraries. You can easily add them for all projects: Select View/Property Manager from the menu, choose any project there and unfold it. You'll see the "Upgrade from VC 6.0" card, double click on it to see all settings that are applied to imported projects. Open Linker/Input and add "shell32.lib user32.lib gdi32.dll advapi32.dll" to "Additional Dependencies". Not every project needs those, but hopefully, Windows doesn't link to libraries that aren't actually used.

That should be it, you can now proceed to build.

More Tools

The following tools are not required for a basic system, you can compile and run our source distribution with just one of the IDEs above. But if you want to be a full scale developer/builder/distributer, you'll also need them.

SVN

SVN (Subversion) is the way we currently manage our source code. The easiest way to get SVN runing to use setup is TortoiseSVN. The included documentation has a nice section in "Articles, Tips and Tricks" titled "Using Tortoise SVN with SourceForge" that tells you how to generate a key pair and run a key agent from Putty so you don't have to type your password every time. TODO: Check TortoiseSVN

joda.bot uses Eclipse IDE and Subclipse which is the official SVN plugin for Eclipse. Eclipse is Java based so it's perhas not the fastest IDE :), but I've never seen a better interface for comparing different and merging source code. --Joda 03:26, 23 June 2006 (CEST)

CVS

CVS is the way we managed our source code in the past. The easiest way to get CVS runing to use setup is TortoiseCVS. The included documentation has a nice section in "Articles, Tips and Tricks" titled "Using Tortoise CVS with SourceForge" that tells you how to generate a key pair and run a key agent from Putty so you don't have to type your password every time.

Python

The script that sorts our included resources into the right place (and is only needed if you want to build from CVS) is written in Python which is available at http://www.python.org. Z-Man has got version 2.4.3. Installation is completely automatic.

[[User:joda|joda.bot] has python version 2.4.3, but installed along with cygwin.

Darcs

Currently under discussion as a future source code management tool, so not required at all for anyone yet. Get it from http://darcs.net. Z-man chose the cygwin-less installation. It's just a plain zip archive without installer. The included README explains better how to install it than I'd be able to. A problem so far: Darcs uses Unix line feed only line endings and doesn't translate to CRLF like CVS. We'll see whether this matters.

There is also an Explorer integration based on TortoiseCVS available. Surprisingly, it's called TortoiseDarcs. It serves as a full TortoiseCVS replacement, too, but for it to work, you need to tweak its settings a bit: In the Tools tab, choose kdiff3 (included) as diff and merge application and for connecting to Unix servers, choose plain cvs as "SSH cvs server".

For passwordless login, the same instructions as for CVS apply, both Darcs and CVS use an underlying ssh connection.

NSIS Installer

Needed to build installer .exes from your builds. Get it at http://nsis.sourceforge.net/Main_Page. Z-Man uses version 2.05. Installation is automatic.