mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
update INSTALL documentation
Catching up with all of the changes to Qt installation and our build processes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
8f153384b5
commit
53c239461d
1 changed files with 39 additions and 52 deletions
91
INSTALL
91
INSTALL
|
@ -19,29 +19,25 @@ Getting Subsurface source
|
||||||
You can get the sources to the latest development version from our git
|
You can get the sources to the latest development version from our git
|
||||||
repository:
|
repository:
|
||||||
git clone http://github.com/Subsurface/subsurface.git
|
git clone http://github.com/Subsurface/subsurface.git
|
||||||
|
cd subsurface
|
||||||
|
git submodule init # this will give you our flavor of libdivecomputer
|
||||||
|
|
||||||
You keep it updated by doing:
|
You keep it updated by doing:
|
||||||
git checkout master
|
git checkout master
|
||||||
git pull -r
|
git pull -r
|
||||||
|
git submodule update
|
||||||
|
|
||||||
|
|
||||||
|
Our flavor of libdivecomputer
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
Getting our flavor of libdivecomputer
|
Subsurface requires its own flavor of libdivecomputer which is inclduded
|
||||||
-------------------------------------
|
above as git submodule
|
||||||
|
|
||||||
All our prebuilt binaries (see https://subsurface-divelog.org/download)
|
|
||||||
are built using our own custom "flavor" of libdivecomputer
|
|
||||||
see https://github.com/Subsurface/libdc.git
|
|
||||||
|
|
||||||
In order to get the modified sources, do
|
|
||||||
- locate yourself in the subsurface repo on your local computer
|
|
||||||
- run "git submodule init"
|
|
||||||
- run "git submodule update"
|
|
||||||
|
|
||||||
The branches won't have a pretty history and will include ugly merges,
|
The branches won't have a pretty history and will include ugly merges,
|
||||||
but they should always allow a fast forward pull that tracks what we
|
but they should always allow a fast forward pull that tracks what we
|
||||||
believe developers should build against. All our patches are contained
|
believe developers should build against. All our patches are contained
|
||||||
in the "Subsurface-NG".
|
in the "Subsurface-DS9" branch.
|
||||||
|
|
||||||
This should allow distros to see which patches we have applied on top of
|
This should allow distros to see which patches we have applied on top of
|
||||||
upstream. They will receive force pushes as we rebase to newer versions of
|
upstream. They will receive force pushes as we rebase to newer versions of
|
||||||
|
@ -65,33 +61,39 @@ We use Qt5 in order to only maintain one UI across platforms.
|
||||||
Qt5.9.1 is the oldest version supported if ONLY building Subsurface
|
Qt5.9.1 is the oldest version supported if ONLY building Subsurface
|
||||||
Qt5.12 is the oldest version supported if also building Subsurface-mobile
|
Qt5.12 is the oldest version supported if also building Subsurface-mobile
|
||||||
|
|
||||||
Download the Open Source version from https://www.qt.io/download and
|
Most Linux distributions include a new enough version of Qt (and if you are on
|
||||||
follow the Qt instructions to install it or alternatively follow the
|
a distro that still ships with an older Qt, likely your C compiler is also not
|
||||||
instruction specific to a distribution (see build instructions).
|
new enough to build Subsurface).
|
||||||
|
|
||||||
To save time and disk space you can unselect Android and IOS packages
|
If you need Qt (likely on macOS) or want a newer version than provided by your
|
||||||
(Of course unless you want to build Android/iOS versions) as well as
|
Linux distro, you can install a separate version that Subsurface will use.
|
||||||
- Qt Data Visualisation
|
As of Qt5.15 it has become a lot harder to download and install Qt - you
|
||||||
- Qt Purchasing
|
now need a Qt account and the installer tool has a new space age look and
|
||||||
- Qt Virtual Keyboard",
|
significantly reduced flexibility.
|
||||||
- Qt WebEngine
|
|
||||||
- Qt Network Authorization
|
|
||||||
- Qt Remote Objects
|
|
||||||
- Qt WebGL Streaming
|
|
||||||
- Qt 3D2
|
|
||||||
- Qt Canvas 3D
|
|
||||||
- Qt Extras
|
|
||||||
This can be done later by use of MaintenanceTool.app in your Qt folder.
|
|
||||||
|
|
||||||
Remark: most Qt installations do not make Qt available on the command
|
As of this writing, there is thankfully a thirdparty offline installer still
|
||||||
line, which is needed. In order to make Qt available you need to
|
available:
|
||||||
add qmake to the path, do something like
|
|
||||||
PATH=$PATH:<Qt location>/<version>/<type>/bin
|
pip3 install aqtinstall
|
||||||
|
aqt install -O <Qt Location> 5.15.2 mac desktop -m qtcharts
|
||||||
|
|
||||||
|
(or whatever version / OS you need). This installer is surprisingly fast
|
||||||
|
and seems well maintained - note that we don't use this for Windows as
|
||||||
|
that is completely built from source using MXE.
|
||||||
|
|
||||||
|
In order to use this Qt installation, simply add it to your PATH:
|
||||||
|
PATH=<Qt Location>/<version>/<type>/bin:$PATH
|
||||||
|
|
||||||
QtWebKit is needed, if you want to print, but no longer part of Qt5,
|
QtWebKit is needed, if you want to print, but no longer part of Qt5,
|
||||||
so you need to download it and compile. In case you just want to test
|
so you need to download it and compile. In case you just want to test
|
||||||
without print possibility omit this step.
|
without print possibility omit this step.
|
||||||
|
|
||||||
|
git clone -b 5.212 git://github.com/qt/qtwebkit
|
||||||
|
mkdir -p qtwebkit/WebKitBuild/Release
|
||||||
|
cd qtwebkit/WebKitBuild/Release
|
||||||
|
cmake -DPORT=Qt -DCMAKE_BUILD_TYPE=Release -DQt5_DIR=/<Qt Location>/<version>/<type>/lib/cmake/Qt5 ../..
|
||||||
|
make install
|
||||||
|
|
||||||
|
|
||||||
Other third party library dependencies
|
Other third party library dependencies
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
|
@ -337,17 +339,14 @@ Cross-building Subsurface on Linux for Windows
|
||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
|
|
||||||
Subsurface builds nicely with MinGW - the official builds are done as
|
Subsurface builds nicely with MinGW - the official builds are done as
|
||||||
cross builds under Linux (currently on Ubuntu 14.04). A shell script to do
|
cross builds under Linux (currently on Ubuntu 20.04). A shell script to do
|
||||||
that (plus the .nsi file to create the installer with makensis) are
|
that (plus the .nsi file to create the installer with makensis) are
|
||||||
included in the packaging/windows directory.
|
included in the packaging/windows directory.
|
||||||
|
|
||||||
Please read through the explanations and instructions in
|
Please read through the explanations and instructions in
|
||||||
packaging/windows/mxe-based-build.sh if you want to build the Windows
|
packaging/windows/README.md, packaging/windows/create-win-installer.sh, and
|
||||||
version on your Linux system.
|
packaging/windows/mxe-based-build.sh if you want to build the Windows version
|
||||||
|
on your Linux system.
|
||||||
In addition you can use the Docker container the same way that CI builds do modify/test
|
|
||||||
modifications to the container build environment following instructions in
|
|
||||||
/scripts/docker/mxe-build-container/instructions.md
|
|
||||||
|
|
||||||
Building Subsurface on Windows
|
Building Subsurface on Windows
|
||||||
------------------------------
|
------------------------------
|
||||||
|
@ -361,19 +360,7 @@ really painful to build Subsurface natively under Windows,
|
||||||
so we don't support that at all.
|
so we don't support that at all.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Cross-building Subsurface on Linux for Android
|
Cross-building Subsurface on Linux for Android
|
||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
|
|
||||||
To compile the mobile version you will need:
|
Follow the instructions in packaging/android/README
|
||||||
|
|
||||||
-Qt for Android (this can be downloaded from: http://www.qt.io/download-open-source/)
|
|
||||||
-Android SDK
|
|
||||||
-Android NDK
|
|
||||||
|
|
||||||
In the folder containing the subsurface source dir run: bash subsurface/packaging/android/android-build-wrapper.sh
|
|
||||||
This will download and install the required NDK, SDK and Qt required to build the app.
|
|
||||||
|
|
||||||
After that, you can run: ./subsurface/packaging/android/build.sh everytime you want to build a new version.
|
|
||||||
|
|
||||||
This will generate an apk file in ./subsurface-mobile-build-arm/build/outputs/apk/debug
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue