Difference between revisions of "Windows Development System"

From Armagetron
m
Line 10: Line 10:
 
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". Oh, but wait, you haven't got any of this installed yet.  
 +
 +
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.
  
 
= IDEs =
 
= IDEs =
Line 20: Line 22:
  
 
== Code::Blocks ==
 
== 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 [http://www.codeblocks.org/ 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.
 
Available for download [http://www.codeblocks.org/ 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.
  
Z-Man wonders: I remember from my last installation that I had to set some paths to the Microsoft Platform SDK to get the client working. This time, I didn't need to. Maybe the SDK setup made it so that it's not required, maybe Code::Blocks doesn't require the SDK at all (it comes with its own headers that appear to be working fine). Moving the SDK to some other directory had no effect on Code::Blocks, so I assume it's not required.
+
Z-Man wonders: I remember from my last installation that I had to set some paths to the Microsoft Platform SDK to get the client working. This time, I didn't need to. Maybe the SDK setup made it so that it's not required, maybe Code::Blocks doesn't require the SDK at all (it comes with its own headers that appear to be working fine). Moving the SDK to some other directory had no effect on Code::Blocks, so I assume you don't need it at all.
  
 
== Microsoft's Free Stuff ==
 
== Microsoft's Free Stuff ==
Line 46: Line 50:
 
You'll need to set the paths to the SDK now. Go to Tools/Options/Projects and Solutions/VC++ Directories.
 
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 to "Include Files" and <Memorized Path>/Lib to "Library Files".
 
Add <Memorized SDK Path>/Include to "Include Files" and <Memorized Path>/Lib to "Library Files".
Insert both at the bottom.
+
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" to "Additional Dependencies".
  
Problems: you also need the DirectX SDK, and linking fails with some missing symbols. To be continued :) Use Code::Blocks, really.
+
That should be it, you can now proceed to build.
  
 
= More Tools =
 
= More Tools =

Revision as of 14:40, 12 April 2006

Since Z-Man is in the process of reinstalling his Windows box, he's taking the opportunity to write step-by-step installation instructions to turn a regular, boring Windows installation into a rocking Armagetron Advanced Development System. Obviously, this is still pretty much under construction.

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". Oh, but wait, you haven't got any of this installed yet.

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.

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.

Z-Man wonders: I remember from my last installation that I had to set some paths to the Microsoft Platform SDK to get the client working. This time, I didn't need to. Maybe the SDK setup made it so that it's not required, maybe Code::Blocks doesn't require the SDK at all (it comes with its own headers that appear to be working fine). Moving the SDK to some other directory had no effect on Code::Blocks, so I assume you don't need it at all.

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.

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 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" to "Additional Dependencies".

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.

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.