Un ptit wiki » History » Version 13
Nicolas Beucher, 09/04/2009 10:03 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 | =>To compile and install the mamba library : |
||
33 | 1 | Michel Bilodeau | # Browse to src/mambaApi |
34 | 12 | Nicolas Beucher | # type : |
35 | 13 | Nicolas Beucher | bq. python setup.py build_ext build (Linux) |
36 | 12 | Nicolas Beucher | |
37 | 13 | Nicolas Beucher | OR |
38 | |||
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 | 12 | Nicolas Beucher | # You can then install it. |
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 | 12 | Nicolas Beucher | bq. 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 | 12 | Nicolas Beucher | you can then find a package under the dist directory, extracting it will install the library in the correct path. |
57 | |||
58 | 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 | 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". |
65 | |||
66 | 1 | Michel Bilodeau | h2. How about the realtime module ? |
67 | 12 | Nicolas Beucher | |
68 | 1 | Michel Bilodeau | Under linux, the realtime module addon can be compiled and installed if you want. |
69 | 12 | Nicolas Beucher | You will need SDL libraries installed along with v4l and v4l2 api (libv4l). |
70 | |||
71 | =>To compile and install the mamba realtime module (linux only) : |
||
72 | # Browse to src/mambaAddons/realtime |
||
73 | # type : |
||
74 | 13 | Nicolas Beucher | bq. python setupRT.py build_ext build |
75 | 12 | Nicolas Beucher | |
76 | # You can then install it. |
||
77 | 13 | Nicolas Beucher | bq. python setupRT.py install |