From 0d238464d93ec8c966cc32d5944792ca14327fc4 Mon Sep 17 00:00:00 2001 From: Cassidy James Blaede Date: Mon, 21 Jun 2021 11:10:37 -0600 Subject: [PATCH 1/4] 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 +``` From e5c63dd8c2780bbf6d2d3d22dcff79bba027b7eb Mon Sep 17 00:00:00 2001 From: Cassidy James Blaede Date: Mon, 21 Jun 2021 11:35:33 -0600 Subject: [PATCH 2/4] README: Break up sections a little bettr --- README.md | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 7c123a38..48d76b2f 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,6 @@ 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 @@ -25,28 +23,44 @@ ninja -C _build For subsequent builds, you only need to use the `ninja -C _build` command. -### Build and run portal-test +### Passing options -If this is your first time building libportal, configure the project to include portal-test: +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 _build -Dbuild-portal-test=true +meson configure _build ``` -Otherwise, re-configure the project: +To change an option, re-configure the project: ``` meson configure _build -Dbuild-portal-test=true ``` +You can also pass in options right from the start, e.g. with: + +``` +meson _build -Dbuild-portal-test=true +``` + Then build: ``` ninja -C _build ``` -And run the binary: +## 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 ``` + +or + +``` +./_build/portal-test/portal-test-qt +``` From b17c073374d8868d5c181fdcfad1bc1fe7a1eec9 Mon Sep 17 00:00:00 2001 From: Cassidy James Blaede Date: Wed, 28 Jul 2021 09:45:35 -0600 Subject: [PATCH 3/4] README: Limit line length to 80 chars --- README.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 48d76b2f..c709625b 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,15 @@ 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. +`libportal` uses Meson to build its projects. To install Meson on your system, +follow the [Getting Meson instructions][1]. 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`: +The first time you build libportal, give `meson` a directory to build into; we +recommend `_build`: ``` meson _build @@ -25,7 +29,9 @@ 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: +libportal includes [Meson build options][2] for components that can optionally +be built. After first running `meson _build`, you can view the available options +with: ``` meson configure _build @@ -53,7 +59,8 @@ ninja -C _build ### `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.: +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 @@ -64,3 +71,6 @@ or ``` ./_build/portal-test/portal-test-qt ``` + +[1]: https://mesonbuild.com/Getting-meson.html +[2]: https://mesonbuild.com/Build-options.html#build-options From 980de8fbba9681559e2a29891649d29b7015f68e Mon Sep 17 00:00:00 2001 From: Cassidy James Blaede Date: Wed, 28 Jul 2021 10:20:24 -0600 Subject: [PATCH 4/4] README: update to portal-tests option --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c709625b..d368c056 100644 --- a/README.md +++ b/README.md @@ -57,19 +57,20 @@ ninja -C _build ## Optional components -### `portal-test` and `portal-test-qt` +### `portal-tests` -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.: +To generate test binaries, set the `portal-tests` option to any combination of +`gtk3`, `gtk4`, or `qt` e.g. `-Dportal-tests=gtk3,gtk4,qt`. Then run the desired +test binary, e.g.: ``` -./_build/portal-test/portal-test +./_build/portal-test/portal-test/gtk3/portal-test-gtk3 ``` or ``` -./_build/portal-test/portal-test-qt +./_build/portal-test/portal-test/qt/portal-test-qt ``` [1]: https://mesonbuild.com/Getting-meson.html