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.

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`.

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)