source: subsurface/INSTALL @ 3cbd961

MtestaddDiveGasFixandroid_testdcDownloadforatdotdegitMergegitdebuggitpicturesiosmergeKirigamiPortpictimeshiftresolutionIndependencespinnertesttestTomaztestingv4.0-branchv4.0.3-branchv4.2-branchv4.4-branchv4.5-branch
Last change on this file since 3cbd961 was 3cbd961, checked in by Thiago Macieira <thiago@…>, 4 years ago

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@…>

  • Property mode set to 100644
File size: 4.4 KB
Line 
1Building the Qt version under Linux
2-----------------------------------
3
4On Debian you need libqt4-dev, libmarble-dev, libzip-dev.
5Unfortunately the marble version in Debian stable (and possibly
6Ubuntu) appears broken and missing essential header files used in the
7current git version of Subsurface. We hack around this right now by
8including this header file but this needs to be revisited before an
9actual release.
10
11On Fedora you need qt-devel, marble-devel, libzip-devel,
12libxml2-devel, libxslt-devel, libsqlite3x-devel. If you are going to
13compile libdivecomputer, you need to libusb-devel too.
14
15On Debian the package names are different; try libxml2-dev,
16libsqlite3-dev, libxslt1-dev, libzip-dev (and libusb-1.0-0-dev if
17you're going to compile libdivecomputer).
18
19To compile libdivecomputer:
20$ git clone git://git.libdivecomputer.org/libdivecomputer
21$ cd libdivecomputer
22$ git checkout release-0.4
23$ autoreconf --install
24$ ./configure
25$ make
26$ sudo make install
27
28To compile Subsurface:
29$ git clone git://subsurface.hohndel.org/subsurface.git
30$ cd subsurface
31$ qmake
32$ make
33$ sudo make install     [optionally, add: prefix=/usr/local]
34
35Building the Qt version under MacOSX
36------------------------------------
37
381)  Install Homebrew
39
40$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
41
422) Install needed dependencies
43
44$ brew install asciidoc libzip qt sqlite cmake libusb pkg-config
45
463) Make the brew version of sqlite the default
47
48$ brew link --force sqlite
49
504) Install Marble
51
52$ mkdir -p ~/src/marble/build
53$ git clone -b KDE/4.11 git://anongit.kde.org/marble ~/src/marble/sources
54$ cd ~/src/marble/build
55$ cmake -DCMAKE_BUILD_TYPE=Debug -DQTONLY=TRUE -DCMAKE_INSTALL_PREFIX=/usr/local ~/src/marble/sources
56$ make
57$ sudo make install
58$ cd src/lib
59$ mkdir -p /usr/local/include/marble
60$ cp $(find . -name '*.h') /usr/local/include/marble/
61$ cp *dylib /usr/local/lib/
62
635) Install Libdivecomputer
64
65$ brew install automake libtool
66$ cd ~/src
67$ git clone git://libdivecomputer.git.sourceforge.net/gitroot/libdivecomputer/libdivecomputer
68$ cd libdivecomputer
69$ git checkout release-0.4
70$ autoreconf --install
71$ ./configure
72$ make
73$ sudo make install
74
756) Compile Subsurface
76
77$ cd ~/src
78$ git clone git://subsurface.hohndel.org/subsurface.git
79$ cd subsurface
80$ qmake
81$ make
82$ sudo make install
83
84After the above is done, Subsurface will be installed to
85/Applications.
86
87Another option is to create a .dmg for distribution:
88
89$ qmake
90$ make
91$ make mac-create-dmg
92
93Cross-building Subsurface on Linux for Windows
94----------------------------------------------
95
96Subsurface builds nicely with MinGW - the official builds are done as
97cross builds under Linux (currently on Fedora 17). A shell script to do
98that (plus the .nsi file to create the installer with makensis) are
99included in the packaging/Windows directory.
100
101The best way to get libdivecomputer to build appears to be
102
103$ git clone git://libdivecomputer.git.sourceforge.net/gitroot/libdivecomputer/libdivecomputer
104$ cd libdivecomputer
105$ git checkout release-0.4
106$ mingw32-configure
107$ mingw32-make
108$ sudo mingw32-make install
109
110To compile Subsurface, use:
111
112$ git clone git://subsurface.hohndel.org/subsurface.git
113$ cd subsurface
114$ i686-w64-mingw32-qmake-qt4
115$ make
116$ make install
117$ make create-windows-installer
118
119Building Subsurface on Windows
120------------------------------
121
122This is still work in progress.
123
124To build subsurface, use:
125
126$ git clone git://subsurface.hohndel.org/subsurface.git
127$ cd subsurface
128$ qmake
129$ make
130$ make install
131$ make create-windows-installer
132
133Build options
134-------------
135
136The following options are recognised when passed to qmake:
137
138 -config debug        Create a debug build
139 -config release      Create a release build
140                      The default depends on how Qt was built.
141 V=1                  Disable the "silent" build mode
142 LIBDCDEVEL=1         Search for libdivecomputer in ../libdivecomputer
143 INCLUDEPATH+=xxx     Add xxx to the include paths to the compiler
144                      (pass the actual path, without -I)
145 LIBS+=xxx            Add xxx to the linker flags. -l and -L options are
146                      recognised.
147
148The INCLUDEPATH and LIBS options are useful to tell the buildsystem
149about non-standard installation paths for the dependencies (such as
150Marble). They can be repeated as often as needed, or multiple
151arguments can be passed on the same switch, separated by a space. For
152example:
153
154  qmake LIBS+="-L$HOME/marble/lib -L$HOME/libdivecomputer/lib" \
155        INCLUDEPATH+="$HOME/marble/include $HOME/libdivecomputer/include"
Note: See TracBrowser for help on using the repository browser.