This is Tikiwiki v2.0 -Arcturus- © 2002–2008 by the Tiki community Sun 05 of Sept., 2010 19:50 CEST

Menu [toggle]

BuildWin32

Print

How to build on MS Windows


This page describes the procedure to build the game and its associated tools on MS Windows.
There are two ways to do it
  • Use mingw32 and gcc. That's possible; this is how it was done first. This is not the current way of doing it though. In order for this to work, the automake build system must probably be hacked a bit.
  • Use MS Visual Studio 2005 Express Edition. It should also work with the Standard, Enterprise and other higher editions.

Prerequisites

You will need the following software before you can compile Top10:
  • SDL version 1.2.x
  • SDL_image compatible with the SDL version above
  • lib3ds 1.2.x
  • Cal3d 0.10.0 (possibly works with higher versions. I think I use 0.11.0 on Linux)
  • PLIB 1.8.3 or more recent
  • tinyxml 2.4.3
  • CGAL 3.2.1, which also requires BOOST
  • QT 4.1.4 patched to work with MSVC++ 8
  • OpenAL 1.1 SDK
  • libvorbis 1.2
  • libogg 1.1.3

The six first items are available here.
The last two items (libvorbis and libogg) are also available in binary form

Check that there is a directory named VisualC in SDL_image. If not, there should be a zip file VisualC.zip containing it.

CGAL can be downloaded from www.cgal.org, but if you don't like the "register before download" policy, you can also get it from http://www.top10-racing.org/bigfiles/

QT 4.1.4 and the patch can be retrieved from their authors.

Finally the OpenAL SDK is also available from http://www.top10-racing.org/bigfiles/

Top10 itself


Get the source for Top10 and the MSVC++ project files from there or from the CVS repository if you want the latest version, or any other version.

Note that the source is one CVS module (top10) and the project files are in another module (vcproj).

Getting ready


Create a directory, e.g. top10-dev. Personally, I use subst to make available this directory as drive X. I don't think the project files contain absolute paths, but if they do, you will have to do the same.

Open a command prompt (Start -> Execute -> type "cmd" -> Enter)

Type "subst X: <path to top10-dev (including top10-dev>

Copy top10 (the source of the game) and vcprojs (the project files) into top10-dev.

Extract/copy all prerequisite libraries into top10-dev

Rename all directory names of all prerequisite libraries to remove the version numbers.

Patch QT as explained in the patch.

Build QT

mount QT's directory as Q: using subst (follow the same procedure as above)

Add an environment variable named QTDIR with value Q:

Dirty hack for OpenAL SDK


On GNU/Linux systems OpenAL headers are typically found in "/usr/include/al". The Windows OpenAL SDK has them under "C:\Program Files\OpenAL 1.1 SDK\include" frown

For me, that's easily solved by renaming the "include" dir on Windows to "al". You may want to copy it instead, you do as you like, but Top10 expects OpenAL header to be under a directory named "al".

Additionally, you will have to set the OPENAL environment variable to the place where the OpenAL SDK is installed ("C:\Program Files\OpenAL 1.1 SDK")

Getting it done


From that point, open the top10 solution file (vcprojs/top10.sln) with Visual Studio.

Go into Options -> Project and Solutions -> VC++ directories and add Q:\bin ($(QTDIR)\bin should work too, I guess) to the list of "Executable files" for platform "Win32"

Set an environment variable named VORBIS_DIR to X:\ogg_sdk.

You are now ready to build!

Additional notes


There are three build modes: release, debug and mixed. Mixed is identical to release, except that some individual files have optimization disabled and debugging enabled.

Compiler and linking flags must be specified using the Property Manager, not the Solution Explorer. Of course, you do as you wish, but if you want to submit patches, please try to follow that rule. Maintaining build options using the Solution Explorer can quickly become unmanageable.

MS Visual Studio 2005 SP1


This update includes a bug in the compiler which prevents building the track editor. To fix this problem, download and install the hot fix "KB930198" from microsoft at https://connect.microsoft.com/content/content.aspx?ContentID=3705&wa=wsignin1.0&siteid=210



Created by: jode. Last Modification: Sunday 06 of July, 2008 12:04:04 CEST by jode.

Online users