Install instructions
====================

Dependencies
------------

To compile igotu2gpx, you need:

- qt4 (http://www.qtsoftware.com/)
- boost (http://www.boost.org/)
- pkg-config (on Linux and Mac OS X systems)
- chrpath (on Linux, optional, makes it possible to run the program without
  installation)
- marble (http://edu.kde.org/marble, optional, openstreetmap display of tracks)
- openssl (on Windows already on install time, otherwise only at runtime, http://openssl.org)
- libusb 1.0 (on Mac OS X systems, http://libusb.sourceforge.net/)
- libusb or libusb 1.0 (on Linux, http://libusb.sourceforge.net/), or the kernel driver (see below)

On a Ubuntu system, this should get you the dependencies:
----
    sudo aptitude install libqt4-dev libboost-dev \
        libusb-1.0-0-dev libmarble-dev chrpath
----

Compiling
---------

Linux
~~~~~

On a Linux system, you can compile with:
----
    qmake && make && sudo make install
----

If you get error messages about "Unknown test functions" from qmake, try
qmake-qt4 instead of qmake.

If you are on a 64bit system and your distributor ships 64bit libraries in
/lib64 and /usr/lib64, use "qmake LIBDIR=/usr/local/lib64".

If you use a compiler older than gcc 4.0.0, use "qmake CLEBS=novisibility".

If you get an error message of 
----
    /usr/local/bin/igotugui: error while loading shared libraries:
        libigotu.so.1: cannot open shared object file: No such file or directory
----
although it got installed correctly, you might be missing a library path. It
might help to create a file "/etc/ld.so.conf.d/local.conf" with the following
content:
-----------
    /usr/local/lib
-----------
and run:
----
    ldconfig
----

To compile the kernel module, go to src/igotuserial and compile with:
----
    make
----
You can then load the kernel module with:
----
    sudo modprobe usbserial; sudo insmod ./igotu.ko
----

Mac OS X
~~~~~~~~

On a Mac OS X system, a bit more work is necessary.

If you want to use marble, get the Mac OS X package from the website and
install it. Afterwards, find a Windows machine and install the Windows package
on it, grab the include folder and put it in
/Applications/marble.app/Contents/Resources/data.

Now copy the file localconfig-template.pri to localconfig.pri, uncomment the
lines with macx:... and adjust the paths so that they match your installation.
Afterwards, try:
----
    qmake -spec macx-g++ && make && sudo make install
----
which should provide you with a more or less working installation in /usr/local
(the path to the marble widget library is wrong).

Microsoft Windows
~~~~~~~~~~~~~~~~~

On Microsoft Windows you can compile igotu2gpx with MinGW. Copy the file
localconfig-template.pri to localconfig.pri, uncomment the lines with win32:...
and adjust the paths so that they match your installation. Afterwards, try the
following from the Qt command line:
----
    qmake && make && make install
----
which should provide you with a working installation in bin/debug-installed.

Running
-------

To get started, try:
----
    igotugui
    man igotu2gpx
    igotu2gpx info
    igotu2gpx dump
----
