Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Building OpenMS on Windows

Read this section first!

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 comes in two flavors: commercial or non-commercial - choose whatever is applicable to you: read more on the Trolltech website
<OL>
  <LI>non-commercial:
    <OL>
      <LI>download Qt source (Qt for Open Source C++ development on Windows - http://qt.nokia.com/downloads/windows-cpp)
      <LI>extract zip file
      <LI>open a Visual Studio Command Line (use x64 version if you want 64bit apps!)
      <LI>$ cd <path-to-qt>
      <LI>$ configure.exe -no-phonon-backend -no-script
      <LI>$ nmake
      <LI>now you should have Link-Libraries and DLL's (debug and release) in your &lt;Qt&gt;/lib directory
    </OL>
  <LI>commercial:
    <OL>
      <LI>we have no experience here, but it should be possible to get the DLL's and Link-Libraries here as well.
    </OL>
  <LI>add the &lt;Qt&gt;/bin (!) directory to your PATH Environment Variable
</OL>

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 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 &lt;generator&gt; 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 <tt>$ cmake</tt> to see a list of available generators.<br>
        Example:
    
    cd c:\svn\contrib_win64_build
    cmake -G "Visual Studio 9 2008 Win64" "c:\svn\contrib"
        <LI>add the &lt;path_to_contrib_build&gt;/lib directory to your PATH Environment Variable (this is so Windows can find the DLL's when running our executables).
      </OL>
    

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 is 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 is 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 @ref install_win_contrib above.
<br>
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 <a href="http://www.OpenMS.de/download.php" target="_blank">download</a> page.
For further (e.g. latest developer version from SVN) info see the <a href="http://open-ms.sourceforge.net/download.php" target="_blank">download instructions</a>.
<br>
<br>
After you got the source code open a VisualStudio Command line (see Start-Menu).
To create Visual Studio Project Files using CMake:
<OL>
  <LI>open a Visual Studio Command Line (use x64 version if you want 64bit apps!)
  <LI>create a build directory for %OpenMS<br>
      -e.g. $ mkdir OpenMS_Win64
  <LI>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"
  </OL>

Now there should be a <tt>OpenMS.sln</tt> 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.<br>
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 @subpage external_code) 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.
<BR>
<BR>
After you have built %OpenMS, you can build the TOPP tools
by building the "TOPP" project in the IDE.

<br>

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 &lt;OpenMS_build_tree&gt;/source/TEST using $ ctest
Single tests can be run with $ ctest -R &lt;testname&gt;, e.g. $ ctest -R Base64_test
For more syntax on ctest look at the online documentation at http://cmake.org/.

[deprecated] Enabling database support

This information is based on an old OpenMS version and might not work.

OpenMS accesses databases via QT. This instruction is based on QT 4.3.2. Other versions might differ. We try to install a MySQL driver (installing other db-drivers should work accordingly).

The open-source version of QT (which is precompiled on windows) does not come with an enabled MySQL driver, so you'll need to recompile QT.

Before that however, you'll need to build the MySQL-driver itself.

  1. Download MySQLServer4.1 and install it.

  2. Build QT with DB support

    cd <path_to_QT>
    configure -L <path_to_MYSQLSERVER>/lib/opt -l libmysql -I <path_to_MYSQLSERVER>/include -qt-sql-mysql -qt-sql-odbc -qt-sql-sqlite -qt-gif -qt-libpng -qt-libjpeg

    and wait ...

  3. now build OpenMS

  4. Now, create a database by opening the mysql command line client (from the start menu) and enter your root password.
    Now type:
    mysql> CREATE DATABASE OPENMS_TEST_DB;
    you should see something like:
    Query OK, 1 row affected (0.14 sec)
Note
To enable DB connectivity tests, use the following CMake parameters:
  • DB_TEST
  • DB_TEST_HOST
  • DB_TEST_PORT
  • DB_TEST_DB
  • DB_TEST_USER
  • DB_TEST_PW

OpenMS / TOPP release 1.9.0 Documentation generated on Sun Oct 27 2013 01:11:37 using doxygen 1.8.4