Install - compiling




If you have a fairly recent linux installation, with a widespread distribution, you can probably safely skip this chapter - you can come back if chmfp fails to compile. Otherwise, if you have an old installation, custom-built kernel or exotic distribution, read on.


You need to have kernel 2.6, with evdev and uinput enabled in the kernel (usually done by default in most linux distributions). You also need gtk2+ version 2.12 if you want graphical user interface capability.


You can verify linux version by typing the following, and expecting the version to be returned at least 2.6 :


$ uname -r


You can verify evdev is enabled (almost no exceptions) by typing the following command, and expecting one of the two first results :


$ cat /usr/src/linux/.config | grep EVDEV
CONFIG_INPUT_EVDEV=m                  // evdev is built as a module
CONFIG_INPUT_EVDEV=y                  // evdev is built in the kernel
#CONFIG_INPUT_EVDEV is not set        // evdev is not available


If evdev is not available, you probably built your own kernel already (!) so you know what to do to enable it !!


You can verify uinput is enabled by typing the following command, and expecting one of the two first results :


$ cat /usr/src/linux/.config | grep UINPUT
CONFIG_INPUT_UINPUT=m                // uinput is built as a module
CONFIG_INPUT_UINPUT=y                // uinput is built in the kernel
#CONFIG_INPUT_UINPUT is not set      // uinput is not available


uinput is available in most distributions since 2.6.12, but if not, you must rebuild your kernel with uinput support enabled, please google around if unsure.


If you want GUI capability (which you can choose to use or not at run time anyway), you need gtk2+ with at least version 2.12. Try the following command :


$ pkg-config --modversion gtk+-2.0


If this command returns an error or a version number lower than 2.12, either you need to install gtk2+ or upgrade the version, either you will be restricted to chmfp command-line interface.


Finally, you need libusb version 1.0 (not 0.1), which should also be available and installed in most linux distributions. Specific tools exist for each distribution, but if you run the following command and have non-empty result, you are pretty safe to assume libusb-1.0 is installed on your system :


$ ls -l /usr/include/libusb-1.0*


If the previous command returns nothing, you might need to install libusb-1.0 on your system, please google around depending on your linux distribution. Again, chmfp will not compile without libusb or with version 0.1



Copy and uncompress sources

Once you have downloaded the source code in a directory, you want to uncompress it. Let us assume you downloaded the file to /tmp, and you want to install it to /usr/local/src (for which you probably need superuser privilege) :


# cd /usr/local/src
# tar xjvf /tmp/chmfp-0.6.0.tar.bz2
# cd chmfp-0.6.0



Compilation options

By default, compilation will happen in local language (either French or English, currently) :


# make


To change the language, you would use the following option (example to force French) :


# make LANG=fr_FR.UTF8


To disable GUI installation, you would use the following option :


# make CHMFP_GTK=0


If you are a programmer, you might want to add DEBUG=1 option, or edit chmfp.h file to change defaults.


You can finish off by installing the binary produced in /usr/local/bin, which then should allow you to execute chmfp without need to specify the absolute path :


# make install



To uninstall

To uninstall and clean all build files, the following will do the trick :


# make uninstall
# make clean