It's unclear if this will be enough to use gcc 10 by default when building
Subsurface using this container.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It looks like Qt company has LGPLed versions tagged wich simplifies
things a bit while building, e.g. 5.15.3 current workaround matches
"v5.15.3-lts-lgpl" tag.
Background: Debian Sid is currently at Qt 5.15.8 which is impossible to
build from scratch with current script as only a few git versions are
tagged in the script format "v5.15.8".
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Update to match Xcode command-line-tools SDKs from 10.X to 16.X
Signed-off-by: Doug Junkins <douglas.junkins@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-build-with-qt6 did not work for me, because the flag is
ignored when selecting the qmake executable. It would find
the system-wide qmake executable, which is Qt5 and then
decide to build with Qt5.
When the flag is set, try to search for a Qt6 version of
qmake first. On Ubuntu based distros this seems to be
qmake6
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
The Qt Company apparently didn't feel the need to have the correct
tags in all of the module directories. So this now has to manually
pick the correct SHA. What a pain.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It does seem a bit odd, but the arch command actually doesn't
return a reasonable architecture on macOS. So let's use the
uname -m command to get the right answer that makes this script
work both on an m1 and an Intel Mac.
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>
This adds a flag to explicitly enable a build against maps, which is
only needed for Qt6 (as we always assume that Qt5 has maps installed).
It also includes a quick fix to fail gracefully if libmtp was already
patched.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
As of today, GitHub no longer allows the 'git://' protocol, so we need to
switch the submodule and our other references to cloning git repos to
'https://' instead.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This has bugged me forever. The existing file creates a warning on every single
compiler invocation. I really need to figure out if I can get this fixed
upstream. But while I'm at it, I submitted it here to make it easier to spot
warnings in the build output.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If we are building our own version of libusb, let's build a current one
(because current libmtp relies on that).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If the CMAKE_PREFIX_PATH is a multi element path the old code failed
in very predictable ways. So instead simply fall back on the PATH to
find qmake.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This cleans up the script a little and makes it more flexible to add other
output formats; and adds Markdown as one such format.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Asciidoc appears to insert './images' references when using the admonitionblock.
Clean that up in the post processing of the user manual for HTML.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When trying to build on Big Sur, the xcode command-line tools
install are installed in /Library/Developer/CommandLineTools/SDKs,
and as of Xcode 12.5, it does not include a 10.x version
of SDK.
This changes it to search in the location of the command-line tools SDK
for a 10.x version, and if it can't find a 10.x version it will
find an explicit 11.x version of the SDK to use because it is
conceivable that in the near future Apple will stop installing any
10.x SDK's as part of the command-line tool installer.
If the SDK can't be found, the build script will exit now instead
of continuing with an unset BASESDK version that causes a later failure.
Signed-off-by: Ryan Gardner <ryan.gardner@coxautoinc.com>
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>
When calling build.sh with no args asking for a specific build type, that
should be equivalent with calling it with the -desktop arg.
Reported-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We now require qmake to be found much earlier in the script so we can simply
use that to get the right prefix path.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Update to Qt 5.12.10, latest OpenSSL, add QtChart, add other missing packages.
Also switch to gcc-7 as our statistics code requires better C++17 support than
what gcc-6 can offer.
This then creates trusty-qt512:1.1
Signed-off-by: Subsurface CI <dirk@hohndel.org>
This is just adding the third option and then untangles some of the 'there are
only two options' based code.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If the OS has an older one installed, that is found first and the
build fails. This way we know that ours is used.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Having them as commits like this should make it easier to migrate them
as we update the underlying Kirigami version.
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>
This adjusts the docker setup to create a container with the correct
NDK, SDK, tools, Qt version, etc, and updates the helper scripts that
are needed in order to do that.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This installs the required versions for most components, switches us to
Qt 5.15, current SDK, NDK, and the current OpenSSL version.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This used to work, and still works with Qt 5.15 on the desktop, but on
Android we get a fatal error trying to open the app. So let's just add
another hack on top of all the other hacks we already have.
Eventually we need to bite the bullet and update Kirigami. I just wish
that wasn't such a pain.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We still only require v0.26 from an API perspective, but it seems
backwards to build that version when building from source as we do for
macOS or Android.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If we are building our own dependencies (usually only for release builds), we
now also need to build libmtp.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This should allow us to then do both 32 and 64 bit Windows builds in our CI/CD
and of course for our releases.
In order to still be able to use this container in a GitHub action, aggressively
remove things that we won't need during the build. Since we use the experimental
-squash argument during docker build, this should get us a much smaller container
image in the end.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We previously tried to build the MXE Docker container on GitHub using
an Action, but that really didn't work well and was a lot more trouble
than it was worth.
So this goes back to an offline build mechanism where I simply create
an updated Docker image when needed and push that to Docker Hub.
But this nearly hides the most interesting change here - we are finally
switching to using 64bit binaries on Windows. It's 2020 and fewer than
1% of our users use 32bit Windows machines. We'll need to expand this
to be able to have both a 32bit and a 64bit version of Subsurface for
Windows. But for now, this solves the problem for 99% of our users.
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 uses latest master (as that's the only one that has the explicit
Descent Mk2i support in it).
Right now, unfortunately the MXE build fails.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Usually ldconfig isn't in the user's path.
Suggested-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
A few years ago the upstream for libhidapi changed - it became part of the
libusb GitHub org. Switching to the latest version appears to fix some odd
problems with talking to the Suunto Eon Steele/Core dive computers on macOS (at
least I can no longer reproduce the problem after switching to the current
version).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I debated about this commit... we don't use these scripts any more, but it
seems like it would be worse to leave the Grantlee references in them. Yet of
course this is all no longer tested. Maybe it is time to delete the scripts
from the tree.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The release process creates full Subsurface trees under tmp. Don't pick
those up when looking for source strings.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Usually people will install these via Homebrew, but when we need to build
everything ourselves (required for release binaries), then these two were
missing before.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
So far, if the conversion process failed, we simply returned
an empty file. Now, we report that something's wrong.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
- use hidapi grantlee and mdbtools from MXE
- update MXE version to use QT 5.15, and pull in libzstd and CMake 3.17.3
- fix linking of winmm on windows build with new mxe
- add some instructions on building the container
- add some new dependancies from QT 5.15 to the packaging
- add a patch to MXE to Build qtconnectivity with native-win32-bluetooth
[Dirk Hohndel: small refactor]
Signed-off-by: Paul Buxton <paulbuxton.mail@googlemail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
These are all kinda weird but I use them when creating releases, so it
seems to make sense to add them to the repo. I don't think they are
useful to anyone but me, but in the event someone else takes over, they
might be a useful starting point.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Instead of using the Subsurface-divelog user on GitHub, we now use an org that
was generously donated to us.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If we install our support libraries into the NDK we later run into
include path order issues that result in strange errors around the
inclusion of math.h (because we find the C version of that include
file that ships with the NDK before we find the libstdc++ version
of math.h (because the include path for our support libraries is
listed before the libstdc++ include search path). By having a distinct
install-root for our libraries we can avoid this problem.
Remove the previous hack that tried to work around the symptoms of
this issue.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The official installer now requires the user to log in which we can't
really do in a scripted manner. Let's see how long this way of
installing things will be available.
While doing this remove an ancient hack of some Qt settings that we no
longer need.
This also tries to prune some things that we don't need in the Docker
image to reduce image size.
The mapbox plugin is removed as it would add a dependency to QtSql which
we otherwise don't need. And since the plugin isn't used, no point in
installing it.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Qt 5.13.2 fixes a few bugs.
We are NOT switching to Qt 5.14 as that breaks a ton of things with
Android support. At this point even with qmake it near impossible to get
working Android binaries, no one appears to have a solution for cmake.
With qt-android-cmake current master fixes the problem that held us back
at the earlier commit, so let's go back to using master.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I don't know why this is suddenly needed and wasn't before, but hopefully
this fixes the broken builds on GitHub.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is a feature that I never fully understood, but that apparently is
causing the drawers to show up for people who are just trying to
interact with the action button. The approach here is really drastic and
crude, but in my testing it seems to work.
Reported-by: Hartley Horwitz <hhrwtz@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Not sure when it started doing that - we don't want those in our
translations, I believe.
Also, we appear to suddenly get problems with too many numerus lines
unless the existing translation is deleted, first. Very strange.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
While the project doesn't use Travis anymore, these scripts are indeed
useful when building locally, so it makes sense to keep them current and
working.
Signed-off-by: Christof Arnosti <charno@charno.ch>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
As of today some of the icons that we need are no longer in the git repoo but
instead created via script. Instead of making this work everywhere, let's just
use a working SHA...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
A recent merge upstream causes build faiilures because the
PROJECT_VERSION variiable isn't defined. I can't figure out how to make
sure that it is defined correctly, so hack around that by using the
version prior to that merge.
See https://github.com/LaurentGomila/qt-android-cmake/issues/33
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add option "-src-dir <source directory>" to build options.
When calling build.sh without -src-dir it uses src/subsurface as usual, but when called
with -src-dir <source directory>, it uses src/<source directory> as source basis.
This is a needed option, when working with "git worktree", which is used when working on
different branches in parallel (e.g. master and my-feature-branch), because it allows a
build directory in each worktree, and thus much faster when switching work.
Signed-off-by: jan Iversen <jan@casacondor.com>
This actually changes behavior compared to what we did before. But it seems
reasonabel. If ./subsurface is a link to a different directory, then assume
that we want a true out of tree build in the current directory.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This attempts to allow sharing a host directory across multiple builds, target
use case is to have a shared source directory on a VM host and be able to build
from that in a number of VMs without those builds stepping on top of each
other.
Instead of subsurface/build, subsurface/mobile-build,
subsurface/libdivecomputer/build, use a prefix path to allow having true out of
tree builds.
The one shortcoming is that the autotools need to be run in the libdivecomputer
directory - that means this will be run on the first system that starts a
build. But that seems to cause no harm in my testing.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Sadly, there's an explicit change in the sources to of QtConnectivity
that requires this workaround when running the build on a case sensitive
file system.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Right now in the Ubuntu 14.04 base image for Docker the file
/etc/apt/preferences.d/ubuntu-esm-infra-trusty doesn't exist.
Subsequently, apt-get update enables ESM, but since we don't have a license to
use that upgrades / installs from ESM fail.
This workaround simply ensure that there is such a file pinning ESM to never be
used. With that, the creation of our image should succeed again.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Based on ideas from Anton - both the basic building of containers in the first
place as well as the workaround for the 6h build limit.
Because GitHub Actions are limited to 6 hours we split the creation of the MXE
container into two steps and push the intermediary container after stage 1 to
docker hub. Right now each of the steps takes about 3.5 hours, so hopefully
even with changes in the future this will continue to work.
This commit also introduces use of docker hub instead of GitHub's own registry
(since strangely right now GitHub actions cannot run containers from GitHub's
private registry).
In order for this to work, we need to have the docker credentials in secrets in
GitHub. As a result, only people who can create branches in our repository can
easily test changes to the container images. Others can modify the code to use
a different docker hub account and provide those secrets in their own GitHub
account. Not ideal, but of course we cannot allow every pull request to
potentially overwrite docker images in our "official" docker hub account.
Suggested-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
libssh2 depends on openssl, therefore it is important that openssl is
build before libssh2.
The old get-deps would cause errors in 2 situations:
1) In a clean build, make of libssh2 would fail
2) In a normal build, where openssl changed version, make of libssh2 would
depend on old build.
Signed-off-by: Jan Iversen <jan@casacondor.com>