My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
Compiling  
How to compile StepMania 5 on various platforms.
Featured, Phase-Deploy
Updated May 4, 2012 by jafelds@gmail.com

General Requirements

  • Mercurial (for obtaining the source code)
  • Reading through UsingMercurial (recommended for most; required for committers)
  • There's also Joel Spolsky's hg init, a user-friendly introduction to Mercurial. This one is optional, but recommended.

Obtaining the Source Code

Get a local copy of the sm-ssc repository with this command: hg clone https://sm-ssc.googlecode.com/hg/ sm-ssc

If you are on Windows (and don't have TortoiseHG installed), you are strongly recommended to run this in the command prompt so you have some idea of where the project is going to end up. Running the command from Start→Run or the search bar may cause the project to end up somewhere unexpected. (Try looking in %appdata% or %userprofile% if you have done this.)

Then for your sanity and ours, read the instructions on the MaintainingSourceTree page for keeping the source tree up to date, so your patches integrate cleanly with the source tree.

Building SM5

Until we get specific instructions up, please follow the build guides on StepMania.com:

Building on Windows

It is recommended to use Visual Studio 2008. A free copy of VS8 Express can be found here.

Make sure you have a version of the DirectX SDK with bindings for DirectX8, since that's what StepMania uses.

As of revision 8be5ad4d42a3 (July 23, 2011), you can now build with any DirectX SDK up to August 2007. (yes, StepMania still uses DirectX 8.) The Summer 2004 version is still the recommended version of the DirectX SDK for the time being.

If you are compiling an older revision, it's suggested that you get the SDK linked on the StepMania.com wiki page above.

Make sure to follow the steps in "Configure Visual C++ Paths" as well, or else you'll get errors when trying to compile.

The Visual Studio projects usually have multiple build targets:

  • Debug - for debugging things.
  • FastDebug - a compromise of debugging power and speed.
  • Release - for normal use.
  • Release-SSE2 - for people who have SSE2-capable processors.

Troubleshooting

"I get a problem about afxres.h when compiling."

Oddly enough, VC++ adds afxres.h to resource files even when you aren't using an MFC project, and yet the file may only be installed if you install MFC. This particular file isn't actually required, so to fix the error you can edit the .rc file in notepad and replace both occurrences of "afxres.h" with "winres.h" (note that there should be two of them, and you need to change both).
- Win32 Programming - Solutions to Common Errors

Other Versions

  • Visual Studio 2003 and Visual Studio 2005 are not actively maintained, but their project files are still in the repository at this time.
  • Visual Studio 2010 can build at this time, but needs minor configuration before it can become the recommended version.
  • At this time, there is no support for building on Windows that does not involve Visual Studio. That may change at a later point in time.

Building on Mac OS X

To build StepMania, Xcode 4 is required at this time. The project file to build StepMania is inside the Xcode folder called stepmania_xcode4.3.xcodeproj. Older versions of StepMania used the PBProject folder for reference.

Download Xcode 4 from the Mac App Store to be able to compile and run the binary.

Similar to the Windows build above, there are multiple settings for building StepMania.

  • Native Build a binary that is designed to work with your Intel architecture. Most people will want to use this setting by default.
  • Debug Build a binary for your architecture that also contains debugging symbols. It is recommended to use this build to help test and find bugs, for this mode runs slower than the Native build.

To use these settings, you need to select "Edit Scheme..." and then choose between them.

Building on Linux

Building on BSD

Some BSD-specific patches are required and are maintained in a separate port.

Comment by koen...@gmail.com, Jan 31, 2010

For compiling on linux run $dos2unix ./Utils/build.sh before executing build.sh

Comment by project member ajk...@gmail.com, Feb 2, 2010

Hopefully that's not needed after Revision a787b47b94. :)


Sign in to add a comment
Powered by Google Project Hosting