This wiki has been moved to https://github.com/SuperTux/wiki into the mediawiki branch.
Building on Windows
If you want to build the current development version on Windows, these step-by-step instructions are for you. At the end of the article is a quick guide for Visual Studio.
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 or VirtualBox) instead.
- Most developers currently focus on getting SuperTux stable for Linux. Feel free to try getting it to work on Windows, but do not expect much 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?
- The build process fails on Windows Vista sometimes. (please open a bug in our bug tracker to help us figure out why)
OK, enough of that. Here are the exact steps for building SuperTux on a fresh Windows installation:
- Create or pick a working folder. Its path should not contain any spaces. (The root of a drive, such as C:\ or D:\, is fine)
- I chose D:\Build_SuperTux; change the commands to match your choice.
- Every non-absolute path I give is relative to this directory
Checking Things Out
- We want to check out the latest sources from SVN
- Pick a Subversion client: (instructions vary depending on client)
- CollabNet binaries require a login, but are very similar to the next option
- I chose 
- Apache 2.2 Binaries Down. Alternatives can be found at http://alagazam.net/
- I chose svn-win32-1.6.6.zip
- Unpack the binaries to svn
- Add subversion to your path
- Right click "My Computer" and go to Properties->Advanced->Environment Variables.
- Edit or add the PATH variable in either window.
- Add a semicolon at the end if not present and type D:\Build_SuperTux\svn\bin at the end.
- Open a command prompt (Start->Run and type cmd) and type svn checkout http://supertux.lethargik.org/svn/supertux/trunk/supertux D:\Build_SuperTux\supertux
- TortoiseSVN has a nice GUI - try TortoiseSVN-22.214.171.12493-win32-svn-1.6.6.msi
- You must install and reboot to finish the installation (SVN-Options will appear in the right-click menu in the Explorer)
- right-click this folder and select "SVN checkout..." from the context menu
- As repository URL, enter: http://supertux.lethargik.org/svn/supertux/trunk/supertux
- As checkout dir, enter: D:\Build_SuperTux\supertux
- CollabNet binaries require a login, but are very similar to the next option
- begin your checkout and wait - this might take some time, so to the next step...
It's Download Time
Download all these to your build directory.
- MinGW and MSYS
http://sourceforge.net/projects/mingw/files/MinGW%20API%20for%20MS-Windows/w32api-3.14/w32api-3.14-mingw32-dev.tar.gz/download Working Link: http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/RuntimeLibrary/Win32-API/w32api-3.14/w32api-3.14-mingw32-dev.tar.gz/download
http://sourceforge.net/projects/mingw/files/MSYS%20Base%20System/msys-1.0.11/msysCORE-1.0.11-bin.tar.gz/download Working Link: http://sourceforge.net/projects/mingw/files/MSYS/BaseSystem/msys-core/msys-1.0.11/msysCORE-1.0.11-bin.tar.gz/download
http://sourceforge.net/projects/mingw/files/GNU%20Binutils/binutils-2.20/binutils-2.20-1-mingw32-bin.tar.gz/download Working Link: http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/GNU-Binutils/binutils-2.20/binutils-2.20-1-mingw32-bin.tar.gz/download
http://sourceforge.net/projects/mingw/files/MinGW%20Runtime/mingwrt-3.16/mingwrt-3.16-mingw32-dll.tar.gz/download Working Link: http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/RuntimeLibrary/MinGW-RT/mingwrt-3.16/mingwrt-3.16-mingw32-dll.tar.gz/download
http://sourceforge.net/projects/mingw/files/MinGW%20Runtime/mingwrt-3.16/mingwrt-3.16-mingw32-dev.tar.gz/download Working Link: http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/RuntimeLibrary/MinGW-RT/mingwrt-3.16/mingwrt-3.16-mingw32-dev.tar.gz/download
http://sourceforge.net/projects/mingw/files/GCC%20Version%204/Current%20Release_%20gcc-4.4.0/gcc-full-4.4.0-mingw32-bin-2.tar.lzma/download (rather large) Working Link: http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/GCC/Version4/Previous%20Release%20gcc-4.4.0/gcc-full-4.4.0-mingw32-bin-2.tar.lzma/download
- OpenSSH (for committing)
http://sourceforge.net/projects/mingw/files/MSYS%20openssh/openssh-4.7p1-2/openssh-4.7p1-2-msys-1.0.11-bin.tar.lzma/download Working Link: http://sourceforge.net/projects/mingw/files/MSYS/openssh/openssh-4.7p1-2/openssh-4.7p1-2-msys-1.0.11-bin.tar.lzma/download
http://sourceforge.net/projects/mingw/files/MSYS%20openssl/openssl-0.9.8k-1/libopenssl-0.9.8k-1-msys-1.0.11-dll-098.tar.lzma/download Working Link: http://sourceforge.net/projects/mingw/files/MSYS/openssl/openssl-0.9.8k-1/libopenssl-0.9.8k-1-msys-1.0.11-dll-098.tar.lzma/download
http://sourceforge.net/projects/mingw/files/MSYS%20minires/minires-1.02_1-1/libminires-1.02_1-1-msys-1.0.11-dll.tar.lzma/download Working Link: http://sourceforge.net/projects/mingw/files/MSYS/minires/minires-1.02_1-1/libminires-1.02_1-1-msys-1.0.11-dll.tar.lzma/download
http://sourceforge.net/projects/mingw/files/MinGW%20zlib/zlib-1.2.3-1-mingw32/libz-1.2.3-1-mingw32-dll-1.tar.gz/download Working Link: http://sourceforge.net/projects/mingw/files/MSYS/zlib/zlib-1.2.3-1/zlib-1.2.3-1-msys-1.0.11-dll.tar.gz/download
- Bison and Flex (for miniswig)
http://sourceforge.net/projects/mingw/files/MSYS%20bison/bison-2.4.1-1/bison-2.4.1-1-msys-1.0.11-bin.tar.lzma/download Working Link: http://sourceforge.net/projects/mingw/files/MSYS/bison/bison-2.4.1-1/bison-2.4.1-1-msys-1.0.11-bin.tar.lzma/download
http://sourceforge.net/projects/mingw/files/MSYS%20flex/flex-2.5.35-1/flex-2.5.35-1-msys-1.0.11-bin.tar.lzma/download Working Link: http://sourceforge.net/projects/mingw/files/MSYS/flex/flex-2.5.35-1/flex-2.5.35-1-msys-1.0.11-bin.tar.lzma/download
http://sourceforge.net/projects/mingw/files/MSYS%20regex/regex-1.20090805-1/libregex-1.20090805-1-msys-1.0.11-dll-1.tar.lzma/download Working Link: http://sourceforge.net/projects/mingw/files/MSYS/BaseSystem/regex/regex-1.20090805-1/libregex-1.20090805-1-msys-1.0.11-dll-1.tar.lzma/download
- Gettext (for translations)
http://sourceforge.net/projects/mingw/files/MinGW%20gettext/gettext-0.17-1/libintl-0.17-1-mingw32-dll-8.tar.lzma/download Working Link: http://sourceforge.net/projects/mingw/files/MinGW/gettext/gettext-0.17-1/libintl-0.17-1-mingw32-dll-8.tar.lzma/download
http://sourceforge.net/projects/mingw/files/MinGW%20libiconv/libiconv-1.13.1-1/libcharset-1.13.1-1-mingw32-dll-1.tar.lzma/download Working Link: http://sourceforge.net/projects/mingw/files/MinGW/libiconv/libiconv-1.13.1-1/libcharset-1.13.1-1-mingw32-dll-1.tar.lzma/download
http://sourceforge.net/projects/mingw/files/MinGW%20libiconv/libiconv-1.13.1-1/libiconv-1.13.1-1-mingw32-dll-2.tar.lzma/download Working Link: http://sourceforge.net/projects/mingw/files/MinGW/libiconv/libiconv-1.13.1-1/libiconv-1.13.1-1-mingw32-dll-2.tar.lzma/download
http://sourceforge.net/projects/mingw/files/MinGW%20gettext/gettext-0.17-1/libgettextpo-0.17-1-mingw32-dll-0.tar.lzma/download Working Link: http://sourceforge.net/projects/mingw/files/MinGW/gettext/gettext-0.17-1/libgettextpo-0.17-1-mingw32-dll-0.tar.lzma/download
http://sourceforge.net/projects/mingw/files/MinGW%20gettext/gettext-0.17-1/gettext-0.17-1-mingw32-bin.tar.lzma/download Working Link: http://sourceforge.net/projects/mingw/files/MinGW/gettext/gettext-0.17-1/gettext-0.17-1-mingw32-bin.tar.lzma/download
http://sourceforge.net/projects/mingw/files/MinGW%20gettext/gettext-0.17-1/gettext-0.17-1-mingw32-dev.tar.lzma/download Working Link: http://sourceforge.net/projects/mingw/files/MinGW/gettext/gettext-0.17-1/gettext-0.17-1-mingw32-dev.tar.lzma/download
- cURL (add-on manager)
- SDL graphics library
- GLEW graphics library
- SDL_image for loading graphics
- PhysFS file management
- 7-zip for your favorite extraction program
- OpenAL, for all your OggVorbis needs
- Run the 7-zip and OpenAL SDK installers. (OpenAL requires administrative privileges)
- Select everything else you downloaded, right click, and select "Extract here". Repeat with the generated *.tar files. Answer "no to all" when prompted to overwrite.
- Make a folder
localto hold libraries
- Copy bin, include, lib, and share folders from cmake, curl, SDL, SDL_image, and glew folders
- Go to C:\Program Files\OpenAL 1.1 SDK
- Copy the include directory there to local
- Copy \samples\playoggvorbis\include\Ogg and \samples\playoggvorbis\include\Vorbis to local\include
- Copy the Ogg and Vorbis DLL's in \samples\playoggvorbis\Win32 to local\bin
- Go to C:\WINDOWS\system32 (%SYSTEMROOT%\system32)
- 64-bit Windows: go to C:\windows\syswow64 (%SYSTEMROOT%\syswow64) instead of system32. System32 has 64-bit libraries even though its name is "system32" and syswow64 has 32-bit libraries even though it's called "syswow64". This information should be valid for Window Vista and Windows Seven.
- Copy OpenAL32.dll and wrap_oal.dll to local\bin
- If they aren't there, try running C:\Program Files\OpenAL 1.1 SDK\redist\oalinst.exe
- PhysFS 2.0.0 needs a patch to make it compile without warnings under Windows. Change
IF(PHYSFS_IS_GCC4) ADD_DEFINITIONS(-fvisibility=hidden) ENDIF(PHYSFS_IS_GCC4)
IF(PHYSFS_IS_GCC4 AND NOT WINDOWS) ADD_DEFINITIONS(-fvisibility=hidden) ENDIF(PHYSFS_IS_GCC4 AND NOT WINDOWS)
- We're ready to build PhysFS.
- Launch MSYS with msys.bat and type in the following: (you can paste into MSYS using the icon in the title bar)
cd /physfs* mkdir build cd build cmake .. -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX:PATH=/local make make install
- We're ready to build SuperTux.
- Change to the SuperTux checkout directory
- Make a build directory to store generated files
mkdir build cd build
- Start the actual build (everything else was libraries)
INCLUDE="/local/include/SDL:/boost_1_44_0" cmake -G"MSYS Makefiles" -DCOMPILE_AMALGATION=ON -DCMAKE_CXX_FLAGS=-Wl,--enable-auto-import .. make
- You need to copy some dll's from /local/bin, /local/lib, and /bin into /supertux.
cd .. cp /local/bin/*.dll . cp /local/lib/*.dll . cp /bin/*.dll .
A lot of these are unnecessary; use objdump -p or strings to prune the tree.
- Now run supertux2.exe, sit back, and enjoy the game.
cd /supertux ./supertux2.exe
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:
- Make sure you have OpenGL drivers installed
- Microsoft .NET 1.X framework SDK, you should be able to get this here: http://www.microsoft.com/downloads/details.aspx?FamilyID=9b3a2ca6-3647-4070-9f41-a333c6b9181d&DisplayLang=en
- Microsoft .NET 2.X framework SDK, yes you need 1.x AND 2.x at the moment!: http://www.microsoft.com/downloads/details.aspx?familyid=FE6F2099-B7B4-4F47-A244-C96D69C35DEC&displaylang=en
- Gtk-Sharp 2.7 SDK for windows, make sure you actually get the SDK the runtime version contains some bugs that affect the editor: http://forge.novell.com/modules/xfcontent/private.php/gtks-inst4win/Win32%20Installer/v2.7.1/gtksharp-2.7.1-win32-0.5.exe
- Microsoft Visual C# Express Edition, it's a free version of visual studio and we use it for compiling (and development on win32): http://msdn.microsoft.com/vstudio/express/visualcsharp/download
- This apparently requires SP2 on Windows XP. (not tested on any other Windows versions)
- SDL.dll and SDL_image.dll, you can get these from an existing SuperTux installation or from the downloads above.
- Get the sourcecode from svn
- Open supertux-sharp.sln by double clicking on it.
- 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 quite slow for the OpenGL calls, so if you actually want to 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.
MMLosh has some snapshots on his website: http://elektromaniak.wz.cz/download.html Note that because Mono is cross-platform, the executables should work on both Windows and Linux, though libraries can be a problem.
FastBuild with Visual Studio
This is experimental Tested on W7/VS2010 x64
- Install Visual Studio
- Download CMake 2.8+
- Open cmake gui
- Set dirs according to your Environment (p.ex.: H:\STuxSVN and H:\STuxSVN\bin)
- Press Configure, select your version of VS (with native compilers) and click on finish
- Now CMake tells you what to do. If asked for any libs, make sure to download and add them to your environment strings
Small List of DLs:
- Boost: BOOST_ROOT: H:\STuxSVN\boost_1_42_0 / BOOST_LIBRARYDIR: $BOOST_ROOT\libs)
- OpenAL: OPENAL_INCLUDE_DIR: D:\Program Files (x86)\OpenAL 1.1 SDK\include
- Ogg Vorbis: VORBIS_INCLUDE_DIR: H:\STuxSVN\libvorbis-1.2.3
- SDLIMAGE: SDLIMAGE_INCLUDE_DIR: H:\STuxSVN\SDL_image-1.2.10\include
- SDL: SDL_INCLUDE_DIR: H:\STuxSVN\SDL-1.2.14