Commit graph

774 commits

Author SHA1 Message Date
Dirk Hohndel
7dc3afba31 build-system: update to current OpenSSL version
This is required to compile it on ARM64 Macs (and of course also is
the right thing to do overall).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-03-12 08:28:32 -08:00
Dirk Hohndel
39857ff717 macOS: remove unused Info.plist
This was confusing - the file in packaging macos hasn't been used since we
switched to building with cmake something like seven years ago.
Also add missing keys to the actual Info.plist skeleton.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-03-12 08:28:32 -08:00
Dirk Hohndel
a4438c2d07 update copyright year...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-01-17 14:18:59 -08:00
Dirk Hohndel
c3a5cf3315 build-system: update Ubuntu releases
groovy has been rejecting updates for a while, but impish should now be
available.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-10-19 12:26:09 -07:00
Dirk Hohndel
64098aeb2e iOS: don't request GPS permission anymore
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-13 11:21:34 -07:00
Dirk Hohndel
329fcf7fdc cleanup: update copyrights
That should have been done six months ago.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-07-03 14:28:37 -07:00
Dirk Hohndel
fd3ebf9b62 build-system: build for Ubuntu 21.04 / hirsute as well
This release drops the qt5-default package - which really wasn't needed since
focal. So just drop it on all of the builds after 18.04 (bionic).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-05-07 12:17:21 -07:00
Dirk Hohndel
74021afd97 build-system: don't check dependencies when creating Ubuntu package
There is no reason to check that on the system that is simply used to
submit the package to Launchpad.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-02-17 09:07:20 -08:00
Dirk Hohndel
b40354c7f2 build-system: compile stats code on mobile OSs
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>
2021-01-10 15:16:52 -08:00
Dirk Hohndel
814b2dd65f build-system/Windows: package the QtCharts QML resources
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-01-03 13:56:05 -08:00
Dirk Hohndel
12d1b54546 cleanup: fix typo
Sorry about that.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-30 10:40:56 -08:00
Dirk Hohndel
fd85752cd0 build-system: update OBS spec file
Contrary to the Launchpad builds, OBS isn't actually using the spec file that
is included in the Subsurface source but instead maintains its own.

So this is just updating to the version that has been tracked over there,
mostly for reference.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-30 09:19:37 -08:00
Dirk Hohndel
c22dd07c4d build-system: fix Launchpad packaging
There are just so many places where I need to remember to update the package
lists. Turns out I had forgotten to add libmtp to the Linux builds when we
add the Garmin Descent mk2 support...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-30 09:19:22 -08:00
Dirk Hohndel
8ae326c268 cleanup: remove obsolete macOS packaging files
Several of these stem back from when Subsurface was a Gtk2 app.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-30 08:57:12 -08:00
Dirk Hohndel
428118ae92 cleanup: remove obsolete iOS packaging files
These have all been replaced with the current build process.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-30 08:57:12 -08:00
Dirk Hohndel
4ebd8485f4 cleanup: remove obsolete Android scripts
These have all been replaced with the current qmake based build process.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-30 08:57:12 -08:00
Dirk Hohndel
7c84e3de05 update Windows README
Pointing at the current build container.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-29 13:39:16 -08:00
Dirk Hohndel
dea1ef84d5 build-system/Android: adapt the Google maps plugin name
This appears to be needed only for Android with Qt 5.15. Which means
that this commit creates odd breakage in case someone were to try to
build for Android with an older Qt version - but given that the current
build process only works with Qt 5.14 or 5.15, I think this is an
acceptable flaw.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-23 18:10:11 +00:00
Dirk Hohndel
7bdd968e05 build-system/iOS: fix minimum iOS version supported
Qt requires iOS 10, let's not pretend that we can support ancient iOS 6.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17 09:17:54 -08:00
Dirk Hohndel
e3a83dcc90 build-system/iOS: remove outdated build-ios directories
The places we build things are still rather inconsistent for historic reasons -
this definitely deserves some more cleaning up.
The top level build-ios dir was completely unused, and the build location for
the googlemaps plugin was inconsistent with all of the other build dirs.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17 09:17:54 -08:00
Dirk Hohndel
fb3d1b3073 Android: improve documentation and setup script
This has now been verified to work on a fresh clean Ubuntu 20.04 install, both
using the docker image route as well as the full local build system.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17 09:17:54 -08:00
Dirk Hohndel
e00f8d4602 build-system/iOS: remove obsolete .pro file
We now use a shared one in the root directory.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17 09:17:54 -08:00
Dirk Hohndel
55dc445188 build-system/iOS: create the build directory parallel to subsurface
This seems more consistent with how we do things elsewhere.
Also make sure that the ssrf-version.h file is created in the correct
directory.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17 09:17:54 -08:00
Dirk Hohndel
80b5e7990a build-system/iOS: build Kirigami separately for iOS as well
Since the integrated build no longer seems to work, this creates a separate
Kirigami build using qmake (as I couldn't make Kirigami's cmake build work).

The install target tries to install into the Qt install which may not be
possible with a user account, so this instead uses the built library directly.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17 09:17:54 -08:00
Dirk Hohndel
320b4a77ef build-system/iOS: ensure cmake works for Qt builds
I stumbled across needing this when trying to build Kirigami via cmake (just
like on Android). I abandoned that attempt, but there seems to be no harm in
adding this.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17 09:17:54 -08:00
Dirk Hohndel
4070c76501 build-system/Android: we need to collect the ABIs earlier
That's what happens if you develop a script like this sequentially.
We need to have the ABIs picked in order to build googlemaps, otherwise
this fails with the build container as that only includes the ARM
libraries and tools.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17 09:17:54 -08:00
Dirk Hohndel
6439a9b441 build-system/mobile: force using our own ECM build
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>
2020-12-17 09:17:54 -08:00
Dirk Hohndel
2fd464893b android/build-system: build kirigami as library
Doing it this way using the cmake build system at least gets us to the point
where everything links and appears to fit together. It still doesn't work at
all, but hey, progress.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17 09:17:54 -08:00
Berthold Stoeger
3b2ae46eb8 profile: move DiveHandler to profile-widget folder
These are the small dots that describe dragable points on
the profile when in the planner. It makes no sense to have
them in desktop's planner-widget code. They belong to the
profile.

Therefore, move the code there and compile on mobile.

Not everything can be compiled on mobile for now, but it
is a start.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-12 15:52:40 -08:00
Robert C. Helling
5452001dce Shorten the packages list
I compared the packages to those that come with a fresh Raspian
install and also removed those that are dependencies of others.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2020-12-03 13:26:55 -08:00
Robert C. Helling
8934d9744a downloader: make cgi-script functional and add documentation
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2020-12-03 13:26:55 -08:00
Dirk Hohndel
e3d4b91070 android: ensure that gradle can handle UTF8 files
This should be the case automatically, but appears to fail when run as part of
the GitHub Action.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19 17:18:33 -08:00
Dirk Hohndel
cb4ccea3c2 build-system: update Android builder docker container
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>
2020-11-19 17:18:33 -08:00
Dirk Hohndel
3071ea06f0 android: ensure all required pieces are in place for the build
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19 17:18:33 -08:00
Dirk Hohndel
068c7f5de1 android: move the build of googleaps plugin
We want to build the googlemaps plugin once we know with architectures we are
building for. So let's do that right before we build Subsurface-mobile.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19 17:18:33 -08:00
Dirk Hohndel
198096e30e iOS: adjust GitHub Action to new build format
It's frustrating that I can't get the translation.qrc support the translation
files to be created in the build directory. Having them as part of the sources
just feels wrong.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19 17:18:33 -08:00
Dirk Hohndel
648402506f build-system/iOS: no longer build in packaging/ios
That always was such a weird choice.
This also adjusts to a minor change in the layout of libgit2 sources.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19 17:18:33 -08:00
Dirk Hohndel
e73a82cd70 build-system: combine iOS and Android Subsurface-mobile.pro
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19 17:18:33 -08:00
Dirk Hohndel
64913bba47 android: add qmake based build for Subsurface-mobile
Several features that are needed to create Android bundles with the
current NDK and QT 5.15 aren't easily available when using cmake. Given
that we already do a qmake based build for iOS, I decided to simply
switch Android to that as well.

An added complication is that some of the magic that qmake uses to do
the right things fails if the .pro file isn't in the root directory of
your project. So this is right now somewhat inconsistent with the way we
build for iOS. Something that should get cleaned up in the near future
as it makes no sense to maintain two separate .pro files.

This commits also adds a new build shell script to drive the assembly of
all the dependencies. Once again this is a new file with the old one
left in place for now (but to be removed fairly soon).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19 17:18:33 -08:00
Dirk Hohndel
3a00ac0157 android: add new build setup script
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>
2020-11-19 17:18:33 -08:00
Dirk Hohndel
9f98369106 ios: correct capitalization of filename
This was changed in commit 9ed886e4be ("Cleanup: lower-case filenames in
core/subsurface-qt/") but since iOS builds happen on a case-insensitive
file system, no one ever noticed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19 17:18:33 -08:00
Dirk Hohndel
69e7baf682 build-system: allow building only a 64bit Windows installer
This is simply a time optimization that is sometimes useful

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-12 11:19:55 -08:00
Dirk Hohndel
cc04f5d3f8 cleanup: fix stupid hack for MXE build script
This is much easier.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-31 16:08:02 -07:00
Dirk Hohndel
20d97f7bff build-system: enable both 32 & 64 bit Windows builds
The 32bit build won't include libmtp and therefore won't support the Garmin
Descent Mk2/Mk2i.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-30 16:36:08 -07:00
Dirk Hohndel
e71e715cd3 build-system: Docker build for 64bit MXE
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>
2020-10-30 12:24:36 -07:00
Dirk Hohndel
a0cdd38ff6 build-system: adapt the smtk2ssrf script for 64bit Windows
Quite analogous to the Subsurface Windows build script.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-30 12:24:36 -07:00
Dirk Hohndel
e9073a7570 build-system: first steps towards a 64bit Windows build
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>
2020-10-30 12:24:36 -07:00
Dirk Hohndel
cdf1865246 build-system: add libmtp for our Windows builds
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>
2020-10-30 12:24:36 -07:00
Berthold Stoeger
f728923c79 cleanup: move interpolate inline function to its own header file
This is not really related to struct dive, so let's move it.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-10-25 13:59:52 -07:00
Berthold Stoeger
0e196310f9 cleanup: split out divecomputer functions from dive.c
Since dive.c is so huge, split out divecomputer-related functions
into divecomputer.[c|h], sample.[c|h] and extradata.[c|h].

This does not give huge compile time improvements, since
struct dive contains a struct divecomputer and therefore
dive.h has to include divecomputer.h. However, it make things
distinctly more clear.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-10-25 13:59:52 -07:00