Compare commits

..

7 Commits

Author SHA1 Message Date
Dirk Hohndel
15efc4e2c7 Travis/Coverity: try to only scan libdivecomputer and Subsurface
Build the dependencies outside the part that gets scanned.
And remove all the commented out noise.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-22 08:39:39 -07:00
Dirk Hohndel
40c6d9521e build.sh: add flags to only build / not build dependencies
This is mainly intended for use when creating Coverity builds. This
commit is easier to understand with git show -w as almost all changes
are whitespace.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-22 08:38:56 -07:00
Dirk Hohndel
55a3cd13cd Travis/Coverity: for now just trigger on branch name
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-22 08:38:56 -07:00
Dirk Hohndel
c9c43ecb65 Travis Coverity: this should give us the correct token
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-22 08:38:56 -07:00
Anton Lundin
18e4ecff90 Add a coverity status badge to README.md
Signed-off-by: Anton Lundin <glance@acc.umu.se>
2018-03-22 08:38:12 -07:00
Anton Lundin
e64da6e219 Run coverty scan on cron triggers
This is so we can setup a weekly cron trigger of master, to run the
coverty scan.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2018-03-22 08:38:12 -07:00
Anton Lundin
de53455a75 Add automatic coverity scans
This instructs travis to run automatic coverity scans for us.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2018-03-22 08:38:07 -07:00
1318 changed files with 242213 additions and 464499 deletions

View File

@ -7,12 +7,7 @@ maintainers:
- mturkia
- janmulder
- tcanabrava
- bstoeger
- sfuchs79
- janiversen
- jbygdell
features:
- dco_check
- comments
- pr_description_required

View File

@ -10,7 +10,7 @@ ColumnLimit: 0
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
ForEachMacros: [ 'for_each_dc', 'for_each_relevant_dc', 'for_each_dive', 'for_each_line' ]
ForEachMacros: [ 'foreach', 'for_each_dc', 'for_each_dive', 'for_each_line', 'Q_FOREACH', 'BOOST_FOREACH' ]
IndentFunctionDeclarationAfterType: false #personal taste, good for long methods
IndentWidth: 8
MaxEmptyLinesToKeep: 2

2
.github/FUNDING.yml vendored
View File

@ -1,2 +0,0 @@
github: subsurface
ko_fi: dirkhh

View File

@ -1,56 +0,0 @@
name: Manage the Subsurface CICD versioning
inputs:
no-increment:
description: 'Only get the current version, do not increment it even for push events (Caution: not actually a boolean)'
default: false
nightly-builds-secret:
description: The secret to access the nightly builds repository
default: ''
outputs:
version:
description: The long form version number
value: ${{ steps.version_number.outputs.version }}
buildnr:
description: The build number
value: ${{ steps.version_number.outputs.buildnr }}
runs:
using: composite
steps:
- name: atomically create or retrieve the build number and assemble release notes for a push (i.e. merging of a pull request)
if: github.event_name == 'push' && inputs.no-increment == 'false'
env:
NIGHTLY_BUILDS_SECRET: ${{ inputs.nightly-builds-secret }}
shell: bash
run: |
if [ -z "$NIGHTLY_BUILDS_SECRET" ]; then
echo "Need to supply the secret for the nightly-builds repository to increment the version number, aborting."
exit 1
fi
scripts/get-atomic-buildnr.sh $GITHUB_SHA $NIGHTLY_BUILDS_SECRET "CICD-release"
- name: retrieve the current version number in all other cases
if: github.event_name != 'push' || inputs.no-increment != 'false'
env:
PULL_REQUEST_BRANCH: ${{ github.event.pull_request.head.ref }}
shell: bash
run: |
echo "pull-request-$PULL_REQUEST_BRANCH" > latest-subsurface-buildnumber-extension
- name: store version number for the build
id: version_number
env:
PULL_REQUEST_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
shell: bash
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
# For a pull request we need the information from the pull request branch
# and not from the merge branch on the pull request
git checkout $PULL_REQUEST_HEAD_SHA
version=$(scripts/get-version.sh)
echo "version=$version" >> $GITHUB_OUTPUT
buildnr=$(scripts/get-version.sh 1)
echo "buildnr=$buildnr" >> $GITHUB_OUTPUT
git checkout $GITHUB_SHA

View File

@ -1,37 +0,0 @@
name: Android Docker Image CI
on:
push:
branches:
- master
paths:
- scripts/docker/android-build-container/**
- .github/workflows/android-dockerimage.yml
jobs:
android-build-container:
runs-on: ubuntu-latest
env:
VERSION: ${{ '5.15.2' }} # the version numbers here is based on the Qt version, the third digit is the rev of the docker image
steps:
- uses: actions/checkout@v4
- name: Build the name for the docker image
id: build_name
run: |
v=$VERSION
b=$GITHUB_REF # -BRANCH suffix, unless the branch is master
b=${b/refs\/heads\//}
b=${b,,} # the name needs to be all lower case
if [ $b = "master" ] ; then b="" ; else b="-$b" ; fi
echo "NAME=$GITHUB_REPOSITORY_OWNER/android-build${b}:${v}" >> $GITHUB_OUTPUT
- name: Build and Publish Linux Docker image to Dockerhub
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: ${{ steps.build_name.outputs.NAME }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
dockerfile: 'Dockerfile'
workdir: './scripts/docker/android-build-container/'

View File

@ -1,91 +0,0 @@
name: Android
on:
push:
paths-ignore:
- scripts/docker/**
branches:
- master
pull_request:
paths-ignore:
- scripts/docker/**
branches:
- master
jobs:
build:
env:
KEYSTORE_FILE: ${{ github.workspace }}/../subsurface.keystore
runs-on: ubuntu-latest
container:
image: docker://subsurface/android-build:5.15.2
steps:
- name: checkout sources
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: set the version information
id: version_number
uses: ./.github/actions/manage-version
with:
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
- name: set up the keystore
if: github.event_name == 'push'
env:
ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
run: |
echo "$ANDROID_KEYSTORE_BASE64" | base64 -d > $KEYSTORE_FILE
- name: run build
id: build
env:
KEYSTORE_PASSWORD: pass:${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
KEYSTORE_ALIAS: ${{ secrets.ANDROID_KEYSTORE_ALIAS }}
BUILDNR: ${{ steps.version_number.outputs.buildnr }}
run: |
# this is rather awkward, but it allows us to use the preinstalled
# Android and Qt versions with relative paths
cd ..
ln -s /android/5.15.* .
ln -s /android/build-tools .
ln -s /android/cmdline-tools .
ln -s /android/ndk .
ln -s /android/platform-tools .
ln -s /android/platforms .
ln -s /android/tools .
git config --global user.email "ci@subsurface-divelog.org"
git config --global user.name "Subsurface CI"
git config --global --add safe.directory $GITHUB_WORKSPACE
git config --global --add safe.directory $GITHUB_WORKSPACE/libdivecomputer
# get the build number via curl so this works both for a pull request as well as a push
export OUTPUT_DIR="$GITHUB_WORKSPACE"
bash -x ./subsurface/packaging/android/qmake-build.sh -buildnr $BUILDNR
- name: delete the keystore
if: github.event_name == 'push'
run: |
rm $KEYSTORE_FILE
- name: publish pull request artifacts
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: Subsurface-Android-${{ steps.version_number.outputs.version }}
path: Subsurface-mobile-*.apk
# only publish a 'release' on push events (those include merging a PR)
- name: upload binaries
if: github.event_name == 'push'
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version_number.outputs.version }}
repository: ${{ github.repository_owner }}/nightly-builds
token: ${{ secrets.NIGHTLY_BUILDS }}
prerelease: false
fail_on_unmatched_files: true
files: |
Subsurface-mobile-${{ steps.version_number.outputs.version }}.apk

View File

@ -1,24 +0,0 @@
name: Add artifact links to pull request
on:
workflow_run:
workflows: ["Ubuntu 16.04 / Qt 5.15-- for AppImage", "Mac", "Windows", "Android", "iOS"]
types: [completed]
jobs:
artifacts-url-comments:
name: Add artifact links to PR and issues
runs-on: ubuntu-22.04
steps:
- name: Add artifact links to PR and issues
if: github.event.workflow_run.event == 'pull_request'
uses: tonyhallett/artifacts-url-comments@v1.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
prefix: "**Artifacts:**"
suffix: "_**WARNING:** Use at your own risk._"
format: name
addTo: pull
errorNoArtifacts: false

View File

@ -1,69 +0,0 @@
# Modified from the sample workflow suggested by GitHub/Semmle
#
name: "CodeQL"
on:
push:
# once this works, this should be
# branches: [master]
branches: [master, codeQL]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: '0 2 * * 6'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['c-cpp', 'javascript-typescript']
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: get container ready for build
run: |
sudo apt-get update
sudo apt-get install -y -q \
autoconf automake cmake g++ git libcrypto++-dev libcurl4-gnutls-dev \
libgit2-dev libqt5qml5 libqt5quick5 libqt5svg5-dev \
libqt5webkit5-dev libsqlite3-dev libssh2-1-dev libssl-dev libssl-dev \
libtool libusb-1.0-0-dev libxml2-dev libxslt1-dev libzip-dev make \
pkg-config qml-module-qtlocation qml-module-qtpositioning \
qml-module-qtquick2 qt5-qmake qtchooser qtconnectivity5-dev \
qtdeclarative5-dev qtdeclarative5-private-dev qtlocation5-dev \
qtpositioning5-dev qtscript5-dev qttools5-dev qttools5-dev-tools \
qtquickcontrols2-5-dev xvfb libbluetooth-dev libmtp-dev
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
- name: Build
run: |
cd ..
git config --global --add safe.directory $GITHUB_WORKSPACE
git config --global --add safe.directory $GITHUB_WORKSPACE/libdivecomputer
bash -e -x subsurface/scripts/build.sh -desktop -build-with-webkit
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3

View File

@ -1,56 +0,0 @@
name: Coverity Scan Linux Qt 5.9
on:
schedule:
- cron: '0 18 * * *' # Daily at 18:00 UTC
jobs:
CoverityScanBuildOnUbuntu:
runs-on: ubuntu-latest
container:
image: ubuntu:22.04
steps:
- name: add build dependencies
run: |
apt-get update
apt-get dist-upgrade -y
DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
wget curl \
autoconf automake cmake g++ git libcrypto++-dev libcurl4-gnutls-dev \
libgit2-dev libqt5qml5 libqt5quick5 libqt5svg5-dev \
libqt5webkit5-dev libsqlite3-dev libssh2-1-dev libssl-dev libssl-dev \
libtool libusb-1.0-0-dev libxml2-dev libxslt1-dev libzip-dev make \
pkg-config qml-module-qtlocation qml-module-qtpositioning \
qml-module-qtquick2 qt5-qmake qtchooser qtconnectivity5-dev \
qtdeclarative5-dev qtdeclarative5-private-dev qtlocation5-dev \
qtpositioning5-dev qtscript5-dev qttools5-dev qttools5-dev-tools \
qtquickcontrols2-5-dev libbluetooth-dev libmtp-dev
- name: checkout sources
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: configure environment
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
git config --global --add safe.directory $GITHUB_WORKSPACE/libdivecomputer
- name: get the version information
id: version_number
uses: ./.github/actions/manage-version
with:
no-increment: true
- name: run coverity scan
uses: vapier/coverity-scan-action@v1
with:
project: Subsurface-divelog/subsurface
token: ${{ secrets.COVERITY_SCAN_TOKEN }}
email: glance@acc.umu.se
command: subsurface/scripts/build.sh -desktop -build-with-webkit
working-directory: ${{ github.workspace }}/..
version: ${{ steps.version_number.outputs.version }}
description: Automatic scan on github actions

View File

@ -1,36 +0,0 @@
name: Documentation
on:
push:
branches:
- master
paths:
- Documentation
- .github/workflows/documentation.yml
pull_request:
branches:
- master
paths:
- Documentation
- .github/workflows/documentation.yml
jobs:
documentation:
runs-on: ubuntu-22.04
steps:
- name: Install Packages
run: |
sudo apt-get -y update
sudo apt-get -y install asciidoc docbook-xml w3m
- name: Checkout Sources
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Process the Documentation
id: process_documentation
working-directory: Documentation
run: make

View File

@ -1,59 +0,0 @@
name: Fedora Copr Build
on:
push:
paths-ignore:
- scripts/docker/**
branches:
- master
- current
jobs:
setup-build:
name: Submit build to Fedora COPR
# this seems backwards, but we want to run under Fedora, but Github doesn' support that
runs-on: ubuntu-latest
container:
image: fedora:latest
steps:
- name: Setup build dependencies in the Fedora container
run: |
dnf -y install @development-tools @rpm-development-tools
dnf -y install copr-cli make
- name: Check out sources
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: setup git
run: |
git config --global --add safe.directory /__w/subsurface/subsurface
git config --global --add safe.directory /__w/subsurface/subsurface/libdivecomputer
- name: set the version information
id: version_number
uses: ./.github/actions/manage-version
with:
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
- name: Setup API token for copr-cli
env:
API_TOKEN: ${{ secrets.COPR_TOKEN }}
API_LOGIN: ${{ secrets.COPR_LOGIN }}
run: |
mkdir -p "$HOME/.config"
cp packaging/copr/config.copr "$HOME/.config/copr"
sed -i "s/API_TOKEN/$API_TOKEN/;s/API_LOGIN/$API_LOGIN/" "$HOME/.config/copr"
- name: Checkout googlemaps
run: |
cd ..
git clone https://github.com/subsurface/googlemaps
- name: run the copr build script
run: |
cd ..
bash -x subsurface/packaging/copr/make-package.sh $GITHUB_REF_NAME

View File

@ -1,61 +0,0 @@
name: iOS
on:
push:
paths-ignore:
- scripts/docker/**
branches:
- master
pull_request:
paths-ignore:
- scripts/docker/**
branches:
- master
jobs:
build:
runs-on: macOS-11
steps:
- name: switch to Xcode 11
run: sudo xcode-select -s "/Applications/Xcode_11.7.app"
- name: checkout sources
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: setup Homebrew
run: brew install autoconf automake libtool pkg-config
- name: checkout Qt resources
uses: actions/checkout@v4
with:
repository: subsurface/qt-ios
ref: main
path: qt-ios
- name: set the version information
id: version_number
uses: ./.github/actions/manage-version
with:
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
- name: build Subsurface-mobile for iOS
env:
VERSION: ${{ steps.version_number.outputs.version }}
run: |
cd ..
git config --global --add safe.directory $GITHUB_WORKSPACE
git config --global --add safe.directory $GITHUB_WORKSPACE/libdivecomputer
export IOS_QT=$GITHUB_WORKSPACE/qt-ios
echo "build for simulator"
bash -x $GITHUB_WORKSPACE/packaging/ios/build.sh -simulator
# We need this in order to be able to access the file and publish it
mv build-Subsurface-mobile-Qt_5_14_1_for_iOS-Release/Release-iphonesimulator/Subsurface-mobile.app $GITHUB_WORKSPACE/Subsurface-mobile-$VERSION.app
- name: publish artifacts
uses: actions/upload-artifact@v4
with:
name: Subsurface-iOS-${{ steps.version_number.outputs.version }}
path: Subsurface-mobile-*.app

View File

@ -1,100 +0,0 @@
name: Generic workflow for Debian and derivatives
on:
workflow_call:
inputs:
container-image:
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
container:
image: ${{ inputs.container-image }}
steps:
- name: get container ready for build
run: |
echo "--------------------------------------------------------------"
echo "update distro and install dependencies"
apt-get update
apt-get dist-upgrade -y
DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
autoconf automake cmake g++ git libcrypto++-dev libcurl4-gnutls-dev \
libgit2-dev libqt5qml5 libqt5quick5 libqt5svg5-dev \
libqt5webkit5-dev libsqlite3-dev libssh2-1-dev libssl-dev libssl-dev \
libtool libusb-1.0-0-dev libxml2-dev libxslt1-dev libzip-dev make \
pkg-config qml-module-qtlocation qml-module-qtpositioning \
qml-module-qtquick2 qt5-qmake qtchooser qtconnectivity5-dev \
qtdeclarative5-dev qtdeclarative5-private-dev qtlocation5-dev \
qtpositioning5-dev qtscript5-dev qttools5-dev qttools5-dev-tools \
qtquickcontrols2-5-dev xvfb libbluetooth-dev libmtp-dev \
mdbtools-dev
git config --global user.email "ci@subsurface-divelog.org"
git config --global user.name "Subsurface CI"
git config --global --add safe.directory $GITHUB_WORKSPACE
git config --global --add safe.directory $GITHUB_WORKSPACE/libdivecomputer
# needs git from the previous step
- name: checkout sources
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: set the version information
id: version_number
uses: ./.github/actions/manage-version
with:
no-increment: true
- name: build subsurface-mobile
run: |
echo "--------------------------------------------------------------"
echo "building mobile"
cd ..
bash -e -x subsurface/scripts/build.sh -mobile
- name: test mobile build
run: |
echo "--------------------------------------------------------------"
echo "running tests for mobile"
cd build-mobile/tests
# xvfb-run --auto-servernum ./TestGitStorage -v2
xvfb-run --auto-servernum make check
- name: build subsurface
run: |
echo "--------------------------------------------------------------"
echo "building desktop"
# now build for the desktop version (including WebKit)
cd ..
bash -e -x subsurface/scripts/build.sh -desktop -build-with-webkit
- name: test desktop build
run: |
echo "--------------------------------------------------------------"
echo "running tests for desktop"
cd build/tests
# xvfb-run --auto-servernum ./TestGitStorage -v2
xvfb-run --auto-servernum make check
- name: build subsurface-downloader
run: |
echo "--------------------------------------------------------------"
echo "building downloader"
cd ..
bash -e -x subsurface/scripts/build.sh -downloader
- name: build smtk2ssrf
run: |
echo "--------------------------------------------------------------"
echo "building smtk2ssrf"
# build smtk2ssrf (needs the artefacts generated by the subsurface build
cd ..
bash -e -x subsurface/scripts/smtk2ssrf-build.sh -y

View File

@ -1,19 +0,0 @@
name: Debian trixie / Qt 5.15--
on:
push:
paths-ignore:
- scripts/docker/**
branches:
- master
pull_request:
paths-ignore:
- scripts/docker/**
branches:
- master
jobs:
do-build-test:
uses: ./.github/workflows/linux-debian-generic.yml
with:
container-image: debian:trixie

View File

@ -1,68 +0,0 @@
name: Fedora 35 / Qt 6--
on:
push:
paths-ignore:
- scripts/docker/**
branches:
- master
pull_request:
paths-ignore:
- scripts/docker/**
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
container:
image: fedora:35
steps:
- name: get container ready for build
run: |
echo "--------------------------------------------------------------"
echo "update distro and install dependencies"
dnf update -y
dnf install -y autoconf automake bluez-libs-devel cmake gcc-c++ git-core \
libcurl-devel libsqlite3x-devel libssh2-devel libtool libudev-devel \
libusbx-devel libxml2-devel libxslt-devel make \
qt6-qtbase-devel qt6-qtconnectivity-devel qt6-qtdeclarative-devel \
qt6-qtlocation-devel qt6-qtsvg-devel \
qt6-qttools-devel redhat-rpm-config \
libxkbcommon-devel qt6-qt5compat-devel \
bluez-libs-devel libgit2-devel libzip-devel libmtp-devel \
xorg-x11-server-Xvfb
- name: checkout sources
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: set the version information
id: version_number
uses: ./.github/actions/manage-version
with:
no-increment: true
- name: build Subsurface
run: |
echo "--------------------------------------------------------------"
echo "building desktop"
# now build for the desktop version (without WebKit)
cd ..
git config --global --add safe.directory $GITHUB_WORKSPACE
git config --global --add safe.directory $GITHUB_WORKSPACE/libdivecomputer
git config --global --get-all safe.directory
bash -e -x subsurface/scripts/build.sh -desktop -build-with-qt6
- name: test desktop build
run: |
echo "--------------------------------------------------------------"
echo "running tests for desktop"
cd build/tests
xvfb-run --auto-servernum make check

View File

@ -1,80 +0,0 @@
name: Snap
on:
push:
paths-ignore:
- scripts/docker/**
branches:
- master
pull_request:
paths-ignore:
- scripts/docker/**
branches:
- master
jobs:
Snap:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: set the version information
id: version_number
uses: ./.github/actions/manage-version
with:
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
- name: store dummy version and build number for pull request
if: github.event_name == 'pull_request'
run: |
echo "100" > latest-subsurface-buildnumber
echo "CICD-pull-request" > latest-subsurface-buildnumber-extension
- name: Set up LXD
uses: canonical/setup-lxd@main
- name: Set up CCache
id: setup-ccache
run: |
sudo apt-get install ccache
mkdir -p ${HOME}/.ccache
ccache --max-size=2G
/snap/bin/lxc profile device add default ccache disk source=${HOME}/.ccache/ path=/root/.ccache
# Patch snapcraft.yaml to enable ccache
patch -p1 < .github/workflows/scripts/linux-snap.patch
# Find common base between master and HEAD to use as cache key.
git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules origin master
echo "key=$( git merge-base origin/master $GITHUB_SHA )" >> $GITHUB_OUTPUT
- name: CCache
uses: actions/cache@v3
with:
key: ccache-${{ runner.os }}-${{ steps.setup-ccache.outputs.key }}
restore-keys: |
ccache-${{ runner.os }}-
path: ~/.ccache/**
- name: Build and verify the snap
uses: canonical/actions/build-snap@release
id: build-snap
with:
setup-lxd: false
- name: Clear CCache stats
run: ccache --show-stats --zero-stats
- name: Upload the snap
if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: ${{ steps.build-snap.outputs.snap-name }}
path: ${{ steps.build-snap.outputs.snap-path }}
if-no-files-found: error

View File

@ -1,149 +0,0 @@
name: Ubuntu 16.04 / Qt 5.15-- for AppImage
on:
push:
paths-ignore:
- scripts/docker/**
branches:
- master
pull_request:
paths-ignore:
- scripts/docker/**
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
container:
image: ubuntu:16.04
steps:
- name: get container ready for build
run: |
echo "--------------------------------------------------------------"
echo "update distro and install dependencies"
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
software-properties-common
add-apt-repository -y ppa:savoury1/qt-5-15
add-apt-repository -y ppa:savoury1/kde-5-80
add-apt-repository -y ppa:savoury1/gpg
add-apt-repository -y ppa:savoury1/ffmpeg4
add-apt-repository -y ppa:savoury1/vlc3
add-apt-repository -y ppa:savoury1/gcc-9
add-apt-repository -y ppa:savoury1/display
add-apt-repository -y ppa:savoury1/apt-xenial
add-apt-repository -y ppa:savoury1/gtk-xenial
add-apt-repository -y ppa:savoury1/qt-xenial
add-apt-repository -y ppa:savoury1/kde-xenial
add-apt-repository -y ppa:savoury1/backports
add-apt-repository -y ppa:savoury1/build-tools
apt-get update
apt-get dist-upgrade -y
DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
autoconf automake cmake g++ g++-9 git libcrypto++-dev libcurl4-gnutls-dev \
libgit2-dev libqt5qml5 libqt5quick5 libqt5svg5-dev \
libqt5webkit5-dev libsqlite3-dev libssh2-1-dev libssl-dev libssl-dev \
libtool libusb-1.0-0-dev libxml2-dev libxslt1-dev libzip-dev make \
pkg-config qml-module-qtlocation qml-module-qtpositioning \
qml-module-qtquick2 qt5-qmake qtchooser qtconnectivity5-dev \
qtdeclarative5-dev qtdeclarative5-private-dev qtlocation5-dev \
qtpositioning5-dev qtscript5-dev qttools5-dev qttools5-dev-tools \
qtquickcontrols2-5-dev xvfb libbluetooth-dev libmtp-dev liblzma-dev \
curl
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 \
--slave /usr/bin/g++ g++ /usr/bin/g++-9
- name: checkout sources
# We cannot update this as glibc on 16.04 is too old for node 20.
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: set the version information
id: version_number
uses: ./.github/actions/manage-version
with:
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
- name: build Subsurface
run: |
echo "--------------------------------------------------------------"
echo "building desktop"
# now build the appimage
cd ..
bash -e -x subsurface/scripts/build.sh -desktop -create-appdir -build-with-webkit
- name: test desktop build
run: |
echo "--------------------------------------------------------------"
echo "running tests for desktop"
cd build/tests
# xvfb-run --auto-servernum ./TestGitStorage -v2
xvfb-run --auto-servernum make check
- name: build appimage
env:
VERSION: ${{ steps.version_number.outputs.version }}
run: |
echo "--------------------------------------------------------------"
echo "assembling AppImage"
export QT_PLUGIN_PATH=$QT_ROOT/plugins
export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins
export QT_DEBUG_PLUGINS=1
cd ..
# set up the appdir
mkdir -p appdir/usr/plugins/
# mv googlemaps plugins into place
mv appdir/usr/usr/lib/x86_64-linux-gnu/qt5/plugins/* appdir/usr/plugins # the usr/usr is not a typo, that's where it ends up
rm -rf appdir/usr/home/ appdir/usr/include/ appdir/usr/share/man/ # No need to ship developer and man files as part of the AppImage
rm -rf appdir/usr/usr appdir/usr/lib/x86_64-linux-gnu/cmake appdir/usr/lib/pkgconfig
cp /usr/lib/x86_64-linux-gnu/libssl.so.1.1 appdir/usr/lib/
cp /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 appdir/usr/lib/
# get the linuxdeployqt tool and run it to collect the libraries
curl -L -O "https://github.com/probonopd/linuxdeployqt/releases/download/7/linuxdeployqt-7-x86_64.AppImage"
chmod a+x linuxdeployqt*.AppImage
unset QTDIR
unset QT_PLUGIN_PATH
unset LD_LIBRARY_PATH
./linuxdeployqt*.AppImage --appimage-extract-and-run ./appdir/usr/share/applications/*.desktop -exclude-libs=libdbus-1.so.3 -bundle-non-qt-libs -qmldir=./subsurface/stats -qmldir=./subsurface/map-widget/ -verbose=2
# create the AppImage
./linuxdeployqt*.AppImage --appimage-extract-and-run ./appdir/usr/share/applications/*.desktop -exclude-libs=libdbus-1.so.3 -appimage -qmldir=./subsurface/stats -qmldir=./subsurface/map-widget/ -verbose=2
# copy AppImage to the calling VM
# with GitHub Actions the $GITHUB_WORKSPACE directory is the current working directory at the start of a step
cp Subsurface*.AppImage* $GITHUB_WORKSPACE/Subsurface-$VERSION.AppImage
- name: PR artifacts
if: github.event_name == 'pull_request'
# We cannot update this as glibc on 16.04 is too old for node 20.
uses: actions/upload-artifact@v3
with:
name: Subsurface-Linux-AppImage-${{ steps.version_number.outputs.version }}
path: Subsurface-*.AppImage
compression-level: 0
# only publish a 'release' on push events (those include merging a PR)
- name: upload binaries
if: github.event_name == 'push'
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ steps.version_number.outputs.version }}
repository: ${{ github.repository_owner }}/nightly-builds
token: ${{ secrets.NIGHTLY_BUILDS }}
prerelease: false
fail_on_unmatched_files: true
files: |
./Subsurface-*.AppImage

View File

@ -1,19 +0,0 @@
name: Ubuntu 20.04 / Qt 5.12--
on:
push:
paths-ignore:
- scripts/docker/**
branches:
- master
pull_request:
paths-ignore:
- scripts/docker/**
branches:
- master
jobs:
do-build-test:
uses: ./.github/workflows/linux-debian-generic.yml
with:
container-image: ubuntu:20.04

View File

@ -1,19 +0,0 @@
name: Ubuntu 22.04 / Qt 5.15--
on:
push:
paths-ignore:
- scripts/docker/**
branches:
- master
pull_request:
paths-ignore:
- scripts/docker/**
branches:
- master
jobs:
do-build-test:
uses: ./.github/workflows/linux-debian-generic.yml
with:
container-image: ubuntu:22.04

View File

@ -1,19 +0,0 @@
name: Ubuntu 24.04 / Qt 5.15--
on:
push:
paths-ignore:
- scripts/docker/**
branches:
- master
pull_request:
paths-ignore:
- scripts/docker/**
branches:
- master
jobs:
do-build-test:
uses: ./.github/workflows/linux-debian-generic.yml
with:
container-image: ubuntu:24.04

View File

@ -1,80 +0,0 @@
name: Mac
on:
push:
paths-ignore:
- scripts/docker/**
branches:
- master
pull_request:
paths-ignore:
- scripts/docker/**
branches:
- master
jobs:
build:
runs-on: macOS-11
steps:
- name: checkout sources
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: setup Homebrew
run: brew install hidapi libxslt libjpg libmtp create-dmg confuse
- name: checkout Qt resources
uses: actions/checkout@v4
with:
repository: subsurface/qt-mac
ref: main
path: qt-mac
- name: set the version information
id: version_number
uses: ./.github/actions/manage-version
with:
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
- name: build Subsurface
id: build
run: |
cd ${GITHUB_WORKSPACE}/..
export QT_ROOT=${GITHUB_WORKSPACE}/qt-mac/Qt5.15.13
export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins
export PATH=$QT_ROOT/bin:$PATH
export CMAKE_PREFIX_PATH=$QT_ROOT/lib/cmake
# now setup Subsurface with WebKit and build the dependencies, using the generic build script
bash -e -x ./subsurface/scripts/build.sh -desktop -build-with-webkit -release -build-deps -ftdi -prep-only
echo "finished initial cmake setup of Subsurface - next build the package"
cd subsurface/build
echo "run the packaging script"
bash -e -x ../packaging/macosx/make-package.sh | tee mp.log 2>&1
IMG=$(grep ^created: mp.log | tail -1 | cut -b10-)
echo "Created $IMG"
echo "dmg=$IMG" >> $GITHUB_OUTPUT
- name: publish pull request artifacts
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: Subsurface-MacOS-${{ steps.version_number.outputs.version }}
path: ${{ steps.build.outputs.dmg }}
compression-level: 0
# only publish a 'release' on push events (those include merging a PR)
- name: upload binaries
if: github.event_name == 'push'
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version_number.outputs.version }}
repository: ${{ github.repository_owner }}/nightly-builds
token: ${{ secrets.NIGHTLY_BUILDS }}
prerelease: false
fail_on_unmatched_files: true
files: ${{ steps.build.outputs.dmg }}

View File

@ -1,45 +0,0 @@
name: Post Release Notes
on:
push:
paths-ignore:
- scripts/docker/**
branches:
- master
jobs:
postRelease:
runs-on: ubuntu-latest
steps:
- name: checkout sources
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: set the version information
id: version_number
uses: ./.github/actions/manage-version
with:
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
# since we are running this step on a pull request, we will skip build numbers in releases
- name: assemble release notes
env:
EVENT_HEAD_COMMIT_ID: ${{ github.event.head_commit.id }}
# Required because we are using the GitHub CLI in 'create-releasenotes.sh'
GH_TOKEN: ${{ github.token }}
run: |
scripts/create-releasenotes.sh $EVENT_HEAD_COMMIT_ID
# add a file containing the release title so it can be picked up and listed on the release page on our web server
- name: publish release
if: github.event_name == 'push'
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version_number.outputs.version }}
repository: ${{ github.repository_owner }}/nightly-builds
token: ${{ secrets.NIGHTLY_BUILDS }}
prerelease: false
files: release_content_title.txt
body_path: gh_release_notes.md

View File

@ -1,169 +0,0 @@
#!/usr/bin/env python3
# coding: utf-8
import json
import logging
import multiprocessing
import os
import pathlib
import pprint
import sys
import subprocess
import tempfile
from launchpadlib import errors as lp_errors # fades
from launchpadlib.credentials import RequestTokenAuthorizationEngine, UnencryptedFileCredentialStore
from launchpadlib.launchpad import Launchpad
import requests # fades
logger = logging.getLogger("subsurface.check_usns")
logger.addHandler(logging.StreamHandler())
logger.setLevel(logging.INFO)
APPLICATION = "subsurface-ci"
LAUNCHPAD = "production"
TEAM = "subsurface"
SOURCE_NAME = "subsurface"
SNAPS = {
"subsurface": {
"stable": {"recipe": "subsurface-stable"},
},
}
STORE_URL = "https://api.snapcraft.io/api/v1/snaps" "/details/{snap}?channel={channel}"
STORE_HEADERS = {"X-Ubuntu-Series": "16", "X-Ubuntu-Architecture": "{arch}"}
CHECK_NOTICES_PATH = "/snap/bin/review-tools.check-notices"
CHECK_NOTICES_ARGS = ["--ignore-pockets", "esm-apps"]
def get_store_snap(processor, snap, channel):
logger.debug("Checking for snap %s on %s in channel %s", snap, processor, channel)
data = {
"snap": snap,
"channel": channel,
"arch": processor,
}
resp = requests.get(STORE_URL.format(**data), headers={k: v.format(**data) for k, v in STORE_HEADERS.items()})
logger.debug("Got store response: %s", resp)
try:
result = json.loads(resp.content)
except json.JSONDecodeError:
logger.error("Could not parse store response: %s", resp.content)
else:
return result
def fetch_url(entry):
dest, uri = entry
r = requests.get(uri, stream=True)
logger.debug("Downloading %s to %s", uri, dest)
if r.status_code == 200:
with open(dest, "wb") as f:
for chunk in r:
f.write(chunk)
return dest
def check_snap_notices(store_snaps):
with tempfile.TemporaryDirectory(dir=pathlib.Path.home()) as dir:
snaps = multiprocessing.Pool(8).map(
fetch_url,
(
(pathlib.Path(dir) / f"{snap['package_name']}_{snap['revision']}.snap", snap["download_url"])
for snap in store_snaps
),
)
try:
notices = subprocess.check_output([CHECK_NOTICES_PATH] + CHECK_NOTICES_ARGS + snaps, encoding="UTF-8")
logger.debug("Got check_notices output:\n%s", notices)
except subprocess.CalledProcessError as e:
logger.error("Failed to check notices:\n%s", e.output)
sys.exit(2)
else:
notices = json.loads(notices)
return notices
if __name__ == "__main__":
check_notices = os.path.isfile(CHECK_NOTICES_PATH) and os.access(CHECK_NOTICES_PATH, os.X_OK)
if not check_notices:
raise RuntimeError("`review-tools` not found.")
try:
lp = Launchpad.login_with(
APPLICATION,
LAUNCHPAD,
version="devel",
authorization_engine=RequestTokenAuthorizationEngine(LAUNCHPAD, APPLICATION),
credential_store=UnencryptedFileCredentialStore(os.path.expanduser(sys.argv[1])),
)
except NotImplementedError:
raise RuntimeError("Invalid credentials.")
ubuntu = lp.distributions["ubuntu"]
logger.debug("Got ubuntu: %s", ubuntu)
team = lp.people[TEAM]
logger.debug("Got team: %s", team)
errors = []
for snap, channels in SNAPS.items():
for channel, snap_map in channels.items():
logger.info("Processing channel %s for snap %s", channel, snap)
try:
snap_recipe = lp.snaps.getByName(owner=team, name=snap_map["recipe"])
logger.debug("Got snap: %s", snap_recipe)
except lp_errors.NotFound as ex:
logger.error("Snap not found: %s", snap_map["recipe"])
errors.append(ex)
continue
if len(snap_recipe.pending_builds) > 0:
logger.info("Skipping %s: snap builds pending…", snap_recipe.web_link)
continue
store_snaps = tuple(
filter(
lambda snap: snap.get("result") != "error",
(get_store_snap(processor.name, snap, channel) for processor in snap_recipe.processors),
)
)
logger.debug("Got store versions: %s", {snap["architecture"][0]: snap["version"] for snap in store_snaps})
snap_notices = check_snap_notices(store_snaps)[snap]
for store_snap in store_snaps:
if str(store_snap["revision"]) not in snap_notices:
logger.error(
"Revision %s missing in result, see above for any review-tools errors.", store_snap["revision"]
)
errors.append(f"Revision {store_snap['revision']} missing in result:\n{store_snap}")
if any(snap_notices.values()):
logger.info("Found USNs:\n%s", pprint.pformat(snap_notices))
else:
logger.info("Skipping %s: no USNs found", snap)
continue
logger.info("Triggering %s", snap_recipe.description or snap_recipe.name)
snap_recipe.requestBuilds(
archive=snap_recipe.auto_build_archive,
pocket=snap_recipe.auto_build_pocket,
channels=snap_recipe.auto_build_channels,
)
logger.debug("Triggered builds: %s", snap_recipe.web_link)
for error in errors:
logger.debug(error)
if errors:
sys.exit(1)

View File

@ -1,44 +0,0 @@
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index 9f34d0169..0d5a89fd9 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -35,6 +35,7 @@ parts:
source: https://github.com/Subsurface/googlemaps.git
plugin: make
build-packages:
+ - ccache
- qtbase5-dev
- wget
override-pull: |
@@ -79,6 +80,7 @@ parts:
override-build: |
qmake \
INCLUDEPATH+=${CRAFT_PART_SRC}/QtHeaders \
+ CONFIG+=ccache \
${CRAFT_PART_SRC}
craftctl default
@@ -111,7 +113,11 @@ parts:
source: .
source-type: git
source-subdir: libdivecomputer
+ autotools-configure-parameters:
+ - CC="ccache gcc"
+ - CXX="ccache g++"
build-packages:
+ - ccache
- libbluetooth-dev
- libhidapi-dev
- libusb-dev
@@ -134,8 +140,11 @@ parts:
- -DFTDISUPPORT=ON
- -DLIBDIVECOMPUTER_LIBRARIES=../../../stage/usr/local/lib/libdivecomputer.so
- -DLIBDIVECOMPUTER_INCLUDE_DIR=../../../stage/usr/local/include
+ - -DCMAKE_C_COMPILER_LAUNCHER=ccache
+ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
build-packages:
- build-essential
+ - ccache
- libcurl4-gnutls-dev
- libftdi1-dev
- libgit2-dev

View File

@ -1,2 +0,0 @@
launchpadlib
requests

View File

@ -1,37 +0,0 @@
name: SnapUSNs
on:
workflow_dispatch:
schedule:
- cron: '0 5 * * *'
jobs:
CheckUSNs:
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Python dependencies
uses: insightsengineering/pip-action@v2.0.0
with:
requirements: .github/workflows/scripts/requirements.txt
- name: Install Snap dependencies
run: |
sudo snap install review-tools --edge
- name: Set up Launchpad credentials
uses: DamianReeves/write-file-action@v1.2
with:
path: lp_credentials
contents: ${{ secrets.LAUNCHPAD_CREDENTIALS }}
- name: Check for USNs
run: .github/workflows/scripts/check_usns.py lp_credentials

View File

@ -1,55 +0,0 @@
name: Ubuntu Launchpad Build
on:
push:
paths-ignore:
- scripts/docker/**
branches:
- master
- current
jobs:
push-to-ppa:
name: Submit build to Ubuntu Launchpad
runs-on: ubuntu-latest
steps:
- name: Check out sources
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: set the version information
id: version_number
uses: ./.github/actions/manage-version
with:
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
- name: Setup build dependencies
run: |
sudo apt-get update
sudo apt-get install -y devscripts dput gpg debhelper qt5-qmake cmake
- name: Setup gpg key token for launchpad
env:
GPG_PRIVATE_KEY: ${{ secrets.PPA_SECRET_KEY }}
run: |
echo "$GPG_PRIVATE_KEY" > ~/.key
gpg --import ~/.key
- name: setup git
run: |
git config --global --add safe.directory /__w/subsurface/subsurface
git config --global --add safe.directory /__w/subsurface/subsurface/libdivecomputer
- name: Checkout googlemaps
run: |
cd ..
git clone https://github.com/subsurface/googlemaps
- name: run the launchpad make-package script
run: |
cd ..
bash -x subsurface/packaging/ubuntu/make-package.sh $GITHUB_REF_NAME

View File

@ -1,38 +0,0 @@
name: Windows (MXE) Docker Image
on:
push:
branches:
- master
paths:
- scripts/docker/mxe-build-container/**
- .github/workflows/windows-mxe-dockerimage.yml
jobs:
windows-mxe:
runs-on: ubuntu-latest
env:
VERSION: ${{ '3.1.0' }} # 'official' images should have a dot-zero version
mxe_sha: 'c0bfefc57a00fdf6cb5278263e21a478e47b0bf5'
steps:
- uses: actions/checkout@v4
- name: Build the name for the docker image
id: build_name
run: |
v=$VERSION
b=$GITHUB_REF # -BRANCH suffix, unless the branch is master
b=${b/refs\/heads\//}
b=${b,,} # the name needs to be all lower case
if [ $b = "master" ] ; then b="" ; else b="-$b" ; fi
echo "NAME=$GITHUB_REPOSITORY_OWNER/mxe-build${b}:${v}" >> $GITHUB_OUTPUT
- name: Build and Publish Linux Docker image to Dockerhub
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: ${{ steps.build_name.outputs.NAME }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
workdir: './scripts/docker/mxe-build-container/'
buildargs: mxe_sha

View File

@ -1,73 +0,0 @@
name: Windows
on:
push:
paths-ignore:
- scripts/docker/**
branches:
- master
pull_request:
paths-ignore:
- scripts/docker/**
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
container:
image: docker://subsurface/mxe-build:3.1.0
steps:
- name: checkout sources
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: set the version information
id: version_number
uses: ./.github/actions/manage-version
with:
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
- name: get other dependencies
env:
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
run: |
echo "Running script to install additional dependancies into container"
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}/libdivecomputer
cd /win
ln -s /__w/subsurface/subsurface .
bash -x subsurface/packaging/windows/container-prep.sh 2>&1 | tee pre-build.log
- name: run build
run: |
export OUTPUT_DIR="$GITHUB_WORKSPACE"
cd /win
bash -x subsurface/packaging/windows/in-container-build.sh 2>&1 | tee build.log
grep "Built target installer" build.log
- name: publish pull request artifacts
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: Subsurface-Windows-${{ steps.version_number.outputs.version }}
path: |
subsurface*.exe*
smtk2ssrf*.exe
# only publish a 'release' on push events (those include merging a PR)
- name: upload binaries
if: github.event_name == 'push'
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version_number.outputs.version }}
repository: ${{ github.repository_owner }}/nightly-builds
token: ${{ secrets.NIGHTLY_BUILDS }}
prerelease: false
fail_on_unmatched_files: true
files: |
./subsurface*.exe*
./smtk2ssrf*.exe

18
.gitignore vendored
View File

@ -17,36 +17,20 @@ Documentation/docbook-xsl.css
Documentation/user-manual*.html
Documentation/user-manual*.pdf
Documentation/user-manual*.text
Documentation/mobile-images/mobile-images
packaging/windows/subsurface.nsi
packaging/macos/Info.plist
*.kdev4
callgrind.out.*
.gitignore
build*/
build/
.rcc
.moc
.uic
.obj
Makefile
subsurface.pro.user*
Subsurface-mobile.pro.user*
Subsurface.app
.DS_Store
!android/**/*.xml
build*
nightly-builds/
mobile-widgets/qml/kirigami
mobile-widgets/3rdparty/ECM/
mobile-widgets/3rdparty/breeze-icons/
mobile-widgets/3rdparty/extra-cmake-modules/
mobile-widgets/3rdparty/kirigami/
packaging/ios/install-root
packaging/ios/Info.plist
packaging/ios/Qt
packaging/ios/asset_catalog_compiler.Info.plist
appdata/subsurface.appdata.xml
android-mobile/Roboto-Regular.ttf
gh_release_notes.md
release_content_title.txt
/output/

4
.gitmodules vendored
View File

@ -1,4 +1,4 @@
[submodule "libdivecomputer"]
path = libdivecomputer
url = https://github.com/Subsurface/libdc.git
branch = Subsurface-NG
url = git://github.com/Subsurface-divelog/libdc.git
branch = Subsurface-branch

View File

@ -1,17 +0,0 @@
path_classifiers:
test:
- "tests/*"
extraction:
cpp:
configure:
command:
- export INSTALL_ROOT=/opt/out
- export PKG_CONFIG_PATH=$INSTALL_ROOT/lib/pkgconfig:$PKG_CONFIG_PATH
- bash -x ./scripts/build-libdivecomputer.sh
- mkdir _lgtm_build_dir
- cd _lgtm_build_dir
- cmake -DLIBGIT2_DYNAMIC=ON -DNO_DOCS=ON -DCMAKE_VERBOSE_MAKEFILE=ON ..
queries:
- exclude: "cpp/short-global-name"

View File

@ -1,47 +0,0 @@
<olteanu.claudiu@ymail.com> <olteanu.vasilica.claudiu@gmail.com>
<danilo.eu@gmail.com> <danilo.cesar@collabora.co.uk>
<dirk@hohndel.org> <dhohndel@dhohndel-mac02.jf.intel.com>
<dirk@hohndel.org> <hohndel@mail.gr8dns.org>
Dirk Hohndel <dirk@hohndel.org> Dirk Hohndel (Intel) <dhohndel@dhohndel-mac02.jf.intel.com>
Dirk Hohndel <dirk@hohndel.org> Subsurface <dirk@subsurface-divelog.org>
Dirk Hohndel <dirk@hohndel.org> Subsurface CI <dirk@hohndel.org>
<guido.lerch@gmail.com> <glerch@Guidos-MacBook-Air.local>
<jacco.van.koll@gmail.com> <jko@haringstad.com>
<jlmulder@xs4all.nl> <jlmulder@planet.nl>
<jef@libdivecomputer.org> <jefdriesen@telenet.be>
<j.bygdell@gmail.com> <narogh@Qutie.local>
<karent.bug@gmail.com> <k.arentowicz@gmail.com>
<me@bearsh.org> <m.gysel@consonics.ch>
<miika.turkia@gmail.com> <miika.turkia@nixu.fi>
Robert C. Helling <helling@atdotde.de>
Robert C. Helling <helling@atdotde.de> Robert.Helling <helling@atdotde.de>
Robert C. Helling <helling@atdotde.de> Robert.Helling <Helling@th-nb-tmpmbp05.fritz.box>
Robert C. Helling <helling@atdotde.de> Robert C. Helling <robert@thetheoreticaldiver.org>
Robert C. Helling <helling@atdotde.de> Robert C. Helling <helling@lmu.de>
Robert C. Helling <helling@atdotde.de> Robert Helling <helling@lmu.de>
<sander@myowndomain.nl> <sander.kleywegt@netscout.com>
<tim@tee-jay.demon.co.uk> <tim@tee-jay.org.uk>
<tim@tee-jay.demon.co.uk> <timw00.tw@googlemail.com>
<tomaz.canabrava@intel.com> <tcanabrava@kde.org>
<tomaz.canabrava@intel.com> <tomaz.canabrava@gmail.com>
<tomaz.canabrava@intel.com> <tomazcanabrava@Tomazs-MacBook-Pro.local>
Willem Ferguson <willemferguson@zoology.up.ac.za>
<willemferguson@zoology.up.ac.za> <fergusonwillem@gmail.com>
<willemferguson@zoology.up.ac.za> <willem@localhost.localdomain>
<willemferguson@zoology.up.ac.za> <willem@willem-Precision-M4700.(none)>
<willemferguson@zoology.up.ac.za> <fergusonwillem@gmail.com>
<jan@casacondor.com> <jani@libreoffice.org>
<jan@casacondor.com> <jani@apache.org>
<jan@casacondor.com> <jancasacondor@gmail.com>
jan Iversen <jan@casacondor.com> jan iversen <jani@apache.org>
Gehad Elrobey <gehadelrobey@gmail.com> <gehadelrobey@gmail.com>
Joseph W. Joshua <joejoshw@gmail.com> <joejoshw@gmail.com>
Joseph W. Joshua <joejoshw@gmail.com> <joshua@megvel.me.ke>
Luisa Pires <luisapiresdesign@gmail.com> <luisapiresdesign@gmail.com>
Pedro Neves <nevesdiver@gmail.com> <nevesdiver@gmail.com>
Salvo 'LtWorf' Tomaselli <tiposchi@tiscali.it> <tiposchi@tiscali.it>
Benjamin Fogel <nystire@gmail.com> <nystire@gmail.com>
Guido Lerch <guido.lerch@gmail.com> <guido.lerch@gmail.com>
Guido Lerch <guido.lerch@gmail.com> <glerch@Guidos-MacBook-Air.local>
Joakim Bygdell <j.bygdell@gmail.com> <j.bygdell@gmail.com>

66
.travis.yml Normal file
View File

@ -0,0 +1,66 @@
env:
global:
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "Cb8+XTvcKMccvabQXQR2F1F5PNl9dZoe98Q66awS2DEHQIisUllMwZnMXyGtb3sbzJcWkilTPamSc6WBXO748hjH1uHdu9yFo4oQKBtq73gx5sRX51XTZSO4OfJipRJxSVkShnEA+YklwQBugOEkxfeRafpM68tbz6pAMoR8eHDKLsNa0wHjRfh+BEUKxaNEPxhWg3+41FSvUUeBf3fbqa6PWK5UwKIFCFh419X4gDyxTOEtm5OiIwYokruRGHxG0rZaMDHFcgjHBZ47WUXR0xIejh5j+L/vNGkcEoG6+96Hh5TR0rg9PaKdcWOUMt8VIO1pBZ1IrfGVdqgM6Yypb6ZrbJi3EEnAM6AxbUyJRW6410ZwcU0yVuNKDe/fMvhAjVlhsd+xjXuk2jfYKdhs/A45LwyK1Qt1vCXL8gFn/Dzgq+NIw8YyX9vL70J0t2cGQEwGTFiuD+5KaO35hyQm740bdw3FUCmFpVOYtq4iJMBDa12F4S9IMI8OvAmCXh2Mg/u3XVx9imDyBjwS4UrX63ny6rMftajdzCFl3FUyAsKcYl54ve1jVQtpoiQdrYuzlbRYXH/MvQ84ZKNclsFt84XayuL+y6Ds8+lyuEPOnJhpmZS0pt54X4YQSK0Yw49poNYBQHGTRKqOWnWSFDeFRlqki6WFnzqDek3lKRIu8iw="
matrix:
include:
- env: SUBSURFACE_PLATFORM='linux'
os: linux
dist: trusty
sudo: required
language: c++
addons:
apt:
packages:
- git
- g++
- make
- autoconf
- automake
- libtool
- cmake
- pkg-config
- libxml2-dev
- libxslt1-dev
- libzip-dev
- libsqlite3-dev
- libusb-1.0-0-dev
- libssl-dev
- libssh2-1-dev
- libcurl4-openssl-dev
# Not a subsurface dependency, but a Qt dependency
- mesa-common-dev
- libqt5gui5
- libxcb-xinerama0
# Not a subsurface dependency, but a QtMultimedia/libdeclarative_multimedia.so dependency
- libpulse-mainloop-glib0
# Not a subsurface dependency, but a QtWebKit dependency
- libhyphen-dev
- libicu52
coverity_scan:
project:
name: "Subsurface-divelog/subsurface"
description: "Build submitted via Travis CI"
notification_email: coverity@subsurface-divelog.org
build_command: bash ${TRAVIS_BUILD_DIR}/scripts/${SUBSURFACE_PLATFORM}/travisbuild.sh -no-deps
branch_pattern: coverity_scan
before_install:
# When the build on this branch gets triggered by travis-cron, do a coverty scan.
- source ${TRAVIS_BUILD_DIR}/scripts/${SUBSURFACE_PLATFORM}/before_install.sh
- source ${TRAVIS_BUILD_DIR}/scripts/${SUBSURFACE_PLATFORM}/travisbuild.sh -only-deps
script:
echo "built in coverity_scan section"
# - source ${TRAVIS_BUILD_DIR}/scripts/${SUBSURFACE_PLATFORM}/travisbuild.sh
after_success:
echo "don't post binaries"
# - source ${TRAVIS_BUILD_DIR}/scripts/${SUBSURFACE_PLATFORM}/after_success.sh
branches:
except:
- # Do not build tags that we create when we upload to GitHub Releases
- /^(?i:continuous)/

View File

@ -11,4 +11,3 @@ type = TS
source_file = terms
source_lang = en
type = txt

View File

@ -1,48 +1,16 @@
statistics: show proper dates in January
desktop: add country to the fields indexed for full text search
import: update libdivecomputer version, add support for the Scubapro G3 / Luna and Shearwater Tern
desktop: add a button linking to the 'Contribute' page
mobile: fix configuration of decompression ceiling and gradient factors
desktop: fix gas switches in UDDF exports
core: allow of up to 6 O2 sensors (and corresponding voting logic)
desktop: add divemode as a possible dive list column
profile-widget: Now zomed in profiles can be panned with horizontal scroll.
desktop: hide only events with the same severity when 'Hide similar events' is used
equipment: mark gas mixes reported by the dive computer as 'inactive' as 'not used'
equipment: include unused cylinders in merged dive if the preference is enabled
equipment: fix bug showing the first diluent in the gas list as 'used' for CCR dives
desktop: added button to hide the infobox in the dive profile
desktop: use persisted device information for the dive computer configuration
core: fix bug using salinity and pressure values in mbar <-> depth conversion
export: fix bug resulting in invalid CSV for '""' in 'CSV summary dive details'
desktop: add support for multiple tanks to the profile ruler
export: change format produced by 'CSV summary dive details' from TSV (tab separated) to CSV
desktop: add function to merge dive site into site selected in list
import: add option to synchronise dive computer time when downloading dives
desktop: fix salinity combo/icon when DC doesnt have salinity info
core: fix bug when save sea water salinity given by DC
desktop: add option to force firmware update on OSTC4
desktop: add column for dive notes to the dive list table
desktop: Add an option for printing in landscape mode
desktop: fix bug when printing a dive plan with multiple segments
desktop: fix remembering of bluetooth address for remembered dive computers (not MacOS)
desktop: fix bug in bailout gas selection for CCR dives
desktop: fix crash on cylinder update of multiple dives
desktop: use dynamic tank use drop down in equipment tab and planner
desktop: fix brightness configuration for OSTC4
equipment: Use 'diluent' as default gas use type if the dive mode is 'CCR'
htmlexport: fix search in HTML export
htmlexport: fix diveguide display
statistics: fix value axis for degenerate value ranges
profile: Show correct gas density when in CCR mode
statistics: show correct color of selected scatter items when switching to unbinned mode
statistics: fix display of month number in continuous date axis
statistics: fix range of continuous date axis
desktop: fix dive time display in time shift dialog
libdivecomputer: garmin: relax string parsing sanity checks
libdivecomputer: add Cressi Donatello, Scubapro G2 TEK, Oceanic Geo Air, Scorpena Alpha
---
* Always add new entries at the very top of this file above other existing entries and this note.
* Use this layout for new entries: `[Area]: [Details about the change] [reference thread / issue]`
# vim: textwidth=100
- Map-widget: try to match the zoom level in Google Maps
- Map-widget: improve context menu texts
- Desktop: Fix format of CSV export for dive list and dive profile
(#1157, #1158)
- Dive pictures: Don't load whole file for parsing EXIF data
- Mobile: enable the built-in map widget
- Desktop: Change strategy when to allow to delete a cylinder (#869)
- Desktop/Mobile: Format numbers according to selected Subsurface
language (#1119)
- Add imperial support for UDCF import
- Desktop: combo box with fresh, sea water and EN 13319 in dive planner
- Desktop: Changed "salinity" to "water type" at dive planner and dive info
# Always add new entries at the very top of this file above other
# existing entries.
# Use this layout for new entries:
# <Area>: <Details about the change> [reference thread / issue]

View File

@ -3,24 +3,19 @@
# Uncomment his to see all commands cmake actually executes
# set(CMAKE_VERBOSE_MAKEFILE ON)
cmake_minimum_required(VERSION 3.1)
project(Subsurface)
cmake_minimum_required(VERSION 2.8.11)
# don't process generated files - this is new in 3.10
if (POLICY CMP0071)
# don't process generated files - this is new in 3.10 - but
# VERSION_GREATER_EQUAL did get added until 3.7
if(${CMAKE_VERSION} VERSION_EQUAL "3.10.0" OR ${CMAKE_VERSION} VERSION_GREATER "3.10.0")
cmake_policy(SET CMP0071 OLD)
endif()
# support Packagename_ROOT environment variable
if (POLICY CMP0074)
cmake_policy(SET CMP0074 NEW) # CMake 3.12
endif ()
# global settings
set(CMAKE_MODULE_PATH
${${PROJECT_NAME}_SOURCE_DIR}/cmake/Modules
${${PROJECT_NAME}_SOURCE_DIR}/../install-root/lib/cmake
${CMAKE_MODULE_PATH}
)
@ -30,15 +25,10 @@ MACRO_ENSURE_OUT_OF_SOURCE_BUILD(
"We don't support building in source, please create a build folder elsewhere and remember to run git clean -xdf to remove temporary files created by CMake."
)
#Option for memory debugging
option(SUBSURFACE_ASAN_BUILD "enable memory debugging of Subsurface binary" OFF)
#Option for profiling
option(SUBSURFACE_PROFILING_BUILD "enable profiling of Subsurface binary" OFF)
#Options regarding usage of pkgconfig
option(LIBGIT2_FROM_PKGCONFIG "use pkg-config to retrieve libgit2" OFF)
option(LIBDC_FROM_PKGCONFIG "use pkg-config to retrieve libdivecomputer" OFF)
option(LIBGRANTLEE_FROM_PKGCONFIG "use pkg-config to retrieve grantlee" OFF)
#Library Handling
option(FORCE_LIBSSH "force linking with libssh to workaround libgit2 bug" ON)
@ -50,22 +40,21 @@ option(NO_PRINTING "disable the printing support" OFF)
option(NO_USERMANUAL "don't include a viewer for the user manual" OFF)
#Options regarding enabling parts of subsurface
option(BTSUPPORT "enable support for QtBluetooth" ON)
option(FBSUPPORT "allow posting to Facebook" ON)
option(BTSUPPORT "enable support for QtBluetooth (requires Qt5.4 or newer)" ON)
option(FTDISUPPORT "enable support for libftdi based serial" OFF)
option(USE_WEBENGINE "Use QWebEngine instead of QWebKit" OFF)
# Options regarding What should we build on subsurface
option(MAKE_TESTS "Make the tests" ON)
# Option whether we should try to build against Qt6, if it is available
option(BUILD_WITH_QT6 "try to build against Qt6 (incomplete)" OFF)
SET(SUBSURFACE_TARGET_EXECUTABLE "DesktopExecutable" CACHE STRING "The type of application, DesktopExecutable, MobileExecutable, or DownloaderExecutable")
LIST(APPEND SUBSURFACE_ACCEPTED_EXECUTABLES "DesktopExecutable" "MobileExecutable" "DownloaderExecutable")
SET(SUBSURFACE_TARGET_EXECUTABLE "DesktopExecutable" CACHE STRING "The type of application, DesktopExecutable or MobileExecutable")
LIST(APPEND SUBSURFACE_ACCEPTED_EXECUTABLES "DesktopExecutable" "MobileExecutable")
SET_PROPERTY(CACHE SUBSURFACE_TARGET_EXECUTABLE PROPERTY STRINGS ${SUBSURFACE_ACCEPTED_EXECUTABLES})
#verify if Platform is correct and warn on wxit with example.
list (FIND SUBSURFACE_ACCEPTED_EXECUTABLES ${SUBSURFACE_TARGET_EXECUTABLE} _index)
if (_index EQUAL -1)
if (${_index} EQUAL -1)
message(FATAL_ERROR "Requested platform not supported, please use one of the following:
${SUBSURFACE_ACCEPTED_EXECUTABLES}
@ -78,25 +67,26 @@ endif()
set(SUBSURFACE_SOURCE ${CMAKE_SOURCE_DIR})
add_definitions(-DSUBSURFACE_SOURCE="${SUBSURFACE_SOURCE}")
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED TRUE)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
#
# TODO: This Compilation part should go on the Target specific CMake.
#
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-inconsistent-missing-override")
if ((CMAKE_SYSTEM_NAME MATCHES "Darwin") AND
((CMAKE_SYSTEM_VERSION MATCHES "11.4.") OR
(CMAKE_OSX_DEPLOYMENT_TARGET MATCHES "10.7") OR
(CMAKE_OSX_DEPLOYMENT_TARGET MATCHES "10.8")))
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 ")
if((${CMAKE_SYSTEM_NAME} MATCHES "Darwin") AND
((${CMAKE_SYSTEM_VERSION} MATCHES "11.4.") OR
(${CMAKE_OSX_DEPLOYMENT_TARGET} MATCHES "10.7") OR
(${CMAKE_OSX_DEPLOYMENT_TARGET} MATCHES "10.8")))
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif()
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-inconsistent-missing-override")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
# Warn about possible float conversion errors
# Use NOT VERSION_LESS since VERSION_GREATER_EQUAL is not available
# in currently used cmake version.
@ -105,33 +95,19 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wfloat-conversion")
endif()
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
# using Intel C++
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# using Visual Studio C++
endif()
# set up profiling
if (SUBSURFACE_PROFILING_BUILD)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pg")
endif()
# set up ASan
if (SUBSURFACE_ASAN_BUILD)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
SET(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
endif()
# every compiler understands -Wall
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror=format")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror=format")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
# by detault optimize with -O2 even for debug builds
set (GCC_OPTIMIZATION_FLAGS "-O2" CACHE STRING "GCC optimization flags")
message (STATUS "GCC optimization flags: " ${GCC_OPTIMIZATION_FLAGS})
set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${GCC_OPTIMIZATION_FLAGS}")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${GCC_OPTIMIZATION_FLAGS}")
# optimize -O2 even for debug builds
set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O2")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2")
# pkgconfig for required libraries
find_package(PkgConfig)
@ -145,6 +121,10 @@ include(pkgconfig_helper)
# module file.
include(HandleFindGit2)
include(HandleFindLibDiveComputer)
if(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "DesktopExecutable")
include(HandleFindGrantlee)
include(HandleUserManual)
endif()
include(HandleFtdiSupport)
include(HandleVersionGeneration)
include(RunOnBuildDir)
@ -152,21 +132,14 @@ include(cmake_variables_helper)
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
include_directories(${CMAKE_OSX_SYSROOT}/usr/include/libxml2)
LIST(APPEND SUBSURFACE_LINK_LIBRARIES -lxml2 -lxslt -lsqlite3)
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -lxml2 -lxslt -lsqlite3)
else()
pkg_config_library(LIBXML libxml-2.0 REQUIRED)
pkg_config_library(LIBSQLITE3 sqlite3 REQUIRED)
pkg_config_library(LIBXSLT libxslt REQUIRED)
endif()
pkg_config_library(LIBZIP libzip REQUIRED)
if(NOT ANDROID)
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
pkg_config_library(BLUEZ bluez REQUIRED)
endif()
pkg_config_library(LIBUSB libusb-1.0 QUIET)
pkg_config_library(LIBMTP libmtp QUIET)
endif()
pkg_config_library(LIBUSB libusb-1.0 QUIET)
include_directories(.
${CMAKE_CURRENT_BINARY_DIR}
@ -174,163 +147,64 @@ include_directories(.
${CMAKE_BINARY_DIR}/desktop-widgets
)
# decide what to do about Qt
# this is messy because we want to support older Qt5 versions, newer Qt5 versions,
# and Qt6 when enabled / available.
if(BUILD_WITH_QT6)
set(CHECK_QT6 "Qt6")
endif()
# figure out which version of Qt we are building against
# in theory this should get us all the variables set up correctly, but that
# ended up failing in subtle ways to do what was advertized; in the Qt5 case
# some of the variables didn't get set up, so we'll immediately call it again
# for Qt5
find_package(QT NAMES ${CHECK_QT6} Qt5 REQUIRED COMPONENTS Core Widgets)
# right now there are a few things that don't work with Qt6
# let's disable them right here and remember our Qt version
if(QT_VERSION_MAJOR STREQUAL "6")
set(USINGQT6 ON)
set(QT5OR6 "")
# for Qt6 we want the Qt5 compatibility package
LIST(APPEND QT_EXTRA_COMPONENTS Core5Compat)
LIST(APPEND QT_TEST_LIBRARIES Qt::Core5Compat)
# QtWebKit doesn't work with Qt6, so no printing, no manual
set(NO_PRINTING ON)
set(NO_USERMANUAL ON)
# as of Qt 6.3 by default QtLocation isn't included, but one can
# build the module from source; so let's look if the user has installed
# it (or if a newer version is out that includes it, anyway)
find_package(Qt6 COMPONENTS Location)
if(Qt6Location_FOUND)
message(STATUS "Found Qt6Location")
LIST(APPEND QT_EXTRA_COMPONENTS Location)
add_definitions(-DMAP_SUPPORT)
set(MAPSUPPORT ON)
# at least on macOS something goes sideways and we fail to load the
# QML files with a weird error about Qml.WorkerScript missing
# linking Subsurface against that component appears enough to hack
# around that, but that feels... wrong
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
find_package(Qt6 COMPONENTS QmlWorkerScript)
LIST(APPEND SUBSURFACE_LINK_LIBRARIES Qt6::QmlWorkerScript)
endif()
endif()
else()
# as mentioned above, since some variables appear to fail to populate
# on some platforms, simply run this again the 'old' way
find_package(Qt5 REQUIRED COMPONENTS Core Widgets)
set(USINGQT6 OFF)
set(QT5OR6 "5")
set(QT_VERSION ${Qt5_VERSION})
set(QT_INSTALL_PREFIX ${_qt5Core_install_prefix})
# for Qt5 we want the Location component (which is missing so far in Qt6)
LIST(APPEND QT_EXTRA_COMPONENTS Location)
add_definitions(-DMAP_SUPPORT)
set(MAPSUPPORT ON)
endif()
message(STATUS "building with Qt ${QT_VERSION}")
# Project Target specific configuration should go here,
# if the configuration is too big or would disrupt the normal code flux,
# move it somewhere else (another file) and include it.
if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopExecutable")
if(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "DesktopExecutable")
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(SUBSURFACE_TARGET Subsurface)
else()
set(SUBSURFACE_TARGET subsurface)
endif()
list(APPEND QT_EXTRA_COMPONENTS Quick)
list(APPEND QT_EXTRA_COMPONENTS Location)
list(APPEND QT_EXTRA_COMPONENTS QuickWidgets)
list(APPEND QT_EXTRA_LIBRARIES Qt5::Quick)
list(APPEND QT_EXTRA_LIBRARIES Qt5::Location)
list(APPEND QT_EXTRA_LIBRARIES Qt5::QuickWidgets)
remove_definitions(-DSUBSURFACE_MOBILE)
if(NO_USERMANUAL)
message(STATUS "building without built-in user manual support")
add_definitions(-DNO_USERMANUAL)
else()
set(REQUEST_WEBKIT ON)
endif()
if(NO_PRINTING)
message(STATUS "building without printing support")
add_definitions(-DNO_PRINTING)
else()
set(REQUEST_WEBKIT ON)
endif()
if(REQUEST_WEBKIT)
# Because Qt5WebKitWidgets isn't a part of the "regular" Qt5, we can't get it the normal way
find_package(Qt5WebKitWidgets QUIET)
if(Qt5WebKitWidgets_FOUND STREQUAL "1")
LIST(APPEND QT_EXTRA_COMPONENTS PrintSupport WebKitWidgets)
LIST(APPEND SUBSURFACE_LINK_LIBRARIES Qt5::WebKitWidgets)
message(STATUS "building with QtWebKit")
else()
message(STATUS "didn't find QtWebKit, building without user manual and printing support")
add_definitions(-DNO_PRINTING)
add_definitions(-DNO_USERMANUAL)
set(NO_PRINTING ON)
set(NO_USERMANUAL ON)
endif()
endif()
elseif (SUBSURFACE_TARGET_EXECUTABLE MATCHES "MobileExecutable")
elseif(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "MobileExecutable")
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(SUBSURFACE_TARGET Subsurface-mobile)
else()
set(SUBSURFACE_TARGET subsurface-mobile)
endif()
list(APPEND QT_EXTRA_COMPONENTS Quick)
list(APPEND QT_EXTRA_COMPONENTS Location)
list(APPEND QT_EXTRA_COMPONENTS QuickControls2)
list(APPEND QT_EXTRA_COMPONENTS QuickWidgets)
list(APPEND QT_EXTRA_LIBRARIES Qt5::Quick)
list(APPEND QT_EXTRA_LIBRARIES Qt5::Location)
list(APPEND QT_EXTRA_LIBRARIES Qt5::QuickControls2)
add_definitions(-DSUBSURFACE_MOBILE)
# add definition to seperate mobile for devices and for desktop
add_definitions(-DSUBSURFACE_MOBILE_DESKTOP)
message(STATUS "Building Subsurface-mobile requires BT support")
set(BTSUPPORT ON)
elseif (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DownloaderExecutable")
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(SUBSURFACE_TARGET Subsurface-downloader)
else()
set(SUBSURFACE_TARGET subsurface-downloader)
endif()
set(BTSUPPORT ON)
add_definitions(-DSUBSURFACE_DOWNLOADER)
message(STATUS "building the embedded Subsurface-downloader app")
endif()
if(ANDROID)
set(NO_PRINTING ON)
set(NO_USERMANUAL ON)
set(MAKE_TESTS OFF)
list(APPEND QT_EXTRA_COMPONENTS AndroidExtras)
LIST(APPEND SUBSURFACE_LINK_LIBRARIES -llog)
list(APPEND QT_EXTRA_LIBRARIES Qt5::AndroidExtras)
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -llog)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
# add pthread to the end of the library list on Linux
# this is only needed on Ubuntu
# but shouldn't hurt on other Linux versions
# in some builds we appear to be missing libz for some strange reason...
LIST(APPEND SUBSURFACE_LINK_LIBRARIES -lz -lpthread)
# Test for ARM processor (Raspberry Pi) and add libGLESv2 if found
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "armv6l")
message (STATUS "Found ARM processor. Adding libGLESv2")
LIST(APPEND SUBSURFACE_LINK_LIBRARIES -lGLESv2)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
endif()
# add pthread to the end of the library list on Linux
# this is only needed on Ubuntu
# but shouldn't hurt on other Linux versions
# in some builds we appear to be missing libz for some strange reason...
# Add ssh2 at the end for openSUSE builds (for recent cmake?)
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -lssh2 -lz -lpthread)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
execute_process(
COMMAND bash scripts/get-version.sh
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE SSRF_VERSION_STRING
OUTPUT_STRIP_TRAILING_WHITESPACE
)
find_library(APP_SERVICES_LIBRARY ApplicationServices)
find_library(HID_LIB HidApi)
LIST(APPEND SUBSURFACE_LINK_LIBRARIES ${HID_LIB})
set(EXTRA_LIBS ${APP_SERVICES_LIBRARY})
set(ICON_FILE ${CMAKE_SOURCE_DIR}/packaging/macosx/Subsurface.icns)
if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "MobileExecutable")
execute_process(
COMMAND sh scripts/get-version linux
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE SSRF_VERSION_STRING
OUTPUT_STRIP_TRAILING_WHITESPACE
)
find_library(APP_SERVICES_LIBRARY ApplicationServices)
find_library(HID_LIB HidApi)
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} ${HID_LIB})
set(EXTRA_LIBS ${APP_SERVICES_LIBRARY})
set(ICON_FILE ${CMAKE_SOURCE_DIR}/packaging/macosx/Subsurface.icns)
if(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "MobileExecutable")
set(MACOSX_BUNDLE_INFO_STRING "Subsurface-mobile")
set(MACOSX_BUNDLE_BUNDLE_NAME "Subsurface-mobile")
else()
@ -339,197 +213,157 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
endif()
set(MACOSX_BUNDLE_ICON_FILE Subsurface.icns)
set(MACOSX_BUNDLE_GUI_IDENTIFIER "org.subsurface-divelog")
set(MACOSX_BUNDLE_BUNDLE_VERSION "${SSRF_VERSION_STRING}")
set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${SSRF_VERSION_STRING}")
set(MACOSX_BUNDLE_LONG_VERSION_STRING "${SSRF_VERSION_STRING}")
set(MACOSX_BUNDLE_COPYRIGHT "Linus Torvalds, Dirk Hohndel, Tomaz Canabrava, Berthold Stoeger and others")
set_source_files_properties(${ICON_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
set(SUBSURFACE_PKG MACOSX_BUNDLE ${ICON_FILE})
set(MACOSX_BUNDLE_BUNDLE_VERSION "${SSRF_VERSION_STRING}")
set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${SSRF_VERSION_STRING}")
set(MACOSX_BUNDLE_LONG_VERSION_STRING "${SSRF_VERSION_STRING}")
set(MACOSX_BUNDLE_COPYRIGHT "Linus Torvalds, Dirk Hohndel, Tomaz Canabrava, and others")
set_source_files_properties(${ICON_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
set(SUBSURFACE_PKG MACOSX_BUNDLE ${ICON_FILE})
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
LIST(APPEND SUBSURFACE_LINK_LIBRARIES -lwsock32 -lws2_32)
remove_definitions(-DUNICODE)
add_definitions(-mwindows -D_WIN32)
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -lwsock32 -lws2_32)
remove_definitions(-DUNICODE)
add_definitions(-mwindows -D_WIN32)
endif()
if(BTSUPPORT)
set(BLESUPPORT ON)
list(APPEND QT_EXTRA_COMPONENTS Bluetooth)
list(APPEND QT_EXTRA_LIBRARIES Qt5::Bluetooth)
endif()
find_package(Qt5 REQUIRED COMPONENTS Core Concurrent Widgets Network Svg Test LinguistTools Positioning ${QT_EXTRA_COMPONENTS})
set(QT_LIBRARIES Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network Qt5::Svg Qt5::Positioning ${QT_EXTRA_LIBRARIES})
set(QT_TEST_LIBRARIES ${QT_LIBRARIES} Qt5::Test)
#disable bluetooth if Qt version is ancient.
if (BTSUPPORT AND Qt5Widgets_VERSION VERSION_LESS 5.4.0)
if (${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "MobileExecutable")
message(FATAL_ERROR "Subsurface-mobile requires BT and Qt version ${Qt5Widgets_VERSION} is too old for that")
endif()
set(BTSUPPORT OFF)
message(STATUS "Turning off Bluetooth support as Qt version ${Qt5Core_VERSION} is insufficient for that")
list(REMOVE_ITEM QT_LIBRARIES Qt5::Bluetooth)
endif()
# Windows Qt doesn't support BLE at all
# the rest of them need at least 5.6 to be reasonable but really, you want 5.9.1
if (BTSUPPORT AND NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
if ("${Qt5Core_VERSION}" VERSION_LESS 5.6.0)
message(STATUS "Turning off BLE support as Qt version ${Qt5Core_VERSION} is insufficient for that")
else()
set(BLESUPPORT ON)
if ("${Qt5Core_VERSION}" VERSION_LESS 5.9.1)
message(STATUS "BLE support has been enabled, but for best results you really want Qt 5.9.1")
endif()
endif()
endif()
if(BTSUPPORT)
add_definitions(-DBT_SUPPORT)
endif()
if(BLESUPPORT)
add_definitions(-DBLE_SUPPORT)
endif()
if(ANDROID)
# when building for Android, the toolchain file requires all cmake modules
# to be inside the CMAKE_FIND_ROOT_PATH - which prevents cmake from finding
# our Qt installation. This is ugly, but it works.
set(CMAKE_FIND_ROOT_PATH "/;${CMAKE_FIND_ROOT_PATH}")
endif()
set(QT_FIND_COMPONENTS Core Concurrent Widgets Network Svg Positioning Quick ${QT_EXTRA_COMPONENTS})
if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopExecutable")
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS ${QT_FIND_COMPONENTS} LinguistTools Test QuickTest)
elseif (SUBSURFACE_TARGET_EXECUTABLE MATCHES "MobileExecutable")
# Kirigami 5.62 and newer require at least Qt 5.12
if(ANDROID)
find_package(Qt${QT_VERSION_MAJOR} 5.12 REQUIRED COMPONENTS ${QT_FIND_COMPONENTS} LinguistTools)
else()
find_package(Qt${QT_VERSION_MAJOR} 5.12 REQUIRED COMPONENTS ${QT_FIND_COMPONENTS} LinguistTools Test QuickTest)
endif()
elseif (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DownloaderExecutable")
# let's pick a version that's not ancient
find_package(Qt${QT_VERSION_MAJOR} 5.11 REQUIRED COMPONENTS ${QT_FIND_COMPONENTS})
set(MAKE_TESTS OFF)
endif()
foreach(_QT_COMPONENT ${QT_FIND_COMPONENTS})
list(APPEND QT_LIBRARIES Qt${QT5OR6}::${_QT_COMPONENT})
endforeach()
if(NOT ANDROID)
LIST(APPEND QT_TEST_LIBRARIES ${QT_LIBRARIES} Qt${QT5OR6}::Test Qt${QT5OR6}::QuickTest)
endif()
#set up the subsurface_link_libraries variable
LIST(APPEND SUBSURFACE_LINK_LIBRARIES ${LIBDIVECOMPUTER_LIBRARIES} ${LIBGIT2_LIBRARIES} ${LIBUSB_LIBRARIES} ${LIBMTP_LIBRARIES})
if (NOT SUBSURFACE_TARGET_EXECUTABLE MATCHES "DownloaderExecutable")
if(USINGQT6)
if(MAPSUPPORT)
qt_add_resources(SUBSURFACE_RESOURCES map-widget/qml/map-widget.qrc)
set(SUBSURFACE_MAPWIDGET subsurface_mapwidget)
endif()
qt_add_resources(SUBSURFACE_RESOURCES subsurface.qrc profile.qrc stats/statsicons.qrc desktop-widgets/qml/statsview2.qrc)
else()
qt5_add_resources(SUBSURFACE_RESOURCES subsurface.qrc profile.qrc stats/statsicons.qrc map-widget/qml/map-widget.qrc desktop-widgets/qml/statsview2.qrc)
set(SUBSURFACE_MAPWIDGET subsurface_mapwidget)
endif()
endif()
# hack to build successfully on LGTM
if(DEFINED ENV{LGTM_SRC})
LIST(APPEND SUBSURFACE_LINK_LIBRARIES -lgssapi_krb5 -lhttp_parser)
endif()
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} ${LIBDIVECOMPUTER_LIBRARIES} ${LIBGIT2_LIBRARIES} ${LIBUSB_LIBRARIES})
qt5_add_resources(SUBSURFACE_RESOURCES subsurface.qrc)
# include translations
if (NOT SUBSURFACE_TARGET_EXECUTABLE MATCHES "DownloaderExecutable")
add_subdirectory(translations)
endif()
add_subdirectory(core)
add_subdirectory(qt-models)
add_subdirectory(commands)
if (NOT SUBSURFACE_TARGET_EXECUTABLE MATCHES "DownloaderExecutable")
add_subdirectory(profile-widget)
if(MAPSUPPORT)
add_subdirectory(map-widget)
endif()
add_subdirectory(mobile-widgets)
add_subdirectory(stats)
endif()
add_subdirectory(backend-shared)
if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopExecutable")
if (${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "DesktopExecutable")
add_subdirectory(desktop-widgets)
endif()
# create the executables
if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "MobileExecutable")
# set up Kirigami using KDE ECM
# that's available as kde-extra-cmake-modules on Homebrew, on all Linux flavors
# Android and iOS are built via qmake, Windows build of Subsurface-mobile isn't supported
find_package(ECM REQUIRED CONFIG PATHS ${CMAKE_CURRENT_SOURCE_DIR}/mobile-widgets/3rdparty/ECM)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/ ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
set(BREEZEICONS_DIR mobile-widgets/3rdparty/breeze-icons/)
SET(QML_IMPORT_PATH ${QML_IMPORT_PATH} ${CMAKE_SOURCE_DIR}/mobile-widgets/3rdparty/kirigami/src ${CMAKE_SOURCE_DIR}/mobile-widgets/qml)
add_subdirectory(mobile-widgets/3rdparty)
include_directories(${CMAKE_SOURCE_DIR}/mobile-widgets/3rdparty/kirigami/src)
include(${CMAKE_SOURCE_DIR}/mobile-widgets/3rdparty/kirigami/KF5Kirigami2Macros.cmake)
if(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "MobileExecutable")
set(MOBILE_SRC
mobile-widgets/qmlmanager.cpp
mobile-widgets/qmlprofile.cpp
mobile-widgets/qml/kirigami/src/kirigamiplugin.cpp
mobile-widgets/qml/kirigami/src/settings.cpp
mobile-widgets/qml/kirigami/src/enums.cpp
mobile-widgets/qml/kirigami/src/formlayoutattached.cpp
mobile-widgets/qml/kirigami/src/mnemonicattached.cpp
mobile-widgets/qml/kirigami/src/libkirigami/basictheme.cpp
mobile-widgets/qml/kirigami/src/libkirigami/kirigamipluginfactory.cpp
mobile-widgets/qml/kirigami/src/libkirigami/platformtheme.cpp
subsurface-mobile-main.cpp
subsurface-helper.cpp
subsurface-mobile-helper.cpp
map-widget/qmlmapwidgethelper.cpp
)
if(USINGQT6)
qt_add_resources(MOBILE_RESOURCES mobile-widgets/qml/mobile-resources.qrc)
qt_add_resources(MOBILE_RESOURCES profile.qrc)
qt_add_resources(MOBILE_RESOURCES mobile-widgets/3rdparty/icons.qrc)
qt_add_resources(MOBILE_RESOURCES mobile-widgets/3rdparty/kirigami/src/scenegraph/shaders/shaders.qrc)
else()
qt5_add_resources(MOBILE_RESOURCES mobile-widgets/qml/mobile-resources.qrc)
qt5_add_resources(MOBILE_RESOURCES profile.qrc)
qt5_add_resources(MOBILE_RESOURCES mobile-widgets/3rdparty/icons.qrc)
qt5_add_resources(MOBILE_RESOURCES mobile-widgets/3rdparty/kirigami/src/scenegraph/shaders/shaders.qrc)
include_directories(${CMAKE_SOURCE_DIR}/mobile-widgets/qml/kirigami/src/libkirigami)
if(NOT ANDROID AND NOT iOS)
set(MOBILE_SRC ${MOBILE_SRC} mobile-widgets/qml/kirigami/src/desktopicon.cpp)
endif()
add_definitions(-DKIRIGAMI_BUILD_TYPE_STATIC)
qt5_add_resources(MOBILE_RESOURCES mobile-widgets/qml/mobile-resources.qrc)
qt5_add_resources(MOBILE_RESOURCES mobile-widgets/qml/kirigami/kirigami.qrc)
# When building the mobile application in Android, link it and Qt will do the rest, when doing the mobile application on Desktop, create an executable.
if(ANDROID)
add_library(${SUBSURFACE_TARGET} SHARED ${SUBSURFACE_PKG} ${MOBILE_SRC} ${SUBSURFACE_RESOURCES} ${MOBILE_RESOURCES})
else()
add_executable(${SUBSURFACE_TARGET} MACOSX_BUNDLE WIN32 ${SUBSURFACE_PKG} ${MOBILE_SRC} ${SUBSURFACE_RESOURCES} ${MOBILE_RESOURCES})
endif()
# the following is split across two commands since in cmake 3.12 this would result
# in a non-sensical "no sources given to target" error if done all as one set of
# arguments to the add_executable() call
add_executable(${SUBSURFACE_TARGET} ${SUBSURFACE_PKG} ${SUBSURFACE_RESOURCES})
target_sources(${SUBSURFACE_TARGET} PUBLIC ${MOBILE_SRC} ${MOBILE_RESOURCES})
target_link_libraries(
${SUBSURFACE_TARGET}
subsurface_mobile
subsurface_profile
${SUBSURFACE_MAPWIDGET}
subsurface_backend_shared
subsurface_models_mobile
subsurface_commands
subsurface_corelib
subsurface_stats
kirigamiplugin
${SUBSURFACE_LINK_LIBRARIES}
)
elseif (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopExecutable")
elseif(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "DesktopExecutable")
set(SUBSURFACE_APP
subsurface-desktop-main.cpp
subsurface-helper.cpp
subsurface-desktop-helper.cpp
)
source_group("Subsurface App" FILES ${SUBSURFACE_APP})
if(ANDROID)
add_library(${SUBSURFACE_TARGET} SHARED ${SUBSURFACE_PKG} ${SUBSURFACE_APP} ${SUBSURFACE_RESOURCES})
else()
add_executable(${SUBSURFACE_TARGET} MACOSX_BUNDLE WIN32 ${SUBSURFACE_PKG} ${SUBSURFACE_APP} ${SUBSURFACE_RESOURCES})
endif()
if(ANDROID)
add_library(${SUBSURFACE_TARGET} SHARED ${SUBSURFACE_PKG} ${SUBSURFACE_APP} ${SUBSURFACE_RESOURCES})
else()
add_executable(${SUBSURFACE_TARGET} MACOSX_BUNDLE WIN32 ${SUBSURFACE_PKG} ${SUBSURFACE_APP} ${SUBSURFACE_RESOURCES})
endif()
if(FBSUPPORT)
set(FACEBOOK_INTEGRATION facebook_integration)
add_dependencies(facebook_integration subsurface_generated_ui)
endif()
target_link_libraries(
${SUBSURFACE_TARGET}
subsurface_generated_ui
subsurface_interface
${FACEBOOK_INTEGRATION}
subsurface_profile
${SUBSURFACE_MAPWIDGET}
subsurface_backend_shared
subsurface_statistics
subsurface_models_desktop
subsurface_commands
subsurface_corelib
subsurface_stats
${SUBSURFACE_LINK_LIBRARIES}
)
add_dependencies(subsurface_desktop_preferences subsurface_generated_ui)
add_dependencies(subsurface_statistics subsurface_generated_ui)
add_dependencies(subsurface_interface subsurface_generated_ui)
add_dependencies(subsurface_profile subsurface_generated_ui)
add_dependencies(subsurface_models_desktop subsurface_generated_ui)
add_dependencies(subsurface_generated_ui version)
elseif (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DownloaderExecutable")
set(DOWNLOADER_APP
subsurface-downloader-main.cpp
cli-downloader.cpp
)
source_group("Downloader App" FILES ${DOWNLOADER_APP})
add_executable(${SUBSURFACE_TARGET} MACOSX_BUNDLE WIN32 ${SUBSURFACE_PKG} ${DOWNLOADER_APP} ${SUBSURFACE_RESOURCES})
target_link_libraries(
${SUBSURFACE_TARGET}
subsurface_backend_shared
subsurface_models_downloader
subsurface_commands
subsurface_corelib
${SUBSURFACE_LINK_LIBRARIES}
)
endif()
add_dependencies(subsurface_corelib version)
# add platform specific actions
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
file(WRITE ${CMAKE_BINARY_DIR}/qt.conf "[Paths]
Prefix=.
")
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/qt.conf
COMMAND echo \"[Paths]\" > ${CMAKE_BINARY_DIR}/qt.conf \; echo \"Prefix=.\" >> ${CMAKE_BINARY_DIR}/qt.conf
)
add_custom_target(
generate_qtconf
DEPENDS ${CMAKE_BINARY_DIR}/qt.conf
)
add_dependencies(${SUBSURFACE_TARGET} generate_qtconf)
endif()
# build an automated html exporter
@ -545,22 +379,21 @@ set(DOCFILES
${CMAKE_BINARY_DIR}/Documentation/user-manual.html
${CMAKE_BINARY_DIR}/Documentation/user-manual_es.html
${CMAKE_BINARY_DIR}/Documentation/user-manual_fr.html
${CMAKE_BINARY_DIR}/Documentation/user-manual_ru.html
)
# add all the translations that we may need
FILE(STRINGS "subsurface_enabled_translations" QTTRANSLATIONS_BASE)
if(NOT DEFINED QT_TRANSLATION_DIR OR QT_TRANSLATION_DIR STREQUAL "")
if(USINGQT6)
set(QT_TRANSLATION_DIR ${QtCore_DIR}/../../../translations)
else()
set(QT_TRANSLATION_DIR ${Qt5Core_DIR}/../../../translations)
endif()
set(QT_TRANSLATION_DIR ${Qt5Core_DIR}/../../../translations)
endif()
set(QTTRANSLATIONS "")
foreach(QTTRANSLATION ${QTTRANSLATIONS_BASE})
if (QTTRANSLATION AND EXISTS ${QT_TRANSLATION_DIR}/${QTTRANSLATION})
set(QTTRANSLATIONS ${QTTRANSLATIONS} ${QT_TRANSLATION_DIR}/${QTTRANSLATION})
if(NOT ${QTTRANSLATION} STREQUAL "")
if(EXISTS ${QT_TRANSLATION_DIR}/${QTTRANSLATION})
set(QTTRANSLATIONS ${QTTRANSLATIONS} ${QT_TRANSLATION_DIR}/${QTTRANSLATION})
endif()
endif()
endforeach()
@ -571,21 +404,21 @@ if(ANDROID)
if((DEFINED ENV{KEYSTORE}) AND (DEFINED ENV{KEYSTORE_PASSWORD}))
add_qt_android_apk(${SUBSURFACE_TARGET}.apk ${SUBSURFACE_TARGET}
PACKAGE_SOURCES ${CMAKE_BINARY_DIR}/android-mobile DEPENDS ${ANDROID_NATIVE_LIBSSL} ${ANDROID_NATIVE_LIBCRYPT}
BUILDTOOLS_REVISION ${BUILDTOOLS_REVISION}
KEYSTORE $ENV{KEYSTORE} Subsurface-mobile KEYSTORE_PASSWORD $ENV{KEYSTORE_PASSWORD}
)
message(STATUS "KEYSTORE=$ENV{KEYSTORE} KEYSTORE_PASSWORD=$ENV{KEYSTORE_PASSWORD}")
else()
add_qt_android_apk(${SUBSURFACE_TARGET}.apk ${SUBSURFACE_TARGET}
PACKAGE_SOURCES ${CMAKE_BINARY_DIR}/android-mobile DEPENDS ${ANDROID_NATIVE_LIBSSL} ${ANDROID_NATIVE_LIBCRYPT}
BUILDTOOLS_REVISION ${BUILDTOOLS_REVISION}
)
message(STATUS "no KEYSTORE")
endif()
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(APP_BUNDLE_DIR "${SUBSURFACE_TARGET}.app")
# macdeployqt simplifies a lot of this process, but still doesn't get everything right
# - it misses a couple of resources and frameworks
# - it seems to always deploy the SQL plugins (even though they aren't needed)
set(MACDEPLOY_ARGS "-qmldir=${APP_BUNDLE_DIR}/Contents/Resources/qml -appstore-compliant -verbose=0 -executable=${APP_BUNDLE_DIR}/Contents/MacOS/${SUBSURFACE_TARGET} -always-overwrite -libpath=${CMAKE_SOURCE_DIR}/../install-root/lib")
set(EXTRA_MACDEPLOY_ARGS "-qmldir=${APP_BUNDLE_DIR}/Contents/Resources/qml ")
set(MACDEPLOY_ARGS "${EXTRA_MACDEPLOY_ARGS}-executable=${APP_BUNDLE_DIR}/Contents/MacOS/${SUBSURFACE_TARGET} -always-overwrite")
set(RESOURCEDIR ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources)
set(PLUGINDIR ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/PlugIns)
install(DIRECTORY Documentation/images DESTINATION ${RESOURCEDIR}/share/Documentation)
@ -596,58 +429,25 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
install(FILES ${QTTRANSLATIONS} DESTINATION ${RESOURCEDIR}/translations)
install(FILES ${CMAKE_SOURCE_DIR}/gpl-2.0.txt DESTINATION ${RESOURCEDIR})
install(CODE "execute_process(COMMAND mkdir -p ${RESOURCEDIR}/qml)")
if(USINGQT6)
set(QT_INSTALL_PREFIX ${QT6_INSTALL_PREFIX})
else()
set(QT_INSTALL_PREFIX ${_qt5Core_install_prefix})
# this is a HACK
if((${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "DesktopExecutable") AND (NOT NO_PRINTING))
install(DIRECTORY ${Grantlee5_DIR}/../../grantlee DESTINATION ${PLUGINDIR})
endif()
if(MAPSUPPORT)
install(CODE "execute_process(COMMAND mkdir -p ${PLUGINDIR}/geoservices)")
# this is really weird. We first try a plugin that ended up in the Qt install prefix
# then we try one that's in that odd broken install location that the qmake file results in (that includes the QT_INSTALL_PREFIX after our INSTALL_ROOT
# and finally, for fat binaries, we copy the one that's in the 'logical' spot under the INSTALL_ROOT
# this should cover all cases and always get us the correct library
install(CODE "execute_process(COMMAND cp ${QT_INSTALL_PREFIX}/plugins/geoservices/libqtgeoservices_googlemaps.dylib ${PLUGINDIR}/geoservices ERROR_QUIET)")
install(CODE "execute_process(COMMAND cp ${CMAKE_SOURCE_DIR}/../install-root/${QT_INSTALL_PREFIX}/plugins/geoservices/libqtgeoservices_googlemaps.dylib ${PLUGINDIR}/geoservices ERROR_QUIET)")
install(CODE "execute_process(COMMAND cp ${CMAKE_SOURCE_DIR}/../install-root/plugins/geoservices/libqtgeoservices_googlemaps.dylib ${PLUGINDIR}/geoservices ERROR_QUIET)")
endif()
# this will fail is macdeployqt isn't in the PATH - that seemed to happen in the past, but not recently
# also, on M1 macOS systems macdeployqt throws a ton of (apparently harmless) errors. Warn the unsuspecting developer
install(CODE "execute_process(COMMAND macdeployqt ${APP_BUNDLE_DIR} -no-strip ${MACDEPLOY_ARGS})")
# the next hack is here to delete the sqlite plugin that get's installed even though it isn't needed
install(CODE "execute_process(COMMAND rm -rf ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/PlugIns/sqldrivers)")
install(CODE "execute_process(COMMAND mkdir -p ${PLUGINDIR}/geoservices)")
install(CODE "execute_process(COMMAND cp ${_qt5Core_install_prefix}/plugins/geoservices/libqtgeoservices_googlemaps.dylib ${PLUGINDIR}/geoservices)")
# this is a hack - but I don't know how else to find the macdeployqt program if it's not in the PATH
string(REPLACE moc macdeployqt MACDEPLOYQT ${QT_MOC_EXECUTABLE})
install(CODE "execute_process(COMMAND ${MACDEPLOYQT} ${APP_BUNDLE_DIR} ${MACDEPLOY_ARGS})")
# and another hack to get the QML Components in the right place
if(MAPSUPPORT)
if (USINGQT6)
install(CODE "execute_process(COMMAND rm -rf ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml/{QtQuick,QtLocation,QtPositioning})")
install(CODE "execute_process(COMMAND cp -a ${QT_INSTALL_PREFIX}/qml/QtQuick ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)")
else()
install(CODE "execute_process(COMMAND rm -rf ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml/{QtQuick.2,QtLocation,QtPositioning})")
install(CODE "execute_process(COMMAND cp -a ${QT_INSTALL_PREFIX}/qml/QtQuick.2 ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)")
endif()
install(CODE "execute_process(COMMAND cp -a ${QT_INSTALL_PREFIX}/qml/QtLocation ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)")
endif()
install(CODE "execute_process(COMMAND cp -a ${QT_INSTALL_PREFIX}/qml/QtPositioning ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)")
if(NOT QT_VERSION VERSION_LESS 5.11.0)
# and with Qt 5.11 we need another library that isn't copied by macdeployqt
install(CODE "execute_process(COMMAND rm -rf ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Frameworks/QtPositioningQuick.framework)")
install(CODE "execute_process(COMMAND cp -a ${QT_INSTALL_PREFIX}/lib/QtPositioningQuick.framework ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Frameworks)")
endif()
if(NOT QT_VERSION VERSION_LESS 5.14.0)
# and with Qt 5.14 we need another library that isn't always copied by macdeployqt
install(CODE "execute_process(COMMAND rm -rf ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Frameworks/QtQmlWorkerScript.framework)")
install(CODE "execute_process(COMMAND cp -a ${QT_INSTALL_PREFIX}/lib/QtQmlWorkerScript.framework ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Frameworks)")
endif()
if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "MobileExecutable")
install(CODE "execute_process(COMMAND cp -a ${QT_INSTALL_PREFIX}/qml/QtQuick ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)")
install(CODE "execute_process(COMMAND cp -a ${QT_INSTALL_PREFIX}/qml/QtGraphicalEffects ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)")
install(CODE "execute_process(COMMAND cp -a ${QT_INSTALL_PREFIX}/qml/QtQml ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)")
install(CODE "execute_process(COMMAND cp -a ${QT_INSTALL_PREFIX}/qml/QtPositioning ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)")
endif()
install(CODE "execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Frameworks/qml)")
install(CODE "execute_process(COMMAND cp -a ${_qt5Core_install_prefix}/qml/QtQuick.2 ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)")
install(CODE "execute_process(COMMAND cp -a ${_qt5Core_install_prefix}/qml/QtLocation ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)")
install(CODE "execute_process(COMMAND cp -a ${_qt5Core_install_prefix}/qml/QtPositioning ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)")
install(CODE "message(STATUS \"two ERRORS here about libmysqlclient and libpq not found are harmless\")")
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
if (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
if(NOT DEFINED OBJCOPY)
set(OBJCOPY x86_64-w64-mingw32.shared-objcopy)
set(OBJCOPY i686-w64-mingw32.shared-objcopy)
endif()
find_program(OBJCOPY_FOUND ${OBJCOPY})
if (OBJCOPY_FOUND)
@ -675,13 +475,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
install(FILES ${CMAKE_SOURCE_DIR}/gpl-2.0.txt ${CMAKE_SOURCE_DIR}/packaging/windows/subsurface.ico DESTINATION ${WINDOWSSTAGING})
install(TARGETS ${SUBSURFACE_TARGET} DESTINATION ${WINDOWSSTAGING})
install(FILES ${CMAKE_BINARY_DIR}/qt.conf DESTINATION ${WINDOWSSTAGING})
if(NOT QT_VERSION VERSION_LESS 5.11.0)
# hack to work around the fact that we don't process the dependencies of plugins
# as of Qt 5.11 this additional DLL is needed and it's only referenced in the qml DLLs
install(FILES ${QT_INSTALL_PREFIX}/bin/Qt5PositioningQuick.dll DESTINATION ${WINDOWSSTAGING})
endif()
install(DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/grantlee DESTINATION ${WINDOWSSTAGING})
if(NOT DEFINED MAKENSIS)
set(MAKENSIS makensis)
endif()
@ -710,7 +504,7 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
# in the filesystem below our install-root
# different Linux flavors put the plugin in different directories
file(GLOB_RECURSE GOOGLEMAPS ${CMAKE_SOURCE_DIR}/../install-root/libqtgeoservices_googlemaps.so)
if (NOT GOOGLEMAPS)
if ("${GOOGLEMAPS}" STREQUAL "")
message(STATUS "Cannot find libqtgeoservices_googlemaps.so")
else()
add_custom_target(link_googlemaps_plugin ALL COMMAND
@ -720,19 +514,16 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
endif()
install(FILES subsurface.debug DESTINATION bin)
install(FILES subsurface.desktop DESTINATION share/applications)
install(CODE "execute_process(COMMAND sh ${CMAKE_SOURCE_DIR}/scripts/add-version-to-metainfo.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})")
install(FILES metainfo/subsurface.metainfo.xml DESTINATION share/metainfo)
install(FILES icons/subsurface-icon.svg DESTINATION share/icons/hicolor/scalable/apps)
install(DIRECTORY Documentation/images DESTINATION share/subsurface/Documentation)
install(FILES ${DOCFILES} DESTINATION share/subsurface/Documentation)
install(DIRECTORY theme DESTINATION share/subsurface)
install(DIRECTORY printing_templates DESTINATION share/subsurface)
install(FILES ${TRANSLATIONS} DESTINATION share/subsurface/translations)
install(TARGETS ${SUBSURFACE_TARGET} DESTINATION bin)
install(TARGETS ${SUBSURFACE_TARGET} DESTINATION bin)
endif()
if (MAKE_TESTS)
enable_testing()
add_subdirectory(tests)
endif()

View File

@ -1,424 +0,0 @@
# Coding Style
Here are some of the basics that we are trying to enforce for our coding style
and conventions. The existing code (as of the commit that adds these lines) is
not yet fully consistent to these rules, but following these rules will make
sure that no one yells at you about your patches.
We have a script that can be used to reformat code to be reasonably close
to these rules; it's in `scripts/whitespace.pl` this script requires
clang-format to be installed (which sadly isn't installed by default on
any of our platforms; even on Mac where clang is the default compiler).
At the end of this file are some ideas for your `.emacs` file (if that's
your editor of choice) as well as for QtCreator. If you have settings for
other editors that implement this coding style, please add them here.
## Basic rules
* all indentation is tabs (set to 8 char) with the exception of
continuation lines that are aligned with tabs and then spaces
* all keywords followed by a '(' have a space in between
```
if (condition)
for (i = 0; i < 5; i++)
```
* function calls do NOT have a space between their name and argument
```
i = some_function(argument);
```
* usually there is no space on the inside of parenthesis (see examples
above)
* function / method implementations have their opening curly braces in
column 1
* all other opening curly braces follow at the end of the line, with a
space separating them:
```
if (condition) {
dosomething();
dosomethingelse();
}
```
* both sides of an `if` / `else` clause either use or do not use curly braces:
```
if (condition)
i = 4;
else
j = 6;
if (condition) {
i = 6;
} else {
i = 4;
j = 6;
}
```
* use space to make visual separation easier
```
a = b + 3 + e / 4;
```
* continuation lines have the operator / comma at the end
```
if (very_long_condition_1 ||
condition_2)
b = a + (c + d +
f + z);
```
* in a C++ constructor initialization list, the colon is on the same line and
continuation lines are aligned as the rule above:
```
ClassName::ClassName() : x(1),
y(2),
z(3)
{
}
```
* unfortunate inconsistency
- C code usually uses underscores to structure names
```
variable_in_C
```
- In contrast, C++ code usually uses camelCase
```
variableInCPlusPlus
```
for variable names and PascalCase
```
ClassInCPlusPlus
```
for names of classes and other types
where the two meet, use your best judgment and go for best consistency
(i.e., where does the name "originate")
* macro names should be capitalized; e.g., prefer
```
#define FROB 17
#define FROBULATE(x) (x)+FROB
```
to
```
#define frob 17
#define frobulate(x) (x)+frob
```
* there is a strong preference for lower case file names; sometimes conventions
or outside requirements make camelCase filenames the better (or only) choice,
but absent such an outside reason all file names should be lower case
This rule applies to new file names, existing file names should not be
changed without a reason.
* cpp/h file names should usually be identical to the class name but in lower
case. Where it seems appropriate, multiple, closely related classes can be
in a single file with a more generic name.
* `switch` statements with blocks are a little bit special (to avoid indenting
too far)
```
switch (foo) {
case FIRST:
whatever();
break;
case SECOND: {
int i;
for (i = 0; i < 5; i++)
do_something(i);
}
}
```
## Coding conventions
* variable declarations
In C code we really like them to be at the beginning of a code block,
not interspersed in the middle.
in C++ we are a bit less strict about this but still, try not to go
crazy. Notably, in C++ the lifetime of a variable often coincides with the
lifetime of a resource (e.g. file) and therefore the variable is defined
at the place where the resource is needed.
* The `*`, `&` and `&&` declarators are grouped with the name, not the type
(classical C-style) as in `char *string` instead of `char* string`. This
reflects the precedence rules of the language: `int &i` means that the name
`i` stands for a reference [to an object with type `int`], not that
`i` stands for an object of the type [reference to `int`].
Although this may seem like hairsplitting (both interpretations
have the same effect) it is crucial in the
definition of multiple variables, such
as
```
struct dive *next, **pprev;
```
* In C++ code, we generally use explicit types in variable declarations for clarity.
Use `auto` sparingly and only in cases where code readability improves.
Two classical examples are:
- Iterators, whose type names often are verbose:
```
auto it = m_trackers.find(when);
```
is not only distinctly shorter than
```
QMap<qint64, gpsTracker>::iterator it = m_trackers.find(when);
```
it will also continue working if a different data structure is chosen.
- If the type is given in the same line anyway. Thus,
```
auto service = qobject_cast<QLowEnergyService*>(sender());
```
is easier to read than and conveys the same information as
```
QLowEnergyService *service = qobject_cast<QLowEnergyService*>(sender());
```
- If the variable is a container that is only assigned to a local variable to
be able to use it in a range-based `for` loop
```
const auto serviceUuids = device.serviceUuids();
for (QBluetoothUuid id: serviceUuids) {
```
The variable has also to be const to avoid that Qt containers will do a
deep copy when the range bases `for` loop will call the `begin()` method
internally.
* text strings
The default language of subsurface is US English so please use US English
spelling and terminology.
User-visible strings should be passed to the `tr()` function to enable
translation into other languages.
- like this
```
QString msgTitle = tr("Check for updates.");
```
- rather than
```
QString msgTitle = "Check for updates.";
```
This works by default in classes (indirectly) derived from `QObject`. Each
string to be translated is associated with a context, which corresponds
to the class name. Classes that are not derived from `QObject` can generate
the `tr()` functions by using the `Q_DECLARE_TR_FUNCTIONS` macro:
```
#include <QCoreApplication>
class myClass {
Q_DECLARE_TR_FUNCTIONS(gettextfromC)
...
};
```
As an alternative, which also works outside of class context, the `tr()`
function of a different class can be called. This avoids creating multiple
translations for the same string:
```
gettextFromC::tr("%1km")
```
The `gettextFromC` class in the above example was created as a catch-all
context for translations accessed in C code. But it can also be used
from C++ helper functions. To use it from C, include the `"core/gettext.h"`
header and invoke the `translate()` macro:
```
#include "core/gettext.h"
report_error(translate("gettextFromC", "Remote storage and local data diverged"));
```
It is crucial to pass `"gettextFromC"` as a first macro argument so that Qt
is able to associate the string with the correct context.
The translate macro returns a cached C-style string, which is generated at runtime
when the particular translation string is encountered for the first time.
It remains valid during the whole application's life time.
Outside of function context, the `QT_TRANSLATE_NOOP` macro can be used as in
```
struct ws_info_t ws_info[100] = {
{ QT_TRANSLATE_NOOP("gettextFromC", "integrated"), 0 },
{ QT_TRANSLATE_NOOP("gettextFromC", "belt"), 0 },
{ QT_TRANSLATE_NOOP("gettextFromC", "ankle"), 0 },
{ QT_TRANSLATE_NOOP("gettextFromC", "backplate"), 0 },
{ QT_TRANSLATE_NOOP("gettextFromC", "clip-on"), 0 },
};
```
Note that here, the texts will be scheduled for translation with the `"gettextFromC"`
context, but the array is only initialized with the original text. The actual
translation has to be performed later in code. For C-code, the `QT_TRANSLATE_NOOP`
macro is defined in the `"core/gettext.h"` header.
* UI text style
These guidelines are designed to ensure consistency in presentation within
Subsurface.
Only the first word of multi-word text strings should be capitalized unless
a word would normally be capitalized mid-sentence, like Africa. This applies
to all UI text including menus, menu items, tool-tips, button text and label
text etc. e.g. "Check for updates" rather than "Check for Updates".
We also capitalize Subsurface (NOTE: not SubSurface) when referring to the
application itself.
Abbreviations should end with a period, e.g. "temp." not "temp" for
temperature
Numerals in chemical formulae should use subscript characters e.g. O₂ not O2
Partial pressures in Subsurface are, by convention, abbreviated with a single
"p" rather than 2, as in pO₂ not ppO₂
Where more than one term exists for something, please choose the one already
in use within Subsurface e.g. Cylinder vs. Tank.
* string manipulation
* user interface
In UI part of the code use of `QString` methods is preferred, see this pretty
good guide in [`QString` documentation][1]
* core components
In the core part of the code, C-string should be used.
C-string manipulation is not always straightforward specifically when
it comes to memory allocation, a set of helper functions has been developed
to help with this. Documentation and usage examples can be found in
[core/membuffer.h][2]
## Sample Settings
### Emacs
These lines in your `.emacs` file should get you fairly close when it comes
to indentation many of the other rules you have to follow manually
```
;; indentation
(defun c-lineup-arglist-tabs-only (ignored)
"Line up argument lists by tabs, not spaces"
(let* ((anchor (c-langelem-pos c-syntactic-element))
(column (c-langelem-2nd-pos c-syntactic-element))
(offset (- (1+ column) anchor))
(steps (floor offset c-basic-offset)))
(* (max steps 1)
c-basic-offset)))
(add-hook 'c-mode-common-hook
(lambda ()
;; Add kernel style
(c-add-style
"linux-tabs-only"
'("linux" (c-offsets-alist
(arglist-cont-nonempty
c-lineup-gcc-asm-reg
c-lineup-arglist-tabs-only))))))
(add-hook 'c-mode-hook
(lambda ()
(let ((filename (buffer-file-name)))
;; Enable kernel mode for the appropriate files
(setq indent-tabs-mode t)
(c-set-style "linux-tabs-only"))))
(add-hook 'c++-mode-hook
(lambda ()
(let ((filename (buffer-file-name)))
;; Enable kernel mode for the appropriate files
(setq indent-tabs-mode t)
(c-set-style "linux-tabs-only"))))
```
### QtCreator
These settings seem to get indentation right in QtCreator. Making TAB
always adjust indent makes it hard to add hard tabs before '\' when
creating continuing lines. Copying a tab with your mouse / ctrl-C and
inserting it with ctrl-V seems to work around that problem (use Command
instead of ctrl on your Mac)
Save this XML code below to a file, open Preferences (or Tools->Options)
in QtCreator, pick C++ in the left column and then click on Import...
to open the file you just created. Now you should have a "Subsurface"
style that you can select which should work well for our coding style.
```
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorCodeStyle>
<!-- Written by QtCreator 3.0.0, 2014-02-27T07:52:57. -->
<qtcreator>
<data>
<variable>CodeStyleData</variable>
<valuemap type="QVariantMap">
<value type="bool" key="AlignAssignments">false</value>
<value type="bool" key="AutoSpacesForTabs">false</value>
<value type="bool" key="BindStarToIdentifier">true</value>
<value type="bool" key="BindStarToLeftSpecifier">false</value>
<value type="bool" key="BindStarToRightSpecifier">false</value>
<value type="bool" key="BindStarToTypeName">false</value>
<value type="bool" key="ExtraPaddingForConditionsIfConfusingAlign">false</value>
<value type="bool" key="IndentAccessSpecifiers">false</value>
<value type="bool" key="IndentBlockBody">true</value>
<value type="bool" key="IndentBlockBraces">false</value>
<value type="bool" key="IndentBlocksRelativeToSwitchLabels">false</value>
<value type="bool" key="IndentClassBraces">false</value>
<value type="bool" key="IndentControlFlowRelativeToSwitchLabels">true</value>
<value type="bool" key="IndentDeclarationsRelativeToAccessSpecifiers">true</value>
<value type="bool" key="IndentEnumBraces">false</value>
<value type="bool" key="IndentFunctionBody">true</value>
<value type="bool" key="IndentFunctionBraces">false</value>
<value type="bool" key="IndentNamespaceBody">false</value>
<value type="bool" key="IndentNamespaceBraces">false</value>
<value type="int" key="IndentSize">8</value>
<value type="bool" key="IndentStatementsRelativeToSwitchLabels">true</value>
<value type="bool" key="IndentSwitchLabels">false</value>
<value type="int" key="PaddingMode">2</value>
<value type="bool" key="SpacesForTabs">false</value>
<value type="int" key="TabSize">8</value>
</valuemap>
</data>
<data>
<variable>DisplayName</variable>
<value type="QString">Subsurface</value>
</data>
</qtcreator>
```
### Vim
As everybody knows vim is a way better editor than emacs and thus needs to be
in this file too. Put this into your `.vimrc` and this should produce something
close to our coding standards.
```
" Subsurface coding style
filetype plugin indent on
filetype detect
set cindent tabstop=8 shiftwidth=8 cinoptions=l1,:0,(0,g0
" TODO: extern "C" gets indented
" And some sane defaults, optional, but quite nice
set nocompatible
syntax on
colorscheme default
set hls
set is
" The default blue is just impossible to see on a black terminal
highlight Comment ctermfg=Brown
" clearly point out when someone have trailing spaces
highlight ExtraWhitespace ctermbg=red guibg=red
" Show trailing whitespace and spaces before a tab:
match ExtraWhitespace /\s\+$\| \+\ze\t/
```
[1]: http://doc.qt.io/qt-5/qstring.html#manipulating-string-data
[2]: https://github.com/Subsurface/subsurface/blob/master/core/membuffer.h

View File

@ -1,122 +1,69 @@
# Contributing to Subsurface
[Source](https://subsurface-divelog.org/documentation/contributing/ "Permalink to Contributing | Subsurface")
## Ways to Contribute
# Contributing | Subsurface
There are many ways in which you can contribute. We are always looking for testers who are willing to test the code while it is being developed. We especially need people running Windows and Mac (as the majority of the active developers are Linux people). We are also always looking for volunteers who help reviewing and improving the documentation. And very importantly we are looking for translators willing to translate the software into different languages. Our translations are centrally handled at [Transifex][4] please sign up for an account there and then request to join the [Subsurface Team][5].
It might be a good idea to join our [mailing list][1]. Conversation there is in English -- even though this site (and Subsurface itself) are available in many languages, the shared language we all communicate in is English. Actually "Broken English" is just fine… :-)
If you would like to contribute financially to help us cover the cost of running a free cloud synchronisation service for dive logs, you can do so by sponsoring this project.
We also tend to have some developers hanging out in the `#subsurface` channel on [Freenode][2].
There are many ways in which you can contribute. We are always looking for testers who are willing to test the code while it is being developed. We especially need people running Windows and Mac (as the majority of the active developers are Linux people). We are also always looking for volunteers who help reviewing and improving the documentation. And very importantly we are looking for translators willing to translate the software into different languages. Our translations are centrally handled at [Transifex][3] \-- please sign up for an account there and then request to join the [Subsurface Team][4].
## Joining the Subsurface Contributors' Community
If you would like to contribute patches that fix bugs or add new features, that is of course especially welcome. If you are looking for places to start, look at the open bugs in our [bug tracker][5].
To get 'into the loop' for what is going on in Subsurface you should join our [mailing list][1], and start watching the [subsurface/subsurface repository on GitHub][2]. Conversation in the mailing list is in English even though Subsurface itself and the website and documentation are available in many languages, the shared language the contributors communicate in is English. Actually "Broken English" is just fine… :-)
Here is a very brief introduction on creating commits that you can either send as [pull requests][6] on our main GitHub repository or send as emails to the mailing list. Much more details on how to use git can be found at the [git user manual][7].
Of course it is also a good idea to join our [User Forum][3], to be able to see feedback and bug reports from our users.
Start with getting the latest source (look at the [Building Page][8] to find out how).
`cd subsurface
git checkout master
git pull`
ok, now we know you're on the latest version. Create a working branch to keep your development in:
`git checkout -b devel`
Edit the code (or documentation), compile, test… then create a commit:
`git commit -s -a`
Depending on your OS this will open a default editor -- usually you can define which by setting the environment variable `GIT_EDITOR`. Here you enter your commit message. The first line is the title of your commit. Keep it brief and to the point. Then a longer explanation (more on this and the fact that we insist on all contributions containing a Signed-off-by: line below).
If you want to change the commit message, "git commit --amend" is the way to go. Feel free to break your changes into multiple smaller commits. Then, when you are done there are two directions to go, which one you find easier depends a bit on how familiar you are with GitHub. You can either push your branch to GitHub and create a [pull requests on GitHub][6], or you run
`git format-patch master..devel`
Which creates a number of files that have names like 0001-Commit-title.patch, which you can then send to our developer mailing list.
## Tips for Code Contributions
### Code Change Submissions
If you would like to contribute patches that fix bugs or add new features, that is of course especially welcome. If you are looking for places to start, look at the open bugs in our [bug tracker][6].
Here is a very brief introduction on creating commits that you can either send as [pull requests][7] on our main GitHub repository or send as emails to the mailing list. Much more details on how to use Git can be found at the [Git user manual][8].
Start with getting the latest source.
cd subsurface
git checkout master
git pull
ok, now we know you're on the latest version. Create a working branch to keep your development in:
git checkout -b devel
Edit the code (or documentation), compile, test… then create a commit:
git commit -s -a
Depending on your OS this will open a default editor usually you can define which by setting the environment variable `GIT_EDITOR`. Here you enter your commit message. The first line is the title of your commit. Keep it brief and to the point. Then a longer explanation (more on this and the fact that we insist on all contributions containing a Signed-off-by: line below).
If you want to change the commit message, `git commit --amend` is the way to go. Feel free to break your changes into multiple smaller commits. Then, when you are done there are two directions to go, which one you find easier depends a bit on how familiar you are with GitHub. You can either push your branch to GitHub and create a [pull requests on GitHub][7], or you run:
git format-patch master..devel
Which creates a number of files that have names like `0001-Commit-title.patch`, which you can then send to our developer mailing list.
### Developer Certificate of Origin (DCO)
When sending code, please either send signed-off patches or a pull request with signed-off commits. If you don't sign off on them, we will not accept them. This means adding a line that says "Signed-off-by: Name \<Email\>" at the end of each commit, indicating that you wrote the code and have the right to pass it on as an open source patch.
When sending code, please either send signed-off patches or a pull request with signed-off commits. If you don't sign off on them, we will not accept them. This means adding a line that says "Signed-off-by: Name " at the end of each commit, indicating that you wrote the code and have the right to pass it on as an open source patch.
See: [Signed-off-by Lines][9]
Also, please write good git commit messages. A good commit message looks like this:
### Commit Messages
Header line: explaining the commit in one line
Also, please write good Git commit messages. A good commit message looks like this:
Body of commit message is a few lines of text, explaining things
in more detail, possibly giving some background about the issue
being fixed, etc etc.
Header line: explaining the commit in one line
Body of commit message is a few lines of text, explaining things
in more detail, possibly giving some background about the issue
being fixed, etc etc.
The body of the commit message can be several paragraphs, and
please do proper word-wrap and keep columns shorter than about
74 characters or so. That way "git log" will show things
nicely even when it's indented.
Reported-by: whoever-reported-it
Signed-off-by: Your Name <you@example.com>
The body of the commit message can be several paragrahps, and
please do proper word-wrap and keep columns shorter than about
74 characters or so. That way "git log" will show things
nicely even when it's indented.
Reported-by: whoever-reported-it
Signed-off-by: Your Name
That header line really should be meaningful, and really should be just one line. The header line is what is shown by tools like gitk and shortlog, and should summarize the change in one readable line of text, independently of the longer explanation.
The preferred way to write a commit message is using [imperative mood][12], e.g. "Make foo do xyz" instead of "This patch makes foo do xyz" or "I made foo do xyz", as if you are giving commands or requests to the code base.
The prefered way to write a commit message is using imperative mood, e.g. "Make foo do xyz" instead of "This patch makes foo do xyz" or "I made foo do xyz", as if you are giving commands or requests to the code base.
https://en.wikipedia.org/wiki/Imperative_mood
![gitk sample][10]
_Example with gitk_
### Changelog
Additionally when important changes to behaviors, fixes or new feature are introduced an entry must be added to `CHANGELOG.md` file. Always add new entries at the very top of the file above other existing entries. Use this layout for new entries:
Area: Details about the change [reference thread / issue]
When multiple areas are affected list the areas separated with a /:
Area1/Area2: Detail about the change [reference thread / issue]
Here is a (non exhaustive) list of Areas that can be used:
* Bluetooth
* Cloud-storage
* Desktop
* Dive pictures
* Import
* Libdivecomputer
* Map-widget
* Mobile
* Planner
* Printing
* Profile
### Coding Style
In order to make reviews simpler and have contributions merged faster in the code base, please follow Subsurface project's coding style and coding conventions described in the [CodingStyle][11] file.
Example with gitk
[1]: http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
[2]: https://github.com/subsurface/subsurface
[3]: https://groups.google.com/g/subsurface-divelog
[4]: https://www.transifex.com/
[5]: https://explore.transifex.com/subsurface/subsurface/
[6]: https://github.com/Subsurface/subsurface/issues
[7]: https://github.com/Subsurface/subsurface/pulls
[8]: https://www.kernel.org/pub/software/scm/git/docs/user-manual.html
[2]: http://freenode.net/
[3]: https://www.transifex.com/
[4]: https://www.transifex.com/projects/p/subsurface/
[5]: https://github.com/Subsurface-divelog/subsurface/issues
[6]: https://github.com/Subsurface-divelog/subsurface/pulls
[7]: https://www.kernel.org/pub/software/scm/git/docs/user-manual.html
[8]: https://subsurface-divelog.org/building/
[9]: https://gerrit-review.googlesource.com/Documentation/user-signedoffby.html
[10]: https://github.com/subsurface/subsurface/Documentation/images/Screenshot-gitk-subsurface-1.png "Example with gitk"
[11]: https://github.com/Subsurface/subsurface/blob/master/CODINGSTYLE.md
[12]: https://en.wikipedia.org/wiki/Imperative_mood
[10]: https://subsurface-divelog.org/wp-content/uploads/2011/10/Screenshot-gitk-subsurface-1.png "Example with gitk"

272
CodingStyle Normal file
View File

@ -0,0 +1,272 @@
Coding Style
============
Here are some of the basics that we are trying to enforce for our coding
style. The existing code (as of the commit that adds these lines) is not
yet fully consistent to these rules, but following these rules will make
sure that no one yells at you about your patches.
We have a script that can be used to reformat code to be reasonably close
to these rules; it's in scripts/whitespace.pl - this script requires
clang-format to be installed (which sadly isn't installed by default on
any of our platforms; even on Mac where clang is the default compiler).
At the end of this file are some ideas for your .emacs file (if that's
your editor of choice) as well as for QtCreator. If you have settings for
other editors that implement this coding style, please add them here.
Basic rules
===========
- all indentation is tabs (set to 8 char) with the exception of
continuation lines that are alligned with tabs and then spaces
- all keywords followed by a '(' have a space in between
if (condition)
for (i = 0; i < 5; i++)
- function calls do NOT have a space between their name and argument
i = some_function(argument);
- usually there is no space on the inside of parenthesis (see examples
above)
- function / method implementations have their opening curly braces in
column 1
- all other opening curly braces follow at the end of the line, with a
space separating them:
if (condition) {
dosomething();
dosomethingelse();
}
- both sides of an if / else clause either use or do not use curly braces:
if (condition)
i = 4;
else
j = 6;
if (condition) {
i = 6;
} else {
i = 4;
j = 6;
}
- use space to make visual separation easier
a = b + 3 + e / 4;
- continuation lines have the operator / comma at the end
if (very_long_conditiont_1 ||
condition_2)
b = a + (c + d +
f + z);
- in a C++ constructor initialization list, the colon is on the same line and
continuation lines are aligned as the rule above:
ClassName::ClassName() : x(1),
y(2),
z(3)
{
}
- unfortunate inconsistency:
-- C code usually uses underscores to structure names
variable_in_C
-- C++ code usually uses camelCase
variableInCPlusPlus
where the two meet, use your best judgment and go for best consistency
(i.e., where does the variable "originate")
- switch statements with blocks are a little bit special (to avoid indenting
too far)
switch (foo) {
case FIRST:
whatever();
break;
case SECOND: {
int i;
for (i = 0; i < 5; i++)
do_something(i);
}
}
- variable declarations
in C code we really like them to be at the beginning of a code block,
not interspersed in the middle.
in C++ we are a bit less strict about this - but still, try not to go
crazy.
- text strings
The default language of subsurface is US English so please use US English
spelling and terminology.
Where at all possible strings should be passed to the tr() function to enable
translation into other languages.
-- like this
QString msgTitle = tr("Submit user survey.");
-- rather than
QString msgTitle = "Submit user survey.";
- UI text style
These guidleines are designed to ensure consitency in presentation within
Subsurface.
Only the first word of multi-word text strings should be captalized unless
a word would normally be capitalized mid-sentance, like Africa. This applies
to all UI text including menus, menu items, tool-tips, button text and label
text etc. e.g. "Check for updates" rather than "Check for Updates".
We also captialize Subsurface (NOTE: not SubSurface) when referring to the
application itself.
Abbreviations should end with a period, e.g. "temp." not "temp" for
temperature
Numerals in chemical formulae should use subscript characters e.g. O₂ not O2
Partial pressures in Subsurface are, by convention, abbreviated with a single
"p" rather than 2, as in pO₂ not ppO₂
Where more than one term exists for something, please choose the one already
in use within Subsurface e.g. Cylinder vs. Tank.
Sample Settings
===============
Emacs
-----
These lines in your .emacs file should get you fairly close when it comes
to indentation - many of the other rules you have to follow manually
;; indentation
(defun c-lineup-arglist-tabs-only (ignored)
"Line up argument lists by tabs, not spaces"
(let* ((anchor (c-langelem-pos c-syntactic-element))
(column (c-langelem-2nd-pos c-syntactic-element))
(offset (- (1+ column) anchor))
(steps (floor offset c-basic-offset)))
(* (max steps 1)
c-basic-offset)))
(add-hook 'c-mode-common-hook
(lambda ()
;; Add kernel style
(c-add-style
"linux-tabs-only"
'("linux" (c-offsets-alist
(arglist-cont-nonempty
c-lineup-gcc-asm-reg
c-lineup-arglist-tabs-only))))))
(add-hook 'c-mode-hook
(lambda ()
(let ((filename (buffer-file-name)))
;; Enable kernel mode for the appropriate files
(setq indent-tabs-mode t)
(c-set-style "linux-tabs-only"))))
(add-hook 'c++-mode-hook
(lambda ()
(let ((filename (buffer-file-name)))
;; Enable kernel mode for the appropriate files
(setq indent-tabs-mode t)
(c-set-style "linux-tabs-only"))))
QtCreator
---------
These settings seem to get indentation right in QtCreator. Making TAB
always adjust indent makes it hard to add hard tabs before '\' when
creating continuing lines. Copying a tab with your mouse / ctrl-C and
inserting it with ctrl-V seems to work around that problem (use Command
instead of ctrl on your Mac)
Save this XML code below to a file, open Preferences (or Tools->Options)
in QtCreator, pick C++ in the left column and then click on Import...
to open the file you just created. Now you should have a "Subsurface"
style that you can select which should work well for our coding style.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorCodeStyle>
<!-- Written by QtCreator 3.0.0, 2014-02-27T07:52:57. -->
<qtcreator>
<data>
<variable>CodeStyleData</variable>
<valuemap type="QVariantMap">
<value type="bool" key="AlignAssignments">false</value>
<value type="bool" key="AutoSpacesForTabs">false</value>
<value type="bool" key="BindStarToIdentifier">true</value>
<value type="bool" key="BindStarToLeftSpecifier">false</value>
<value type="bool" key="BindStarToRightSpecifier">false</value>
<value type="bool" key="BindStarToTypeName">false</value>
<value type="bool" key="ExtraPaddingForConditionsIfConfusingAlign">false</value>
<value type="bool" key="IndentAccessSpecifiers">false</value>
<value type="bool" key="IndentBlockBody">true</value>
<value type="bool" key="IndentBlockBraces">false</value>
<value type="bool" key="IndentBlocksRelativeToSwitchLabels">false</value>
<value type="bool" key="IndentClassBraces">false</value>
<value type="bool" key="IndentControlFlowRelativeToSwitchLabels">true</value>
<value type="bool" key="IndentDeclarationsRelativeToAccessSpecifiers">true</value>
<value type="bool" key="IndentEnumBraces">false</value>
<value type="bool" key="IndentFunctionBody">true</value>
<value type="bool" key="IndentFunctionBraces">false</value>
<value type="bool" key="IndentNamespaceBody">false</value>
<value type="bool" key="IndentNamespaceBraces">false</value>
<value type="int" key="IndentSize">8</value>
<value type="bool" key="IndentStatementsRelativeToSwitchLabels">true</value>
<value type="bool" key="IndentSwitchLabels">false</value>
<value type="int" key="PaddingMode">2</value>
<value type="bool" key="SpacesForTabs">false</value>
<value type="int" key="TabSize">8</value>
</valuemap>
</data>
<data>
<variable>DisplayName</variable>
<value type="QString">Subsurface</value>
</data>
</qtcreator>
Vim
---------
As everybody knows vim is a way better editor than emacs and thus needs to be
in this file too. Put this into your .vimrc and this should produce something
close to our coding standards.
" Subsurface coding style
filetype plugin indent on
filetype detect
set cindent tabstop=8 shiftwidth=8 cinoptions=l1,:0,(0,g0
" TODO: extern "C" gets indented
" And some sane defaults, optional, but quite nice
set nocompatible
syntax on
colorscheme default
set hls
set is
" The default blue is just impossible to see on a black terminal
highlight Comment ctermfg=Brown
" clearly point out when someone have trailing spaces
highlight ExtraWhitespace ctermbg=red guibg=red
" Show trailing whitespace and spaces before a tab:
match ExtraWhitespace /\s\+$\| \+\ze\t/

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: subsurface-manual VERSION\n"
"Report-Msgid-Bugs-To: subsurface@subsurface-divelog.org\n"
"POT-Creation-Date: 2018-11-05 09:14+0100\n"
"POT-Creation-Date: 2018-02-07 17:43+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -509,16 +509,7 @@ msgid ""
msgstr ""
#. type: Plain text
#: mobile-manual.txt:250
msgid ""
"Use the _Vendor name_ and _Dive Computer_ drop-downs to pick the correct "
"dive computer. When downloading from multiple different dive computers, "
"shortcut buttons to easily switch between them will appear below the "
"drop-downs."
msgstr ""
#. type: Plain text
#: mobile-manual.txt:256
#: mobile-manual.txt:252
msgid ""
"The process for download is slightly different between the two OSs. In our "
"testing we got the best results on iOS when the dive computer was in "
@ -528,7 +519,7 @@ msgid ""
msgstr ""
#. type: Plain text
#: mobile-manual.txt:260
#: mobile-manual.txt:256
msgid ""
"On Android devices, you should first establish a link between the Bluetooth "
"or Bluetooth LE dive computer and the mobile device using Android "
@ -536,7 +527,7 @@ msgid ""
msgstr ""
#. type: Plain text
#: mobile-manual.txt:269
#: mobile-manual.txt:265
msgid ""
"For USB dive computers, USB cables \"normally\" used for uploading dives to "
"a desktop/laptop computer do NOT work: these cables usually have a "
@ -552,7 +543,7 @@ msgid ""
msgstr ""
#. type: Plain text
#: mobile-manual.txt:271
#: mobile-manual.txt:267
msgid ""
"Please note that not all Android devices support OTG cables. And even on "
"some devices that do support those cables in general, _Subsurface-mobile_ "
@ -560,13 +551,13 @@ msgid ""
msgstr ""
#. type: Target for macro image
#: mobile-manual.txt:272
#: mobile-manual.txt:268
#, no-wrap
msgid "mobile-images/USB-OTG.jpg"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:280
#: mobile-manual.txt:276
msgid ""
"For Bluetooth-equipped dive computers and Android devices, establish a "
"Bluetooth connection between the dive computer and the mobile device. Use "
@ -580,7 +571,7 @@ msgid ""
msgstr ""
#. type: Plain text
#: mobile-manual.txt:286
#: mobile-manual.txt:282
msgid ""
"With pairing between dive computer and _Subsurface-mobile_ having been set "
"up, dive download is simple. From the main menu, tap _Manage dives -> "
@ -593,7 +584,7 @@ msgid ""
msgstr ""
#. type: Plain text
#: mobile-manual.txt:290
#: mobile-manual.txt:286
msgid ""
"Now tap the button labeled _Download_. The downloaded dives appear in the "
"bottom part of the screen, the most recent dive at the top (see image on "
@ -603,7 +594,7 @@ msgid ""
msgstr ""
#. type: Plain text
#: mobile-manual.txt:296
#: mobile-manual.txt:292
msgid ""
"After the download, each dive has a check-box on the left hand side, used "
"for selecting which dives you want to be added to the _Subsurface-mobile_ "
@ -615,19 +606,19 @@ msgid ""
msgstr ""
#. type: Target for macro image
#: mobile-manual.txt:297
#: mobile-manual.txt:293
#, no-wrap
msgid "mobile-images/DC-Download.jpg"
msgstr ""
#. type: Title ==
#: mobile-manual.txt:299
#: mobile-manual.txt:295
#, no-wrap
msgid "Viewing the dive location on Google Maps"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:304
#: mobile-manual.txt:300
msgid ""
"In the _Details View_, the Action Bar at the bottom has a GPS pin on the "
"left hand side. Tap that pin and the dive site is shown in Google "
@ -636,7 +627,7 @@ msgid ""
msgstr ""
#. type: Plain text
#: mobile-manual.txt:307
#: mobile-manual.txt:303
msgid ""
"Alternatively, the _Details View_ has a button at the top right hand marked "
"_Map it_. Tap this button to open Google Maps showing the dive site (image "
@ -644,19 +635,19 @@ msgid ""
msgstr ""
#. type: Target for macro image
#: mobile-manual.txt:308
#: mobile-manual.txt:304
#, no-wrap
msgid "mobile-images/Map.jpg"
msgstr ""
#. type: Title ==
#: mobile-manual.txt:310
#: mobile-manual.txt:306
#, no-wrap
msgid "Dive log management"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:320
#: mobile-manual.txt:316
msgid ""
"A central part of _Subsurface-mobile_ is the ability to store the dive log "
"using the _Subsurface_ cloud storage. This provides security against loss "
@ -668,50 +659,50 @@ msgid ""
msgstr ""
#. type: Title ===
#: mobile-manual.txt:321
#: mobile-manual.txt:317
#, no-wrap
msgid "Add new dive manually"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:324
#: mobile-manual.txt:320
msgid ""
"This is described above under the section dealing with "
"xref:S_Add_Dive[Manually adding a new dive to the dive list]."
msgstr ""
#. type: Title ===
#: mobile-manual.txt:325
#: mobile-manual.txt:321
#, no-wrap
msgid "Download from DC"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:328
#: mobile-manual.txt:324
msgid ""
"This is described above under the section dealing with "
"xref:S_Download[Download dives from a dive computer]."
msgstr ""
#. type: Title ===
#: mobile-manual.txt:329
#: mobile-manual.txt:325
#, no-wrap
msgid "Apply GPS fixes"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:332
#: mobile-manual.txt:328
msgid "This is described in the following main section, below."
msgstr ""
#. type: Title ===
#: mobile-manual.txt:333
#: mobile-manual.txt:329
#, no-wrap
msgid "Manually sync the dive log with the _Subsurface_ cloud storage"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:340
#: mobile-manual.txt:336
msgid ""
"Upload the dives contained on the mobile device to the _Subsurface_ cloud "
"storage by tapping the option _Manual sync with cloud_. This synchronizes "
@ -721,13 +712,13 @@ msgid ""
msgstr ""
#. type: Title ===
#: mobile-manual.txt:341
#: mobile-manual.txt:337
#, no-wrap
msgid "Enable cloud auto sync"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:353
#: mobile-manual.txt:349
msgid ""
"By default _Subsurface-mobile_ runs offline and only syncs the dive list "
"with cloud storage when explicitly told to do so (see above). You can "
@ -742,13 +733,13 @@ msgid ""
msgstr ""
#. type: Title ==
#: mobile-manual.txt:354
#: mobile-manual.txt:350
#, no-wrap
msgid "Recording dive locations using GPS"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:361
#: mobile-manual.txt:357
msgid ""
"The fact that most smartphones have GPS facilities allows "
"_Subsurface-mobile_ to record the locations of dives. If the smartphone is "
@ -758,13 +749,13 @@ msgid ""
msgstr ""
#. type: Title ===
#: mobile-manual.txt:363
#: mobile-manual.txt:359
#, no-wrap
msgid "Configuring the GPS service"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:371
#: mobile-manual.txt:367
msgid ""
"From the Main menu, select _Settings_. The Settings screen has a section for "
"configuring the GPS service (image below). GPS location data are collected "
@ -775,19 +766,19 @@ msgid ""
msgstr ""
#. type: Target for macro image
#: mobile-manual.txt:372
#: mobile-manual.txt:368
#, no-wrap
msgid "mobile-images/GPS-config.jpg"
msgstr ""
#. type: Title ===
#: mobile-manual.txt:374
#: mobile-manual.txt:370
#, no-wrap
msgid "Collecting GPS positions"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:380
#: mobile-manual.txt:376
msgid ""
"Ensure that the GPS on the mobile device has been activated and that you "
"have given the app permission to access your location data. Open the Main "
@ -796,13 +787,13 @@ msgid ""
msgstr ""
#. type: Target for macro image
#: mobile-manual.txt:381
#: mobile-manual.txt:377
#, no-wrap
msgid "mobile-images/GPSstart.jpg"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:390
#: mobile-manual.txt:386
msgid ""
"_Subsurface-mobile_ starts to collect GPS locations automatically, following "
"the preferences specified as described above. While the GPS location service "
@ -813,13 +804,13 @@ msgid ""
msgstr ""
#. type: Title ===
#: mobile-manual.txt:391
#: mobile-manual.txt:387
#, no-wrap
msgid "Storing the GPS data on the _Subsurface_ cloud"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:398
#: mobile-manual.txt:394
msgid ""
"Activate the main menu and select the _GPS_ option that brings up the "
"submenu of GPS-related actions. Tap _Upload GPS data_ that saves the GPS "
@ -829,26 +820,26 @@ msgid ""
msgstr ""
#. type: Title ===
#: mobile-manual.txt:399
#: mobile-manual.txt:395
#, no-wrap
msgid "Downloading GPS data from the _Subsurface_ cloud"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:404
#: mobile-manual.txt:400
msgid ""
"Download the GPS data that have been saved on the cloud (possibly by a "
"different device) by selecting _Download GPS Data_ from the GPS sub-panel."
msgstr ""
#. type: Title ===
#: mobile-manual.txt:405
#: mobile-manual.txt:401
#, no-wrap
msgid "Viewing GPS data"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:415
#: mobile-manual.txt:411
msgid ""
"From the GPS submenu select _Show GPS fixes_. This brings up a list of GPS "
"positions obtained by the location service (image below). Two actions are "
@ -862,19 +853,19 @@ msgid ""
msgstr ""
#. type: Target for macro image
#: mobile-manual.txt:416
#: mobile-manual.txt:412
#, no-wrap
msgid "mobile-images/gpsmanagement.jpg"
msgstr ""
#. type: Title ===
#: mobile-manual.txt:418
#: mobile-manual.txt:414
#, no-wrap
msgid "Applying GPS data to dives in the dive log"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:427
#: mobile-manual.txt:423
msgid ""
"Assuming that all the dives have been entered into the dive log or have been "
"downloaded from the _Subsurface_ cloud, apply the GPS positions to these "
@ -887,13 +878,13 @@ msgid ""
msgstr ""
#. type: Title ==
#: mobile-manual.txt:428
#: mobile-manual.txt:424
#, no-wrap
msgid "Using the settings for _Subsurface-mobile_."
msgstr ""
#. type: Plain text
#: mobile-manual.txt:431
#: mobile-manual.txt:427
msgid ""
"The Settings screen allows the customization of _Subsurface-mobile_. Many of "
"the settings involve dragging a slider switch to activate or deactivate a "
@ -901,13 +892,13 @@ msgid ""
msgstr ""
#. type: Title ===
#: mobile-manual.txt:433
#: mobile-manual.txt:429
#, no-wrap
msgid "Changing to a different _Subsurface_ cloud account"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:438
#: mobile-manual.txt:434
msgid ""
"Some users have more than one _Subsurface_ cloud account and with a need to "
"switch between accounts. Tap _Settings_ on the Main menu and scroll to the "
@ -918,19 +909,19 @@ msgid ""
msgstr ""
#. type: Target for macro image
#: mobile-manual.txt:439
#: mobile-manual.txt:435
#, no-wrap
msgid "mobile-images/SettingsCloudTheme.jpg"
msgstr ""
#. type: Title ===
#: mobile-manual.txt:441
#: mobile-manual.txt:437
#, no-wrap
msgid "Changing the color theme of _Subsurface-mobile_"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:448
#: mobile-manual.txt:444
msgid ""
"_Subsurface-mobile_ has three color schemes to please users with different "
"tastes. This user manual shows the default color scheme, comprising blue "
@ -941,13 +932,13 @@ msgid ""
msgstr ""
#. type: Title ===
#: mobile-manual.txt:449
#: mobile-manual.txt:445
#, no-wrap
msgid "Configuring the GPS webservice"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:452
#: mobile-manual.txt:448
msgid ""
"The Settings screen allows one to set up the way in which GPS positions are "
"collected during dives. See the section on xref:S_ConfigureGPS[Configuring "
@ -955,13 +946,13 @@ msgid ""
msgstr ""
#. type: Title ===
#: mobile-manual.txt:453
#: mobile-manual.txt:449
#, no-wrap
msgid "Saving a detailed dive computer dive log"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:456
#: mobile-manual.txt:452
msgid ""
"Under the heading _Dive computer_, you will find a switch to save a detailed "
"log each time dives are downloaded from a dive computer. This is important "
@ -975,13 +966,13 @@ msgid ""
msgstr ""
#. type: Title ===
#: mobile-manual.txt:457
#: mobile-manual.txt:453
#, no-wrap
msgid "Activating the Developer submenu"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:460
#: mobile-manual.txt:456
msgid ""
"The information in subsurface.log plus some additional information for "
"understanding the screen rendering of dive information as well as the way in "
@ -992,13 +983,13 @@ msgid ""
msgstr ""
#. type: Title ==
#: mobile-manual.txt:461
#: mobile-manual.txt:457
#, no-wrap
msgid "Developer submenu"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:465
#: mobile-manual.txt:461
msgid ""
"If the Developer submenu has been activated in the Settings screen, the Main "
"menu has a _Developer_ item. By tapping this one has two options that are "
@ -1006,13 +997,13 @@ msgid ""
msgstr ""
#. type: Title ===
#: mobile-manual.txt:466
#: mobile-manual.txt:462
#, no-wrap
msgid "App log"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:471
#: mobile-manual.txt:467
msgid ""
"This option shows the messages that _Subsurface-mobile_ generates while "
"running. While most users are not aware of these messages, they are often "
@ -1021,13 +1012,13 @@ msgid ""
msgstr ""
#. type: Title ===
#: mobile-manual.txt:472
#: mobile-manual.txt:468
#, no-wrap
msgid "Theme information"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:476
#: mobile-manual.txt:472
msgid ""
"This option provides a wealth of information about the screen "
"characteristics of the mobile device and the font characteristics used by "

File diff suppressed because it is too large Load Diff

163
Documentation/FAQ.wordpress Normal file
View File

@ -0,0 +1,163 @@
<!-- when editing please don't break the formatting... WordPress is a bit silly about this
- I need the empty lines after the [expand...] and before the [/expand]
- Every paragraph is a single line (how stupid is that!) with an empty line in between -->
<h2>Here are some Frequently Asked Questions by our users</h2>
<span class="expandall">Expand All</span> --- <span class="collapseall">Collapse All</span>
[expand title="Which operating system does Subsurface support?"]
Subsurface runs on Windows (32 and 64bit, Windows XP and newer), MacOS (Intel, 10.7 and newer) and many flavors of Linux. We provide Linux packages for Ubuntu, Linux Mint, Debian, openSUSE and Fedora. Details on where to find Subsurface for your OS are on our <a title="Downloads" href="http://subsurface-divelog.org/download/">Downloads</a> page.
[/expand]
[expand title="How do I install Subsurface on Windows?"]
<a href="http://subsurface-divelog.org/download/">Download the installer</a> and double-click on it. You will get a warning that the installer is from an unknown publisher. Please click Yes to allow installation. Next you are presented with the license for Subsurface, after that you can choose where you would like to install Subsurface (the default should be reasonable in most cases) and the <em>Start Menu Folder</em> where a shortcut to call Subsurface and an entry to uninstall Subsurface will be installed.
[/expand]
[expand title="How do I install Subsurface on MacOS?"]
<a href="http://subsurface-divelog.org/download/">Download the installer DMG</a> and open it. Drag the Subsurface icon on to the Applications icon.
[/expand]
[expand title="How do I install Subsurface on Ubuntu?"]
Simply add the following PPA to your system:
<pre><code style="font-size: 8pt;">ppa:subsurface/subsurface</code></pre>
[/expand]
[expand title="How do I install Subsurface on Debian?"]
We currently only support Debian Jessie; you need to add the Ubuntu repository:
<pre><code style="font-size: 8pt;">echo "deb http://ppa.launchpad.net/subsurface/subsurface/ubuntu trusty main" \
| sudo tee /etc/apt/sources.lists.d/subsurface.list
gpg --keyserver subkeys.pgp.net --recv-keys A8BC9756EE61D9C6
gpg -a --export A8BC9756EE61D9C6 | sudo apt-key add -
sudo apt-get update</code></pre>
Now you can install Subsurface from that repository:
<pre><code style="font-size: 8pt;">sudo apt-get install subsurface</code></pre>
Make sure you are getting a current version with all its Qt5 dependencies.
[/expand]
[expand title="How do I install Subsurface on openSUSE?"]
Go to <a href="http://software.opensuse.org/download.html?project=home:Subsurface-Divelog&amp;package=subsurface">our build service project page</a> and follow the simple instructions there -- its as easy as two clicks.
[/expand]
[expand title="The shortcut keys don't work on Ubuntu"]
Please uninstall <code style="font-size: 9pt;">appmenu-qt5</code> and the shortcuts will work.
[/expand]
[expand title="How can I post my dive on Facebook?"]
Go to the preferences and select the Facebook section. There you can log in to your Facebook account. You have to do this every time you want to post to Facebook, for privacy reasons Subsurface does not stay logged in to Facebook between sessions.
Once you are logged into Facebook you can close the preferences. You will now see a Facebook button next to the Notes section towards the center of the Subsurface window. Clicking on that opens a dialog that allows you to control which parts of the current dive are posted to your timeline. The post is always "private" - you need to connect to Facebook and change the audience for that post in order for others to see it (we do this so you get to review what is posted before it becomes public).
[/expand]
[expand title="How can I post my dives on the web?"]
Currently Subsurface integrates with two different online logbooks: <a href="http://divelogs.de">divelogs.de</a> and <a href="http://dive-share.appspot.com/">DiveShare</a>. You can export dives to either of those two services from the File➝Export menu.
[/expand]
[expand title="How do I use the companion apps?"]
There are companion apps available for both Android and IOS. You can find them in the respective stores. Once you install them on your mobile device you can either mark dive sites and name them (e.g., right before or after a dive), or you can run a "service" in the background that periodically records your position. Don't forget to turn the service off when you are done as it may increase your battery consumption.
Once you have uploaded the dive site data from the companion app to our web service, you can then download the data from within Subsurface. Do this <em>after</em> you have downloaded the dives from that day from your divecomputer (or manually added the dives) so that Subsurface can match the dive data (and their time stamps) with the data stored by the companion app. Subsurface will then add GPS data to those dives that didn't have GPS information and are reasonably close in time to to markers saved by the companion app.
Please note that the companion apps by themselves do <em>not</em> add dives to your dive list. The dive needs to exist before GPS data is added to it.
[/expand]
[expand title="How can I use more than one tank with the same gas?"]
This is a typical question for side mount divers or some tec divers. Subsurface supports having more than one tank with the same gas, even if some dive computers don't. Simply add a gas change to your second tank of the same gas as both tanks will be included in the gas use calculations. In order to add gas changes simply right-click on the profile at the appropriate spot and you will be offered to add such an event.
[/expand]
[expand title="Why is Subsurface not able to download my dives?"]
Clean the contacts. Clean the contacts again. Make sure the connector is firmly connected. Wiggle it. Seriously. Make sure the dive computer is in transfer mode (this isn't necessary for all dive computers but for many common ones). Check with other software that the download works in general. Try another cable. See our user manual for pairing with BT and the general use case.
[/expand]
[expand title="Why is the CSV import failing?"]
The CSV import has a couple of caveats. You should avoid some special characters like ampersand (&), less than (<), greater than (>) and double quotes ("), the latter if quoting text cells. The file should use UTF-8 character set, if having non-ASCII characters. Also the size of the CSV file might cause problems. Importing 100 dives at a time (without dive profile) has worked previously, but larger files might exceed limits of the parser used. When having problems with CSV imports, try first with a smaller sample to make sure everything works.
[/expand]
[expand title="How can I use Subsurface for multiple users?"]
Store logs of different users to separate log files. From Subsurface, you can open individual files for different divers and multiple users are supported quite well.
[/expand]
[expand title="How can I load pictures and associate them with my dive?"]
Select the dives you want to load and associate the pictures with. Then right click on one of the selected dives and select "Load images" from the
popup menu. This will bring in a file selection dialog where you can select one or multiple pictures. When the selection is done and you hit Open, you get a new dialog where you can shift the times of the images. This is described in more detail in our user manual.
If you are having trouble with loading the images, check that you have at least one of the following tags in the Exif headers DateTimeOriginal or
DateTime. We take the time from these fields to detect if the image was shot during the dive or not. If the picture is edited, you should store the original Exif information on the new/edited image for it to be loaded properly.
[/expand]
[expand title="Can I import my dives from my old log software?"]
Many common programs are already supported and we are always happy to try to add new ones. If your old log software supports exporting the log book, we might well be able to import that (for example via CSV files or UDDF). However, usually support for importing the native format will help you to get more complete information into Subsurface. To implement support for the log format, we will need a sample log file. It would be great to have also a screenshot from the original log software or description of the dive that is shown on the sample log. Preferably we would like to have a reasonably simple dive to get basic support and another dive that has as many features enabled as possible (e.g. gas changes during the dive). Please post this information to the user forum or send it to the developer mailing list subsurface@subsurface-divelog.org. Unfortunately some of the log formats we have not been able to decipher (as some vendors have decided to encrypt their log files to increase the degree of lock-in of their customers), so there are no guarantees that this will bring support for your old log software, but it is worth a try.
[/expand]
[expand title="Can you add support for dive computer X?"]
We support a large number of dive computers already and are always happy to add support for more. Please contact us via the user forums so we can try to help. Some vendors have actively helped us in our work and adding support for new models from those vendors is usually easy. Other vendors are more neutral, some are actively hostile. Without help from the vendor it can be rather challenging to reverse engineer the transfer protocol and the dive encoding, but with sufficient help from you it is often possible to do so.
A good starting point is often to send us a libdivecomputer log and dump (you can pick those in the dive computer download dialog) when connecting to the dive computer using a similar existing model (if possible).
[/expand]
[expand title="Is there a virus in the Subsurface installer?"]
If you get a warning message or if Subsurface is blocked by your anti virus software, that is almost certainly a false positive. Subsurface is not built on a Windows machine, it is cross built from source on Linux on a well maintained and clean server.
Most/all Windows AV software packages support an "add exception" feature, which skips an executable from being scanned. Try adding Subsurface to the list of non-harmful software. If the Subsurface installer download is detected as malware, please temporary disable your AV software until Subsurface is installed
In either case, please inform your AV software vendor of a "false positive" as we assure your that Subsurface is not malware
[/expand]
[expand title="I cannot download all my dives, only the most recent ones even though my dive computer's manual states that it records history of e.g. 999 dives."]
Dive history is different than the dive profiles on the log. The history only keeps track of the total number of dives and total amount of time spent below surface. The logs, on the other hand, store the dive profile, but they have limited amount of memory to do so. The exact amount of dive profiles that can be stored on the device depend on sample interval and duration of the dives. Once the memory is full the oldest dives get overwritten with new dives. Thus we are only able to download the last 13, 30 or 199 dives.
If you have downloaded your dives to different dive logging software before they were overwritten, there is a high change that Subsurface can import these. However, if the logs are only on your dive computer, they cannot be salvaged after being over written by new dives.
[/expand]
[expand title="How do I download dives from my Bluetooth dive computer (e.g. Shearwater, OSTC) on Linux?"]
Downloading dives over Bluetooth on all platforms is done using the "Choose Bluetooth download mode" option when downloading dives, and pairing with the detected dive computer. This is further explained in the <a href="https://subsurface-divelog.org/documentation/subsurface-4-user-manual/">Subsurface User Manual</a>.
Previous versions of Subsurface required setting up an RFCOMM connection from the command line before downloading dives from a Bluetooth enabled dive computer. This is no longer the case.
[/expand]
[expand title="How do I fix permission errors when trying to download from my Atomics Aquatics Cobalt under Linux?"]
Sadly this is a somewhat difficult process on some versions of Linux. By default new devices are sometimes given permissions that prevent a regular user from accessing them. If you get a permission error when trying to download from a Cobalt or Cobalt 2 under Linux, please try these steps.
This should work on most Linux flavors. We'd appreciate feedback if this doesn't work for you. Open a terminal window and cut and paste the following command. It may ask you to enter your password in order to allow access as super user (which is required to set up the udev rule that changes the device permissions as you plug in your Cobalt).
<pre><code style="font-size: 8pt;">(MYGRP=$(id | sed "s/^.*gid=.*(\(.*\)) .*$/\1/") ; \
echo -n 'SUBSYSTEM=="usb", ATTR{idVendor}=="0471", ATTR{idProduct}=="0888", MODE="0660", GROUP="' ; \
echo -n $MYGRP ; echo '"') | sudo tee /etc/udev/rules.d/99-cobalt.rules </code></pre>
If you disconnect and reconnect your Cobalt it should now get the correct access permissions.
[/expand]
[expand title="How do I fix permission errors when trying to download from my Suunto EON Steel under Linux?"]
By default new devices are sometimes given permissions that prevent a regular user from accessing them. If you get a permission error when trying to download from an EON Steel under Linux, please try these steps.
This should work on most Linux flavors. We'd appreciate feedback if this doesn't work for you. Open a terminal window and cut and paste the following command. It may ask you to enter your password in order to allow access as super user (which is required to set up the udev rule that changes the device permissions as you plug in your EON Steel).
<pre><code style="font-size: 8pt;">echo 'SUBSYSTEM=="usb",ATTR{idVendor}=="1493",ATTR{idProduct}=="0030", MODE="0666"' |
sudo tee /etc/udev/rules.d/99-cobalt.rules </code></pre>
If you disconnect and reconnect your DC it should now get the correct access permissions.
[/expand]
[expand title="Why is my IRDA based dive computer not working on a MAC?"]
Subsurface on the Mac does not currently support IRDA based dive computers. This is an issue of missing support libraries for us to use - other dive log software may have implemented their own IRDA stack on the Mac, we have not. Subsurface on Windows and Linux does support IRDA based dive computers just fine.
[/expand]

View File

@ -7,7 +7,7 @@
# submitting patches to the user manual, only submit the changes to the .txt
# file - the maintainer will recreate the .html.git file
DOCNAMES = user-manual user-manual_es user-manual_fr user-manual_nl mobile-manual-v3
DOCNAMES = user-manual user-manual_es user-manual_fr user-manual_ru user-manual_nl mobile-manual
HTMLDOCS = $(patsubst %,$(OUT)%.html,$(DOCNAMES))
TEXTDOCS = $(patsubst %,$(OUT)%.text,$(DOCNAMES))
@ -19,7 +19,7 @@ BROWSER = firefox
THEME = compact_subsurface
PWD = $(realpath .)
all: $(HTMLDOCS) $(TEXTDOCS) $(PDFDOCS)
all: $(HTMLEDOCS) $(TEXTDOCS) $(PDFDOCS)
doc: $(HTMLDOCS)
@ -30,21 +30,10 @@ $(OUT)%.pdf: %.txt
-$(A2X) --dblatex-opts "-P latex.output.revhistory=0" -f pdf $<
$(OUT)%.html: %.txt
$(ASCIIDOC) --version > /dev/null 2>&1 || echo "if asciidoc isn't found the html file included in the sources is copied"
@echo "if asciidoc isn't found the html file included in the sources is copied"
$(ASCIIDOC) -a toc -a toclevels=3 -a themedir=$(PWD) -a theme=$(THEME) -o $@ $< || \
cp $(<:%.txt=%.html.git) $@
# for the web facing version of the desktop manual, just use the post-processing script
user-manual.html.wp: user-manual.html
bash ../scripts/prep-manual.sh $<
# for the web facing version of the mobile manual, re-create the HTML with only one level in
# the table of context and then post process
mobile-manual-v3.html.wp: mobile-manual-v3.txt
$(ASCIIDOC) -a toc -a toclevels=1 -a themedir=$(PWD) -a theme=$(THEME) -o $(<:%.txt=%.html.tmp) $< && \
bash ../scripts/prep-manual.sh $(<:%.txt=%.html.tmp) && \
mv $(<:%.txt=%.html.tmp.wp) $@
# Alternatively::
$(OUT)$(DOCNAME).xhtml: $(DOCSOURCE)
$(A2X) --icons -f xhtml $<

View File

@ -8,7 +8,7 @@
*/
* { padding: 0; margin: 0; }
img { border: 0; margin: 15px; max-width:90% }
img { border: 0; }
/*** Layout ***/
@ -69,12 +69,12 @@ body { font-family: Verdana, sans-serif; }
#footer { font-size: 0.8em; }
h2, h3, h4, h5, .title { font-family: Arial, sans-serif; }
h2 { font-size: 160%; }
h2 { font-size: 1.5em; }
.sectionbody { font-size: 0.85em; }
.sectionbody .sectionbody { font-size: inherit; }
h3 { font-size: 150%; } /* 1.35em */
h4 { font-size: 140%; } /* 1.2em */
h5 { font-size: 130%; } /* 1em */
h3 { font-size: 159%; } /* 1.35em */
h4 { font-size: 141%; } /* 1.2em */
h5 { font-size: 118%; } /* 1em */
.title { font-size: 106%; /* 0.9em */
font-weight: bold;
}

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: subsurface-manual VERSION\n"
"Report-Msgid-Bugs-To: subsurface@subsurface-divelog.org\n"
"POT-Creation-Date: 2018-11-05 09:14+0100\n"
"POT-Creation-Date: 2018-02-07 17:43+0100\n"
"PO-Revision-Date: 2018-02-07 17:48+0100\n"
"Last-Translator: Guillaume GARDET <guillaume.gardet@free.fr>\n"
"Language-Team: French <kde-i18n-doc@kde.org>\n"
@ -552,16 +552,7 @@ msgid ""
msgstr ""
#. type: Plain text
#: mobile-manual.txt:250
msgid ""
"Use the _Vendor name_ and _Dive Computer_ drop-downs to pick the correct "
"dive computer. When downloading from multiple different dive computers, "
"shortcut buttons to easily switch between them will appear below the drop-"
"downs."
msgstr ""
#. type: Plain text
#: mobile-manual.txt:256
#: mobile-manual.txt:252
msgid ""
"The process for download is slightly different between the two OSs. In our "
"testing we got the best results on iOS when the dive computer was in "
@ -571,7 +562,7 @@ msgid ""
msgstr ""
#. type: Plain text
#: mobile-manual.txt:260
#: mobile-manual.txt:256
msgid ""
"On Android devices, you should first establish a link between the Bluetooth "
"or Bluetooth LE dive computer and the mobile device using Android utilities. "
@ -579,7 +570,7 @@ msgid ""
msgstr ""
#. type: Plain text
#: mobile-manual.txt:269
#: mobile-manual.txt:265
msgid ""
"For USB dive computers, USB cables \"normally\" used for uploading dives to "
"a desktop/laptop computer do NOT work: these cables usually have a full-"
@ -595,7 +586,7 @@ msgid ""
msgstr ""
#. type: Plain text
#: mobile-manual.txt:271
#: mobile-manual.txt:267
msgid ""
"Please note that not all Android devices support OTG cables. And even on "
"some devices that do support those cables in general, _Subsurface-mobile_ "
@ -603,13 +594,13 @@ msgid ""
msgstr ""
#. type: Target for macro image
#: mobile-manual.txt:272
#: mobile-manual.txt:268
#, no-wrap
msgid "mobile-images/USB-OTG.jpg"
msgstr "mobile-images/USB-OTG.jpg"
#. type: Plain text
#: mobile-manual.txt:280
#: mobile-manual.txt:276
msgid ""
"For Bluetooth-equipped dive computers and Android devices, establish a "
"Bluetooth connection between the dive computer and the mobile device. Use "
@ -623,7 +614,7 @@ msgid ""
msgstr ""
#. type: Plain text
#: mobile-manual.txt:286
#: mobile-manual.txt:282
msgid ""
"With pairing between dive computer and _Subsurface-mobile_ having been set "
"up, dive download is simple. From the main menu, tap _Manage dives -> "
@ -636,7 +627,7 @@ msgid ""
msgstr ""
#. type: Plain text
#: mobile-manual.txt:290
#: mobile-manual.txt:286
msgid ""
"Now tap the button labeled _Download_. The downloaded dives appear in the "
"bottom part of the screen, the most recent dive at the top (see image on "
@ -646,7 +637,7 @@ msgid ""
msgstr ""
#. type: Plain text
#: mobile-manual.txt:296
#: mobile-manual.txt:292
msgid ""
"After the download, each dive has a check-box on the left hand side, used "
"for selecting which dives you want to be added to the _Subsurface-mobile_ "
@ -658,19 +649,19 @@ msgid ""
msgstr ""
#. type: Target for macro image
#: mobile-manual.txt:297
#: mobile-manual.txt:293
#, no-wrap
msgid "mobile-images/DC-Download.jpg"
msgstr "mobile-images/DC-Download.jpg"
#. type: Title ==
#: mobile-manual.txt:299
#: mobile-manual.txt:295
#, no-wrap
msgid "Viewing the dive location on Google Maps"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:304
#: mobile-manual.txt:300
msgid ""
"In the _Details View_, the Action Bar at the bottom has a GPS pin on the "
"left hand side. Tap that pin and the dive site is shown in Google Maps. "
@ -679,7 +670,7 @@ msgid ""
msgstr ""
#. type: Plain text
#: mobile-manual.txt:307
#: mobile-manual.txt:303
msgid ""
"Alternatively, the _Details View_ has a button at the top right hand marked "
"_Map it_. Tap this button to open Google Maps showing the dive site (image "
@ -687,19 +678,19 @@ msgid ""
msgstr ""
#. type: Target for macro image
#: mobile-manual.txt:308
#: mobile-manual.txt:304
#, no-wrap
msgid "mobile-images/Map.jpg"
msgstr "mobile-images/Map.jpg"
#. type: Title ==
#: mobile-manual.txt:310
#: mobile-manual.txt:306
#, no-wrap
msgid "Dive log management"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:320
#: mobile-manual.txt:316
msgid ""
"A central part of _Subsurface-mobile_ is the ability to store the dive log "
"using the _Subsurface_ cloud storage. This provides security against loss "
@ -711,50 +702,50 @@ msgid ""
msgstr ""
#. type: Title ===
#: mobile-manual.txt:321
#: mobile-manual.txt:317
#, no-wrap
msgid "Add new dive manually"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:324
#: mobile-manual.txt:320
msgid ""
"This is described above under the section dealing with xref:"
"S_Add_Dive[Manually adding a new dive to the dive list]."
msgstr ""
#. type: Title ===
#: mobile-manual.txt:325
#: mobile-manual.txt:321
#, no-wrap
msgid "Download from DC"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:328
#: mobile-manual.txt:324
msgid ""
"This is described above under the section dealing with xref:"
"S_Download[Download dives from a dive computer]."
msgstr ""
#. type: Title ===
#: mobile-manual.txt:329
#: mobile-manual.txt:325
#, no-wrap
msgid "Apply GPS fixes"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:332
#: mobile-manual.txt:328
msgid "This is described in the following main section, below."
msgstr ""
#. type: Title ===
#: mobile-manual.txt:333
#: mobile-manual.txt:329
#, no-wrap
msgid "Manually sync the dive log with the _Subsurface_ cloud storage"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:340
#: mobile-manual.txt:336
msgid ""
"Upload the dives contained on the mobile device to the _Subsurface_ cloud "
"storage by tapping the option _Manual sync with cloud_. This synchronizes "
@ -764,13 +755,13 @@ msgid ""
msgstr ""
#. type: Title ===
#: mobile-manual.txt:341
#: mobile-manual.txt:337
#, no-wrap
msgid "Enable cloud auto sync"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:353
#: mobile-manual.txt:349
msgid ""
"By default _Subsurface-mobile_ runs offline and only syncs the dive list "
"with cloud storage when explicitly told to do so (see above). You can "
@ -785,13 +776,13 @@ msgid ""
msgstr ""
#. type: Title ==
#: mobile-manual.txt:354
#: mobile-manual.txt:350
#, no-wrap
msgid "Recording dive locations using GPS"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:361
#: mobile-manual.txt:357
msgid ""
"The fact that most smartphones have GPS facilities allows _Subsurface-"
"mobile_ to record the locations of dives. If the smartphone is taken on the "
@ -801,13 +792,13 @@ msgid ""
msgstr ""
#. type: Title ===
#: mobile-manual.txt:363
#: mobile-manual.txt:359
#, no-wrap
msgid "Configuring the GPS service"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:371
#: mobile-manual.txt:367
msgid ""
"From the Main menu, select _Settings_. The Settings screen has a section for "
"configuring the GPS service (image below). GPS location data are collected "
@ -818,19 +809,19 @@ msgid ""
msgstr ""
#. type: Target for macro image
#: mobile-manual.txt:372
#: mobile-manual.txt:368
#, no-wrap
msgid "mobile-images/GPS-config.jpg"
msgstr "mobile-images/GPS-config.jpg"
#. type: Title ===
#: mobile-manual.txt:374
#: mobile-manual.txt:370
#, no-wrap
msgid "Collecting GPS positions"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:380
#: mobile-manual.txt:376
msgid ""
"Ensure that the GPS on the mobile device has been activated and that you "
"have given the app permission to access your location data. Open the Main "
@ -839,13 +830,13 @@ msgid ""
msgstr ""
#. type: Target for macro image
#: mobile-manual.txt:381
#: mobile-manual.txt:377
#, no-wrap
msgid "mobile-images/GPSstart.jpg"
msgstr "mobile-images/GPSstart.jpg"
#. type: Plain text
#: mobile-manual.txt:390
#: mobile-manual.txt:386
msgid ""
"_Subsurface-mobile_ starts to collect GPS locations automatically, following "
"the preferences specified as described above. While the GPS location service "
@ -856,13 +847,13 @@ msgid ""
msgstr ""
#. type: Title ===
#: mobile-manual.txt:391
#: mobile-manual.txt:387
#, no-wrap
msgid "Storing the GPS data on the _Subsurface_ cloud"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:398
#: mobile-manual.txt:394
msgid ""
"Activate the main menu and select the _GPS_ option that brings up the "
"submenu of GPS-related actions. Tap _Upload GPS data_ that saves the GPS "
@ -872,26 +863,26 @@ msgid ""
msgstr ""
#. type: Title ===
#: mobile-manual.txt:399
#: mobile-manual.txt:395
#, no-wrap
msgid "Downloading GPS data from the _Subsurface_ cloud"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:404
#: mobile-manual.txt:400
msgid ""
"Download the GPS data that have been saved on the cloud (possibly by a "
"different device) by selecting _Download GPS Data_ from the GPS sub-panel."
msgstr ""
#. type: Title ===
#: mobile-manual.txt:405
#: mobile-manual.txt:401
#, no-wrap
msgid "Viewing GPS data"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:415
#: mobile-manual.txt:411
msgid ""
"From the GPS submenu select _Show GPS fixes_. This brings up a list of GPS "
"positions obtained by the location service (image below). Two actions are "
@ -905,19 +896,19 @@ msgid ""
msgstr ""
#. type: Target for macro image
#: mobile-manual.txt:416
#: mobile-manual.txt:412
#, no-wrap
msgid "mobile-images/gpsmanagement.jpg"
msgstr "mobile-images/gpsmanagement.jpg"
#. type: Title ===
#: mobile-manual.txt:418
#: mobile-manual.txt:414
#, no-wrap
msgid "Applying GPS data to dives in the dive log"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:427
#: mobile-manual.txt:423
msgid ""
"Assuming that all the dives have been entered into the dive log or have been "
"downloaded from the _Subsurface_ cloud, apply the GPS positions to these "
@ -930,13 +921,13 @@ msgid ""
msgstr ""
#. type: Title ==
#: mobile-manual.txt:428
#: mobile-manual.txt:424
#, no-wrap
msgid "Using the settings for _Subsurface-mobile_."
msgstr "Utilisation des paramètres pour _Subsurface-mobile_."
#. type: Plain text
#: mobile-manual.txt:431
#: mobile-manual.txt:427
msgid ""
"The Settings screen allows the customization of _Subsurface-mobile_. Many of "
"the settings involve dragging a slider switch to activate or deactivate a "
@ -944,13 +935,13 @@ msgid ""
msgstr ""
#. type: Title ===
#: mobile-manual.txt:433
#: mobile-manual.txt:429
#, no-wrap
msgid "Changing to a different _Subsurface_ cloud account"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:438
#: mobile-manual.txt:434
msgid ""
"Some users have more than one _Subsurface_ cloud account and with a need to "
"switch between accounts. Tap _Settings_ on the Main menu and scroll to the "
@ -961,19 +952,19 @@ msgid ""
msgstr ""
#. type: Target for macro image
#: mobile-manual.txt:439
#: mobile-manual.txt:435
#, no-wrap
msgid "mobile-images/SettingsCloudTheme.jpg"
msgstr "mobile-images/SettingsCloudTheme.jpg"
#. type: Title ===
#: mobile-manual.txt:441
#: mobile-manual.txt:437
#, no-wrap
msgid "Changing the color theme of _Subsurface-mobile_"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:448
#: mobile-manual.txt:444
msgid ""
"_Subsurface-mobile_ has three color schemes to please users with different "
"tastes. This user manual shows the default color scheme, comprising blue "
@ -984,13 +975,13 @@ msgid ""
msgstr ""
#. type: Title ===
#: mobile-manual.txt:449
#: mobile-manual.txt:445
#, no-wrap
msgid "Configuring the GPS webservice"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:452
#: mobile-manual.txt:448
msgid ""
"The Settings screen allows one to set up the way in which GPS positions are "
"collected during dives. See the section on xref:S_ConfigureGPS[Configuring "
@ -998,13 +989,13 @@ msgid ""
msgstr ""
#. type: Title ===
#: mobile-manual.txt:453
#: mobile-manual.txt:449
#, no-wrap
msgid "Saving a detailed dive computer dive log"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:456
#: mobile-manual.txt:452
msgid ""
"Under the heading _Dive computer_, you will find a switch to save a detailed "
"log each time dives are downloaded from a dive computer. This is important "
@ -1018,13 +1009,13 @@ msgid ""
msgstr ""
#. type: Title ===
#: mobile-manual.txt:457
#: mobile-manual.txt:453
#, no-wrap
msgid "Activating the Developer submenu"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:460
#: mobile-manual.txt:456
msgid ""
"The information in subsurface.log plus some additional information for "
"understanding the screen rendering of dive information as well as the way in "
@ -1035,13 +1026,13 @@ msgid ""
msgstr ""
#. type: Title ==
#: mobile-manual.txt:461
#: mobile-manual.txt:457
#, no-wrap
msgid "Developer submenu"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:465
#: mobile-manual.txt:461
msgid ""
"If the Developer submenu has been activated in the Settings screen, the Main "
"menu has a _Developer_ item. By tapping this one has two options that are "
@ -1049,13 +1040,13 @@ msgid ""
msgstr ""
#. type: Title ===
#: mobile-manual.txt:466
#: mobile-manual.txt:462
#, no-wrap
msgid "App log"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:471
#: mobile-manual.txt:467
msgid ""
"This option shows the messages that _Subsurface-mobile_ generates while "
"running. While most users are not aware of these messages, they are often "
@ -1064,13 +1055,13 @@ msgid ""
msgstr ""
#. type: Title ===
#: mobile-manual.txt:472
#: mobile-manual.txt:468
#, no-wrap
msgid "Theme information"
msgstr ""
#. type: Plain text
#: mobile-manual.txt:476
#: mobile-manual.txt:472
msgid ""
"This option provides a wealth of information about the screen "
"characteristics of the mobile device and the font characteristics used by "

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 KiB

BIN
Documentation/images/Globe_image1.jpg Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 59 KiB

BIN
Documentation/images/Globe_image2.jpg Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 44 KiB

BIN
Documentation/images/Globe_image3.jpg Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

BIN
Documentation/images/Location1.jpg Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Some files were not shown because too many files have changed in this diff Show More