Project

General

Profile

Un ptit wiki » History » Version 12

Nicolas Beucher, 09/04/2009 10:02 PM

1 12 Nicolas Beucher
h1. Getting started with Mamba
2 4 Michel Bilodeau
3
4
h2. How to get the sources:
5
6
7
For  CMM members, please indicate the following url to your svn client:
8
9
10
11
bq. svn co svn+ssh://<login>@malte.ensmp.fr/svn/mamba/trunk 
12
13
For the others:
14
15
16
bq. svn co svn+ssh://<login>@malte.ensmp.fr/home/mamba/svn/mamba/trunk 
17 11 Nicolas Beucher
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). 
18 4 Michel Bilodeau
19 5 Michel Bilodeau
h2. How to compile
20
21 12 Nicolas Beucher
Compilation is ensured by python distutils tools.
22 1 Michel Bilodeau
23 12 Nicolas Beucher
You will need the following tools :
24 1 Michel Bilodeau
25 12 Nicolas Beucher
* Python version 2.6 or earlier with the distutils package.
26
* Swig version 1.3.33 or earlier.
27
* GCC version 4.3.0 or earlier (or its windows version MingW32, should work with visual C++ 2008)
28
* Standard C libraries
29
30
Make sure you have correctly installed the required tools and that they appear in your PATH environment variable.
31
32
The following process works for all platforms :
33
34
=>To compile and install the mamba library :
35
# Browse to src/mambaApi
36
# type :
37
> bq. python setup.py build_ext build             (Linux)
38
> OR
39
> bq. python setup.py build_ext build             (Windows with visual C++)
40
> bq. python setup.py build_ext -cmingw32 build   (Windows with mingw32) 
41
42
# You can then install it.
43
> bq. python setup.py install
44
    
45
Alternatively, you can created package/executable that will allow you to distribute the compiled library.
46
47
+On windows :+
48
bq. python setup.py build_ext bdist_wininst            (Windows with visual C++)
49
bq. python setup.py build_ext -cmingw32 bdist_wininst  (Windows with mingw32)
50
then to install, double-click on the created exe inside the dist directory.
51
        
52
+On linux :+       
53
bq. python setup.py build_ext bdist
54
you can then find a package under the dist directory, extracting it will install the library in the correct path.
55
56
All the files are installed in the site-packages directory of your current python installation under directory mambaIm.
57
58
For more options see the distutils documentation.
59
60 1 Michel Bilodeau
h2. It doesn't compile
61
62 12 Nicolas Beucher
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 of the required tools or that it cannot find it (not in the PATH). On windows make sure sure that all the required tools are installed and that their path does not contains any "space".
63 1 Michel Bilodeau
64 12 Nicolas Beucher
h2. How about the realtime module ?
65
66
Under linux, the realtime module addon can be compiled and installed if you want.
67
You will need SDL libraries installed along with v4l and v4l2 api (libv4l).
68
69
=>To compile and install the mamba realtime module (linux only) :
70
# Browse to src/mambaAddons/realtime
71
# type :
72
> bq. python setupRT.py build_ext build
73
74
# You can then install it.
75
> bq. python setupRT.py install