From 4c210e3cc32146ee1b03091504b431e26e5c74f0 Mon Sep 17 00:00:00 2001 From: Cassidy James Blaede Date: Mon, 21 Jun 2021 11:10:37 -0600 Subject: [PATCH] README: Add 'Getting started' directions Based on #29, but a bit expanded and hopefully addressing concerns on that PR. Omits docs instructions for now as I'm not familiar with how that works. --- README.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/README.md b/README.md index abc6fca1..7c123a38 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,51 @@ libportal - Flatpak portal library ================================== libportal provides GIO-style async APIs for most Flatpak portals. + +## Getting started + +### The Meson build system + +`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. + +### Build and run portal-test + +If this is your first time building libportal, configure the project to include portal-test: + +``` +meson _build -Dbuild-portal-test=true +``` + +Otherwise, re-configure the project: + +``` +meson configure _build -Dbuild-portal-test=true +``` + +Then build: + +``` +ninja -C _build +``` + +And run the binary: + +``` +./_build/portal-test/portal-test +```