=======================================
Enable Viacam Installation Instructions
=======================================

This document describes how to compile and install Enable Viacam for
GNU/Linux and Windows platforms.

Linux
=====

- Pre-requisites
  --------------
  wxWidgets >= 2.8.x (recommended 3.0.1 or higher)
  opencv >= 2.4
  gtk+-2.0 or gtk+-3.0
  libxtst
  libxext 

  For Debian/Ubuntu, see file debian/control for exact dependencies.

- Generic compilation and installation
  ------------------------------------
  ./autogen.sh
  ./configure
  make 
  make install

- Generic compilation and installation (debug mode)
  -------------------------------------------------
  ./autogen.sh
  ./configure --enable-debug
  make 
  make install

- Notes on using Eclipse CDT
  --------------------------
  To import the project into a workspace:

    File > Import... > General > Existing projects into workspace

    Do not select an archive file. Set the root directory to where the
    .project and .cproject files are located.

  If Eclipse finds a lot of undefined symbols in .h/.cpp files click
  project context menu and select Index->Rebuild and Index->Freshen All Files

  To develop using Eclipse, first run from the console:

  ./autogen.sh
  ./configure --enable-debug --prefix=/tmp/eviacam
  make -j <number of processor cores>
  make install
    
  Run manually to see if it works
  /tmp/eviacam/bin/eviacam

  Click project context menu -> Debug As -> Debug Configurations...
  Expand C/C++ Application, click eviacam entry
  In C/C++ Application textbox put /tmp/eviacam/bin/eviacam
  Click Close and Yes to save changes

  Click Bug icon to debug to start a debug session.
  

- Source package generation
  -------------------------
  make git-dist [TAG="v1.0.1"]

  The optional TAG parameter can be used to selected a commit given its tag.

- DEB source packages
  -------------------
  To build a debian source package, first switch to debian branch:

    git checkout debian

  Make sure that debian/changelog is up to date. Run the following command
  and check that contents are correct:

    dch -i

  The run gen.sh script with the appropriate tag (version in tag and
  changelog file SHOULD match):

    ./gen.sh v2.1.0


- DEB Packages
  -------------
  (obsolete method)
  Before generating any .deb package make sure file debian/changelog is up
  to date. Run the following command and check that contents are correct:

    dch -i

  * DEB source package generation

    make deb-src [TAG="v1.0.1"]
	  
  * changes file generation
     Useful when generating packages for several distros. Assumes previous 
     step has been done. For each distro edit debian/changes with 

     dch -i

    add the right information then run

     make deb-src-changes [TAG="v1.0.1"]
  
  * DEB binary package generation

     make deb [TAG="v1.0.1"]
	  
- RPM package generation
  ----------------------
  (this section is obsolete)

  make rpm


Windows
=======

- Pre-requisites
  --------------
  Visual Studio 2013
  wxWidgets >= 2.8.x (recommended 3.0.1 or higher)
  opencv >= 2.4 (tested with 2.4.9, custom compilation recommended)
  Windows SDK for Windows 7 and .NET Framework 4 7.1 (tested 7.1.7600.0.30514)
  MinGW (bash, autoconf, automake, m4)
  Inno Setup (to create the installer)

- Building using Visual Studio 2013
  ---------------------------------
  Set the following environment variables:
    WXWIN to point to wxWidgets folder
    CVPATH to point to opencv folder
    DSHOW_SAMPLES to point DirectShow samples directory usually at:
    %PROGRAMFILES%\Microsoft SDKs\Windows\v7.1\Samples\multimedia

  From a bash shell, cd to the source code directory and run:
    ./autogen.sh
    ./configure --disable-dependencies-check

  Open the .sln file.

  Once the program is compiled, you may wish to create the installer using
  Inno Setup.
