view INSTALL @ 600:851b6a19a81c

setting soname
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 10 Oct 2013 15:08:01 +0200
parents dfbd3989a3f9
children d775a3cb5a06
line wrap: on
line source

Orthanc - A Lightweight, RESTful DICOM Server
=============================================


Dependencies
------------

1) CMake: Orthanc uses CMake (http://www.cmake.org/) to automate its
   building process.

2) Python: Some code is autogenerated through Python
   (http://www.python.org/).

3) Mercurial: To use the cutting edge code, a Mercurial client must be
   installed (http://mercurial.selenic.com/). We recommand TortoiseHg.

W) 7-Zip: For the native build under Windows, the 7-Zip tool is used
   to uncompress the third-party packages (http://www.7-zip.org/).

You thus have to download and install CMake, Python, Mercurial and
possibly 7-Zip first. The path to their executable must be in the
"PATH" environment variable.

The other third party dependencies are automatically downloaded by the
CMake scripts. The downloaded packages are stored in the
"ThirdPartyDownloads" directory.


Building Orthanc at a glance
----------------------------

To build Orthanc, you must:

1) Download the source code (either using Mercurial, or through the
   released versions). For the examples below, we assume the source
   directory is "~/Orthanc".

2) Create a build directory. For the examples below, we assume the
   build directory is "~/OrthancBuild".



Native Linux Compilation
------------------------

To build binaries with debug information:

# cd ~/OrthancBuild
# cmake -DSTATIC_BUILD=ON -DCMAKE_BUILD_TYPE=Debug ~/Orthanc
# make
# make doc


To build a release version:

# cd ~/OrthancBuild
# cmake -DSTATIC_BUILD=ON -DCMAKE_BUILD_TYPE=Release ~/Orthanc
# make
# make doc


Under Linux, you have the possibility to dynamically link Orthanc
against the shared libraries of your system, provided their version is
recent enough. This greatly speeds up the compilation:

# cd ~/OrthancBuild
# cmake -DSTATIC_BUILD=OFF -DCMAKE_BUILD_TYPE=Debug ~/Orthanc
# make



Native Windows build with Microsoft Visual Studio 2005
------------------------------------------------------

# cd [...]\OrthancBuild
# cmake -DSTANDALONE_BUILD=ON -G "Visual Studio 8 2005" [...]\Orthanc

Then open the "[...]/OrthancBuild/Orthanc.sln" with Visual Studio.

NOTES:
* More recent versions of Visual Studio should also work.
* You will have to install the Platform SDK (version 6 or above) for
  Visual Studio 2005:
  http://en.wikipedia.org/wiki/Microsoft_Windows_SDK.
  Read the CMake FAQ: http://goo.gl/By90B 



Cross-Compilation for Windows under Linux
-----------------------------------------

To cross-compile Windows binaries under Linux using MinGW, please use
the following command:

# cd ~/OrthancBuild
# cmake -DCMAKE_TOOLCHAIN_FILE=~/Orthanc/Resources/MinGWToolchain.cmake -DSTANDALONE_BUILD=ON -DCMAKE_BUILD_TYPE=Debug ~/Orthanc
# make



Native Windows build with MinGW (VERY SLOW)
-------------------------------------------

# cd [...]\OrthancBuild
# cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug [...]\Orthanc
# mingw32-make



Using ccache
------------

Under Linux, you have the opportunity to use "ccache" to dramatically
decrease the compilation time when rebuilding Orthanc. This is
especially useful for developers. Under Debian/Ubuntu, you would use:

# CC="ccache gcc" CXX="ccache g++" cmake "-DDCMTK_LIBRARIES=wrap;oflog" \
  -DSTATIC_BUILD=OFF -DCMAKE_BUILD_TYPE=Debug ~/Orthanc



Troubleshooting
---------------

The build instructions for specific Linux distributions are available at the following place:
https://code.google.com/p/orthanc/wiki/FAQ#I_use_the_Linux_distribution_XXX,_how_can_I_build_Orthanc?