1
0
mirror of https://github.com/MatMoul/g810-led.git synced 2025-04-04 23:31:48 +00:00
g810-led/INSTALL.md
2018-01-31 22:20:28 +01:00

2.2 KiB

Installation:

Build dependencies:

  • git
  • g++
  • make

Dependencies:>

  • hidapi or libusb

hidapi vs libusb:

hidapi is a newer implementation but needs more testing.
hidapi is more responsive than libusb (~20ms vs ~150ms).
hidapi seem not work on CentOS, writing on hidraw is not allowed.
hidapi is recommended but if you encounter problem on your system, switch to libusb.

Installation by repos:

ArchLinux (aur):
yaourt -S g810-led-git # with yaourt
pacaur -S g810-led-git # with pacaur

Installation of dependencies:

ArchLinux:
sudo pacman -S git gcc make hidapi # for hidapi
sudo pacman -S git gcc make libusb # for libusb
Debian :
sudo apt-get install git g++ make libhidapi-dev # for hidapi
sudo apt-get install git g++ make libusb-1.0-0-dev # for libusb
Fedora :
sudo dnf install git make gcc-c++ hidapi-devel # for hidapi
sudo dnf install git make gcc-c++ libusbx-devel # for libusb

Installation:

git clone https://github.com/MatMoul/g810-led.git
cd g810-led

Makefile variant:

make bin # for hidapi
make bin LIB=libusb # for libusb
sudo make install

CMake variant:

cmake -E make_directory build cmake -E chdir build cmake .. cmake --build build` TODO: CMake variant for installation

Installation of the library (For developpers):

make lib # for hidapi
make lib LIB=libusb # for libusb
sudo make install-lib to install the libg810-led library.
sudo make install-dev to install the libg810-led library and headers for development.
TODO: CMake variant for this

Update:

Same as install, but your profile and reboot files are preserved.

Uninstall:

sudo make uninstall
TODO: CMake variant for this

Boot profiles:

On boot, the keyboard is set with the udev file /etc/udev/rules.d/g810-led.rules
This file launch the profile stored in /etc/g810-led/profile
To prevent your keyboard to flash 3 time when you reboot, a systemd unit (g810-led-reboot) is available for this.
It launch the profile stored in /etc/g810-led/reboot

Samples can be found in /etc/g810-led/samples.