Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Building OpenMS on Windows

Introduction

This document addresses OpenMS users and explains the installation procedure for building OpenMS from its sources. If you only want to use the OpenMS Proteomics Pipeline (TOPP), you are strongly encouraged to download the windows binary installer (see here), instead of building OpenMS from sources. For more information read the install instructions for the TOPP binaries.

This document especially considers the installation of several libraries which are required by OpenMS. Most of these libraries are made available in our "contrib-package" (see below).
If you encounter errors during configuring/compiling our software, have a look at our "Known Issues" section (documentation), maybe the error is already known. If not, please write to the mailing list.

Notation of this tutorial

Setup of environment

Pre-Requisites (Software)

Installing required dependency libraries

OpenMS depends on several other libraries. On a windows system, these are usually not present.

QT installation

We require Qt version 4.5 or higher.
Qt 5.X IS NOT SUPPORTED YET!
VS2012 and VS2013 require at least Qt 4.8.4 with some additional fix (see below).

Qt comes in two flavors: commercial or non-commercial - choose whatever is applicable to you: read more on the Qt website Recently (beginning with Qt 4.6) there are binary development versions available for VS2010 and VS2008. We found these to contain only 32bit compilations. If you are compiling for 32bit as well, you can download these and save a lot of time. They are incompatible for 64bit builds - compile Qt yourself in this case (or see if you can find 64bit builds on the Qt website). Make sure NOT to use the MinGW precompiled binaries, since they are incompatible with Visual Studio binaries.

Follow this procedure if you want to compile Qt yourself:

  1. non-commercial:
    1. download Qt source from http://qt-project.org/downloads as .zip or .tar.gz (or use the prebuild binaries exactly matching your compiler!)
    2. extract zip file to a temp location (called <path-to-tmp-qt> henceforth)
    3. [VS2012 and VS2013 only] there is a bug in the latest Qt (4.8.4 and 4.8.5) preventing compilation. Look at http://stackoverflow.com/questions/12113400/compiling-qt-4-8-x-for-visual-studio-2012 for a fix. Its meant for 4.8.3 though. For 4.8.4 and 4.8.5 you only need to fix HashSet.h! If you use VS2013 you additionally need to remove three functions from <path-to-tmp-qt>\3rdparty\webkit\Source\JavaScriptCore\wtf\MathExtras.h, which are already defined by VS12 (round(), roundf and signbit()).
    4. open a Visual Studio Command Line (use x64 version if you want 64bit apps!)
    5. $ cd <path-to-tmp-qt>
    6. if you have multiple versions of VS installed you might need to provide the "-platform" param for the next configure command (e.g., -platform win32-msvc2012)
    7. $ configure.exe -opensource -nomake demos -nomake examples -no-script -webkit -prefix <path-to-qt> ...[more options, e.g. -graphicssystem opengl]
    8. $ nmake
    9. $ nmake install
    10. all Qt files (libs, includes etc) are now in <path-to-qt> and sub-directories. You can delete <path-to-tmp-qt> (since it will consume quite a lot of disk space)
    11. alternatively to nmake, you can download JOM (http://qt-project.org/wiki/jom) and type "jom" in your Qt build directory to use multiple cores (builds a lot faster usually)
  2. commercial:
    1. we have no experience here, but it should be possible to get the DLL's and Link-Libraries here as well.
  3. add the <Qt>/bin (!) directory to your PATH Environment Variable

Contrib installation

In order to make the installation of the remaining required libraries easier, we composed a "contrib-package" containing the libraries Boost, GSL, libSVM, SeqAn, glpk, zlib, libbz2 and Xerces-C. This contrib package has several advantages over manual installation

Download:

The contrib package is contained in the OpenMS release package.

If you are using the developer version of OpenMS, you must check out the contrib from Sourceforge SVN repository

> svn co https://open-ms.svn.sourceforge.net/svnroot/open-ms/contrib

to obtain the latest developer version (potentially unstable).

Installation:

On Vista/Win7/Win8 some programs using during contrib creation (e.g. patch.exe) require elevation, otherwise the contrib will not build. Thus, you need an admin account with disabled UAC (User Account Control) or alternatively you can start a command line by right-clicking on its link and choosing "Run as administrator", while UAC is still enabled.

After you got the source code for the contrib package open a VisualStudio Command line (see Start-Menu).

  1. Open a Visual Studio Command Line (use x64 version if you want 64bit apps!)
  2. Create a build directory for the OpenMS contrib
    -e.g. $ mkdir contrib_win64_build
  3. Call CMake to build the contrib
    Be aware that you can build 64bit apps even if your operating system is only 32bit (cross-compiling), but you will not be able to run 64bit apps in this case.

    cd <path_to_contrib_build>
    cmake -G "<generator>" "<path_to_contrib>"

    The <generator> you use must be one of the Visual Studio Generators. This is because some contrib libs require Visual Studio to build. Be careful to specify the Generator suffixed with "Win64" if you want a 64bit contrib! Type $ cmake to see a list of available generators.
    Example:

    cd c:\svn\contrib_win64_build
    cmake -G "Visual Studio 9 2008 Win64" "c:\svn\contrib"

  4. Add the <path_to_contrib_build>/lib directory to your PATH Environment Variable (this is so Windows can find the DLL's when running our executables).

VS2013 requires SeqAn 1.4.1, which is currently not shipped in the contrib. However, just download the SeqAn source code from www.seqan.de and replace the headers in <path_to_contrib_build>/include/seqan with the headers from the seqan source.

Building the documentation (optional)

This section is voluntary. If you can live with the online documentation, you do not need to build your own.

In order to build the class documentation (doc & doc_internal targets), TOPP tutorials (doc_tutorials target) and more, you will need to install three programs:

  1. Doxygen (version 1.5.8 and 1.8.2 are tested, others might work as well)
    • Download the installer for Windows (http://www.doxygen.org)
    • Execute the installer. It should automatically add doxygen.exe to the Windows PATH Environment (please recheck)
  2. MikTeX (version 2.7 and 2.9 are tested, others might work as well) - basic version (for DVIPS, LATEX etc).
    • Download binaries for Windows (http://miktex.org/)
    • During installtion tick "install missing packages on the fly = yes"?!
    • The installer SHOULD add the bin directory of MikTeX automatically to the Windows PATH Environment (please recheck)
  3. GPL Ghostscript (8.60) for Windows
    • Download binaries for Windows (http://www.ghostscript.com/) and install
    • Add the <path_to_GHOSTSCRIPT>/bin directory (e.g. c:/programs/gs/gs8.60/bin) to the Windows PATH Environment
  4. Optional:
    You can create dependency graphs using a doxygen plug-in called dot.
    • Download binaries for windows from http://www.graphviz.org (we tested: graphviz-2.18.exe)
    • The installer should have added dot.exe to the Windows PATH Environment (please recheck)

You should install the above apps prior to installing OpenMS, because otherwise during the configuration step the documentation targets will be disabled. If you already have a working installation of OpenMS (without documentation), you can simply install the above programms and then delete the CMakeCache.txt file in your OpenMS build directory and reconfigure OpenMS by calling cmake (see below). No need to recompile the library!

Installing OpenMS

If you have not installed the libraries which OpenMS requires, please refer to the section Contrib installation above.
Assuming you have successfully installed the dependent libraries, you need to get the OpenMS source code. The latest stable version of OpenMS can be found in the download page. For further (e.g. latest developer version from SVN) info see the download instructions.

After you got the source code open a VisualStudio Command line (see Start-Menu). To create Visual Studio Project Files using CMake:

  1. Open a Visual Studio Command Line (use x64 version if you want 64bit apps!)
  2. Create a build directory for OpenMS
    -e.g. $ mkdir OpenMS_Win64
  3. Call CMake to create the BuildSystem there

    cd <path_to_OpenMS_build>
    cmake -D CMAKE_FIND_ROOT_PATH="<path_to_contrib_build>" -G "<generator>" "<path_to_OpenMS>"

    The choice of <generator> is dependent on your system. Type $ cmake to see a list of available generators. If you use a Visual Studio Generator, it should be identical to the one used for building the contrib. Example:

    cd c:\svn\OpenMS_Win64
    cmake -D CMAKE_FIND_ROOT_PATH="C:\svn\contrib_win64_build" -G "Visual Studio 9 2008 Win64" "../OpenMS"

Now there should be a OpenMS.sln file in your build directory, which you can open using Visual Studio. If you choose another generator (e.g. Eclipse) you will find something equivalent.

In Visual Studio execute the 'targets' project, which will show you the most prominent targets.

Try to build the OpenMS library - the target is called 'OpenMS'. This will create the OpenMS dll. If you used the debug configuration it will be called OpenMSd.dll, in release mode its called OpenMS.dll.
As a last step you should add the location of the OpenMS dll to your PATH environment. This is required for TOPP tools like TOPPAS, which might otherwise not work. Also external projects (see External Code using OpenMS) require the OpenMS dll (OpenMS.dll or OpenMSd.dll) to be in the PATH. Depending on the generator and configuration used you will find the dll in [OpenMS_build]/bin/Release or [OpenMS_build]/bin/Debug or just [OpenMS_build]/bin. In the same folder the TOPP tools will reside once build (see next section). Be aware that the order of directories in the PATH variable determines which dll or executable is used, if no absolute path was given when the executable was called. So the PATH might need to be updated (add/delete/reorder entries) if you are working with multiple installations or configurations of OpenMS.

Building the TOPP tools

TOPP is a toolset for the analysis of HPLC-MS data. It consists of several small applications that can be chained to create analysis pipelines tailored for a specific problem.

After you have built OpenMS, you can build the TOPP tools by building the "TOPP" project in the IDE.


Testing your OpenMS/TOPP installation

Each class in OpenMS and each TOPP tool have a unit test. To build and execute the tests, go to your OpenMS build_tree and further into ./source/TEST. There you'll find an OpenMS_tests.sln file, which you can open. For other generators an equivalent file with another suffix will be present. Now, build the 'test_build' target and the 'RUN_TESTS' target. You can also run the tests in a command prompt in <OpenMS_build_tree>/source/TEST using $ ctest Single tests can be run with $ ctest -R <testname>, e.g. $ ctest -R Base64_test For more syntax on ctest look at the online documentation at http://cmake.org/.


OpenMS / TOPP release 1.11.1 Documentation generated on Mon Aug 18 2014 14:41:10 using doxygen 1.8.7