linglong/INSTALL.md

59 lines
1.1 KiB
Markdown
Raw Permalink Normal View History

2021-08-30 10:54:38 +08:00
# Installation
## Build
```bash
mkdir -v build
cd build
cmake ..
make -j
2021-08-30 10:54:38 +08:00
sudo make install
```
## Build For Developers
```bash
mkdir -v build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_DEBUG_SANIT=address ..
make -j
sudo make install
```
DCMAKE_DEBUG_SANIT = 'address' open asan for debug builds
DCMAKE_DEBUG_SANIT = 'thread' open tasn for debug builds
## Run
2021-08-30 10:54:38 +08:00
```bash
# install repo
> curl https://sh.linglong.dev | sh
2021-08-30 10:54:38 +08:00
# install an app, just in deepin
> ll-cli install com.163.music
2021-08-30 10:54:38 +08:00
# run app with sandbox
> ll-cli run com.163.music
2021-08-30 10:54:38 +08:00
# show running container
> ll-cli ps
App ContainerID Pid Path
2021-08-30 10:54:38 +08:00
bc000426d8884c7fbe804996f24144ce 21751 @ /run/user/1000/linglong/bc000426d8884c7fbe804996f24144ce
# kill container
> ll-cli kill bc00
2021-08-30 10:54:38 +08:00
```
## Coverage Test
add --coverage in CMakeLists.txt
```bash
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
```
use gcov、lcov to generate convert html report, make shure at the top level of the project.
```bash
./scripts/code_coverage.sh
```