summaryrefslogtreecommitdiffstats
path: root/INSTALL
diff options
context:
space:
mode:
Diffstat (limited to 'INSTALL')
-rw-r--r--INSTALL155
1 files changed, 155 insertions, 0 deletions
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 000000000..fe0f7967d
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,155 @@
+Building the Qt version under Linux
+-----------------------------------
+
+On Debian you need libqt4-dev, libmarble-dev, libzip-dev.
+Unfortunately the marble version in Debian stable (and possibly
+Ubuntu) appears broken and missing essential header files used in the
+current git version of Subsurface. We hack around this right now by
+including this header file but this needs to be revisited before an
+actual release.
+
+On Fedora you need qt-devel, marble-devel, libzip-devel,
+libxml2-devel, libxslt-devel, libsqlite3x-devel. If you are going to
+compile libdivecomputer, you need to libusb-devel too.
+
+On Debian the package names are different; try libxml2-dev,
+libsqlite3-dev, libxslt1-dev, libzip-dev (and libusb-1.0-0-dev if
+you're going to compile libdivecomputer).
+
+To compile libdivecomputer:
+$ git clone git://git.libdivecomputer.org/libdivecomputer
+$ cd libdivecomputer
+$ git checkout release-0.4
+$ autoreconf --install
+$ ./configure
+$ make
+$ sudo make install
+
+To compile Subsurface:
+$ git clone git://subsurface.hohndel.org/subsurface.git
+$ cd subsurface
+$ qmake
+$ make
+$ sudo make install [optionally, add: prefix=/usr/local]
+
+Building the Qt version under MacOSX
+------------------------------------
+
+1) Install Homebrew
+
+$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
+
+2) Install needed dependencies
+
+$ brew install asciidoc libzip qt sqlite cmake libusb pkg-config
+
+3) Make the brew version of sqlite the default
+
+$ brew link --force sqlite
+
+4) Install Marble
+
+$ mkdir -p ~/src/marble/build
+$ git clone -b KDE/4.11 git://anongit.kde.org/marble ~/src/marble/sources
+$ cd ~/src/marble/build
+$ cmake -DCMAKE_BUILD_TYPE=Debug -DQTONLY=TRUE -DCMAKE_INSTALL_PREFIX=/usr/local ~/src/marble/sources
+$ make
+$ sudo make install
+$ cd src/lib
+$ mkdir -p /usr/local/include/marble
+$ cp $(find . -name '*.h') /usr/local/include/marble/
+$ cp *dylib /usr/local/lib/
+
+5) Install Libdivecomputer
+
+$ brew install automake libtool
+$ cd ~/src
+$ git clone git://libdivecomputer.git.sourceforge.net/gitroot/libdivecomputer/libdivecomputer
+$ cd libdivecomputer
+$ git checkout release-0.4
+$ autoreconf --install
+$ ./configure
+$ make
+$ sudo make install
+
+6) Compile Subsurface
+
+$ cd ~/src
+$ git clone git://subsurface.hohndel.org/subsurface.git
+$ cd subsurface
+$ qmake
+$ make
+$ sudo make install
+
+After the above is done, Subsurface will be installed to
+/Applications.
+
+Another option is to create a .dmg for distribution:
+
+$ qmake
+$ make
+$ make mac-create-dmg
+
+Cross-building Subsurface on Linux for Windows
+----------------------------------------------
+
+Subsurface builds nicely with MinGW - the official builds are done as
+cross builds under Linux (currently on Fedora 17). A shell script to do
+that (plus the .nsi file to create the installer with makensis) are
+included in the packaging/Windows directory.
+
+The best way to get libdivecomputer to build appears to be
+
+$ git clone git://libdivecomputer.git.sourceforge.net/gitroot/libdivecomputer/libdivecomputer
+$ cd libdivecomputer
+$ git checkout release-0.4
+$ mingw32-configure
+$ mingw32-make
+$ sudo mingw32-make install
+
+To compile Subsurface, use:
+
+$ git clone git://subsurface.hohndel.org/subsurface.git
+$ cd subsurface
+$ i686-w64-mingw32-qmake-qt4
+$ make
+$ make install
+$ make create-windows-installer
+
+Building Subsurface on Windows
+------------------------------
+
+This is still work in progress.
+
+To build subsurface, use:
+
+$ git clone git://subsurface.hohndel.org/subsurface.git
+$ cd subsurface
+$ qmake
+$ make
+$ make install
+$ make create-windows-installer
+
+Build options
+-------------
+
+The following options are recognised when passed to qmake:
+
+ -config debug Create a debug build
+ -config release Create a release build
+ The default depends on how Qt was built.
+ V=1 Disable the "silent" build mode
+ LIBDCDEVEL=1 Search for libdivecomputer in ../libdivecomputer
+ INCLUDEPATH+=xxx Add xxx to the include paths to the compiler
+ (pass the actual path, without -I)
+ LIBS+=xxx Add xxx to the linker flags. -l and -L options are
+ recognised.
+
+The INCLUDEPATH and LIBS options are useful to tell the buildsystem
+about non-standard installation paths for the dependencies (such as
+Marble). They can be repeated as often as needed, or multiple
+arguments can be passed on the same switch, separated by a space. For
+example:
+
+ qmake LIBS+="-L$HOME/marble/lib -L$HOME/libdivecomputer/lib" \
+ INCLUDEPATH+="$HOME/marble/include $HOME/libdivecomputer/include"