Traditionally, C++ development on Windows wasn't cheap. The main compiler for the platform was Microsoft's Visual C++, and that wasn't exactly something that came for free with your new computer. Fortunately though, in 2005 Microsoft released completely free versions --�Express� versions- of their new compilers –Visual C++, Visual basic, etc. No licensing limitations, no vital features missing, just a free, fully functional copy of their Visual C++ compiler and development environment. Wonderful!
Great story, truly inspiring --I'm going to go bring peace to world now, thanks to this tale- but... I don't really care about Microsoft's partial lapse of business self. I want to compile Sylphis! Well, guess what (bet you have already, and are just waiting for me to get on with it): you need Visual C++ 2005 Express to compile Sylphis, and thanks to Microsoft, you don't have to spend a load buying their compiler to do so. Care about it now?
First step's first; you need to download VC++2005 Express and install it. Simple. Go here and follow the instructions. If you can't follow instructions in general, then stay here and don't see a councilor...
Once you have VC++ installed, you need to download and install the Platform Development Kit, which is basically what allows you to do anything “Windowsy� with VC++. Again, download here and follow the instructions here
Now that you're all packed and ready, it's time to go see the dreaded Sven. Scroll down until you come to the Windows binaries section, then download the setup file and run it.
Next is Python. (You thought Sven was scary? Huh!) As you probably know, Sylphis uses the Python scripting language to make it easy for you to write game logic code. Specifically, Sylphis uses a variation of Python called Stackless Python that allows for all sorts of magic cool things --mainly speed enhancements and the like. To get everything working as it needs to be, you'll need to download both the standard Python binary, as well as the Stackless Python source.
Python First: http://www.python.org/download/releases/2.4.4/ Although version 2.4.4 isn't the latest version of Python, it is the version that Sylphis needs. (Don't worry, you're not missing out on any bug fixes or anything by not using the newest version of Python; older versions are still maintained.) To install Python, just run the installer. Make sure you take note of where Python is installed (usually C:\Python24\) because you'll need that later on.
Once you have Python installed, it's time to move on to Stackless Python. Unfortunately, you're not going to get a nice, simple installer this time. Instead, you have to download the Stackless source and extract it somewhere. You don't have to compile it, just extract it. Anyway, grab the source from stackless.com, making sure get the package matching you version of Python (2.4.4, if you've been following along). After that, simply use a compression program that supports .tar.gz to extract the source to a directory of your choosing (c:\stackless\ make a nice one.) If you don't have a compression program that'll work, give 7zip a try.
So, you've managed to bargain a free copy of VC++ from the mighty Microsoft, smuggled a copy of the Platform SDK with you on the way out the door, met with the wise though often intimidating SVN, slain the deadly Python, and... how does Stackless fit in here? Uhh, you... ate a thin cake. Right. Well, regardless of whether you've left enough cake for the rest of us, congratulations, you've made it past the first set of obstacles in compiling Sylphis. Go reward yourself with cake.
Done with cake, no more? Alright, then let's get going again. Now it's time to configure VC++, telling it where the things Sylphis will need to compile are. If you've not done so already, start VC++. Under the “Tools" menu, choose “Options.� Over on the left you'll see a a tree of option categories; choose “Projects – What, you can't see it?
Are you're eyes open?
Ahh, there you go. Keep them open this time.
Choose “Projects and Solutions,� then choose “VC++ Directories� under that. From the “Show directories for:� drop-down box in the upper-right corner of the dialog, choose “Include Files.� Click the icon that looks like a folder to add a new include directory. You'll want to add several:
Got that? Good. Now pop back up to the “Show directories for:� and choose “Library files.� The procedure is quite similar to adding the includes, though this time we're adding the, you guessed it, Library files:
One note I should add is that the order of the directories does matter. In the list, you want, for example, C:\stackless\Lib to be higher than C:\Python24\Lib. If you don't do this, there's a strong possibility that compiling will fail. So make sure you're lists look like:

And

Perfect.
Ready for the exciting part? Now you're going to get the actual source of Sylphis from SVN. Go again to Start->Run “cmd.� Change directories to where you'd like to download the Syphis code, for example “cd C:\� Take note, we'll have SVN create a “sylphis3d� directory, so the source will automatically end up in “C:\sylphis3d\.�
Next, type “svn co https://sylphis3d.svn.sourceforge.net/svnroot/sylphis3d/ sylphis3d� and hit enter. And away it'll chug! It's not a light download (75+ megs), so depending on your Internet connection, it may take a while. Go eat more cake.
Once the source is done downloading, open up VC++. File->Open->Project/Solution and navigate to wherever you downloaded Sylphis' source. Next, wander further into the directories, into sylphis\trunk\runtime\src\sylphis\, then open the sylphis.sln file.
After all this setup, you've got to be expecting compiling Sylphis to be a nightmare, no? Well, from the “Build� menu select “Build Solution,� wait a while, then let me know how nightmarish that was. What? Compiled? Yup!
If all went well, you should have a sylphis.exe in the sylphis3d\sylphis\trunk\runtime\ directory, all ready and happy to run. If, however, something went wrong, go back and check what you've done to each step of this guide (including the cake –mustn't forget the cake). If you've followed everything exactly and are still getting some error, check the forums for the problem, and if that still doesn't help, file a bug report.
Congratulations once again; you've compiled Sylphis on Windows! Now go get creating cool stuff...
Comments
Nightmarish compile.
I think there's a typo in the svn address. I couldn't find the server at "sourceforget.net". I removed the extra 't' and it seems to work. I downloaded the latest version. (as of 7-03/07 revision 20)
I tried to compile, but got about 400 warnings and one error. I added the Include directory "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\mfc" and changed build mode to Release. That fixed the error and reduced the warnings to 121.
I tried to run the resulting executable, but got a blank window with "Sylphis 0.95 (Win32" with the current time and date ) in the bar, and an immediate unhandled exception. Debugging revealed it was a "Failed to import python importer" exception. This problem seems to have been resolved in the forums before you wrote this tutorial, but nothing I tried there seemed to help.
I wouldn't worry greatly
I wouldn't worry greatly about the warnings. Usually just messages about depreciated functions, unused variables, and the like. Kind of a "You're shoes are on the wrong feet" vs. "You have no feet" thing. (Hmmm.) All the fully working binaries I've compiled spit out those whole bunch of warnings, so definitely not the cause of other problems.
The MFC error you had initially leads me to think that the Win32 Platform SDK wasn't st up properly. Double check what you did with these instructions: http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/ Each step there is vital.
Indeed, a typo in the SVN URL. Thanks! Fixed now. Actually, something happened with the character encoding a few weeks ago and threw a mess of nasty gibberish characters into the tutorials, and this reminded me that I need to go fix them.
Please do keep us all updated on the your progress. The instructions for compiling Sylphis must be absolutely perfect and clear, and the problems you're having can help them become so.
-=Derek
A few difficulties as well
The compile instructions, while entertaining, were a little verbose and made following the instructions more difficult.I think programmers generally like lists of stuff :)
I ran into problems with the instructions as well in that I grabbed the stackless Windows binaries instead of the source code. When I saw that "stackless.h" was missing during the compile, I realized the error of my ways and grabbed it from the SVN repository:
svn checkout href=http://svn.python.org/projects/stackless/tags/python-2.44/
Also, the SVN client for windows is a pain (I've been a hard-core UNIX guy for 15 years, on Windows I just click the big shiny buttons until World of Warcraft runs), so I found an App called Tortoise-SVN. It provides a nice Explorer hook so that you can right click on an empty directory, select "Chevkout SVN", pop a URL in and voila, you've got source. Beautiful! You can grab that little app from here: http://tortoisesvn.tigris.org/
After adding in another include (the /mfc/ directory) mentioned by the commenter above), my build is now failing at the linking stage. I'll cross-post this to the forums.