Make multiple improvements to the existing workflows:
- create a shared custom action to deal with version number tracking
and generation;
- use this action to add the branch name to the version for pull
request builds;
- create a shared workflow for all debian-ish builds to avoid re-use
by copy / paste;
- remove potential security risks by eliminating the use of
pre-evaluated expressions (`${{ ... }}`) inside scripts;
- update outdated GitHub action versions;
- improve the consistency by renaming scripts acording to have a `.sh`
extension;
- improve naming of generated artefacts for pull requests to include
the correct version.
@dirkh: Unfortunately this is potentially going to break builds when it is
merged, as there is no good way to 'test' a merge build short of
merging.
We'll just have to deal with the fallout of it in a follow-up pull
request.
Signed-off-by: Michael Keller <github@ike.ch>
Code such as `report_info("msg: %s", i)` may crash if `i` is
not a string type. To avoid such problems make format-warnings
hard compile errors.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
- fix typo in Makefile
- remove unmaintained Russian translation
- try to fix incompatibilities with current asciidoc version
- update processed files
Unfortunately I wasn't able to figure out one error that stops the linting of
the mobile manual from succeeding - as a result I turned of linting for now
(that's the '-L' flag that was added to a2x)
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
- for now all versions start with v6.0
- CICD builds use the monolithic build number as patch level, e.g. v6.0.12345
- local builds use the following algorithm
- find the newest commit with a CICD build number that is included in the
working tree
- count the number of commits in the working tree since that commit
- if there are no commits since the last CICD build, the local build version
will be v6.0.12345-local
- if there are N commits since the last CICD build, it will be
v6.0.12345-N-local
- test builds in the CICD that don't create artifacts simply use a dummy release
in order to not incorrectly increment the build number and also not to waste
time and resources by manually checking out the nightly-build repo for each of
these builds.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This should avoid build failures on platforms where we don't know if
QtWebKit will be available or not.
The options for printing and user manual are awkward to work with. This
all needs to be cleaned up at some point. Right.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
While I clearly recall that in the past the couple of cmake modules
that were installed when building the dependencies were found, in my
latest tests on macOS 12 with the latest cmake this seems to fail.
This seems like a cheap quick way to ensure that things behave as
expected.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
As some Linux distros start to ship both Qt5 and Qt6, it actually makes more
sense to build only against Qt6 when the user explicitly asks for it. Having it
preferred over Qt5 seems completely wrong in hind sight.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I couldn't make this to work as a single pass build, so we again do a dual pass
and manually assemble the dylib. This is then copied to a sane spot which
required another attempt to copy it in the CMakeLists.txt - which I added
comments to in order to make sense of the weirdness.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
There is an initial build of the C++ classes that seems to work, but the QML
integration is still missing. Still, progress is being made.
Unfortunately with Qt6 we can't forward declare the MapLocationModel class (one
of the operators needs to be able to determine the size of the class), so we
need to include the header file.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Making this simply depend on Qt5 or Qt6 was short-sighted as work on QtLocation
upstream continues. Instead break this out as its own option.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Both for Windows and macOS the installers actually didn't work correctly.
It turns out that the nifty trick (which is the officially documented way of
doing this) for setting up Qt5 OR Qt6 doesn't actually set up all of the
variables correctly - at least not on Windows and macOS.
Instead of trying to figure out why that part is failing, I decided to simply
immediately re-run the find_package for Qt5 if we don't find Qt6.
In the Windows case there was an additional problem: A very subtle typo where a
Qt5 turned into a Qt (which alone would have broken things).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This way they are available in both mobile and desktop version.
Without this, the icons weren't shown on iOS and Android.
Fixes#3214
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I thought that explicitly requesting Qt5 should be enough, but we have a report
from a user who tried to build against Qt6 and cmake happily let them proceed.
So let's fail this explicitly.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is a bit lacking sophistication (you need to remember to make clean
before rebuilding when changing this option, etc), but it works well
enough for my purpuses.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Android and iOS use qmake, so add the code to the .pro file.
This also removes all remnants of QCharts includes and uses and all the
references to QCharts in our various build systems.
That was a brief but extremely useful detour.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It turns out that the wrong base class was used for the chart.
QQuickWidget can only be used on desktop, not in a mobile UI.
Therefore, turn this into a QQuickItem and move the container
QQuickWidget into desktop-only code.
Currently, this code is insane: The chart is rendered onto a
QGraphicsScene (as it was before), which is then rendered into
a QImage, which is transformed into a QSGTexture, which is then
projected onto the device. This is performed on every mouse
move event, since these events in general change the position
of the info-box.
The plan is to slowly convert elements such as the info-box into
QQuickItems. Browsing the QtQuick documentation, this will
not be much fun.
Also note that the rendering currently tears, flickers and has
antialiasing artifacts, most likely owing to integer (QImage)
to floating point (QGraphicsScene, QQuickItem) conversion
problems. The data flow is
QGraphicsScene (float) -> QImage (int) -> QQuickItem (float).
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
The StatsView shows the chart described by the StatsState structure.
It is based on a QML ChartView. This should make it possible to
easily port to mobile. It does not include any of the UI around
the chart, viz. the variable and chart selection, etc.
The code checking for the statistical significance of the regression
line was written by Willem.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
The StatisticVariable class hierarchy encapsulates the concept
of a dive-variable, which can be plotted in charts either as
dependend or independend variable.
There are three types of these variables:
1) discrete: For example dive buddies or suit type.
2) continuous: Has a notion of linear metric - can be
used as histogram or scatter plot axis.
3) numeric: Like continuous, but allows for operations
such as calculating the mean or the sum over numerous
dives.
All variables support binning. The bins are defined per
variable.
Continuous variables can be converted into an arbitrary
double value, which is used to be plotted on a continuous
axis.
Moreover, numeric variables support a number of operations,
which depend on the variable.
Since binning is based on different types, the code is rather
template-heavy. Of course, this could be solved with
unions/variants and runtime-polymorphism, but using templates
was just much quicker. Notably, this uses the CRTP
(curiously recurring template pattern) where a subclass
passes itself as argument to the baseclass. This is a weird
kind of "reverse inheritance".
The StatsTranslations class is a dummy class which will
be used to collect all translations of the statistics
module.
This includes changes by Dirk to fix compilation of the
downloader.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
On macOS the cmake build system doesn't copy the QML resources into the app
bundle and so we do that manually. I forgot to add that for QtCharts.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Even though the mobile build doesn't have a UI for the statistics, yet, it
already builds the base files.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
These should already be part of the kirigami plugin, but without explicitly
adding them here they appear to not get found at runtime.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Instead of relying on this being available as a system resource, treat it
the same way as we treat Kirigami and the Breeze icons.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Our half-assed manual build of Kirigami was becoming completely unmaintainable.
So let's try to use the build method that the Kirigami team recommends. Which
unfortunately requires us to have access to the KDE extra cmake modules (ECM).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Qt 5.11 is what current Raspian comes with. Unless we
really need it, let's try not to have to manually download
Qt on an already slow RaspberryPi.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Provide supported dive computer list on the command line
and actually call the cli download. Still not functional.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
We'll need this in order to be able to actually open dive files and
download things from a dive computer.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Right now this doesn't do a thing, but it gives us a nice target that
has far fewer dependencies and should contain enough parts to download
stuff from a divecomputer and then sync that with cloud storage.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is barely scratching the surface (no put intended), and of course the
container needs to be updated, first, to have a 64bit version of MXE installed,
but this seems to help make libmtp build correctly.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This brings in the needed libdivecomputer updates and builds Subsurface against
libmtp in order to support downloading dive data via MTP (since the Mk2/Mk2i
no longer provide a FAT filesystem via USB).
In order for this to work you need to have libmtp installed on your system.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We used to need this when building our own libgit2 on older
distibutions. This shouldn't be needed anymore at all.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Technically with this the app might be ready for AppStore inclusion. I don't see myself
spending the energy on that, TBH.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The Qt based implementation apparently got broken at some point and now fails
to connect to rfcomm dive computers like the Shearwater Petrel.
This uses the libdivecomputer rfcomm backend. Tested to work with bluez on
Linux as well as with the native Windows implementation.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>