The original code was just throwing away error conditions for write calls to an
fd. Obviously this is bad, but really, we should probably be using an ostream
instead of a raw file handle here. For now, deal with the warning by checking
the result for errors, at least, and later we'll refactor to use ostream
properly.
This starts to make g13d more automatic. Instead of requiring manual
intervention or automatic starts on system start, this will allow udevd to
automatically trigger g13d when a g13 is plugged in.
There's still a bug in g13d where if the device falls off the USB chain g13d
won't exit, though, but this is a good start.
This preps us for proper system installs to distributions, finding depending
libraries, and allowing us to build the foundation for the GUI and support
tooling next.
The plan is to run g13d as a system daemon managed by systemd. We'll use the
system-wide input group to control access to the daemon.
- Add a CMakeLists for etc so we can install the udev rules.
- Move the src dir to g13d to disambiguate a bit.
- Update the toplevel Makefile so we can still build the old way (for now).
The original source was under the public domain from "ecraven" off of github --
this places the entire tree under the MIT license. In terms of licensing, this
isn't much different from the public domain, except for the indemnity clauses.
This is in prep to turn on more warnings.
- Stop using libusb_set_debug, according to the deprecation warning for
libusb.
- Return correctly in G13_Manager::run
- Fix the ostream logging helper to return an ostream instead of just
returning whatever the last expression was.
This cleans things up significantly in the source tree and makes this easier to
manage longer term. In the next few commits, we'll migrate the build to CMake in
prep for packaging support.
- Move bindings into bindings
- Move system configs and misc files into etc
- Move LCD apps into contrib/
- Move all source files into srcs
- Rename helper extensions to match GNU extension naming, fix the #includes as
well
- Adjust Makefile to be less verbose and more programmatic
This removes the makefile packaging target, since it wasn't really all that
useful for distribution of the program. Additionally, this sets up an install
target to install g13d to the users' local directory.
This is kinda a hack -- really we should be installing g13d to $PREFIX/bin,
dropping a g13d unit somewhere, and then setting up appropriate permissions,
etc. It works for me, though.