
How to compile and install Choreonoid
=====================================

For Ubuntu Linux
================

For the Ubuntu Linux version 10.04 - 11.10, Choreonoid can be compiled
according to the following instructions.

1. Installing packages needed for compiling Choreonoid

By invoking "install-requisites-ubuntu.sh" in the "misc/script" directory,
the tools and libraries required for compiling Choreonoid are installed.


2. Generating Makefiles with CMake

Choreonoid uses CMake (http://www.cmake.org/) as a standard build system.
The building procedure of Choreonoid is described by CMake scripts,
and Makefiles can be generated by using CMake commands.

For example, type the following command in the top source directory:

$ cmake .

Then Makefiles for compiling Choreonoid are generated.

You can also specify various options for the compile.
Please see the CMake documentation to do that.


3. Compile

Please type the make command:

$ make

If your PC has multi-core processors, parallel compile with -j option is useful
to shorten the whole compile time. For example, if you want to simultaneously
invoke eight processes for the compile, type the following command:

$ make -j 8

After the compile succeeds, execution file "choreonoid" is generated in the "bin"
directory. You can invoke Choreonoid by typing the following command:

$ bin/choreonoid


4. Installation

As is described above, Choreonoid binaries generated in the original source tree
can be directly used without installation. However, if you want to install them
into the system directories, it can be done by the following command:

$ make install

In default, program and data files are installed into the "/usr/local" directory.
It can be changed by setting the "CMAKE_INSTALL_PREFIX" variable of CMake.


For Windows
===========

1. Installing compile tools

Currently we have only tested the compile using Visual C++ 2008 and 2010.
So please install either of them in advance.

As well as Linux, CMake (http://www.cmake.org/) is used for describing
the compile procedure and project files of Visual Studio are generated with it.
So please install CMake in advance.


2. Installing requisite libraries

Please manually install the following libraries:


* Boost C++ Libraries

Since choreonoid requires some binary files of the boost libraries,
you should make the boost binaries or get some binary packages.
The site of Boost Pro (http://www.boostpro.com) provides binary packages
of the boost, and downloading a package and installing it is a good solution.

* Qt

You can get it from http://qt.nokia.com/.

* OpenSceneGraph

You can get it from http://www.openscenegraph.org/.


3. Generating project files with CMake

Please generate Visual Studio project files by using CMake.
Using "cmake-gui.exe" is recommended and you should manually specify
the paths of the above libraries.


4. Building Choreonoid using Visual Studio

By loading a solution file (.sln) generated by CMake, the projects for 
building Choreonoid appear on the Visual Studio IDE.

By building the "ALL_BUILD" project, all components are built.

Unlike the compile on Linux, the binary files generated under the original
source (building) directory cannot be directly executed from there, and
the installation is required.

By building the "INSTALL" project on the Visual Studio IDE, the program and
data of Choreonoid are installed into the directory specified with the
"CMAKE_INSTALL_PREFIX" variable.
