Compile from Source
From gizmod
Contents |
Compiling from Source
Compiling from isn't as scary as it may seem. You'll just need to make sure you have the proper dependencies installed prior to beginning, and the rest should go smoothly. If it doesn't please head on over to the forum, and let us know exactly what happened.
Filling Dependencies
You'll need to make sure you have the following installed:
- gcc >= 4.3
- Up to date kernel headers for your distro. This usually means installing something like kernel-devel, or kernel-smp-dev, etc.
- CMake
You'll also need development packages for the following libraries:
- ALSA (try alsa-devel)
- X11 (try xorg-devel)
- Python (python-devel)
- Boost (boost-devel). Note that there may be multiple boost packages that need to be installed. Gizmod relies on the standard boost set, plus boost.python, boost.threads, and boost.serialization. As a rule of thumb, simply install every boost package in your distro's repository.
Filling Dependencies on Ubuntu
To install all the necessary dependencies on Ubuntu, run the following command:
sudo apt-get install g++ cmake libboost-program-options-dev libboost-iostreams-dev libboost-thread-dev \ libboost-serialization-dev libboost-filesystem-dev libboost-python-dev libasound2-dev \ python-dev xorg-dev libvisual-0.4-dev
Note that libvisual-0.4-dev is only needed if you want to compile the libVisual Amarok plugin.
Kernel Modules
Note: This section is most likely not required. Most distros these days come with a pre-built kernel that already has every module you need. The only kernel dependencies Gizmo Daemon has is the Linux Event subystem (module evdev). The kernel module option is located in the following place in the kernel's menuconfig:
Device Drivers --->
Input Device Support -->
<M> Event interface
If you have a Griffin PowerMate you'll want to ensure that the PowerMate's kernel module (powermate) is enabled as well:
Device Drivers --->
USB support --->
<M> Griffin PowerMate and Contour Jog support
Ensure that the modules load fine:
sudo modprobe evdev sudo modprobe powermate (optional) dmesg
If you see any errors in dmesg relating to the evdev or powermate modules such as messages about unknown symbols or other things, then there's a problem with your kernel. Seek distro specific help.
Obtaining Gizmo Daemon
Go to the Gizmod download page and download the archive. Then to unpack the source tarball do the following:
tar jxvf gizmod-X.xx.tar.bz2 cd gizmod-X.xx
Compiling and Installing Gizmo Daemon
Configuring
Now run cmake
mkdir build && cd build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DSYSCONF_INSTALL_DIR=/etc ../../gizmod
Compiling and Installing
Now simply run make and make install:
make sudo make install
Setting Permissions on the Input Device Nodes
After installing Gizmo Daemon the next task is to make sure that permissions are set properly on the input device nodes. See: HOWTO: Setting Input Device Permissions / Creating a udev Rule.
Launching Gizmo Daemon
That's it! If you made it this far you're done! To launch gizmod simply do the following:
gizmod
Running in Debug Mode
If you want to see all the events that are being generated on your system launch Gizmo Daemon in debug mode:
gizmod -g
Running as a Server
If you want to run Gizmod as a server (ie to use the Amarok visualization plugin) run as follows:
gizmod -s
Customizing Gizmo Daemon's Behavior
If you want to change how Gizmod works, proceed to Configuration.
