Commit graph

435 commits

Author SHA1 Message Date
Dirk Hohndel
6586438bf6 build-system: improve finding of libdivecomputer.a
On some systems it ends up in lib64 instead of lib.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-16 21:11:44 -07:00
Dirk Hohndel
86396e9904 build-system: fix libgit2 detection
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>
2020-10-16 20:23:37 -07:00
Dirk Hohndel
0aaa654433 build-system: switch to current libhidapi
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>
2020-10-16 14:14:50 -07:00
Dirk Hohndel
b40c8de35b build-system: remove Grantlee references from legacy scripts
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>
2020-10-08 12:19:39 -07:00
Dirk Hohndel
21f1cf09f7 build-system: remove Grantlee from the container setup scripts
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-08 12:19:39 -07:00
Dirk Hohndel
b29140f6e8 build-system: remove Grantlee from the get-dep-lib script
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-08 12:19:39 -07:00
Dirk Hohndel
2dd28e3c8d build-system: remove building Grantlee from build script
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-08 12:19:39 -07:00
Dirk Hohndel
1f65d9df62 build-sytem: hide archived Subsurface version from translation scan
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>
2020-10-06 10:52:26 -07:00
Dirk Hohndel
3a9d895ccf documentation: release tasks
I think I'm the only one using this list, but it makes sense to
have it in the repo

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-30 16:40:41 -07:00
Dirk Hohndel
e6ac0665c7 build-system/macOS: build libz and libftdi as part of Mac dependencies
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>
2020-09-13 13:55:46 -07:00
Dirk Hohndel
605ce56ea2 build-system: add zlib as library we know how to fetch
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-13 13:55:46 -07:00
Salvador Cuñat
45812da046 smtk-import: Fix build script
Subsurface build needs install-root path to link libdc

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
2020-08-13 10:02:12 -07:00
Robert C. Helling
73151ca1d9 smtk2ssrf Perl script: Add some error reporting
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>
2020-08-08 14:16:54 +02:00
Paul Buxton
a753845d5a build-system/MXE: build with more up to date MXE tools.
- 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>
2020-06-25 11:00:51 -07:00
Dirk Hohndel
e9e72fa237 add random helper scripts
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>
2020-05-02 14:24:10 -07:00
Dirk Hohndel
da953fa18a move GitHub url to the Subsurface 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>
2020-04-26 16:36:30 -07:00
Dirk Hohndel
d3e495efd0 build-system/Android: use PREFIX outside of NDK
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>
2020-04-25 13:18:41 -07:00
Dirk Hohndel
f112be7a61 build-system/Android: use install-qt.sh to install Qt
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>
2020-04-25 13:18:41 -07:00
Dirk Hohndel
9025a9b2b1 build-system/Android: update some dependency versions
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>
2020-04-25 13:18:41 -07:00
Dirk Hohndel
c6704f2aa6 build-system: deal with libgit2 versions 1 and later
We assumed everywhere that libgit would always have a 0.xx version number.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-09 17:04:52 -07:00
Dirk Hohndel
ac9df93a13 build-system: pull newer libxslt
The older version stopped building for iOS.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-04 12:00:25 -07:00
Dirk Hohndel
5178ea2d15 iOS: add libxml2 build
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>
2020-04-04 11:09:17 -07:00
Dirk Hohndel
ebbe01a359 mobile UI: disable action button / drawer interactions
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>
2020-03-27 12:31:02 -07:00
Dirk Hohndel
98ef01b2e4 mobile UI: stop the use of dark icon theme
This was used very inconsistently and had more bugs than positive
impact.

See #2686

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-21 13:27:00 -07:00
Dirk Hohndel
1b2db4e058 translation tooling: fix script to not include Kirigami strings
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>
2020-03-10 14:07:42 -07:00
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