From ed57fb8b869ba1edd226b55953ace0719fe8e1c1 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 8 Jul 2020 12:51:54 +1000 Subject: tools: add a xkbcli tool as entry point for the various tools we have This is the base tool, no subtools are currently connected so you only get help and version for now. The goal here is to have a git-like infrastructure where /usr/bin/xkbcli is the main tool, anything else will hide in libexec. The infrastructure for this is copied from libinput. Tools themselves will will be installed in $prefix/libexec/xkbcommon and the xkbcli tool forks off whatever argv[1] is after modifying the PATH to include the libexec dir. libinput has additional code for checking whether we're running this from the builddir but it's a bit iffy and it's usefulness is limited - if you're in the builddir anyway you can just run ./builddir/xkbcli- directly. So for this code here, running ./builddir/xkbcli will execute the one in the prefix/libexecdir. Since we want that tool available everywhere even where some of the subtools aren't present, we need to ifdef the getopt handling. man page generation is handled via ronn which is a ruby program but allows markdown for the sources. It's hidden behind a meson option to disable where downloading ronn isn't an option. The setup is generic enough that we can add other man-pages by just appending to the array. Signed-off-by: Peter Hutterer --- .github/workflows/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f23e77a..72bf0e9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,7 +23,7 @@ jobs: sudo apt update -y sudo env DEBIAN_FRONTEND=noninteractive apt install -y \ doxygen libxcb-xkb-dev valgrind ninja-build \ - libwayland-dev wayland-protocols bison graphviz + libwayland-dev wayland-protocols bison graphviz ruby-ronn - name: Setup run: | meson setup build @@ -40,12 +40,14 @@ jobs: runs-on: macos-10.15 steps: - uses: actions/checkout@v2 + - uses: actions/setup-ruby@v1 - uses: actions/setup-python@v1 with: python-version: '3.7' - name: Install dependencies run: | python -m pip install --upgrade pip meson + gem install ronn brew install doxygen bison ninja brew link bison --force env: @@ -65,6 +67,7 @@ jobs: runs-on: windows-2019 steps: - uses: actions/checkout@v2 + - uses: actions/setup-ruby@v1 - uses: actions/setup-python@v1 with: python-version: '3.7' @@ -78,6 +81,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip meson + gem install ronn choco install ninja winflexbison3 -y --no-progress --stop-on-first-failure - name: Setup shell: cmd -- cgit v1.2.1