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

Integrate the vala example into the project #15

Merged
merged 1 commit into from
Apr 24, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 0 additions & 4 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,3 @@ jobs:
run: ninja -C build test
- name: Install
run: sudo ninja -C build install
- name: Meson Vala example
run: cd examples/vala-standalone && meson ../../vala-build
- name: Build Vala example
run: ninja -C vala-build
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The easiest way to build against GTK Layer Shell is to use the `gtk-layer-shell-
[examples/simple-example.py](examples/simple-example.py) contains sample Python code.

### Vala
[examples/vala-standalone](examples/vala-standalone) contains a minimal working standalone Vala project, see [the readme](examples/vala-standalone/README.md) for details.
[examples/simple-example.vala](examples/simple-example.vala) contains a minimal working Vala app.

### Rust
[@pentamassiv](https://github.com/pentamassiv) maintains [safe Rust bindings](https://github.com/pentamassiv/gtk4-layer-shell-gir) and the [crates.io crate](https://crates.io/crates/gtk4-layer-shell/). Rust examples can be found [here](https://github.com/pentamassiv/gtk4-layer-shell-gir/tree/main/gtk4-layer-shell/examples).
Expand Down Expand Up @@ -63,7 +63,7 @@ sudo apt install meson libwayland-dev libgtk-4-dev gobject-introspection libgire
* `-Ddocs` (default `false`): If to generate the docs
* `-Dtests` (default `false`): If to build the tests
* `-Dintrospection` (default: `true`): If to build GObject Introspection data (used for bindings to languages other than C/C++)
* `-Dvapi` (default: `true`): If to build VAPI data (allows this library to be used in Vala). Requires `-Dintrospection=true`
* `-Dvapi` (default: `true`): If to build VAPI data and Vala example. The VAPI file allows this library to be used in Vala. Requires `-Dintrospection=true`

### Running the Tests
* `ninja -C build test`
Expand Down
10 changes: 9 additions & 1 deletion examples/meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
subdir('demo')
# vala-standalone is it's own meson project, so do not subdir() it

executable(
'gtk4-layer-demo',
Expand All @@ -14,3 +13,12 @@ executable(
build_by_default: get_option('examples'),
dependencies: [gtk, gtk_layer_shell],
install: false)

if get_option('vapi')
add_languages('vala')
executable(
'simple-example-vala',
files('simple-example.vala'),
dependencies: [gtk, gtk_layer_shell, vapi],
install: false)
endif
File renamed without changes.
11 changes: 0 additions & 11 deletions examples/vala-standalone/README.md

This file was deleted.

13 changes: 0 additions & 13 deletions examples/vala-standalone/meson.build

This file was deleted.

2 changes: 1 addition & 1 deletion src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ if get_option('introspection')
install: true)

if get_option('vapi')
gnome.generate_vapi(
vapi = gnome.generate_vapi(
pkg_config_name,
sources: gir[0],
packages: 'gtk4',
Expand Down