summaryrefslogtreecommitdiffstats
path: root/docs/0_Installation.md
blob: f02fa88b1c94e84d1da52142e82518f5e685ecae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Installation

## Pre-requisites

[Setup the pre-requisite](http://docs.automotivelinux.org/docs/devguides/en/dev/reference/host-configuration/docs/1_Prerequisites.html) then [install the Application Framework](http://docs.automotivelinux.org/docs/devguides/en/dev/reference/host-configuration/docs/2_AGL_Application_Framework.html) on your host.

You will also need to install lua-devel >= 5.3 to be able to build the project.

Fedora:

```bash
dnf install lua-devel
```

OpenSuse:

```bash
zypper install lua53-devel
```

Ubuntu (>= Xenial), Debian stable:

```bash
apt-get install liblua5.3-dev
```

## Grab source and build

Download the **afb-test** binding source code using git:

```shell
git clone --recurse-submodules https://gerrit.automotivelinux.org/gerrit/apps/app-afb-test
cd afb-test
mkdir build
cd build
cmake .. && make
```

## Test natively on your host

If you want to use the **afb-test** binding natively on your host, you have to
install it. Then *pkg-config* tool can find the **afb-test.pc** and you can
use **afm-test** launcher:

```bash
sudo make install
# Eventually set PKG_CONFIG_PATH environment variable if not installed in the
# system directory
export PKG_CONFIG_PATH=<path-to-pkgconfig-dir>:${PKG_CONFIG_PATH}
# The same for the PATH environment variable where afm-test has been installed
export PATH=<path-to-afm-test-dir>:${PATH}
```

Then you can test other binding using the **afm-test** launcher. Example here,
with another binding project using **app-templates** submodule or the
**cmake-apps-module** CMake module:

> **Note** CMake module is the new way to use **app-templates**

```bash
cd build
cmake ..
make
afm-test package package-test
```