Difference between revisions of "Development on Linux"
|  (Marked this version for translation) | |||
| Line 5: | Line 5: | ||
| ==Install development packages== <!--T:2--> | ==Install development packages== <!--T:2--> | ||
| + | <!--T:3--> | ||
| On Ubuntu:<br /> | On Ubuntu:<br /> | ||
| − | <code | + | <code> | 
| sudo apt-get install git g++ libwxgtk2.8-dev libbluetooth-dev libxml2-dev libusb-1.0-0-dev libncursesw5-dev gettext xterm xdg-utils libmhash-dev libcurl4-gnutls-dev libxi-dev libx11-dev libhidapi-dev libhidapi-hidraw0 libudev-dev</code> | sudo apt-get install git g++ libwxgtk2.8-dev libbluetooth-dev libxml2-dev libusb-1.0-0-dev libncursesw5-dev gettext xterm xdg-utils libmhash-dev libcurl4-gnutls-dev libxi-dev libx11-dev libhidapi-dev libhidapi-hidraw0 libudev-dev</code> | ||
| + | <!--T:22--> | ||
| On Raspbian:<br /> | On Raspbian:<br /> | ||
| <code> | <code> | ||
| Line 18: | Line 20: | ||
| rm libhidapi-*.deb</code> | rm libhidapi-*.deb</code> | ||
| + | <!--T:4--> | ||
| On Fedora:<br /> | On Fedora:<br /> | ||
| − | <code | + | <code> | 
| yum -y install wxGTK-devel bluez-libs-devel glib2-devel libxml2-devel libXi-devel libusb-devel (to be completed)</code> | yum -y install wxGTK-devel bluez-libs-devel glib2-devel libxml2-devel libXi-devel libusb-devel (to be completed)</code> | ||
| ==Download GIMX sources== <!--T:9--> | ==Download GIMX sources== <!--T:9--> | ||
| − | + | <!--T:10--> | |
| + | <code> | ||
| git clone -b master --single-branch --depth 1 <nowiki>https://github.com/matlo/GIMX.git</nowiki></code> | git clone -b master --single-branch --depth 1 <nowiki>https://github.com/matlo/GIMX.git</nowiki></code> | ||
| ==Compile== <!--T:11--> | ==Compile== <!--T:11--> | ||
| − | + | <!--T:12--> | |
| + | <code> | ||
| cd GIMX | cd GIMX | ||
| make -j 2</code> | make -j 2</code> | ||
| Line 38: | Line 43: | ||
| ==Install== <!--T:14--> | ==Install== <!--T:14--> | ||
| − | + | <!--T:15--> | |
| + | <code> | ||
| sudo make install</code> | sudo make install</code> | ||
| Line 46: | Line 52: | ||
| A few gimx binaries need root priviledges. | A few gimx binaries need root priviledges. | ||
| − | + | <!--T:21--> | |
| + | <code> | ||
| sudo chmod u+s /usr/bin/gimx /usr/bin/sixaddr /usr/bin/bdaddr /usr/bin/hcirevision</code> | sudo chmod u+s /usr/bin/gimx /usr/bin/sixaddr /usr/bin/bdaddr /usr/bin/hcirevision</code> | ||
| Line 54: | Line 61: | ||
| One way to give read permissions to GIMX is to create a special group, change /dev/input/event* group ownership to that group, and then make the gimx binaries setgid to that group. | One way to give read permissions to GIMX is to create a special group, change /dev/input/event* group ownership to that group, and then make the gimx binaries setgid to that group. | ||
| − | + | <!--T:18--> | |
| + | <code> | ||
| sudo su<br /> | sudo su<br /> | ||
| + | <!--T:23--> | ||
| groupadd -f input<br /> | groupadd -f input<br /> | ||
| + | <!--T:24--> | ||
| echo "KERNEL==\"event*\", NAME=\"input/%k\", MODE:=\"660\", GROUP=\"input\"" > /etc/udev/rules.d/99-gimx-input.rules<br /> | echo "KERNEL==\"event*\", NAME=\"input/%k\", MODE:=\"660\", GROUP=\"input\"" > /etc/udev/rules.d/99-gimx-input.rules<br /> | ||
| echo "KERNEL==\"js*\", NAME=\"input/%k\", MODE:=\"664\", GROUP=\"input\"" >> /etc/udev/rules.d/99-gimx-input.rules<br /> | echo "KERNEL==\"js*\", NAME=\"input/%k\", MODE:=\"664\", GROUP=\"input\"" >> /etc/udev/rules.d/99-gimx-input.rules<br /> | ||
| Line 64: | Line 74: | ||
| chmod g+rw /dev/input/event* /dev/input/js*<br /> | chmod g+rw /dev/input/event* /dev/input/js*<br /> | ||
| + | <!--T:25--> | ||
| chgrp input /usr/bin/gimx-config /usr/bin/gimx-fpsconfig /usr/bin/gimx-launcher<br /> | chgrp input /usr/bin/gimx-config /usr/bin/gimx-fpsconfig /usr/bin/gimx-launcher<br /> | ||
| chmod g+s /usr/bin/gimx-config /usr/bin/gimx-fpsconfig /usr/bin/gimx-launcher<br /> | chmod g+s /usr/bin/gimx-config /usr/bin/gimx-fpsconfig /usr/bin/gimx-launcher<br /> | ||
| + | <!--T:26--> | ||
| exit</code> | exit</code> | ||
| </translate> | </translate> | ||
Revision as of 14:07, 30 September 2015
This wiki explains how to compile GIMX from a Linux terminal.
Contents
Install development packages
On Ubuntu:
sudo apt-get install git g++ libwxgtk2.8-dev libbluetooth-dev libxml2-dev libusb-1.0-0-dev libncursesw5-dev gettext xterm xdg-utils libmhash-dev libcurl4-gnutls-dev libxi-dev libx11-dev libhidapi-dev libhidapi-hidraw0 libudev-dev
On Raspbian:
sudo apt-get install git g++ libwxgtk2.8-dev libbluetooth-dev libxml2-dev libusb-1.0-0-dev libncursesw5-dev gettext xterm xdg-utils libmhash-dev libcurl4-gnutls-dev libxi-dev libx11-dev libudev-dev
wget http://gimx.fr/download/3ad2ff26a13a5518b446ae41157bec504cbf2c0d/libhidapi-dev_0.8.0~rc1+git20140201.3a66d4e+dfsg-3_armhf.deb
wget http://gimx.fr/download/3ad2ff26a13a5518b446ae41157bec504cbf2c0d/libhidapi-hidraw0_0.8.0~rc1+git20140201.3a66d4e+dfsg-3_armhf.deb
wget http://gimx.fr/download/3ad2ff26a13a5518b446ae41157bec504cbf2c0d/libhidapi-libusb0_0.8.0~rc1+git20140201.3a66d4e+dfsg-3_armhf.deb
sudo dpkg -i libhidapi-*.deb
rm libhidapi-*.deb
On Fedora:
yum -y install wxGTK-devel bluez-libs-devel glib2-devel libxml2-devel libXi-devel libusb-devel (to be completed)
Download GIMX sources
git clone -b master --single-branch --depth 1 https://github.com/matlo/GIMX.git
Compile
cd GIMX
make -j 2
Replace "2" with your number of CPU cores.
Install
sudo make install
Set the setuid
A few gimx binaries need root priviledges.
sudo chmod u+s /usr/bin/gimx /usr/bin/sixaddr /usr/bin/bdaddr /usr/bin/hcirevision
Set Input Device Permissions
One way to give read permissions to GIMX is to create a special group, change /dev/input/event* group ownership to that group, and then make the gimx binaries setgid to that group.
sudo su
groupadd -f input
echo "KERNEL==\"event*\", NAME=\"input/%k\", MODE:=\"660\", GROUP=\"input\"" > /etc/udev/rules.d/99-gimx-input.rules
echo "KERNEL==\"js*\", NAME=\"input/%k\", MODE:=\"664\", GROUP=\"input\"" >> /etc/udev/rules.d/99-gimx-input.rules
chgrp -f input /dev/input/event* /dev/input/js*
chmod g+rw /dev/input/event* /dev/input/js*
chgrp input /usr/bin/gimx-config /usr/bin/gimx-fpsconfig /usr/bin/gimx-launcher
chmod g+s /usr/bin/gimx-config /usr/bin/gimx-fpsconfig /usr/bin/gimx-launcher
exit
