Commit Graph

24 Commits (virtual-keyboard-mouse)

Author SHA1 Message Date
nirenjan 8914184613 build: Migrate CI to use distro containers
Previously, the build workflow was restricted to running only on Ubuntu
22.04, Ubuntu 24.04 and macOS, which are the only available native
runners on Github Actions. However, the Ubuntu runner does allow us to
run the build inside a container. Therefore, this commit adds the
ability to pull a prebuilt container with all the necessary dependencies
and build libx52 inside of that container. This commit also adds support
scripts to build the containers and run the CI build against those
prebuilt containers locally for testing, without having to rely
exclusively on Github Actions.

This change also adds support for testing libx52 against Alpine Linux,
in order to verify the portability, given that Alpine uses musl instead
of glibc. The limitation is that we need to mount the `/dev/bus/usb`
device tree inside the container, otherwise libusb inside the Alpine
image fails with LIBUSB_ERROR_OTHER. This is not a concern on the other
distributions, but due to limitations in the Github actions environment,
there is no `/dev/bus/usb` tree to export. For this reason, Alpine is
not a part of the CI build, but is available for testing locally.

Also, because a default bare container would need several minutes of
package installation just to get to a point where we could run
build-and-test.sh, this includes a prebuild workflow which generates the
container images and pushes them to ghcr.io, and the build workflow
pulls from there. There is also logic to ensure that we only keep the
latest image, since there is no value in retaining older images.
2026-03-26 12:23:38 -07:00
nirenjan aa555f5e66 doc: Update INSTALL.md with Meson instructions
This change removes the old autotools based documentation and switches
to using Meson exclusively. In addition, the build action will build
using meson compile and meson test instead of ninja/ninja test.
2026-03-22 19:13:00 -07:00
nirenjan 74fe559f4a build!: Update build to use system inih
When the x52d daemon was originally implemented, the inih library was
not bundled with any major distribution, and had to be compiled from
source everytime. However, with recent distributions (starting with
Ubuntu 22.04 LTS), this is no longer an issue, and inih is available in
the distro package manager. As a result, there is no longer a need to
vendor the inih sources with thiis repository.

However, as a result of this change, third party packaging scripts such
as those on the AUR or other similar registries that directly query the
git repository will fail unless they update the dependencies.

BREAKING CHANGE: Packaging scripts (AUR, etc.) need dependency update
2026-03-12 09:50:58 -07:00
nirenjan 9361c7af5c build: Update Github Actions to use only supported distros 2026-03-03 16:40:45 -08:00
nirenjan 88159d4fc5 Disable deprecated Github-hosted runners 2022-09-02 23:03:53 -07:00
nirenjan e7d91fd3a4 Replace all references to x52pro-linux with libx52 2021-09-29 00:30:55 -07:00
nirenjan aef1b6fade Remove rsync dependency and add Fedora packages
This change eliminates the dependency on rsync to copy the Doxygen
generated files, and instead falls back to using `cp -R -P`. Since the
generated HTML needs no special permissions, `cp` is more than
sufficient, and it's already installed on all Unix systems as a core
utility.
2021-09-22 23:37:05 -07:00
nirenjan 4f427b2ebe Update build instructions
[skip ci]
2021-09-19 16:39:49 -07:00
nirenjan 16e53b897f Use $(localstatedir)/run instead of $(runstatedir)
`runstatedir` is only available in Autoconf 2.70, but unless the
distribution is a bleeding edge system, it most likely uses Autoconf
2.69. That said, several major distributions have backported runstatedir
support to the older versions, hiding the issue. See #35.

This change replaces all references to runstatedir to use
$localstatedir/run instead, which is what is recommended by the autoconf
manual.

This also updates the build instructions to add --localstatedir and
--sysconfdir. This is because the lack of the options would have them
default to `$(prefix)/var` and `$(prefix)/etc` respectively, and with
prefix set to `/usr`, these would be the bogus directories `/usr/var`
and `/usr/etc`.
2021-09-15 09:06:31 -07:00
nirenjan 276b512478 Update dependencies and changelog 2021-09-14 17:18:46 -07:00
nirenjan a39945f461 Import inih library into source tree
Prior to this change, the user needed to install inih as a dependency,
either from the distribution repositories, or from source. On some
platforms (notably macOS), inih is not available prepackaged, and must
be installed by the user. This tends to cause needless friction.

This change imports the ini.c and ini.h files from the upstream inih
repository into the X52 source tree. This will allow us to build the
repository on any system with the original set of dependencies, and not
have to force the user to install packages themselves.
2021-08-26 22:16:38 -07:00
nirenjan 0cf6f247be Add systemd unit file to start X52 daemon 2021-08-05 10:21:28 -07:00
nirenjan 2cdf22b8c1 Remove dependency on faketime 2021-07-30 13:31:00 -07:00
nirenjan 98cc439f05 Remove build status badge from INSTALL.md
[skip ci]
2021-07-19 11:16:28 -07:00
nirenjan 1b598c2d78 Fix pkg-config check for inih and enable Ubuntu 18.04 builds 2021-07-19 11:09:41 -07:00
nirenjan 5a283672c4 Update instructions to install inih on Arch and MacOS
[skip ci]
2021-07-15 22:20:40 -07:00
nirenjan f82c31a6eb Add support for including inih configuration parser library 2021-07-15 13:52:46 -07:00
nirenjan e3758a2f29
Remove udev rules from default configure command.
The configuration options describes the method to override the udev rules directory.
It is not necessary to add it as the default in the build/install instructions.
2021-01-26 22:14:05 -08:00
nirenjan abb366d89c Allow udev rules to be configured at build time [#25]
Prior to this change, the udev rules were fixed to allow read-write
access only to the `plugdev` group. However, while this is the default
group for USB input devices on Debian and its derivatives, this is not
true for some systems such as openSUSE, which use `input` as the group.

This change adds a `--with-input-group` argument to `configure`, which
defaults to `plugdev`. This change also updates the install
documentation to reflect the new options.
2020-12-25 15:17:52 -08:00
nirenjan 59c4643474
Update install instructions in INSTALL.md
Fixes #24
2020-12-25 13:53:37 -08:00
nirenjan 55c1fadba6 Update package list for Arch Linux
[skip ci]
2020-07-19 15:17:17 -07:00
nirenjan cf6c458fae Update dependencies in INSTALL.md
[skip ci]
2020-07-08 17:39:29 -07:00
nirenjan c4acd0ce49 Update makefiles to use Python 3
Prior to this change, generation of the character lookup table could use
Python 2 or Python 3, depending on what the first instance of python in
the PATH pointed to.  On most systems, python is a symbolic link to
python2.7. However, given that Python 2 is EOL, it makes sense to switch
the code to use Python 3 now, rather than later.

This change updates the requirements to use Python 3.6 or later, and
updates the Makefile to invoke the script with the detected python
binary, rather than relying on the shebang to use the system Python.
2020-06-16 15:17:53 -07:00
nirenjan cb96d297ab Create INSTALL.md
[skip ci]
2020-06-02 16:36:01 -07:00