This wiki has been moved to into the mediawiki branch.

Building on Windows

From SuperTux
Revision as of 16:19, 20 December 2007 by Sommer (Talk | contribs)

Jump to: navigation, search


If you want to build the current development version on Windows, these step-by-step instructions are for you.


Before you proceed, however, carefully read the following warnings:

  • You will be building a highly unstable development version of SuperTux. This might cause permanent damage to your system, your brain or both!
  • Do not try these instructions out on a production system. Use a virtual machine (e.g. VMWare) instead.
  • The developers currently focus on getting SuperTux stable for Linux. Feel free to try getting it to work on Windows, but do not expect any support down this road.
  • Read these instructions to the end before starting your install. If any step makes you feel unsure, better wait for a Windows release of SuperTux.
  • The whole build process takes about one hour to complete, depending on your internet connection and processor power. Why not do something more productive in that hour? Maybe do some housework?


OK, enough of that. Here are the exact steps for building SuperTux on a fresh Windows installation:

It's Download Time

  • Download and install MinGW (from SourceForge)
    • When prompted, select the "candidate" release. Aside from the base component, also install both the "g++" and "mingw make" components - they might come in handy.
    • The default folder of c:\MinGW was alright with me, as I installed on a development installation of Windows. I'll just assume we installed there.
  • Download and install MSYS - I chose MSYS-1.0.11-2004.04.30-1
    • Again, the default folder of C:\msys\1.0 was fine with me
    • In the process of installing MSYS, a command shell should open, promping you whether you want to continue and if you already installed MinGW. Answer both questions with yes (y) and you should be prompted for the path to your MinGW installation. As I installed to c:\MinGW, I entered c:/MinGW (note the forward slash instead of a backslash)
  • Download and install the MSYS developer toolkit (DTK) - I chose msysDTK-1.0.1
    • Again, the default folder of C:\msys\1.0 was fine with me, the rest of the install was smooth sailing
  • Download, build and install a recent version of SDL - I chose 1.2.12
    • After unpacking, install SDL using "make install-sdl prefix=/local"
  • Download MSYS autoconf - I chose msys-autoconf-2.59
    • save this to C:\msys\1.0, we will unpack it later
  • Download MSYS automake - I chose msys-automake-1.8.2
    • save this to C:\msys\1.0, we will unpack it later
  • If you want to use the SuperTux Add-On Manager, download libcurl - I chose libcurl-7.16.0-win32-nossl
    • extract the included bin, include and lib folders as subfolders of C:\msys\1.0
  • Download and install OpenAL
    • On the OpenAL website, choose "Download", then "Installer for Windows"
    • Start the Installer and follow the onscreen instructions

Checking Things Out

  • time to check out the latest sources from SVN
    • create c:\msys\1.0\build - we will download and build SuperTux there
    • right-click this folder and select "SVN checkout..." from the context menu
    • As repository URL, enter:
    • As checkout dir, enter: C:\msys\1.0\build\supertux
    • begin your checkout and wait - this might take some time...

Getting Busy

  • time to start MSYS for the first time. Launch MSYS by clicking on the conveniently created desktop icon
  • install the downloaded binaries by typing
cd /c/msys/1.0/
tar -xzvf gcc-g++-3.4.2-20040916-1.tar.gz
tar -xjvf msys-autoconf-2.59.tar.bz2
tar -xjvf msys-automake-1.8.2.tar.bz2
tar -xjvf supertux-msys-libs-2006-03-21.tar.bz2


  • we're ready to build SuperTux. Just type the following
cd /build/supertux/
cp /usr/local/bin/*.dll .
cp /usr/local/lib/libcurl-4.dll .
  • If you want to build using CMake, enter this:
mkdir build
cd build
CMAKE_INCLUDE_PATH="/local/include;/local/include/SDL;/local/include/vorbis" CMAKE_LIBRARY_PATH="/local/lib" cmake -G "MSYS Makefiles" -DVORBIS_INCLUDE_DIR="/local/include" -DOPENAL_INCLUDE_DIR="/local/include" -DPHYSFS_INCLUDE_DIR="/local/include" -DSDLIMAGE_INCLUDE_DIR="/local/include/SDL" -DSDL_INCLUDE_DIR="/local/include/SDL" -DCURL_INCLUDE_DIR="/local/include/curl" -DDEBUG=ON .. -DGENERATE_WRAPPER=OFF -DGENERATE_MESSAGESPOT=OFF
  • If you want to build using jam instead, run the following commands
LIBS="-L/usr/local/lib -lvorbisenc -lvorbisfile -lvorbis -logg" CFLAGS="-I/usr/local/include" configure --enable-debug
  • Now run "supertux2.exe", sit back and enjoy the game.

Ready-made Binaries

  • You might also find an old developer snapshot I built on my website.

Additional Tips

If jam fails on wrapper.cpp or miniswig try preventing miniswig from regenerating wrapper.cpp. To do that run this command in msys:

cd /build/supertux && \
sed 's/"bison"/""/;s/"flex"/""/' Jamconfig > Jamconfig.tmp && \
mv Jamconfig.tmp Jamconfig

After that use TortoiseSVN to svn up the whole directory (to restore possibly deleted files). Then try running jam again.

Building the editor

There's a new gtk-sharp based editor in development which can also be built on windows. To do so you first have to get and install the following dependencies:



  • Get the sourcecode from svn
  • open supertux-sharp.sln by double clicking on it (it should open in Visual C# Express now).
  • Build the project in debug and release mode (use F6 and then F5 for example)
  • Copy SDL.dll and SDL_image.dll into the bin\Debug and bin\Release directory that has just been created
  • You can now go back to Visual Studio Express and start the editor with F11. Note that the debug mode is quiet slow for the OpenGL calls, so if you actually wanna use the editor instead of developing it start it in release mode (CTRL+F11)

You might want to read the Editor FAQ at this point.