%%
%% This file is part of the ViTE project.
%%
%% This software is governed by the CeCILL-A license under French law
%% and abiding by the rules of distribution of free software. You can
%% use, modify and/or redistribute the software under the terms of the
%% CeCILL-A license as circulated by CEA, CNRS and INRIA at the following
%% URL: "http://www.cecill.info".
%% 
%% As a counterpart to the access to the source code and rights to copy,
%% modify and redistribute granted by the license, users are provided
%% only with a limited warranty and the software's author, the holder of
%% the economic rights, and the successive licensors have only limited
%% liability.
%% 
%% In this respect, the user's attention is drawn to the risks associated
%% with loading, using, modifying and/or developing or reproducing the
%% software by the user in light of its specific status of free software,
%% that may mean that it is complicated to manipulate, and that also
%% therefore means that it is reserved for developers and experienced
%% professionals having in-depth computer knowledge. Users are therefore
%% encouraged to load and test the software's suitability as regards
%% their requirements in conditions enabling the security of their
%% systems and/or data to be ensured and, more generally, to use and
%% operate it in the same conditions as regards security.
%% 
%% The fact that you are presently reading this means that you have had
%% knowledge of the CeCILL-A license and that you accept its terms.
%%
%%
%% ViTE developers are:
%%
%%        - COULOMB Kevin
%%        - FAVERGE Mathieu
%%        - JAZEIX Johnny
%%        - LAGRASSE Olivier
%%        - MARCOUEILLE Jule
%%        - NOISETTE Pascal
%%        - REDONDY Arthur
%%        - VUCHENER Clément 
%%

\chapter{Installation}

\section{Direct installation from packages}

\ViTE can be downloaded from its website~: \url{http://vite.gforge.inria.fr/}. %Click on the download button and depending of your Operating System, the best choice will be proposed. You can also 
Go into the \textit{download} section where you will find the different packages (for Linux, Windows...) and its sources.
If you want to compile the source code, please read the instructions on the paragraph \ref{compilation}.


\textbf{Quick install for Debian/Ubuntu users:}
Since ViTE is already available on Debian repository, you can install it with the following:

\begin{verbatim}
$ apt-get install vite
or
$ aptitude install vite
\end{verbatim}
The available version for these packages is the 1.1. These commands should also install the needed package.


Otherwise, in order to install \ViTE, you need to have the following libraries on your computer~:
\begin{itemize}
\item libqt4-dev.
\item libqt4-opengl-dev.
\end{itemize}



\section{Compilation}\label{compilation}
The compilation of \ViTE can be useful to customize it. \ViTE can be compiled using the cmake software or the configure script provided.

Currently, there are optional features that can be enabled or disabled~:
\begin{itemize}
\item OTF trace files support ;
\item Tau trace files support (experimental) ;
\item Spinning rabbit (which is fun 5 minutes but no more).
\end{itemize}

\subsection{Using CMake}
The first way is to use \textit{cmake} (\url{http://www.cmake.org/}), a portable way to compile. On Windows system, a GUI is provided in order to compile. The rules to follow are the same as for Linux. For Linux users, the easiest way is to build a directory at the root of ViTE sources~:

\begin{verbatim}
mkdir obj && cd obj
ccmake ..
\end{verbatim}

Then type 'C' to configure the CMake cache. You will see the windows \ref{cmake0}. After that, you can check if the options set are good (additional directories and libraries). Then, type 'C' then 'G' to generate the Makefile. If libraries or directories are not found, you will get errors warning you to check the paths (like in the figure \ref{cmake1}).
To finish, type \verb?make? and it will compile.

\begin{figure}[htbp]
\centering
\includegraphics[width=10cm]{images/cmake0}
\caption{\label{cmake0}CMake window}
\end{figure}

\begin{figure}[hbpt]
\centering
\includegraphics[width=10cm]{images/cmake1}
\caption{\label{cmake1}CMake error}
\end{figure}

For Windows users, the easiest way is to create a visual C++ project if you have it and compile with it.
You can also create create a mingw Makefile, however, the OTF library is only supported with visual c++ compiler so it could not compile/work with mingw.

\subsection{Using the configure script}

The second way is to use the configure script. It works on Linux and MacOS.
Go to the source directory and type \verb?./configure? and then \verb?make? on the console.

The configure script is useful because on some implementation, in order to compile Qt sources, you have qmake or qmake-qt4. Also, options are available to customise your compilation. See \verb?./configure -h? (figure \ref{configurehelp}) for more informations.

For example, if the directory of \textit{ViTE} is in your home, hit~:
\begin{verbatim}
cd ~/vite/src && ./configure && make
\end{verbatim}
The binary will be in the \verb?bin/? directory under the name of \verb?vite?.

\lstset{frameround=fttt}
\begin{lstlisting}[frame=trBL,caption={./configure -h},label=configurehelp]
ViTE configuration shell-script
Usage:
 ./configure [ options ]
Options:
  -h, --help
        print this page

  --release
        compiles in release mode (by default)

  --debug
        compiles in debug mode

  --enable_spinning_logo
        makes the rabbit to turn when no trace is loaded

  --enable_otf
        enables the otf support (An OTF release is provided
        in the externals/otf directory)

  --otf_dir=<path>
        path to the OTF library

  --otf_incdir=<path>
        include path to the OTF headers

  --otf_libdir=<path>
        library path to the OTF libraries

  --enable_tau
        enables the tau support

  --tau_dir=<path>
        path to the TAU library

  --tau_incdir=<path>
        include path to the TAU headers

  --tau_libdir=<path>
        library path to the TAU libraries
\end{lstlisting}
