Compiling gdivelog-smarttrak-plugin

As Uwatec SmartTrak log book files are Microsoft Access databases, MDB tools is required to read them. The api of MDB tools is not fixed and I settled on version 0.6pre1 because memo fields, used to store the notes field of your dives, actually worked. As I hacked everything needed from the source of this version, version 0.6pre1 is required. gdiveog-smarttrak-plugin will not work with any version prior to this and may not work as is with any future version.

In addition to the above, MDB tools can be tricky to build, so I have included instructions here.

Some linux distributions include MDB tools, e.g. Ubuntu. This is also very likely to be linked to important applications like Open Office so is therefore unlikely to be easily to removed, even if it was desirable to do so. It is also unlikely that gdivelog-smarttrak-plugin will work or compile with this version of MDB Tools (I know it does not with Debian's 0.5.99.0.6pre1.0.20050409-1.1, in fact, this version is broken. Try using mdb-sql). In this case, it is neccesary to compile and install MDB Tools to a different location and build gdivelog-smarttrak-plugin so that it uses this version of MDB tools rather than the version supplied with the distribution. With all this in mind, the instructions below will install MDB Tools in /opt/gdivelog-mdbtools.

To compile MDB tools you will need the mdbtools-0.6pre1 tar ball and mdbtools-0.6pre1-build.patch

To compile MDB Tools:

  tar zxf mdbtools-0.6pre1.tar.gz
  cd mdbtools-0.6pre1
  libtoolize --force --copy
  patch -p1 -i ../mdbtools-0.6pre1-build.patch
  ./configure --prefix=/opt/gdivelog-mdbtools
  make
  make install

To compile gdivelog-smarttrak-plugin:

  tar jxf gdivelog-smarttrak-plugin-[version].tar.bz2
  cd gdivelog-smarttrak-plugin-[version]
  ./configure --with-mdbtools=/opt/gdivelog-mdbtools
  make
  make install

Note that for versions of gdivelog-smarttrak-plugin < 0.3 the configure option --with-mdbtools did not exist. If for some reason you want to compile this version, use the following in place of the above configure and make steps:

  LDFLAGS="-R/opt/gdivelog-mdbtools/lib -L/opt/gdivelog-mdbtools/lib $LDFLAGS" ./configure
  LDFLAGS="-R/opt/gdivelog-mdbtools/lib -L/opt/gdivelog-mdbtools/lib $LDFLAGS" make

You will probably need to be root for the make install step.

gdivelog will automatically load any plugins that have been installed with the same --prefix, i.e. [gdivelog's --prefix]/lib/gdivelog. Currently there is no way to discover what --prefix an already installed version of gdivelog was installed with. If you want to install a plugin to a different directory you will need to set the environment variable GDIVELOG_PLUGIN_PATH to include this directory, e.g.

  export GDIVELOG_PLUGIN_PATH=/home/me/my_gdivelog_plugins:/usr/local/lib/additional_gdivelog_plugins

Bear in mind that gdivelog will attempt to load every file in GDIVELOG_PLUGIN_PATH as a plugin.