A pre-requisites before continuing:

If you like to do things the hard way, i.e. unixlike, then you can follow the Cygwin path. If, like me, you like an IDE and a simple setup, then you can go the Dev-C++ route.

Getting ToME v2.3.3 to work

Just follow the v3 instructions, but ignoring the instructions about SDL.

Getting ToME v3 to work

First choose what development environment you want to work with.

DevC++

I will use Dev-C++ as the build environment. I am currently using the "Dev-C++ 5.0 beta 9.2 (4.9.9.2) (9.0 MB) with Mingw/GCC 3.4.2" download to do my building and testing.

Once you have downloaded and installed Dev-C++, I installed it into C:\Dev-Cpp

ToME v3 now needs SDL to compile so you need to add a few packages and this is done by:

You also need to copy the following files from the C:\Dev-Cpp\bin directory to your C:\Windows\system32 directory:

and the the following files from the C:\Dev-Cpp\dll directory:

Ok that should be the IDE set up, now we need a project file and a makefile. The project file will define what files you are looking at and how the project compiles and the makefile tells the system how to compile each file and generate the binary image.

For a v3 build you need to copy the tome.dev file out of the src/windows directory into the src directory and for a v2 build you need to get the dev file from here and the makefile from here.

If you have NOT installed into C:\Dev-Cpp then you must edit src/makefile.devcpp and change DEVCPP_PATH to point to where it has been installed into.

If you have problems with line-endings in the makefile, then this is related to how CVS retreives the files from the server and you need to check out the text files with Unix LF (0xa). This can be done by passing the -kb option to cvs and then you wont have this problem.

To open the project you need to go to "File" menu and then "Open Project or File..." and select the tome.dev file in the src directory.

Once the project is open you can compile the code by going to the "Execute" menu and then "Compile". This should then generate a ToME3.exe (or ToME.exe if done for v2) in the main tome root directory.

To run this new version all you have to do is double click the executable file in the root directory, or create a batch file in that directory, examples can be found elsewhere.

CygWin

I will use cygwin as the build environment, so I expect you to have it installed and configured properly with a decent development/build environment i.e. gcc, make etc installed.

ToME v3 relies on a couple of SDL packages to build and run. As the default packages do not have SDL available, you will need to add ftp://sunsite.dk/projects/cygwinports to the available download site list. You will then have to download and install the following packages:

You will also have to install the MS Windows runtime libraries of the above and they can be found at the following locations:

I would suggest unzipping them into the windows system32 directory.

To build the binary you go into the src directory and do the standard "make -f makefile.cyg" followed by the usual "make install -f makefile.cyg" and you should now have a ToME3.exe (or ToME.exe if done for v2) one directory up.

Reducing the image size

If you are going to distribute your results, then you will want to reduce the size of the exe. To do this I use Ultimate Packer for eXecutables.

Chatter

DarkGod: SDL_mixer should be compiled with libvorbis for the ogg files too

TerryPatcher: I managed to compile the latest CVS using this method, but I can't see any difference related to SDL. Is the bat-file above lacking an argument, or some configuration, or something?

LaLuneEtMoi: These instructions worked brilliantly for me under XP, but lately I got a new Vista machine and I am killing myself trying to get DEV-C++ to compile TOME 2.3.4. Getting help out of Bloodshed is a fool's errand, so I was wondering if anyone here is successfully compiling this game under Vista, and if so, how?

Developers Corner/MS Windows Build Instructions (last edited 2008-05-29 07:09:27 by IainMac)