Compilation

In some cases it is more preferable to compile StepMania from its source code than use an installer or binary build.

StepMania utilizes the Git distributed version control system, and the cmake build system.

Compilation on Linux

Install dependencies

StepMania 5.1

On current versions of Debian and Ubuntu (since at least 9.0 and 17.04 respectively), the following commands will install the dependencies needed to compile StepMania 5.1.

sudo apt-get install build-essential
sudo apt-get install git cmake mesa-common-dev libglu1-mesa-dev libglew1.5-dev libxtst-dev libxrandr-dev libpng-dev libjpeg-dev zlib1g-dev libbz2-dev libogg-dev libvorbis-dev libc6-dev yasm libasound-dev libpulse-dev binutils-dev libgtk2.0-dev libmad0-dev libudev-dev libva-dev nasm
StepMania 5.3

StepMania 5.3 has amended dependendies

sudo apt-get install build-essential
sudo apt-get install git binutils-dev cmake mesa-common-dev libglu1-mesa-dev libxrandr-dev zlib1g-dev libbz2-dev libao-dev libogg-dev libvorbis-dev libc6-dev libasound2-dev libpulse-dev binutils-dev libgtk2.0-dev libmad0-dev libudev-dev libva-dev libxtst-dev xutils-dev yasm nasm libgl1-mesa-dev libgl1-mesa-dri libgles1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev

Retrieving source code 

To retrieve the StepMania 5.1 source code, run the following command.

git clone --single-branch -b 5_1-new --depth=1 https://github.com/stepmania/stepmania.git 

Building StepMania

StepMania 5.1

Run the following commands in sequence

cd stepmania
git submodule update --init
cd Build
cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=Release .. && cmake ..
make -j8

Change the 8 to a number not no more than double the number of cores in your CPU. 

In case you want to test features and obtain more detailed debug information, replace "Release" in the cmake command with "Debug".

Compilation on macOS

Building StepMania

First, you'll need to install Homebrew package manager. Then open the terminal, and run the following commands.

brew install cmake yasm
git clone --single-branch -b 5_1-new --depth=1 https://github.com/stepmania/stepmania.git 
cd stepmania
git submodule update --init
cd Build
cmake -G 'XCode' -DCMAKE_BUILD_TYPE=Release .. && cmake ..

In case you want to test features and obtain more detailed debug information, replace "Release" in the cmake command with "Debug".

After compilation is complete, just double click the .xcodeproj file that is in the Build folder.

Compilation on Windows

Windows dependencies

To compile StepMania on Windows, you'll require a few things, including

  • CMake (be sure to install it to your PATH during installation so you can execute it on the command line)
  • Git - there are several options, such as Git for Windows, GitKraken, and the GitHub Desktop client. As long as you have the command line tools available, you'll be fine. If you use the GitHub Desktop application, it installs a PowerShell instance called "Git Shell" that provides enhancements for navigating Git repositories.
  • Visual Studio 2017 (these instructions presume that you will be using the free Community edition)
    • When installing Visual Studio, you will require at least the following components/workloads:
      • Desktop development with C++ components
      • Visual C++ Tools for CMake
      • Windows 10 SDK
      • Windows 8.1 SDK and UCRT SDK
  • The DirectX SDK
    • If you encounter error code S1023 whilst installing the DirectX SDK, run the following commands in an Administrator command prompt, install the DirectX SDK, and then reinstall Visual C++ 2010 SP1 runtimes.
      • MsiExec.exe /passive /X{F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}
      • MsiExec.exe /passive /X{1D8E6291-B0D5-35EC-8441-6616F567A0F7}

Building StepMania

When you're ready, once again retrieve the source code and run the following commands (assuming you are running Git from the command line. If not, follow the instructions for your software);

git clone --single-branch -b 5_1-new --depth=1 https://github.com/stepmania/stepmania.git 
cd stepmania
git submodule update --init
cd Build
cmake -G 'Visual Studio 15 2017' -DCMAKE_BUILD_TYPE=Release .. 

In case you want to test features and obtain more detailed debug information, replace "Release" in the cmake command with "Debug".

After running the commands, CMake will generate Visual Studio solution files, which can then be used to compile StepMania from within Visual Studio.

 

No Comments
Back to top