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