How to build the Windows version
This page describes the build and packaging process on windows. You need Visual Studio 11 or higher, the free express version works fine.
Instructions for Compiling
- Download and install a source package - either a released package or from svn.
- Download the dependency package from here. Unzip it in the root directory, so that the .dll files will be in the root directory, and the dependencies directory is next to the src and data directory.
- Download cmake and install it. Then start cmake-gui and select the STK root directory as 'Where is the source code', and a new directory in the root directory (next to src, data etc) as build directory (for now I assume that this directory is called bld).
- Click on configure. You will be asked to create the directory (yes), then for your VS version. Make sure to select the right version (be aware of the easy to confuse version numbers: VS 2008 = version 9; VS 2010 = version 10; VS 2012 = version 11). Click on configure, then generate. This will create the directory 'bld', and a VS solution in that directory.
- In Visual Studio open the project file generated in the 'bld' folder
- Select Build->Build Solution (or press F7) to compile.
To run inside VS some additional settings are necessary:
- Right-click on ALL_BUILD in the solution tab, and select properties.
- Select 'Configuration Properties', then Debugging.
- As 'Command', set: $(ProjectDir)/bin/Debug/supertuxkart.exe
- As 'Working Directory', set: $(ProjectDir)/..
- In 'Environment', add: PATH=$(ProjectDir)/..;$(PATH)
Then you should be able to run STK from Visual Studio.
You can also start STK from the command line: change into STK's root directory, and do: ./bld/Debug/supertuxkart.exe
Instructions for Creating the Installer
Note that this step is only necessary if you want to create an installer package. To just run or debug STK, only the above Instructions for Compiling need to be followed.
- Download and install NSIS.
- Create a copy (best outside of STK) of src/windows_installer (I'll assume it will have the same name).
- Create the directory windows_installer/supertuxkart, and copy the executable, all DLL and the data subdirectory into it (not all files from data are necessary for the windows install. Make sure to exclude all .svn files. It's usually best to use linux to install a package, and copy the files from that installation, since it will also exclude other minor files like linux desktop icons etc).
- Copy the icon file (.../src/windows_installer/icon.ico) into the supertuxkart directory.
- Start NSIS, select windows_installer/supertuxkart.nsi, and create the installer.