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.md - Add Getting started section #29

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Arxcis
Copy link

@Arxcis Arxcis commented Apr 5, 2020

Why?

  • A comment Add Makefile #28 (comment) from @matthiasclasen uttered interest in having build instructions in the README.md 🚀
  • Make it easier for newcomers.
  • Agree on a good default way of how to build and use libportal projects.

Added

  • Add Getting started section a4db4e3
  • Add .gitignore to ignore the build directory 7811d5c

TODO

  • Add instructions how to view the docs. (I don't know how) 🤔

@Arxcis Arxcis changed the title README.md - Add Getting started secition README.md - Add Getting started section Apr 5, 2020
@Arxcis Arxcis marked this pull request as ready for review April 8, 2020 04:23
Copy link
Contributor

@hadess hadess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would change the layout of this "getting started" section so that building (and how to pass options) is separate from "where to find the docs" or "how to launch tests".

@@ -0,0 +1 @@
build/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't need to be here, really, as the name of the build directory is user-controlled, it could be anything (even if that one matches the instructions in the README).

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Side note: recent versions of Meson will automatically generate a .gitignore in the build directory.


### Build libportal
```
meson build/libportal
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use subdirectories? We usually prefer _build to make it clear that it's not a command on its own.


### Build and run portal-test
```
meson build/potal-test -Dbuild-portal-test=true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto about the sub-directories here. There was a typo in the subdir name.

meson build/doc -Dgtk_doc=true
ninja -C build/doc

# @TODO How to view the docs?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gio open build/doc/doc/html/index.html in your example.

```
meson build/potal-test -Dbuild-portal-test=true
ninja -C build/portal-test
chmod +x ./build/potal-test/portal-test/portal-test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That shouldn't be needed, it's a compiled executable, it should already be executable.

GeorgesStavracas pushed a commit that referenced this pull request Jul 28, 2021
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.
GeorgesStavracas pushed a commit to GeorgesStavracas/libportal that referenced this pull request Nov 21, 2021
Based on flatpak#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.

### Build libportal
```
meson build/libportal
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idiomatic command is:

meson setup _build

### Build and run portal-test
```
meson build/potal-test -Dbuild-portal-test=true
ninja -C build/portal-test
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ninja -C build/portal-test
meson compile -C _build


### Build and view docs
```
meson build/doc -Dgtk_doc=true
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
meson build/doc -Dgtk_doc=true
meson setup -Dgtk_doc=true _build

### Build and view docs
```
meson build/doc -Dgtk_doc=true
ninja -C build/doc
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ninja -C build/doc
meson compile -C _build

### Build libportal
```
meson build/libportal
ninja -C build/libportal
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ninja -C build/libportal
meson compile -C _build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants