Difference between revisions of "Windows Development System"

From Armagetron
Line 9: Line 9:
 
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
 
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
 
your choice. Visual Studio 2005 will ask whether it should transform the project to its own format, answer
with "yes to all". Oh, but wait, you haven't got any of this installed yet.  
+
with "yes to all".
  
And before you actually build and run Armagetronad, you need to prepare the build target directories. We have a small batch script for that, it's called "makedist.bat". You need to have Python installed if you want to build from CVS source. The current version of it is included in the source zip archive and the armagetronad_build_visualc folder. We should probably move it to armagetronad_winlibs, so also look for it there if you can't find it. The version in armagetronad_codeblocks is somewhat out of date.
+
# Before you build Armagetronad call armagetronad\win32\update_version.bat from the armagetronad\win32\ subfolder. This step generates the correct version.
 +
# Build Armagetronad - select a target and build
 +
# 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 other 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. The current version of it is included in the armagetronad/win32 folder. Project files (for example Code::Blocks) are inside armagetronad/win32 and winlibs/win32. Currently no developer maintains Visual Studio project files. Oh, but wait, you haven't got any IDE installed yet.
 +
 
 +
TODO: Determine exact versions (probably source zip for 0.2.8.2 already contains Code::Blocks project files?)
 +
 
 +
== Notes ==
 +
* '''0.3.0_alphaXXXX - 0.3.0_alphaXXXX''': winlib's Code::Blocks project files are inside the Armagetronad source zip (folder armagetronad/win32).
 +
* '''0.2.7.x - 0.2.8.2''': Visual Studio or Code::Blocks project files are inside the root folder of the Armagetronad source zip.
  
 
= IDEs =
 
= IDEs =

Revision as of 10:00, 22 June 2006

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. 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.
  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 other 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. The current version of it is included in the armagetronad/win32 folder. Project files (for example Code::Blocks) are inside armagetronad/win32 and winlibs/win32. Currently no developer maintains Visual Studio project files. Oh, but wait, you haven't got any IDE installed yet.

TODO: Determine exact versions (probably source zip for 0.2.8.2 already contains Code::Blocks project files?)

Notes

  • 0.3.0_alphaXXXX - 0.3.0_alphaXXXX: winlib's Code::Blocks project files are inside the Armagetronad source zip (folder armagetronad/win32).
  • 0.2.7.x - 0.2.8.2: Visual Studio or Code::Blocks project files are inside the root folder of the Armagetronad source zip.

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. I've got 1.0rc2 with the MINGW compiler. 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.

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

You need it to compile SDL. Get it from [1]. The installer allows to select components; Headers and Libs should suffice for our purposes (Info applies to DirectX 8.1). Again, memorize the path you install to.

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.

CVS

CVS is the way we currently manage our source code. 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.

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.