This wiki has been moved to https://github.com/SuperTux/wiki into the mediawiki branch.

Building on Windows

From SuperTux
Revision as of 13:54, 26 May 2006 by Sommer (Talk | contribs)

Jump to: navigation, search

Introduction

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

Warning

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?

Preparation

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

It's Download Time

  • Download and install MinGW - I chose MinGW-5.0.0
    • 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 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
  • 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: svn://svn.berlios.de/supertux/trunk/supertux
    • 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

Building

  • we're ready to build SuperTux. Just type the following
cd /build/supertux/
cp /usr/local/bin/*.dll .
./autogen.sh
LIBS="-L/usr/local/lib -lvorbisenc -lvorbisfile -lvorbis -logg" CFLAGS="-I/usr/local/include" configure --enable-debug
jam
  • Now run "supertux.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

  • none yet

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:

Building:

  • 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)
  • To make the editor find the supertux tiles and executable you have to start it once and quit it so that it creates the config file. You should then search in Document&Settings folder for a supertux-editor folder that contains a settings.xml file. Open it with a texteditor. You should put the path to the supertux executable (if you have any) after <SupertuxExe> and the path to the data directory of your supertux svn checkout after <SupertuxData>.