-
Notifications
You must be signed in to change notification settings - Fork 40
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
build/ | ||
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -2,3 +2,32 @@ 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 instructions here: 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 | ||||||
``` | ||||||
meson build/libportal | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why use subdirectories? We usually prefer There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The idiomatic command is:
|
||||||
ninja -C build/libportal | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
``` | ||||||
|
||||||
### Build and run portal-test | ||||||
``` | ||||||
meson build/potal-test -Dbuild-portal-test=true | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||||||
ninja -C build/portal-test | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
chmod +x ./build/potal-test/portal-test/portal-test | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||||||
./build/potal-test/portal-test/portal-test | ||||||
``` | ||||||
|
||||||
### Build and view docs | ||||||
``` | ||||||
meson build/doc -Dgtk_doc=true | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
ninja -C build/doc | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
# @TODO How to view the docs? | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||
``` |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.