Commit 7602b89c authored by Arnaud Blanchard's avatar Arnaud Blanchard

Update doc

parent ca12b0b7
DEVELOPMENT
=============
Installing
==========
Compiling
--------------
Use `./compile.sh <project directory> [Release|Debug|RelWithDebugInfo|RelMinSize]` (blc, blv4l2, ...)
Some projects like the libraries need to be installed. In this case you can do **`./install <project> [<Release|Debug|RelWithDebugInfo|RelMinSize>]`**
The binaries will be in `build/<Release|Debug|RelWithDebugInfo|RelMinSize>`and the libraries in the subdirectory `lib`.
The cmake builds will be in `build/cmake_files_<Release|Debug|RelWithDebugInfo|RelMinSize|eclipse|xcode>/`.
This will compile and install the project. You computer password may be requested if the install needs to access to `/usr/local`or similar. It is the case for the basic libraries. It is safe to use './install.sh' for all projects even those which does not need install. Using **`./run.sh <project directory`** (see compiling below) may be simpler.
`build/` is a symbolic link toward a real directory which is outside your current directory usually :`../blaar_build`.
The prefix automatically takes the value of your directory (i.e. if you are in `test_blaar/` the real build directory will be `../test_blaar_build/`. This allows you to have different versions in different directories (we recommend to use git branches instead of different copies).
If you want install all the cloned submodules, use **`./install.sh all [<Release|Debug|RelWithDebugInfo|RelMinSize>]`**. If your project is not a cloned submodule it will not be installed by `all`. Precise your exact project directory.
When your are coding on your project you should use `./run.sh <project directory>` instead of directly calling your binary. Like this, you are sure to use the last compilation of your code. **./run.sh** automatically compiles you code before executing it.
Compiling
=========
Use `./compile.sh <project directory> [Release|Debug|RelWithDebugInfo|RelMinSize]` (blibs/blc_core, blgtk, ...)
The compile and install process uses [CMake](https://cmake.org). The intermediate files generated are in `build/cmake_files_<Release|Debug|RelWithDebugInfo|RelMinSize|eclipse|xcode>` . Do not hesitate to remove them to solve problems during cmake compilation.
The binaries will be in `build/<Release|Debug|RelWithDebugInfo|RelMinSize>`and the libraries in the subdirectory `lib`. The cmake builds will be in `build/cmake_files_<Release|Debug|RelWithDebugInfo|RelMinSize|eclipse|xcode>/`. Remove this directory to solve cmake problems during compilation.
`build/` is a symbolic link toward a real directory which is outside your current directory usually :`../blaar_build`. The prefix automatically takes the value of your directory (i.e. if you are in `test_blaar/` the real build directory will be `../test_blaar_build/`. This allows you to have different versions of blaar in different directories (we recommend to use git branches instead of different copies).
Remove the **cmake_files_<Release|Debug|RelWithDebugInfo|RelMinSize|eclipse|xcode> as soon
When your are coding on your project you should use **`./run.sh <project directory>`** instead of directly calling your binary. Like this, you are sure to use the last compilation of your code. `./run.sh <project directory>` automatically compiles your code before executing it.
Installing
----------
Debugging
=========
Some projects like the libraries need to be installed. In this case you can do `./install <project> [<Release|Debug|RelWithDebugInfo|RelMinSize>]`
In case of problem you may use a debugger: **`./debug.sh <project directory>`** or realize memory checks with valgrind: **`./valgrind.sh <project directory>`**. The project is automatically recompiled in debug mode and the appropriate debugger (gdb, lldb, valgrind) is called.
This will compile and install the project. You can use it for all the projects enven those which does not need install. You computer password may be requested.
If the problem appear in a library you may reinstall all the projects in Debug mode: **` ./install.sh all Debug`**
If you want install all the submodules use `all`: **`./install.sh all [<Release|Debug|RelWithDebugInfo|RelMinSize>]`**
If your project is not a git submodule it will not be installed and compiled. Use `./run.sh` as explained above.
Eclipse
=======
Debugging
---------------
In case of problem you may debug: `./debug.sh <project directory>` or realize memory check with valgrind: `./valgrind.sh <project directory>`. The project is automatically recompiled in debug mode and the appropriate debugger (gdb, lldb, valgrind) is called.
`./eclipse_create_project.sh <project dir>`
Follow the instruction to import the project in eclipse
If the problem appear in another project you may reinstall all the projects in Debug mode: ` ./install.sh all Debug`
If you want to debug in eclipse : **debug->debug configurations->new C/C++ application->browse: `<blaar_build>/Debug/<project>`**
Eclipse
----------
```bash
./eclipse_create_project.sh <project dir>
```
Follow the instruction to import the project
Xcode (Mac OSX)
===============
If you want to debug: **debug->debug configurations->new C/C++ application->browse: `<blaar_build>/Debug/<project>`**
`./xcode_project <project>`
Xcode (Mac OSX)
-----------------------
```bash
./xcode_project <project>
```
**xcode** will be automatically launched with the project
**xcode** will be automatically launched with the project.
If you want to debug: select an executable target instead of `ALL_BUILD` and press the play button. To precise arguments, click on the executable target then `Edit Echeme` then `Arguments`->`Argument Passed On Launch`. Similarly, you can ask the target to be executed in a specific directory going to `Options`->`Working Directory`.
Source documentation
====================
Code documentation
==================
To build the source documentation with **doxygen**: `./doc_api.sh <project>`.
Add **-c** option if you want only the C accessible API.
To see the code documentation: **`./doc_api.sh <project>`.**. Add **-c** option if you want only want the C accessible. The documentation will be opened automatically with your default browser.
The built documentation will be opened automatically. For information, it is in `build/<cpp_api|c_api>/<project>/html/index.html` and will be opened automatically.
The documentation is built with doxygen in `build/<cpp_api|c_api>/<project>/html/index.html`.
Useful command for git
======================
Useful commands for git
=======================
Merge
=====
......@@ -21,7 +20,3 @@ You want to get only yours modifications: ` git checkout --ours <files>`
Then `git add <files>`to say you fix the conflict.
Remove a specific commits: `git revert <commit id>`
[![logo](logo_blaar.png)](http://blaar.org)
Basic Libraries And Applications for Robotics
=====================================
=============================================
BLAAR is still in active development. It is **not stable yet** and will evolve. Do no hesitate to [ask for improvements or notify issues](https://framagit.org/blaar/blaar/issues).
Basic Libraries for C/C++
-------------------------
- [blc_core](https://framagit.org/blibs/blc_core) : Generic helpers in C or C++ used by all other blaar projects
- [blc_channel](https://framagit.org/blibs/blc_channel) : Tools to use shared memory in synchrone ( in test) and asynchrone mode
- [blc_image](https://framagit.org/blibs/blc_image) : Manipulate blc_array as images. Can load and save them as png files
- [blc_program](https://framagit.org/blibs/blc_program) : Parse arguments and interacts with user in commandline.
Applications for C/C++
----------------------
Standard blaar applications
---------------------------
- [bapps](https://framagit.org/blaar/bapps.git) : Generic tools to manipulate blc_channels (find max, generate oscillators, ...)
- [bapps](https://framagit.org/blaar/bapps.git) : Generic executables to manipulate blc_channels (find max, generate oscillators, ...)
In `scripts/` you have bash scripts which combine applications to produce higher level functionalities. They may require you add optional modules.
Install
=======
......@@ -25,34 +29,23 @@ Install
Adding submodules
-----------------
You will only have basic framework. You may add submodules as needed.
To add project use : `git submodule add <project repository>`
You will only have basic framework. You may add submodules as needed. To add modules use : `git submodule add <module repository>`. Once you have added a module, install it with **`./install.sh <module>|all`**
Once you have added a submodule, install it with `./install.sh <project>|all`
**all** install all your projects (submodules) at once.
**all** install all your cloned modules at once.
Update the installation
-----------------------
`update_and_install_all.sh`
**`./update_and_install_all.sh`**
This will download the new code and install it for blaar and each submodule
Usage
=====
bin/<executable> [--help] [others args ...]
All the project has the **--help** which will show a small description of the program and the list of options with theirs descriptions.
**`<binary> [--help] [args ...]`**
It is usefull to add to your `~/.bashrc` on Linux or to your `~/.bash_profile` on OSX:
export PATH=$PATH:~/blaar/bin
Assuming your blaar is in your home ~ .
This allows you to call any blaar executable from anywhere.
The availble blaar binaries are in `bin/` directory. All the binaries accept the **`--help`** option which shows a description of the project and details of possible others options. You can also use scripts which run a combinaison of binaries and other scripts. They are in `scripts/` directory and accept the **`-h`** option which shows a description of the project and details of possible others options.
When your are in development your are advised to see [developement](DEVELOPMENT.md).
......@@ -60,3 +53,5 @@ You can see an [**example**](https://framagit.org/blibs/blc_core/wikis/home) of
You can create you first project with this example of [image manipulation](https://framagit.org/blibs/blc_image/wikis/home)
**SEE ALSO** [examples](EXAMPLES.md) [development](DEVELOPMENT.md) [git](GIT.md) [Frequently Asked Questions](FAQ.md)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment