Project

General

Profile

Un ptit wiki » History » Revision 12

Revision 11 (Nicolas Beucher, 05/05/2009 08:28 PM) → Revision 12/14 (Nicolas Beucher, 09/04/2009 10:02 PM)

h1. Getting started with Mamba Un ptit wiki 


 h2. How to get the sources: 


 For    CMM members, please indicate the following url to your svn client: 



 bq. svn co svn+ssh://<login>@malte.ensmp.fr/svn/mamba/trunk  

 For the others: 


 bq. svn co svn+ssh://<login>@malte.ensmp.fr/home/mamba/svn/mamba/trunk  
 svn co svn+ssh://<login>@malte.ensmp.fr/svn/mamba/trunk - Don't forget to edit you .ssh/config to add specific configuration for malte.ensmp.fr (port 2200).  

 h2. How to compile 

 Compilation is ensured by python distutils tools. On linux, osx, cygwin do: 

 You will need the following tools : 

 * Python version 2.6 or earlier with the distutils package. 
 * Swig version 1.3.33 or earlier. 
 * GCC version 4.3.0 or earlier (or its windows version MingW32, should work with visual C++ 2008) 
 * Standard C libraries 

 Make sure you have correctly installed the required tools and that they appear in your PATH environment variable. 

 The following process works for all platforms : 

 =>To compile and install the mamba library : 
 # Browse to src/mambaApi 
 # type : 
 > bq. python setup.py build_ext build               (Linux) 
 > OR 
 > bq. python setup.py build_ext build               (Windows with visual C++) 
 > bq. python setup.py build_ext -cmingw32 build     (Windows with mingw32)  

 # You can then install it. 
 > bq. python setup.py install 
    
 Alternatively, you can created package/executable that will allow you to distribute the compiled library. make pylib 

 +On windows :+ 
 bq. python setup.py build_ext bdist_wininst              (Windows with visual C++) 
 bq. python setup.py build_ext -cmingw32 bdist_wininst    (Windows with mingw32) 
 then to install, double-click on the created exe inside the dist directory. 
        
 +On linux :+        
 bq. python setup.py build_ext bdist 
 you can then find a package under the dist directory, extracting it will install the library in the correct path. 

 All the files are installed in the site-packages directory of your current python installation under directory mambaIm. 

 For more options see the distutils documentation. 

 h2. It doesn't compile 

 The makefile relies on a python script "setup.py" which integrates all modules. If the script cannot perform the compilation it can means that you are missing one One of the required tools or that it cannot find it (not in the PATH). this module is an interface to generic    video grabbers which is platform dependent. On windows make sure sure that all the required tools are installed and that their path does not contains any "space". 

 h2. How about the realtime module ? 

 Under linux, the realtime module addon can be compiled and installed if you want. 
 You will need this interface    relies on external libraries: SDL libraries installed along with v4l and v4l2 api (libv4l). 

 =>To compile and install V4L.   

 A quick fix is to remove from setup.py references to the mamba modules realtime module (linux only) : 
 # Browse to src/mambaAddons/realtime 
 # type : 
 > bq. python setupRT.py build_ext build 

 # You can then install it. 
 > bq. python setupRT.py install and    mambaRTapi .