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. VS 2010 and earlier are unsupported (though you can use VS 2010 if you either disable USE_WIIUSE, or set the (advanced) option BUILD_WIIUSE).
Instructions for Compiling
- Install VS 2012 or later. The free express versions work fine.
- Download and install a source package - either a released package or from our git/svn repositories.
- Download the latest dependency package depdendencies_for_0.8.2.zip from here. Unzip it in the root directory, so that the dependencies directory is next to the src and data directory (if you are updating from a previous dependency package, you can delete the .dll files in the root directory, they are not needed anymore).
- Download the latest assets. You can use svn.
svn checkout https://svn.code.sf.net/p/supertuxkart/code/stk-assets stk-assetsThese two repositories should be downloaded in the same folder, so that folders "stk-code" and "stk-assets" are next to each other.
- 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 2012 = version 11; VS 2013 = version 12). 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
- Right click on the supertuxkart project in the solution explorer, and select "Set as StartUp Project".
- Select Build->Build Solution (or press F7) to compile.
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.