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>
This feature is in beta right now and might change without notice, but instead
of dealing with the broken Travis Mac builds, this does seem progress.
The build artifact seems to work, but it's a bit more painful to get to. Go to
https://github.com/Subsurface-divelog/subsurface/actions and click on the
corresponding run - it's then in the top right corner under Artifacts. The one
oddity is that after unzipping the file you need to manually make
Contents/MacOS/Subsurface executable.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Also make sure Grantlee still compiles with Qt 5.13 by cherry picking a commit
that was added after the v5.1.0 release.
In order to identify this commit as comming from the build automation we
temporarily override the user name and email address. As a side effect this
also makes this work on Travis.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
QML has ways to style icons - and we use that for the main theme color,
but it doesn't seem to work (anymore?) for the edit and save icons.
Instead of tracking down what changed there, simply switch between icons
with different foreground color, depending on theme.
All the other icons seem to work well in all three themes.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This reverts commit 60e63afb82.
I merged this to early without paying attention to the fact that this
needed an updated build container as well.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Kirigami isn't picking up our font for the Back entry in sub menus.
Also, we still don't get a back button icon on Android. This will
allow us to work around that.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This looks extremely fishy to me, but it does seem sufficient to
get the forward and backward buttons to show up in the toolbar.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Whatever I try, the toolbar background is always based on the 'active'
color set in qtquickcontrols2.conf, not on anything that I can set in
QML code. So in an effort to brute-force the issue, this hardcodes the
subsurfaceTheme value in the toolbar UI code of Kirigami.
To make this easier, this (and one of the other hacks) is added to the
existing kirigami.diff.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The hack to remove the action button caused situations where the action
button didn't return. Let's skip that for now. All the other fixes
appear to still be needed.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove hidapi from manually built components and use the mxe based one instead.
Remove libzip as that is handled by mxe packages.
Update version of grantlee used to build with qt 5.13.1.
Also hide vscode files from git.
[Dirk Hohndel: combined two commits, cleaned up the commit message and removed
one now incorrect comment line from mxe-based-build.sh]
Signed-off-by: Paul Buxton <paulbuxton.mail@googlemail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When building dbus within the appimage, cmake picks up the installation
path of various files dbus uses through the GNUInstallDirs package,
however this doesn't work under the appimage build.
So we replace the variable with the normal location of this file.
Signed-off-by: Paul Buxton <paubuxton.mail@googlemail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
For this we need our own hand crafted trusty container with Qt 5.12,
including QtWebKit and an updated cmake and libdbus, as well as already
build googlemaps plugin, grantlee and libgit2.
At the same time stop uploading the Subsurface AppImage in the
traditional trusty build.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
With all upgrading, the build apks now show up in a slightly different
location. Correct this in the scripting. Notice that this is debug
building only. Release building is outside the repo.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Trivial. The final touch command was missing the proper quotes, so it
created a bunch of strangely names files from the date command. Just
good for the developers that like to peek into the docker image.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
The main reason for upgrading of the Qt version is the hunt for a broken
BT/BLE stack, preventing downloads from BT/BLE enabled DCs, in relation
to arm64 architecture builds. (And the absolute need for an arm64 build
in relation to the publication of the Android app in Googles Play
store).
In addition, Qt 5.12.4 starts supporting OpenSSL 1.1.1c, and trying to
use our current OpenSSL 1.0 series is highly discouraged by Qt (and
OpenSSL itself).
So, upgrade both in unison. But ... be careful bisecting issues on this
commit, as it does break our build. That will be fixed in the next
commit.
This fixes the BT/BLE download for arm64!
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
The .app.zip should once again run on any Mac (ignoring the security issue of
unsigned binaries). The Qt binaries in that archive include the jpeg and png
libraries that were missing in the Qt 5.11.1 binaries we used until now.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
0.9 docker image includes static libraries to build mdbtools so there is
no need for an aditional tarball.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add -a parameter to tee to avoid overwriting build.log when building
static libraries for smtk2ssrf
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Passing an argument on the docker build command line avoids the need to
modify the Dockerfile for each image build.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
mdbtools only builds static under mxe.
This should add static build of glib to the container with the mxe
libraries.
[Dirk Hohndel: merged with latest version of Dockerfile]
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Instead of trying to do it all in one step rely on --squash to do its
job. Don't try to be so aggressive in removing things, it saves very
little space and caused builds to fail.
This results in version 0.9 of the MXE build container
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Printing never worked, none of this was ever included in test builds. Also, now
that there are official releases of QtWebKit again, this just doesn't seem worth
carrying along anymore.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Just like Android, Windows binaries are best created in a container.
I still need to push the latest version to docker hub and use it on
Travis, but this way at least the Dockerfile is here.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
... and remove install of the default (old) libgit2 from OS. That old
(0.24.0) libgit2 will be replaced by a newer anyway, so useless to
install.
But the real change to get this Travis build running again is using
the well known openssl instead of libressl.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
The install was missing curl.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl> Removed upgrade to newer libgit2.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We currently require a minimal version of libgit2 of 0.24.0. From
issue #1926 it seems that this version is too old. So, a simple test on
Linux to see the behaviour with such an old libgit2, I tried that.
Interestingly, with the current version of openssl that old libgit2
version does not even compile from source (known error in libgit2).
So, bump our minimal version of libgit2 to 0.26.0. That is also the
version we currently use on the Travis and official builds, so well
tested.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
The scripts/build.sh script has an option --skip-googlemaps. Introduced
in 2017 at a moment the Travis Mac build failed on this. Interestingly,
when Mac building of the maps plugin was possible again (commit 79e3f69f48)
the --skip-googlemaps stayed. Obviously, this hack was never intended
to be used for anything else then getting it passed Travis on
some point in time for a specific Mac build.
So, remove this option.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
With this we have working arm and arm64 images (except that the arm64
image crashes when using Bluetooth).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
cmake 3.10 (which comes with Ubuntu 18.04) in combination with Qt 5.12
and the current qt-android-cmake causes an odd bug. Paths are set with a
double slash at the start '//' and later in the process this causes
garbled path names for some of the objects which in return causes the
APKs built in the container to fail.
Upgrading the cmake inside the container to 3.13.2 fixes that problem.
All the credit for identifying the problem and figuring out a solution
goes to Jan Mulder.
The resulting container was pushed to Docker hub as version to 5.12.03.
Reported-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Again, this is relevant for developers that do local docker android
builds, and normal android builds. A normal build uses the directory
subsurface-mobile-build-arm(64), and when doing a docker android build
this directory is shared between host and container. That sharing is
good, as it nicely exposes the build tree to the host (for easy compare,
inspection, etc.). But reusing the same tree as the local one is
inconvenient (and possibly dangerous due to all kinds of caching
issues).
So, give the docker build its own output tree for the shared
subsurface-mobile-build-arm(64) build output.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Users that use docker locally for Windows style build and Android style
builds will (probably) not like that we use the same name for both
docker containers. So, give the android builder its own name.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
As explained in commit 449d4ee33d ("Android build: add explanation for
huge hack").
It seems reasonable to add this to our Travis image as that is custom
made just to build our Android binaries.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This should make our mac builds on Travis faster.
This also switches to the latest xcode / VM image which helps speed things up
(less to update for Homebrew). It turned out that that app directories that we
were creating here didn't run for people, anyway, so why even bother with an
old image.
We still create / upload that image (simply in order to be able to peek into it
in case something goes wrong).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Initial implementation/prototype of copy-paste support for
Subsurface-mobile. The UI part is really lacking; right now the copy
button is initially visible and paste is achieved by long press on a
dive and clicking the paste button when it appears. Delete is currently
not possible at all, as I just failed to layout the buttons properly
using QML. It just sounds so simple, to put all the copy-paste-delete
buttons next to each other...
The data to be copied is currently hard-coded. A dialog to choose
inteded fields would be nice, but it'll take quite a bit effort to get
used to QML enough to be able to hack something together.
Anyway, this seems to work, even though the UI is not always reflecting
the paste without switching dives (when testing on laptop).
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
And use that to have our Travis build still work with the existing MXE
build container as well as the even older, pre-compiled MXE binaries
used in the windows build.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Ooops. Forgot to fix this before sent the patches, as this part doesn't
works on my travis builds.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Enable building of SmartTrak divelogs importer.
A new, lighter, tarball for mxe static libraries has been built, as it
seems impossible to build mdbtools with shared libraries (see mxe's
build matrix). The tarball doesn't include prebuilt mdbtools and we
build from source via build script.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Starting with Xcode 10, system headers are located inside the
macOS SDK.
Add this location to the check for command line tools.
Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
More specifically, don't upload them from the old Windows build - we
just keep that one around for the smtk2ssrf binaries. The Subsurface
binaries are now created in the container based Windows build.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I expect this to become the default way to test Windows builds and
create installers on Travis. The idea is that instead of downloading the
pre-built MXE binaries we might as well use a container that has all
this installed and can be used locally to test if things fail on Travis;
which will allow us to have the exact same environment for testing
locally as runs on Travis.
At this point the container used is way too big - more effort needs to
be spent on shrinking it.
Right now this only deals with Subsurface and not with smtk2ssrf.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
That qmake -query was added for debugging a long time ago.
Since the comment clearly indicate that the edit of the Makefile is only
for Travis, let's only do it when running on Travis.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It wasn't documented in the first place (magic first argument, anyone?).
This used to be available for quite a few of the dependency and had
somehow kept around only for Grantlee and Googlemaps. Let's just kill
this and be consistent for all dependencies.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In some Mac environments autotools somehow think that we have clock_gettime(),
even though it isn't supported. Somehow the previous workaround stopped working
as make ended up re-running ../configure and overwriting our change. This tries
to work around that problem.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Turns out that Jan found an issue with the latest Kirigami, so let's go back to
the known good one.
This reverts commit 17ec95e70c.
Suggested-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Turns out that Jan found an issue with the latest Kirigami, so let's go back to
the known good one.
This reverts commit 40766db459.
Suggested-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Update to the master of today, and no issues detected on mobile-on-desktop
and Android.
Only, the ugly border is back as the magic hack of 0b16b547ae failed
due to the patch file that errored. So that is fixed too.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Build systems that run from tar balls and not git fail to create valid
.appdata.xml This solves the problem for tar balls that we create for
OBS via our own make-package script. It doesn't solve the problem for
Arch or Gentoo who I believe take our tar files created via git archive.
One way to fix this would be to change the process by which I create
those tar files, I guess.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Instead of editing appdata/subsurface.appdata.xml in place, switch to our usual
pattern of modifying a .in file and add the resulting file to .gitignore.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Use correct format, create script to update the version and release date in the
appdata.
[Dirk Hohndel: call said script during the build process]
Signed-off-by: Alexander Wilms <f.alexander.wilms@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Switching to GitHub as source for libzip means that we need to encode
the version number differently. Newer versions of libzip don't compile
cleanly on Android and this one seems new enough.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This also switches us to libzip's new official home on GitHub, and takes into
account that libzip no longer supports autotools and instead now is cmake
based.
Building against that, on my Mac build system, Subsurface once again correctly
opens DLD files downloaded from divelogs.de.
Fixes#1534
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Clearly something has changed here. When I first tried to use Homebrew on
Travis the update would take often so long that the build would time out. Now
it is nice and fast. So instead of wasting time with the cache let's just use
Homebrew directly.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>