OpenMS
|
If OpenMS' TOPP and UTILS tools are not enough in a certain scenario, you can either request a change to OpenMS, if you feel this functionality is useful for others as well, or modify/extend OpenMS privately. For the latter, there are multiple ways to do this: You can modify the developer version of OpenMS by changing existing tools or adding new ones. Or you use an External Project to write a new tool, while not touching OpenMS itself (see below on how to do that). Once you've finished your new tool, and it only needs to run on the development machine, you're done. If you want to ship it to a new client machine, see Shipping your external code to a new machine .
It is very easy to set up an environment to write your own programs using OpenMS. Make sure you downloaded and installed the source package of OpenMS/TOPP properly. Note that you cannot use the 'install' target when working with the development version of OpenMS - it must be built and used within the build tree.
All important compiler settings and preprocessor definitions along with the OpenMS library will be available to you. The most important variables are:
and the OpenMS target itself (which you can link against).
The example that follows will be explained in details:
The command project defines the name of the project - the name is only of interest of you're working in an IDE or want to export this project's targets. To compile your program just append it to the my_executables list. If you also use object files (classes which do not contain a main program), append them to the my_sources list. In the next step CMake creates a statically linked library of the object files, listed in my_sources. This simple CMakeLists.txt example can be extended to also build shared libraries, include other external libraries and so on.
An example external project can be found in OpenMS/share/OpenMS/examples/external_code. Copy these files to a separate directory and use CMake to configure it (here as an in-source build).
For more information visit the website of cmake at cmake.org and consult the documentation.
Have fun coding with OpenMS!
If you've modified OpenMS itself and not used an external project you can just use our installer scripts, to build your own OpenMS installer for your platform (see our internal FAQ which is built using "make doc_internal") and ship that to a client machine.
If you've used an external project and have a new executable (+ an optional new library), you can use the installer approach as well, and manually copy the new executable to the TOPP/UTILS binary directory (e.g. on Windows this could be c:/program files/OpenMS/bin, on Linux it could be /bin.
If you do NOT use the installer, you can copy all required files manually, plus a few extra steps - see below. What needs to be done is a little platform dependent, thus very cumbersome to explain. You should look at the cmake installer scripts, to see whats required (for Mac and Linux see OpenMS/cmake/package*.cmake, for Windows see https://github.com/OpenMS/windows-installer/OpenMS_installer.nsi ).
In short: