From 53c239461d735b7a6568298afc69f241be992d0d Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 29 Dec 2020 12:37:47 -0800 Subject: update INSTALL documentation Catching up with all of the changes to Qt installation and our build processes. Signed-off-by: Dirk Hohndel --- INSTALL | 95 ++++++++++++++++++++++++++++------------------------------------- 1 file changed, 41 insertions(+), 54 deletions(-) (limited to 'INSTALL') diff --git a/INSTALL b/INSTALL index 2be15eac0..6b12a10f0 100644 --- a/INSTALL +++ b/INSTALL @@ -19,29 +19,25 @@ Getting Subsurface source You can get the sources to the latest development version from our git repository: 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: git checkout master git pull -r + git submodule update - - -Getting our flavor of libdivecomputer -------------------------------------- -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 +Our flavor of libdivecomputer +----------------------------- -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" +Subsurface requires its own flavor of libdivecomputer which is inclduded +above as git submodule 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 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 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.12 is the oldest version supported if also building Subsurface-mobile -Download the Open Source version from https://www.qt.io/download and -follow the Qt instructions to install it or alternatively follow the -instruction specific to a distribution (see build instructions). - -To save time and disk space you can unselect Android and IOS packages -(Of course unless you want to build Android/iOS versions) as well as -- Qt Data Visualisation -- Qt Purchasing -- Qt Virtual Keyboard", -- 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 -line, which is needed. In order to make Qt available you need to -add qmake to the path, do something like -PATH=$PATH:///bin +Most Linux distributions include a new enough version of Qt (and if you are on +a distro that still ships with an older Qt, likely your C compiler is also not +new enough to build Subsurface). + +If you need Qt (likely on macOS) or want a newer version than provided by your +Linux distro, you can install a separate version that Subsurface will use. +As of Qt5.15 it has become a lot harder to download and install Qt - you +now need a Qt account and the installer tool has a new space age look and +significantly reduced flexibility. + +As of this writing, there is thankfully a thirdparty offline installer still +available: + + pip3 install aqtinstall + aqt install -O 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=///bin:$PATH 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 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=////lib/cmake/Qt5 ../.. + make install + 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 -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 included in the packaging/windows directory. Please read through the explanations and instructions in -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 +packaging/windows/README.md, packaging/windows/create-win-installer.sh, and +packaging/windows/mxe-based-build.sh if you want to build the Windows version +on your Linux system. Building Subsurface on Windows ------------------------------ @@ -361,19 +360,7 @@ really painful to build Subsurface natively under Windows, so we don't support that at all. - Cross-building Subsurface on Linux for Android ---------------------------------------------- -To compile the mobile version you will need: - --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 +Follow the instructions in packaging/android/README -- cgit v1.2.3-70-g09d2