Skip to content

Building Modipulate

Eric Gregory edited this page Jun 7, 2015 · 14 revisions

Once you've grabbed the source code, this page explains how to build it.

Modipulate is built with CMake. If you're familiar with the CMake build process this won't be very exciting for you.

Windows

We build Modipulate and associated libraries with Visual Studio 2010, but older/newer versions will work as well. If you don't have Visual Studio, download the free Visual Studio Express 2010

Install the CMake GUI for Windows.

(Note: It should be possible to build with Cygwin or MinGW. We have not tested this configuration.)

Download and install the DirectX SDK

Download the PortAudio sources. The easiest way to build PortAudio is with CMake and VisualStudio.

Optional:

  • Build the LOVE Megasource dependencies. Follow the directions carefully to build both LOVE and Lua.
  • If you'd rather not build LOVE but would like Lua support, install the Lua SDK for Windows (or build Lua from source.) In order for the build script to detect Lua on your system, set the following environment variables:
  1. LUA_INCLUDE_DIR should be something like "C:\Program Files (x86)\Lua\5.1\include"
  2. LUA_LIBRARIES should be something like "C:\Program Files (x86)\Lua\5.1\lib"

Generate the project files with CMake. In the CMake GUI set the source folder, create a build folder somewhere, and click configure. You may need to setup the paths for Lua, PortAudio, and other libraries on your system if CMake couldn't find them. The "build" folder is where the Visual Studio .sln file will appear.

Here's an example build configuration in the CMake GUI:

CMake build configuration for Windows

Once everything is set in the CMake GUI, click "Generate" and you'll get a set of files for Visual Studio n your build folder. From there it's as simple as opening modipulate.sln in Visual C++ and clicking build.

Mac OS X

If you don't already have Homebrew you should install that first. It's a simple package manager for OS X.

After installing Homebrew, you MUST exit and restart the terminal app.

Install the required packages with Homebrew:

brew install cmake portaudio libvorbis

For the optional Lua support you have two options:

  1. Install Lua with Homebrew: brew install lua

  2. Build and install LOVE. First install the pre-built dependency frameworks (including Lua) as described here. Then grab the LOVE source code, build it in Xcode, and install the resulting app bundle by copying it to your Applications folder.

Run CMake to configure Modipulate. You'll want to do this from a build subfolder, for example:

mkdir build
cd build
cmake ..

CMake will generate a Makefile. Just run make and it should build.

Xcode projects can be generated from CMake as well. We haven't tested this, but it Should Work (TM).

To run the optional LOVE demos, copy libmodipulatelua.dylib to the demo folder. Run the LOVE binary directly from the bundle like this:

$ /Applications/love.app/Contents/MacOS/love .

Ubuntu

The following was last tested on Ubuntu Oneiric and may be out of date.

Install the required packages:

sudo apt-get install cmake libportaudio2 portaudio19-dev

Install optional packages:

sudo apt-get install liblua5.1-0 liblua5.1-0-dev

Run CMake to configure. You'll want to do this from a build subfolder, for example:

mkdir build
cd build
cmake ..

CMake will generate a Makefile. Just run make and it should build.

If you'd like to hack on the code, note that CMake can generate a Code::Blocks or Eclipse CDT project with the -G option.

Clone this wiki locally