Commit graph

410 commits

Author SHA1 Message Date
Christof Arnosti
33643bb0af travis build-scripts: update container
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>
2020-03-07 12:34:43 -08:00
Dirk Hohndel
ef26a8e02f build-system: use working version of Breeze icons
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>
2020-02-23 20:58:54 -08:00
Dirk Hohndel
a686be07f9 android: use non-broken version of qt-android-cmake
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>
2020-02-03 17:13:49 -08:00
jan Iversen
20a1b4befb scripts: expand build.sh
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>
2020-01-24 10:56:26 -08:00
Alexander Kjäll
b4eef5548b fixed typo in comment
Signed-off-by: Alexander Kjäll <alexander.kjall@gmail.com>
2019-12-24 06:25:59 +09:00
jan Iversen
d1490776e2 build-system: correct spelling error in build.sh
the location of libdivecomputer is not subsurface/llibdivecomputer

Correct spelling error.

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-24 06:18:36 +09:00
Dirk Hohndel
ebe317d644 build system: make INSTALL_ROOT depend on BUILD_PREFIX as well
This makes things more consistent.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-12 06:56:29 -05:00
Dirk Hohndel
623eb6a16f build system: fix most shellcheck warnings
A couple are still there, but this was the low hanging fruit.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-12 06:56:29 -05:00
Dirk Hohndel
2d0cf24efd build system: do something more reasonable if subsurface is a symlink
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>
2019-12-12 06:56:29 -05:00
Dirk Hohndel
24637dc769 build-system: allow shared source across multiple hosts
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>
2019-12-12 06:56:29 -05:00
Dirk Hohndel
dd83ca9d59 GitHub Actions: deal with case sensitive file system
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>
2019-12-07 15:01:24 -08:00
Dirk Hohndel
7d77db96e3 GitHub Actions: work around bug in Ubuntu 14.04 docker base image
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>
2019-11-28 11:12:59 -08:00
Dirk Hohndel
8c64140220 GitHub Actions: add two stage MXE container build
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>
2019-11-28 11:12:59 -08:00
jan Iversen
f179ec033f scripts: update get-deps to allow clean build
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>
2019-11-08 23:09:57 +01:00
Dirk Hohndel
43b16f0810 Mobile: add circle around the side actions
That seems slightly more visually pleasing.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-10-28 22:57:18 -07:00
Dirk Hohndel
db6b70f600 Mobile: make the action button wider
This makes it hard to fat finger the side buttons.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-10-28 22:57:18 -07:00
Dirk Hohndel
754fffc795 GitHub Actions: first CI/CD build for Mac based on GitHub Actions
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>
2019-10-14 21:00:10 -07:00
Dirk Hohndel
0f3d287200 Desktop: update to Grantlee 5.1
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>
2019-10-14 21:00:10 -07:00
Dirk Hohndel
85d810119b Mobile: pick icons depending on theme
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>
2019-10-14 13:39:45 -07:00
Dirk Hohndel
804a5be71f Travis: test mobile build under Linux-Trusty-Qt-5.12
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-10-14 13:37:17 -07:00
Dirk Hohndel
cd8e1eb15a Revert "Windows build: Changesto build using mxebased hidapi,libusb and grantlee"
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>
2019-10-14 07:31:56 -07:00
Dirk Hohndel
4fb2f89bb5 Mobile: another kirigami hack to make toolbar work
Without this the font size and positioning of the toolbar is broken.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-10-13 11:32:27 -07:00
Dirk Hohndel
56713842b9 Mobile: ensure consistent path when accessing arrow icons
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-10-13 11:32:27 -07:00
Dirk Hohndel
0d4acbd735 Mobile: add another Kirigami hack so we can fix the Back menu entry
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>
2019-10-13 11:32:27 -07:00
Dirk Hohndel
e91a8ff7f9 Mobile: hack around missing icons in the toolbar
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>
2019-10-13 11:32:27 -07:00
Dirk Hohndel
26a7cf1698 Mobile: hack around toolbar theme issue
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>
2019-10-13 11:32:27 -07:00
Dirk Hohndel
1e25c85dde build-system: update the mobile components script
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>
2019-10-13 11:32:27 -07:00
Dirk Hohndel
272cb43c4e Mobile: update Kirigami to v5.62
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-10-13 11:32:27 -07:00
Paul Buxton
60e63afb82 Windows build: Changesto build using mxebased hidapi,libusb and grantlee
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>
2019-10-13 11:31:38 -07:00
Dirk Hohndel
d82e008b4c Android: switch to latest OpenSSL
If we update all this, we might as well go to the latest.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-10-05 08:19:31 -07:00
Dirk Hohndel
ea0e447e0d builld-system: switch Android to Qt 5.13.1
This fixes the SSL issue with Android 5.x/Lollipop.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-10-05 08:19:31 -07:00
Paul Buxton
c1aa686f9c AppImage: Fix path of machine-id in dbus library
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>
2019-09-23 13:38:57 -07:00
Paul Buxton
4b391c448d AppImage: Fix missing libssl1.1
Add ssl to the AppImage build.
Add helper script to fetch required dependancies.
Update docker build container used.

Signed-off-by: Paul Buxton <paubuxton.mail@googlemail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-09-23 13:38:57 -07:00
Dirk Hohndel
a921acb3ce Travis: build Subsurface AppImage against Qt 5.12
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>
2019-09-05 17:54:09 -07:00
Dirk Hohndel
6670ea7bdb build-system: add -quick flag for build.sh
With this flag we assume that we don't need to rebuild grantlee and googlemaps.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-09-05 17:54:09 -07:00
Dirk Hohndel
373415bb52 build-system: add Dockerfile for Qt 5.12 on Trusty
We'll use this to create a better AppImage on Travis.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-09-05 17:54:09 -07:00
Jan Mulder
2f6ad092a5 Android: fix review comment
Fix review comment by Anton on GitHub.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2019-07-18 06:39:00 -07:00
Jan Mulder
29f4d35bc4 Android: fix location of the build apks
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>
2019-07-18 06:39:00 -07:00
Jan Mulder
7c722ea222 Android Docker: make a nice version tag file
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>
2019-07-18 06:39:00 -07:00
Dirk Hohndel
a236dd4fd2 Android: hack around the build issue with a custom container
Local testing seems to indicate that the build should work with this container.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-07-18 06:39:00 -07:00
Dirk Hohndel
7dcfc9d96b Android: Switch to Qt 5.12.4 container
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-07-18 06:39:00 -07:00
Jan Mulder
bb895f1896 Android: Qt 5.12.4, OpenSSL 1.1.1c
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>
2019-07-18 06:39:00 -07:00
Dirk Hohndel
9b63b6d5e1 update parse-descriptor.pl
libdivecomputer is a submodule. Just hardcode the path to descriptor.c.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-07-15 11:22:10 -07:00
Dirk Hohndel
f0307abf50 Travis: move storage to a cheaper service
It's surprising how much money this ended up costing...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-05-19 14:14:37 -07:00
Dirk Hohndel
b68b42bd2f Travis: build macOS test against Qt 5.12.3
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>
2019-05-19 14:14:37 -07:00
Salvador Cuñat
d0d599470a windows-container: remove useless tarball download
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>
2019-05-18 14:43:16 -07:00
Salvador Cuñat
ec287d87f4 docker-mxe: Fix tee command line for static build
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>
2019-05-18 14:43:16 -07:00
Salvador Cuñat
aab658fc9f docker-mxe: Make Dockerfile reusable
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>
2019-05-18 14:43:16 -07:00
Salvador Cuñat
967f9fb590 Build static glib under mxe
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>
2019-05-18 14:43:16 -07:00
Dirk Hohndel
68592ebc62 Travis: use version 0.9 of the MXE build container
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-05-18 14:43:16 -07:00