summaryrefslogtreecommitdiffstats
path: root/INSTALL
diff options
context:
space:
mode:
Diffstat (limited to 'INSTALL')
-rw-r--r--INSTALL87
1 files changed, 44 insertions, 43 deletions
diff --git a/INSTALL b/INSTALL
index 646a32321..2a4c987f8 100644
--- a/INSTALL
+++ b/INSTALL
@@ -33,39 +33,21 @@ effort patch in packaging/ubuntu/0001-Make-build-with-Qt4.patch that
attempts to continue to allow building with Qt4, but that is not
officially supported and will result in missing functionality.
+As of Subsurface 4.5 we are switching our build system to cmake. qmake
+based builds are no longer supported.
+
Build options for Subsurface
----------------------------
-The following options are recognized 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
- LIBMARBLEDEVEL=path Search for marble library and includes in path
- SPECIAL_MARBLE_PREFIX=1 Use libssrfmarblewidget as library name
- This is needed when building with our marble branch
- LIBGIT2DEVEL=path Search for libgit2 library and includes in path
- 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
- recognized.
- DEFINES+=SHOW_PLOT_INFO_TABLE=1
- Only available in debug builds, this creates a
- second window that shows all elements in the
- plot_info structure as a table - very useful when
- debugging issues with the profile
-
-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"
+The following options are recognized when passed to cmake:
+
+ -DCMAKE_BUILD_TYPE=Release create a release build
+ -DCMAKE_BUILD_TYPE=Debug create a debug build
+
+The Makefile that was created using cmake can be forced into a much more
+verbose mode by calling
+ make VERBOSE=1
Building Subsurface 4 under Linux
---------------------------------
@@ -190,21 +172,16 @@ $ make install
$ cd ~/src
$ git clone git://subsurface-divelog.org/subsurface.git
$ cd subsurface
-$ qmake SPECIAL_MARBLE_PREFIX=1 INCLUDEPATH+=/usr/local/include \
- LIBS+=-L/usr/local/lib \
- LIBS+='-L/usr/local/Cellar/libzip/0.11.2/lib -lzip -lz' \
- INCLUDEPATH+=/usr/local/Cellar/libzip/0.11.2/include V=1 \
- LIBMARBLEDEVEL=../marble-source/marble-build/
+$ mkdir build
+$ cd build
+$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ make -j4
-$ make install_mac_bundle
-
-After the above is done, Subsurface will be installed to /Applications.
+$ make install
-Another option is to create a .dmg for distribution:
+After the above is done, Subsurface.app will be available in the
+subsurface/build/staging directory. This folder can then be moved
+to /Applications install Subsurface for every user.
-$ qmake
-$ make
-$ make mac-create-dmg
Cross-building Subsurface on Linux for Windows
@@ -215,6 +192,28 @@ cross builds under Linux (currently on Fedora 20). A shell script to do
that (plus the .nsi file to create the installer with makensis) are
included in the packaging/windows directory.
+On OpenSUSE, for mingw64 packages you should add the specific
+repository from their site. After that you can run the following
+command:
+sudo zypper install mingw64-cross-libqt5-qttools mingw64-mpc-devel \
+ mingw64-filesystem mingw64-pkg-config mingw64-cross-gcc \
+ mingw64-gcc-c++ mingw64-libusb-1_0-devel \
+ mingw64-cross-libqt5-qttools mingw64-libqt5-qtwebkit \
+ mingw64-libqt5-qtwebkit-devel mingw64-cross-libqt5-qmake \
+ mingw64-libqt5-qtscript mingw64-libqt5-qtscript-devel \
+ mingw64-libqt5-qtsvg mingw64-libqt5-qtsvg-devel \
+ mingw64-libqt5-qtdeclarative mingw64-libqt5-qtdeclarative-devel \
+ mingw64-libssh2-devel mingw64-libzip-devel \
+ mingw64-sqlite-devel mingw64-win_iconv-devel \
+ mingw64-libxslt-devel mingw64-libqt5-qttools
+
+[Observation] - Sometimes on OpenSUSE platform there is a problem with
+the mingw64-libzip-devel package(the zipconf header is not installed in
+the right place) and you have to create a symbolic link using the following
+command:
+ sudo ln -s /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libzip/include/zipconf.h \
+ /usr/x86_64-w64-mingw32/sys-root/mingw/include/zipconf.h
+
Everywhere below the mingw64- prefix is used for the cross tools. If you
really need a 32bit binary you need to use mingw32- as prefix and you may
also run into issues creating an installable binary with Qt5 (i.e., you
@@ -258,9 +257,11 @@ $ sudo mingw64-make install
To compile libgit2, use:
-$ mkdir -p ~/src/libgit2/build
$ git clone git://github.com/libgit2/libgit2 ~/src/libgit2
-$ cd ~/src/libgit2/build
+$ mkdir ~/src/libgit2/build
+$ cd ~/src/libgit2
+$ git checkout v0.21.5
+$ cd build
$ mingw64-cmake ..
$ mingw64-make
$ sudo mingw64-make install