Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README: Add 'Getting started' directions #43

Merged
merged 4 commits into from
Jul 28, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,65 @@ libportal - Flatpak portal library
==================================

libportal provides GIO-style async APIs for most Flatpak portals.

## Getting started

`libportal` uses Meson to build its projects. To install Meson on your system, follow the [Getting Meson instructions](https://mesonbuild.com/Getting-meson.html). If your system is missing a dependency, Meson will tell you which one. How you install your missing dependencies is up to you.

### Build libportal

The first time you build libportal, give `meson` a directory to build into; we recommend `_build`:

```
meson _build
```

Then use `ninja` to build the project, pointing it to your build directory:

```
ninja -C _build
```

For subsequent builds, you only need to use the `ninja -C _build` command.

### Passing options

libportal includes [Meson build options](https://mesonbuild.com/Build-options.html#build-options) for components that can optionally be built. After first running `meson _build`, you can view the available options with:

```
meson configure _build
```

To change an option, re-configure the project:

```
meson configure _build -Dbuild-portal-test=true
cassidyjames marked this conversation as resolved.
Show resolved Hide resolved
```

You can also pass in options right from the start, e.g. with:

```
meson _build -Dbuild-portal-test=true
```

Then build:

```
ninja -C _build
```

## Optional components

### `portal-test` and `portal-test-qt`

Set the `build-portal-test` or `build-portal-test-qt` option to `true` and build the project to compile the corresponding binary. Then run the binary, e.g.:

```
./_build/portal-test/portal-test
cassidyjames marked this conversation as resolved.
Show resolved Hide resolved
```

or

```
./_build/portal-test/portal-test-qt
```