/** \page installation Getting started \imp is available in a variety of different ways. If you are just planning on using existing \imp code and run on a standard platform, you may be able to install a pre-built binary. See the \salilab{imp/download.html,download page}. If you are planning on contributing to \imp, you should download and build the source. See the next section for more information. If you are building \imp from source, read the following sections, otherwise skip to the last one. -# \ref userbuild "Building and installing" -# \ref devbuild "Building IMP for developers" -# \ref prereq "Prerequisites" -# \ref next "Where to go next" \section userbuild 1. Building and installing basics Building \imp from source is straightforward if the \ref prereq "prerequisites" are already installed. First, obtain the source code tarball from the \salilab{imp/download.html,download page}. code there -# Extract the tarball \command{tar -xvzf imp-1.0.tar.gz} This will create a directory called \c imp-1.0 containing all the source. -# change into that directory and build by doing \command{scons prefix=place_to_install_imp all} -# install \imp by doing \command{scons prefix=place_to_install_imp install} (If you are familiar with \svn, you can also use an SVN client to check out the same code from our Subversion repository at http://svn.salilab.org/imp/tags/release-1.0/) If there are build errors -# make sure all prerequisites are installed -# read the scons help (\c scons \c -h) to figure out any more arguments you need to pass to scons in order to make sure it finds needed external libraries. . If you cannot figure things out, feel free to post on the \impusers list. If you are likely to be building \imp repeatedly, it can be useful to put the arguments to \c scons into a config file. This is a file called \c config.py located in the \imp directory (the one containing the \c SConscript file). For %example one of ours looks like \verbatim import os modeller=os.environ['MODINSTALLSVN'] prefix=os.environ['HOME']+"/fs" path='/opt/local/bin' includepath='/opt/local/include:'+os.environ['HOME']+"/fs/include" libpath=os.environ['HOME']+"/fs/lib" build='debug' deprecated=False \endverbatim \section devbuild 2. Building and installing for developers To get the latest development version of \imp, it is necessary to check it out from our \impsvn using an \svn client: \command{svn co http://svn.salilab.org/imp/trunk imp} This will create a directory called \c imp containing all the source at the SVN trunk. We recommend you use use this. Since this is the place that people commit changes to, one should consult the nightly build logs before updating to make sure things are working. In addition, consult the \c ChangeLog file to see what has changed since your last update. When developing code for \imp, it is useful to be able to run it without installing everything. To aid this, we provide a script located at \c tools/imppy.sh which runs a command after setting up the environment so that dynamically linked libraries and python modules can be found. For %example, to run Python such that it can use \imp do \command{./tools/imppy.sh python} In addition, we recommend doing out of source builds (building \imp in a directory other than the one containing the source files). Doing this allows several different versions of \imp to be built using the same source files. For example, an optimized one (using \c build='fast') and a debug one (\c build='debug'). To set this up -# make a clean checkout of the source code \command{svn co http://svn.salilab.org/imp/trunk src} -# make a directory for your debug build \command{mkdir imp-debug} -# setup the debug directory \command{src/tools/setup-out-of-source-build imp-debug} -# edit \c imp-debug/config.py as desired -# change into \c imp-debug \command{cd imp-debug} -# build \command{scons -j 2} Note that this probably doesn't work on Windows. You can update your copy of \imp, by typing \command{svn update} \section prereq 3. Prerequisites In order to obtain and compile \imp, you will need: - scons (0.98 or later) - Boost (1.33 or later) - Developers will also need a Subversion (svn) client to access the repository If you wish to build the Python interfaces, you will also need: - Python (2.3 or later) - SWIG (1.3.40 or later) If you install headers, libraries or tools anywhere other than the standard locations (i.e. \c /usr/lib and friends) then you need to tell \c SCons where to find them. This is done using the `includepath`, `libpath`, and `path` options (paths are colon-separated). These can either be passed to scons as command line arguments or put in the \c config.py file. For example \command{scons includepath=/usr/local/include:/opt/local/include libpath=/usr/local/lib path=/usr/local/bin} Tells \imp to search to headers and libraries in the provided locations in addition to the standard ones. Notes on how to work around various platform issues can be found at \wiki{build, the Build Notes page in the wiki}. \subsection mac Getting prerequisites on a Mac Mac users should use one of the available collections of Unix tools, either \external{www.macports.org/, MacPorts} or \external{www.finkproject.org/, Fink}. If you use MacPorts, you must add \c /opt/local/bin to your path (either by modifying your shell's config file or by making an \c environment.plist file-see the \salilab{imp/wiki/FAQ, FAQ}) and then do \command{sudo port install boost scons swig-python} to install the needed libraries and tools. Alternatively, you can build the packages yourself from source code, but really, why bother. \note Mac OS X 10.5 and 10.6 include a 'swig' binary, but it is too old to use with IMP. If you install SWIG with MacPorts above, you will need to make sure SCons picks up your SWIG rather than Apple's by setting the `path` option when running `scons`. \note Do not install any C++ headers in `/usr/include` on your Mac as the compiler assumes any such headers are C headers. \subsection windows Getting prerequisites on Windows The SCons build system should work on Windows with the command line Microsoft Visual Studio compiler (`cl`) but it has not yet been tested; some of the subsidiary scripts may assume a Unix environment. (In the Sali lab, you can build a Windows version on `synth` by running `scons` in the usual way, giving the `wine=true` command line option.) \subsection linux Getting prerequisites on Linux All of the prerequisites should be available as pre-built packages for your Linux distribution of choice. \subsection optional Optional dependencies Locally built documentation will look prettier if you have \external{www.graphviz.org/,graphviz} installed. It is available as part of most unix tool sets (MacPorts, all linux distributions etc.). If you want to use \imp with MODELLER, you should use version 9v7 or later and use the following argument to scons \command{scons modeller=path/to/modeller} (The Linux Modeller RPM installs in /usr/, while the Mac installer installs in /Library/modeller9v7/.) Certain geometric computations will be faster, better or more reliable if \ref cgal "CGAL" is installed. \section next 4. Where to go next You are now ready to use \imp within Python and C++. Everyone should read the \ref introduction "Introduction" and developers should then move on to the \ref devguide "Developer guide". */