Difference between revisions of "Development on Linux"

From GIMX
Jump to: navigation, search
(Remove old instructions.)
Line 7: Line 7:
 
     <!--T:3-->
 
     <!--T:3-->
 
sudo apt-get install git g++ libwxgtk2.8-dev libbluetooth-dev libglib2.0-dev libxml2-dev libusb-dev libusb-1.0-0-dev libncursesw5-dev gettext xterm xdg-utils
 
sudo apt-get install git g++ libwxgtk2.8-dev libbluetooth-dev libglib2.0-dev libxml2-dev libusb-dev libusb-1.0-0-dev libncursesw5-dev gettext xterm xdg-utils
patch and libxi-dev were also required before r1277.
 
  
 
<!--T:4-->
 
<!--T:4-->
 
On Fedora: yum -y install wxGTK-devel bluez-libs-devel glib2-devel libxml2-devel libXi-devel libusb-devel (to be completed)
 
On Fedora: yum -y install wxGTK-devel bluez-libs-devel glib2-devel libxml2-devel libXi-devel libusb-devel (to be completed)
 
==<span style="color:#DCDCDC">Compile a patched SDL library (not required anymore since r1277)</span>== <!--T:5-->
 
 
    <!--T:6-->
 
<span style="color:#DCDCDC">wget <nowiki>http://www.libsdl.org/release/SDL-1.2.14.tar.gz</nowiki></span>
 
    <span style="color:#DCDCDC">tar xzvf SDL-1.2.14.tar.gz</span>
 
    <span style="color:#DCDCDC">svn export <nowiki>http://diyps3controller.googlecode.com/svn/trunk/libsdl/patch</nowiki></span>
 
    <span style="color:#DCDCDC">cd SDL-1.2.14</span>
 
    <span style="color:#DCDCDC">patch -p1 < ../patch</span>
 
    <span style="color:#DCDCDC">./configure ; make</span>
 
    <span style="color:#DCDCDC">cd ..</span>
 
 
==<span style="color:#DCDCDC">Copy SDL headers and .so (not required anymore since r1277)</span>== <!--T:7-->
 
 
    <!--T:8-->
 
<span style="color:#DCDCDC">mkdir -p libsdl/lib</span>
 
    <span style="color:#DCDCDC">mkdir -p libsdl/include/SDL</span>
 
    <span style="color:#DCDCDC">cp SDL-1.2.14/build/.libs/libSDL.so libsdl/lib</span>
 
    <span style="color:#DCDCDC">cp SDL-1.2.14/include/* libsdl/include/SDL</span>
 
  
 
==Download GIMX sources== <!--T:9-->
 
==Download GIMX sources== <!--T:9-->
Line 50: Line 30:
 
sudo make install
 
sudo make install
  
==Set Input Device Permissions (required since r1277)== <!--T:16-->
+
==Set Input Device Permissions== <!--T:16-->
  
 
<!--T:17-->
 
<!--T:17-->

Revision as of 23:39, 25 November 2013

Other languages:
English • ‎français

This wiki explains how to compile GIMX from a Linux terminal.

Install development packages

   sudo apt-get install git g++ libwxgtk2.8-dev libbluetooth-dev libglib2.0-dev libxml2-dev libusb-dev libusb-1.0-0-dev libncursesw5-dev gettext xterm xdg-utils

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 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*

chgrp input /usr/bin/gimx-config /usr/bin/gimx-fpsconfig /usr/bin/gimx-bluetooth /usr/bin/gimx-serial
chmod g+s /usr/bin/gimx-config /usr/bin/gimx-fpsconfig /usr/bin/gimx-bluetooth /usr/bin/gimx-serial

exit