source: subsurface/INSTALL @ f434417

Mtestandroid_testdcDownloadforatdotdegitMergegitdebuggitpicturesiosmergeKirigamiPortpictimeshiftresolutionIndependencespinnertestTomaztestingv4.0-branchv4.0.3-branchv4.2-branchv4.4-branchv4.5-branch
Last change on this file since f434417 was f434417, checked in by Dirk Hohndel <dirk@…>, 4 years ago

Improvements to INSTALL instructions

Some words about cross building Marble and a hint about Debug vs. Release
builds

Signed-off-by: Dirk Hohndel <dirk@…>

  • Property mode set to 100644
File size: 6.6 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 --disable-shared
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/install)"
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 ../sources
56 - or -
57$ cmake -DCMAKE_BUILD_TYPE=Release -DQTONLY=TRUE -DCMAKE_INSTALL_PREFIX=/usr/local ../sources
58$ cd src/lib
59$ make -j4
60$ cp *dylib /usr/local/lib/
61$ mkdir -p /usr/local/include/marble
62$ cd ../../../sources/src/lib
63$ cp $(find . -name '*.h') /usr/local/include/marble/
64
655) Install Libdivecomputer
66
67$ brew install automake libtool
68$ cd ~/src
69$ git clone git://git.libdivecomputer.org/libdivecomputer
70$ cd libdivecomputer
71$ git checkout release-0.4
72$ autoreconf --install
73$ ./configure --disable-shared
74$ make
75$ make install
76
776) Compile Subsurface
78
79$ cd ~/src
80$ git clone git://subsurface.hohndel.org/subsurface.git
81$ cd subsurface
82$ qmake
83$ make
84$ make install_mac_bundle
85
86After the above is done, Subsurface will be installed to
87/Applications.
88
89Another option is to create a .dmg for distribution:
90
91$ qmake
92$ make
93$ make mac-create-dmg
94
95Cross-building Subsurface on Linux for Windows
96----------------------------------------------
97
98Subsurface builds nicely with MinGW - the official builds are done as
99cross builds under Linux (currently on Fedora 17). A shell script to do
100that (plus the .nsi file to create the installer with makensis) are
101included in the packaging/Windows directory.
102
103The best way to get libdivecomputer to build appears to be
104
105$ git clone git://git.libdivecomputer.org/libdivecomputer
106$ cd libdivecomputer
107$ git checkout release-0.4
108$ mingw32-configure --disable-shared
109$ mingw32-make
110$ sudo mingw32-make install
111
112To compile Marble, use:
113
114$ mkdir -p ~/src/marble/build
115$ git clone -b v4.11.2 git://anongit.kde.org/marble ~/src/marble/sources
116$ cd ~/src/marble/build
117$ mingw32-cmake -DCMAKE_BUILD_TYPE=Debug -DQTONLY=TRUE ../sources
118 - or -
119$ mingw32-cmake -DCMAKE_BUILD_TYPE=Release -DQTONLY=TRUE ../sources
120$ mingw32-make -j4
121$ mingw32-make install
122
123To compile Subsurface, use:
124
125$ git clone git://subsurface.hohndel.org/subsurface.git
126$ cd subsurface
127$ i686-w64-mingw32-qmake-qt4
128$ make
129$ make install
130$ make create-windows-installer
131
132Building Subsurface on Windows
133------------------------------
134
1351) Install msys-git:
136http://msysgit.github.io
137
138Tools part of MSYS are required for building Subsurface, while you also
139need Git to be upstream and contribute to the project.
140Make sure that the msys/bin (or git/bin) folder is in PATH.
141
1422) Install Qt
143http://qt-project.org/downloads
144
145Subsurface is currently built against Qt 4.8.5.
146
1473) Install a MinGW toolchain
148https://docs.google.com/open?id=0B4D8x6CJEmtuczdiQklwMEs4RUU
149
150Qt 4.8.5 comes without a compiler and you will have to download it from
151a separate location. Other compiler may work, but there are no guaranties for
152that. Make sure that the mingw/bin folder is in PATH.
153
1544) Install Libdivecomputer
155Use similar steps to the previous section, without the sudo command.
156
1575) Install CMake (required for building Marble):
158http://www.cmake.org/cmake/resources/software.html
159
160Make sure that the cmake/bin folder is in PATH.
161
1625) Download and build Marble
163http://marble.kde.org/sources.php
164http://techbase.kde.org/Projects/Marble/WindowsCompiling#Compiling_Marble_using_MingW
165
166Make sure you build both the Debug and Release versions.
167
1686) Install pkg-config
169http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.26-1_win32.zip
170
171pkg-config depends on DLL files such as libglib-2.0-0.dll and has to be in
172PATH, so it's best that you copy the executable to msys/bin.
173
1747) Install other dependencies
175Subsurface also depends on the following libraries:
176
177* libxml2
178http://www.xmlsoft.org/downloads.html
179* libxslt
180http://xmlsoft.org/XSLT/
181* libusb-1.0
182http://sourceforge.net/apps/trac/libusb-win32/wiki
183* zlib
184http://www.zlib.net/
185* libzip
186http://www.nih.at/libzip/
187
188Once you have the libraries, create .pc files (pkg-config) for them and place
189the files in a folder that is indicated by the PKG_CONFIG_PATH environment
190variable - e.g. PKG_CONFIG_PATH=c:\msys\pkg-config
191
192To build subsurface, use:
193
194$ git clone git://subsurface.hohndel.org/subsurface.git
195$ cd subsurface
196$ qmake
197$ make
198$ make install
199$ make create-windows-installer
200
201Build options
202-------------
203
204The following options are recognised when passed to qmake:
205
206 -config debug        Create a debug build
207 -config release      Create a release build
208                      The default depends on how Qt was built.
209 V=1                  Disable the "silent" build mode
210 LIBDCDEVEL=1         Search for libdivecomputer in ../libdivecomputer
211 INCLUDEPATH+=xxx     Add xxx to the include paths to the compiler
212                      (pass the actual path, without -I)
213 LIBS+=xxx            Add xxx to the linker flags. -l and -L options are
214                      recognised.
215
216The INCLUDEPATH and LIBS options are useful to tell the buildsystem
217about non-standard installation paths for the dependencies (such as
218Marble). They can be repeated as often as needed, or multiple
219arguments can be passed on the same switch, separated by a space. For
220example:
221
222  qmake LIBS+="-L$HOME/marble/lib -L$HOME/libdivecomputer/lib" \
223        INCLUDEPATH+="$HOME/marble/include $HOME/libdivecomputer/include"
Note: See TracBrowser for help on using the repository browser.