mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Update the README and create an INSTALL file.
Let the README contain generic information and move the build instructions to the INSTALL file. Signed-off-by: Thiago Macieira <thiago@macieira.org>
This commit is contained in:
parent
6c90fa7c64
commit
3cbd961ce3
2 changed files with 155 additions and 172 deletions
155
INSTALL
Normal file
155
INSTALL
Normal file
|
@ -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"
|
172
README
172
README
|
@ -11,89 +11,6 @@ will get you the latest version of the fully functional Subsurface.
|
|||
|
||||
git checkout Gtk
|
||||
|
||||
If you are indeed planning to work on the Qt version, here are some
|
||||
pointers to get you started:
|
||||
|
||||
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.
|
||||
|
||||
Building the Qt version under MacOSX
|
||||
------------------------------------
|
||||
|
||||
You might have built MacPorts packages with +quartz dependencies to
|
||||
build the previous Subsurface/Gtk version. Switch to the +x11
|
||||
dependencies and prepare your system for Subsurface/Qt by doing:
|
||||
|
||||
sudo port uninstall gtk-osx-application subsurface libdivecomputer
|
||||
sudo port install cairo +x11 pango +x11 py27-pygtk +x11 gtk2 +x11
|
||||
sudo port install qt4-mac marble libzip libtool libusb
|
||||
|
||||
Then build libdivecomputer and Subsurface as described below.
|
||||
|
||||
With the current version (and dependencies of marble), to run subsurface you have to once
|
||||
|
||||
sudo port install dbus
|
||||
sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
|
||||
launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
|
||||
sudo chown -R ${USER} ~/Library/Preferences/KDE
|
||||
|
||||
Buildling the Qt version under MacOSX, using dependencies from Homebrew
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
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
|
||||
$ make
|
||||
|
||||
|
||||
Subsurface - an Open Source Divelog
|
||||
===================================
|
||||
|
||||
|
@ -154,95 +71,6 @@ can get a tar ball from
|
|||
|
||||
http://subsurface.hohndel.org/downloads/Subsurface-3.1.tgz
|
||||
|
||||
|
||||
Building subsurface under Linux
|
||||
-------------------------------
|
||||
You need libxml2-devel, libxslt-devel, gtk2-devel, glib2-devel,
|
||||
gconf2-devel, libsoup-devel, osm-gps-map-devel, libsqlite3x-devel, and
|
||||
libzip-devel to build this (and libusb-1.0 if you have libdivecomputer
|
||||
built with it, but then you obviously already have it installed).
|
||||
Check with your Linux distribution how to install these packages.
|
||||
|
||||
On Debian the package names are different; try libxml2-dev,
|
||||
libgtk2.0-dev, libglib2.0-dev, libgconf2-dev, libsoup2.4-dev,
|
||||
libosmgpsmap-dev, libsqlite3-dev, libxslt1-dev, libzip-dev,
|
||||
zlib1g-dev (and libusb-1.0-0-dev if libdivecomputer is built with it).
|
||||
|
||||
Note that contrary to earlier versions of Subsurface, starting in v3.1
|
||||
XSLT, LIBZIP and OSMGPSMAP are no longer optional but instead are
|
||||
required to build.
|
||||
|
||||
You also need to have libdivecomputer installed. The current git
|
||||
versions of Subsurface assume that you use libdivecomputer version
|
||||
0.4, which goes something like this:
|
||||
|
||||
git clone git://git.libdivecomputer.org/libdivecomputer
|
||||
cd libdivecomputer
|
||||
git checkout release-0.4
|
||||
autoreconf --install
|
||||
./configure
|
||||
make
|
||||
sudo make install
|
||||
|
||||
NOTE! Sometimes you may need to tell the main Subsurface Makefile where
|
||||
you installed libdivecomputer; pkg-config for libdivecomputer doesn't
|
||||
always work unless the project has been installed by the distro.
|
||||
|
||||
Just edit the makefile directly.
|
||||
|
||||
|
||||
Building Subsurface under 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.
|
||||
|
||||
Strangely the developers have failed to make 'https' support work in
|
||||
the cross-built Windows binaries. As a workaround at this point the
|
||||
cross built Windows binaries use http instead https connections (right
|
||||
now this only applies to divelogs.de uploads).
|
||||
|
||||
The best way to get libdivecomputer to build appears to be
|
||||
|
||||
mingw32-configure
|
||||
mingw32-make
|
||||
sudo mingw32-make install
|
||||
|
||||
Once you have built and installed libdivecomputer you can use
|
||||
|
||||
sh packaging/Windows/mingw-make.sh
|
||||
|
||||
to then build subsurface. In order to create an installer simply use
|
||||
|
||||
sh packaging/Windows/mingw-make.sh create-windows-installer
|
||||
|
||||
|
||||
Building subsurface on a Mac
|
||||
----------------------------
|
||||
Install MacPorts and install the dependencies from MacPorts:
|
||||
|
||||
sudo port install libusb libtool libzip qt4-mac marble
|
||||
|
||||
Install libdivecomputer:
|
||||
git clone git://git.libdivecomputer.org/libdivecomputer
|
||||
cd libdivecomputer
|
||||
git checkout release-0.4
|
||||
autoreconf --install
|
||||
LIBUSB_CFLAGS=-I/opt/local/include ./configure
|
||||
make
|
||||
sudo make install
|
||||
|
||||
Install subsurface:
|
||||
git clone git://subsurface.hohndel.org/subsurface.git
|
||||
cd subsurface
|
||||
PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/" make
|
||||
sudo make install-macosx
|
||||
|
||||
More instructions on how to create a Subsurface DMG can be found in
|
||||
packaging/macosx/README
|
||||
|
||||
|
||||
Usage:
|
||||
======
|
||||
|
||||
|
|
Loading…
Reference in a new issue