Development: Compiling the code

From OpenMPT Wiki
Jump to: navigation, search

If you want to get involved with OpenMPT development, or just want to compile your own version of the tracker, here are some hints on how to get started.

Prerequisites[edit]

  • Visual Studio 2015 or later (Express will not work as it does not include MFC, but the Community Edition will).
  • Optional TortoiseSVN or any other SVN client. You will need this to get the latest code revision via the SVN system. The description below is written for TortoiseSVN. You can also download a code snapshot if you do not want to install a SVN client (see below).

Getting the code[edit]

Using TortoiseSVN: First, you have to create a directory on your hard drive in which you want to place the source code. Right-click on the directory and choose the context menu entry “SVN Checkout...”. The “Repository URL” to fill in is https://source.openmpt.org/svn/openmpt/trunk/OpenMPT/. After clicking the OK button, all files will be downloaded.

- or -

Tarball: If you do not want to use an SVN client, simply get the GNU tarball from the web interface - click the “Download” link next to the OpenMPT folder to retrieve it.

Once you have checked out, you can always right-click on the directory and choose “SVN Update...” to get the most recent revision of the code. This will of course not work with the tarball method, you will have to download a new tarball after every commit in that case.

For legal reasons, the ASIO and VST SDKs are not included in the OpenMPT code repository, but they are required to compile OpenMPT with ASIO and VST support. The required packages can be downloaded automatically by running the file build/download_externals.cmd. Using this script requires PowerShell, so only works out of the box on Windows 7 or newer. Alternatively, you can retrieve them manually:

  • Download the respective SDKs from the Steinberg website.
  • VST: Simply copy all files from VST2_SDK/pluginterfaces/vst2.x to include/vstsdk2.4/pluginterfaces/vst2.x.
  • ASIO: Copy the ASIOSDK2 folder into the include directory of OpenMPT.

Alternatively, if you do not want to compile OpenMPT with VST and ASIO support, you can define the constants NO_VST and NO_ASIO in the file common/BuildSettings.h (appropriate #define statements are already present but commented out).

Compiling the code[edit]

Open the file build/vs20xx/OpenMPT.sln (where xx matches your Visual Studio version) in Visual Studio and click on the menu item BuildBuild solution to compile the code. Note that this process may take quite a while!

Staying up to date[edit]

If you want to be notified of new code commits, you can subscribe to the SVN mailing list or import the RSS feed into your favourite RSS reader.