### Build Example Applications with Meson Source: https://github.com/wmww/gtk4-layer-shell/blob/main/README.md Enable building example C applications by setting the `-Dexamples` option to `true` during Meson configuration. The Vala example is not built with this option. ```bash meson -Dexamples=true build ``` -------------------------------- ### Build VAPI Data and Vala Example with Meson Source: https://github.com/wmww/gtk4-layer-shell/blob/main/README.md Build VAPI data and the Vala example by setting `-Dvapi=true`. This requires `-Dintrospection=true` to be set as well. ```bash meson -Dvapi=true -Dintrospection=true build ``` -------------------------------- ### Example Usage of Layer Shell Preload Source: https://github.com/wmww/gtk4-layer-shell/blob/main/layer_shell_preload.md Demonstrates how to run a Wayland application with Layer Shell Preload enabled and configure its properties using environment variables. ```bash LD_PRELOAD=/usr/lib/liblayer-shell-preload.so LAYER_ANCHOR='lrb' LAYER_HEIGHT=50 LAYER_EXCLUSIVE=1 LAYER_KEYBOARD=on-demand weston-terminal ``` -------------------------------- ### Run Mock Server and Client Separately Source: https://github.com/wmww/gtk4-layer-shell/blob/main/test/README.md Execute tests using a mock Wayland server and client. This setup is useful for debugging with wayland-debug or GDB. Ensure the GTKLS_TEST_DIR is set. ```bash # server: ninja -C build && GTKLS_TEST_DIR=/tmp ./build/test/mock-server/mock-server # client: ninja -C build && GTKLS_TEST_DIR=/tmp ./build/test/[testname] --auto ``` -------------------------------- ### Enable Smoke Tests with Meson Source: https://github.com/wmww/gtk4-layer-shell/blob/main/README.md Configure Meson to build smoke tests by setting `-Dsmoke-tests=true`. Disable this if you do not want to install the various languages and dependencies required for smoke tests. ```bash meson -Dsmoke-tests=true build ``` -------------------------------- ### Install GTK4 Layer Shell Dependencies on Ubuntu Source: https://github.com/wmww/gtk4-layer-shell/blob/main/README.md Installs the necessary build dependencies for GTK4 Layer Shell on Ubuntu 18.04 and later. Ensure you have sudo privileges. ```bash sudo apt install meson ninja-build libwayland-dev wayland-protocols libgtk-4-dev gobject-introspection libgirepository1.0-dev gtk-doc-tools python3 valac ``` -------------------------------- ### Install GTK4 Layer Shell Dependencies on Arch Linux Source: https://github.com/wmww/gtk4-layer-shell/blob/main/README.md Installs the necessary build dependencies for GTK4 Layer Shell on Arch Linux. Use the --needed flag to avoid reinstalling existing packages. ```bash pacman -S --needed meson ninja gtk4 wayland wayland-protocols gobject-introspection libgirepository gtk-doc python vala ``` -------------------------------- ### Get Container Image Size Source: https://github.com/wmww/gtk4-layer-shell/blob/main/test/README.md Calculates and displays the size of a container image in megabytes using Podman inspect and shell arithmetic. ```bash echo "$(("$(podman image inspect ghcr.io/wmww/gtk4-layer-shell-ci:latest --format '{{ .Size }}')" / 1024 / 1024)) MB" ``` -------------------------------- ### Run All Tests Source: https://github.com/wmww/gtk4-layer-shell/blob/main/test/README.md Execute the entire test suite. Ensure your build directory is correctly specified. ```bash ninja -C build test ``` -------------------------------- ### Generate Documentation with Meson Source: https://github.com/wmww/gtk4-layer-shell/blob/main/README.md Generate project documentation by setting the `-Ddocs` option to `true` when configuring with Meson. ```bash meson -Ddocs=true build ``` -------------------------------- ### Using LD_PRELOAD for Linking Source: https://github.com/wmww/gtk4-layer-shell/blob/main/linking.md Run your application with LD_PRELOAD set to the path of libgtk4-layer-shell.so to force it to be loaded before other libraries. ```bash LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgtk4-layer-shell.so my-app ``` -------------------------------- ### Run GTK4 Layer Demo Source: https://github.com/wmww/gtk4-layer-shell/blob/main/release_process.md Launch the GTK4 layer shell demo application to manually test features and catch issues missed by automated tests. This should be done after ensuring tests pass. ```bash build/examples/gtk4-layer-demo ``` -------------------------------- ### Run Specific Test with Verbose Output Source: https://github.com/wmww/gtk4-layer-shell/blob/main/README.md To run a specific test and see its complete output, first build the project, then use `meson test` with the `--verbose` flag and the test name. ```bash ninja -C build && meson test -C build --verbose ``` -------------------------------- ### Push Container Image Source: https://github.com/wmww/gtk4-layer-shell/blob/main/test/README.md Pushes the built container image to the GitHub Container Registry using Podman. ```bash podman push ghcr.io/wmww/gtk4-layer-shell-ci:latest ``` -------------------------------- ### Run Tests with Valgrind Source: https://github.com/wmww/gtk4-layer-shell/blob/main/release_process.md Execute the test suite with Valgrind to detect memory errors. Ensure you have pulled the latest changes from the main branch before running. ```bash GTKLS_VALGRIND=1 ninja -C build test ``` -------------------------------- ### Build Container Image Source: https://github.com/wmww/gtk4-layer-shell/blob/main/test/README.md Builds a container image using Podman from a specified Containerfile. The image is tagged for GHCR. ```bash podman build -f test/Containerfile -t ghcr.io/wmww/gtk4-layer-shell-ci:latest . ``` -------------------------------- ### Create and Shell into Container Source: https://github.com/wmww/gtk4-layer-shell/blob/main/test/README.md Creates a new container from an image and opens an interactive bash shell inside it. Uses --replace to overwrite existing containers with the same name. ```bash podman run -it --replace --name gtk4-layer-shell-ci-0 ghcr.io/wmww/gtk4-layer-shell-ci:latest bash ``` -------------------------------- ### Run a Single Test Source: https://github.com/wmww/gtk4-layer-shell/blob/main/test/README.md Execute a specific test by its name. This requires building the tests first. ```bash ninja -C build && meson test -C build --verbose [testname] ``` -------------------------------- ### Tag Release Source: https://github.com/wmww/gtk4-layer-shell/blob/main/release_process.md Create a Git tag for the new release version. Replace vA.B.C with the actual version number. ```bash git tag vA.B.C ``` -------------------------------- ### Build Tests with Meson Source: https://github.com/wmww/gtk4-layer-shell/blob/main/README.md Include the project's tests in the build by setting the `-Dtests` option to `true` during Meson configuration. ```bash meson -Dtests=true build ``` -------------------------------- ### Podman Login to GHCR Source: https://github.com/wmww/gtk4-layer-shell/blob/main/test/README.md Logs into the GitHub Container Registry using Podman. Requires authentication. ```bash podman login ghcr.io -u wmww ``` -------------------------------- ### Debugging Library Loading with LD_DEBUG Source: https://github.com/wmww/gtk4-layer-shell/blob/main/linking.md Use LD_DEBUG=libs to inspect the dynamic linker's library loading process. Redirect stderr to stdout and grep for 'find library=' to see the order in which libraries are loaded. ```bash LD_DEBUG=libs build/my-bin 2>&1 | grep 'find library=' ``` -------------------------------- ### Execute Command in Running Container Source: https://github.com/wmww/gtk4-layer-shell/blob/main/test/README.md Opens an interactive bash shell in an already running container using Podman exec. ```bash podman exec -it gtk4-layer-shell-ci-0 bash ``` -------------------------------- ### Run Integration Test Script Manually Source: https://github.com/wmww/gtk4-layer-shell/blob/main/test/README.md Execute a specific integration test using the provided Python script. This bypasses Meson's test runner. ```bash ninja -C build && test/run-integration-test.py build/test/ ``` -------------------------------- ### Build GObject Introspection Data with Meson Source: https://github.com/wmww/gtk4-layer-shell/blob/main/README.md Build GObject Introspection data, used for bindings to languages other than C/C++, by setting `-Dintrospection=true` during Meson configuration. ```bash meson -Dintrospection=true build ``` -------------------------------- ### Run Against Wayland Compositor with wayland-debug Source: https://github.com/wmww/gtk4-layer-shell/blob/main/test/README.md Debug test interactions with the Wayland compositor using wayland-debug. This command filters specific Wayland interfaces. ```bash ninja -C build && wayland-debug -f 'zwlr_*, xdg_*, ext_*' -r ./build/test/ --auto ``` -------------------------------- ### Python: Explicitly Load GTK4 Layer Shell Source: https://github.com/wmww/gtk4-layer-shell/blob/main/linking.md For Python applications using GI Repository, explicitly load libgtk4-layer-shell.so using ctypes before importing with gi. This ensures it's linked before libwayland-client. ```python from ctypes import CDLL CDLL('libgtk4-layer-shell.so') ``` -------------------------------- ### Push Tag Source: https://github.com/wmww/gtk4-layer-shell/blob/main/release_process.md Push the newly created Git tag to the remote repository. This makes the tag visible on platforms like GitHub. ```bash git push origin vA.B.C ``` -------------------------------- ### Run Against Current Wayland Compositor Source: https://github.com/wmww/gtk4-layer-shell/blob/main/test/README.md Execute tests directly against your active Wayland compositor for debugging. The --auto flag runs tests non-interactively. ```bash ninja -C build && ./build/test/ --auto ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.