Commit graph

754 commits

Author SHA1 Message Date
Dirk Hohndel
2690325623 Android: install translations into the right place
When updating the NDK I forgot to adjust the install destination for the
translations.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-05-27 12:41:14 -07:00
Dirk Hohndel
9815024199 add Berthold to the list of explicitly mentioned developers
Number 3 overall committer with currently 9% of total commits and 27% of all
commits in the last three years.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-05-09 17:21:43 -07:00
Berthold Stoeger
fe82cb32b9 media: add small C++ helper describing a picture struct
By using a std::string instead of a C-string, memory management
becomes so much simpler! This class will be used for keeping track
of deleted/added pictures in the undo system.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-05-06 13:58:09 -07:00
Berthold Stoeger
e61641c79c undo: implement undo of setting a picture time by drag&drop
Even though the functionality is seemingly trivial, this is a bit
invasive, as the code has to be split into two distinct parts:
1) Post undo command
2) React to changes to the divelist

Don't compile that code on mobile.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-05-06 13:58:09 -07:00
Dirk Hohndel
006d630142 build-system/Android: add missing install-qt.sh
This file is copied from the QBS project. It's under LGPL and therefore
compatible with our licensing. While it would be possible to retrieve
this file at build time from the original project, for now it seemed
easier to include it in our repo.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-27 11:04:29 -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
f04bfd4a86 GitHub Actions: use the Qt 5.13.2 based Android build container
This is no longer created using GitHub actions (but all the necessary
information is still included in this repo). We need to be able to
shrink this container so our GitHub Action runs don't run out of disk
space.

Adjust the path where the resulting binaries are found with this build.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-25 13:18:41 -07:00
Dirk Hohndel
0fe02af0e8 build-system/android: remove libusb at QTest
We no longer use libusb to access USB devices on Android, therefore
there's no point including libusb in our build. Also, we have never even
attempted to run the tests on Android, so let's not even pretend to
support building them.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-25 13:18:41 -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
c0ecd3a597 build-system/Android: create standalone toolchain in wrapper script
This way when we build the android build container, the correct toolchain
is already in place.

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
999cc2d642 build-system/Android: remove no longer supported Qt versions
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-25 13:18:41 -07:00
Dirk Hohndel
08c5788020 build-system: cleanup Ubuntu/Debian script
This code block was also for the OBS builds and is no longer needed now that we
have to separate make-package scripts.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-19 14:27:54 -07:00
Dirk Hohndel
195d43d186 build-system: simplify and clean up OBS make-package script
The previous version wasn't quite ready for prime time.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-19 08:41:29 -07:00
Dirk Hohndel
2f8c968ff9 build-system: remove OBS support from Ubuntu/Debian scripts
This feels much cleaner.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-19 08:17:15 -07:00
Dirk Hohndel
83a963bc37 build-system: create separate OBS make-package
It seemed very odd to have those steps mixed in with the Ubuntu/Debian
instructions. Yes, there is a bunch of overlap, but this seems much cleaner.

This also updates the spec files to something that works for the current
sources.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-19 08:17:15 -07:00
Dirk Hohndel
37badf2746 cleanup: fix image reference in Android README
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-18 17:38:09 -07:00
Dirk Hohndel
b38138fd0d build-system: update Ubuntu/Debian package script
This cleans up a lot of the ancient mess in that file.

It's still confusingly usable to push sources to OBS as well (but that's now
hidden behind an option) and it is still somewhat custom-made for me, but it
should be much easier to reuse for others now.

In addition to Subsurface and libdivecomputer we are inclooding the googlemaps
sources and libgit2 1.0.0 sources. Bionic is the only remaining distro that we
support that doesn't have a new enough version of libgit2 (0.26 is the minimum
we expect), but since we are linking statically against it, maybe it's best to
simply force all of these builds to include libgit2 1.0.0.

Handling of the debian/* files in the script has been changed quite a bit to
make it easier for others to create a working setup. It now updates all of the
files with the exception of the changelog files from the sources we are
building from. I am hoping that this will be a not-so-subtle incentive for me
to keep the bundled versions up to date.

Since we no longer do beta releases, I removed that part from the file.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-18 17:38:09 -07:00
Dirk Hohndel
29884ba307 build-system: remove references to docs we no longer ship
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-18 17:38:09 -07:00
Dirk Hohndel
ef947ffc1f build-system: silence one more warning for Ubuntu/Debian builds
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-18 17:38:09 -07:00
Dirk Hohndel
da5aa06cc0 build-system: get ready for switching to libgit2 1.0
We want to build this against its own regex package to avoid adding more system
dependencies.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-18 17:38:09 -07:00
Dirk Hohndel
c8f40c57c9 build-system: add missing dependencies for Ubuntu/Debian build
And acknowledge the current file format standard.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-18 17:38:09 -07:00
Dirk Hohndel
a3731ecc69 build-system: update copyright years in Ubuntu/Debian files
And remove an optional entry (which we would have to keep changing otherwise).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-18 17:38:09 -07:00
Dirk Hohndel
afccff08dc build-system: add valid Ubuntu/Debian changelog file
We don't want to try to track every change to this file in our source repo, so
this starting point is as goos as any.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-18 17:38:09 -07:00
Dirk Hohndel
61f9c4114e
Merge pull request #2737 from Subsurface-divelog/libgitCleanup
Libgit cleanup
2020-04-10 17:19:51 -07:00
Berthold Stoeger
3f3869ff65 media: move picture function from dive.c to picture.c
Currently, move only those functions that do not access dive
structures.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-04-10 10:53:03 -07:00
Dirk Hohndel
3828ec6097 build-system: remove references to long gone support for libgit2 < 0.23
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-09 17:05:24 -07:00
Dirk Hohndel
f9ccbabb3d cleanup: update all copyright dates to 2020
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-04 12:00:24 -07:00
Dirk Hohndel
0d8324bfb4 iOS: fix libxslt build
We need to build libxml2 without LZMA.
We need to make sure that libxslt finds the libxml2 includes.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-04 11:09:17 -07:00
Dirk Hohndel
6c5c2bfb18 iOS: clean up build shell script
Address shell linter comments. Follow our usual naming for build dirs.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-04 11:09:17 -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
Berthold Stoeger
8c63d4e2bd build: use -Wno-inconsistent-missing-override in Subsurface-mobile.pro
The inconsistent-missing-override warning is annoying as it prevents
us from adding "override" modifiers: It will warn if we do this only
for selected functions. Sadly, this is the default on clang. Therefore,
we disable this warning for quite some time in CMakeLists.txt. For
consistency also do this in the Subsurface-mobile.pro file.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-04-01 12:26:59 -07:00
Dirk Hohndel
7719373f1a Android: remove legacy FTDI support
This works on almost no devices anymore and has been replaced by the USB
serial support for Android.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-16 07:58:20 -07:00
Berthold Stoeger
3c2a192864 mobile: remove no longer used DiveListModel
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-03-10 09:25:57 -07:00
Berthold Stoeger
c0095f690f mobile/undo: compile undo commands and call undo command for deletion.
First steps towards full undo on mobile.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-09 12:41:11 -07:00
Berthold Stoeger
7d6949ce7d mobile/undo: compile WSInfoModel
The weight-undo commands need this. Therefore, we have to compile the
WSInfoModel if we want to access the undo commands from mobile.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-09 12:41:11 -07:00
Berthold Stoeger
35b33b8c6a mobile/divelist: add first version of new MobileListModel proxy model
Create a model which represents all top-level items and, potentially, one
expanded trip as a flat list.

Pass down roles to the source model and let the source model handle that. We'll
have to do some ifdef-ery, but so be it.

Additionally, compile the base model on mobile as well.
This contains a couple of hacks to make things compile at all.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-09 12:41:11 -07:00
Berthold Stoeger
5bbc0fdb58 filter: compile fulltext index on mobile
The code is not used yet.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-03-01 10:21:44 -08:00
Dirk Hohndel
8763dad56e build-system/iOS: create correct bundle ID
If you are building your own flavor you'll need to change that, of course.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-16 15:56:57 -08:00
Dirk Hohndel
639be7149f GitHub Actions/iOS: shift to using a pre-packaged Qt installation
Since the official Qt binaries can no longer be installed without disclosing
credentials (well, sure, that could be done through secrets), I decided that
we should go back to packaging just the part of the iOS Qt SDK that we need.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-13 13:34:01 -08:00
Dirk Hohndel
67933e68dd build-system/iOS: don't build libdivecomputer inside the source tree
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-09 16:48:55 -08:00
Dirk Hohndel
6fed3d6517 buils-system/iOS: change confusing variable name
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-09 16:48:55 -08:00
Berthold Stoeger
641ca47fd5 mobile/summary: remove backend-share/divesummary.[h|cpp]
These were replaced by a model.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-08 10:29:36 -08:00
Berthold Stoeger
1a85b0e941 mobile/summary: create DiveSummaryModel
Instead of passing the dive summary via a completely unstructured
QStringList to QML, implement a dynamic model. For potential reuse
on desktop (though somewhat unlikely) the model has two interfaces,
one for QtWidgets and one for QML. The former is based on columns,
whereas the later is based on roles. The number of columns is
set dynamically. The roles currently support access to two columns.
If more columns should be accessed from QML, more roles have to
be added manually.

This commit only creates the model and hooks it into QMLs global
context, but does not yet change the QML page.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-08 10:29:36 -08:00
Berthold Stoeger
9ed886e4be Cleanup: lower-case filenames in core/subsurface-qt/
We tend to use lower-case filenames. Let's do it for these files
as well. Simple search & replace.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-04 02:16:46 +01:00
jan Iversen
6cd46bee06 divesummary: add DiveSummary class to shared and backend
Create DiveSummary class in backend-shared and make the DiveSummary calculation
results available to QML.

This adds a loop over all dives (could have been done with a model, but the
models available to mobile are very limited, so use the basic way).

[Dirk Hohndel: renamed the results variable and combined a couple of commits]

Signed-off-by: jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-27 14:25:03 -08:00
jan Iversen
9de296f3dd mobile-widgets: add themeInterface
Currently subsurfaceTheme resides in main.qml, where it does not naturally
belong.

Add C++ class that will replace subsurfaceTheme in main.qml in a 1-1 manner.

This opens future posibilities
- on top of the 3 themes, allow users to select colors/fonts
- add stylesheets to Template* components
- make day/night shift automatically.

Signed-off-by: jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-26 16:42:35 -08:00
jan Iversen
fdc2fd35bf mobile-widgets: add pure interface for passing values to QML
Add a header file that contains a duplicate of the enums,
that are needed in QML in one class.
the unit enums are added imidiatly, since they are needed
or will be neede shortly in Settings and DivePlannerSettings

This class will also contain Q_PROPERTY and signal/slot for
variables used in QML. This is done to allow e.g.

deco_mode qPrefUnits::planner_deco_mode()
void qPrefUnits::set_planner_deco_mode(deco_mode)
as strongly typed in C++
and
DECO_MODE planner_deco_mode()
void set_planner_deco_mode(DECO_MODE)
as strongly typed in QML
Remark: wrong assignments gives errors in QML

The advantage over using strings or the value directly is that
QML detects typos and flags them as errors/warnings.

It is important to note that the class may only contain
a) a function call to the implementation
b) a reference to a global variable e.g. prefs.

Added note to the original definitions of the enums that they
have been duplicated.

Signed-off-by: jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-18 17:31:58 -08:00
jan Iversen
360add37a8 mobile-widgets: remove qmlprefs.*
class is not longer used, remove it.
(also from qml)

Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29 12:20:19 -08:00
jan Iversen
d90a2ca008 build-system: add missing models for iOS build
Append missing models to Qt creator project

Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-26 08:38:08 -08:00
willemferguson
6212bb6721 Preferences UI: final cleanup
This commit does some final cleaning up to the code, mostly deleting
white space and comments.

Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-25 02:57:42 +09:00
jan Iversen
f39dea144c build-system: add backend_shared to Xcode project
Update Xcode project with new root folder reference

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-24 08:44:23 +09:00
jan Iversen
7751ec1c78 build-system: move plannerShared to backend-shared
WARNING: multi directory commit, needed to secure it builds.

move the core/plannerShared.* to backend-shared.

update CMakeLists.txt to include backend-shared lib in link process.

update ios project to reflect new directory

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-24 08:44:23 +09:00
jan Iversen
9c52aaf043 build-system: move exportfuncs to backend-shared
WARNING: multi directory commit, needed to secure it builds.

move the core/exportfuncs.* to backend-shared.

update backend-shared/CMakeLists.txt to generate backend-shared lib

update CMakeLists.txt to include backend-shared lib in link process.

update ios project to reflect new directory

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-24 08:44:23 +09:00
jan Iversen
3930cc42a5 build-system: add diveplanner to iOS build
Update iOS project solution file

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-24 06:30:57 +09:00
jan Iversen
967f0e56d7 build system: add forgotten directory to xCode project
Add tests to xCode project.

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-24 03:53:04 +09:00
jan Iversen
0ab5810a87 build-system: iOS, activate qml compiler
Activate use of qml compiler, which provides:
- more error detection at compile time
- fast qml
- smaller footprint

Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-24 03:52:40 +09:00
jan Iversen
7eddaeea21 build-system: iOS, change location of 3rd party builds
move location of 3rd build to follow same pattern as desktop/mobile build

update central .gitignore to silence libdivecomputer/build-ios, this should
really be in libdivecomputer, but it is more easy to put it in a subsurface
controlled file.

Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-18 13:29:25 +09:00
jan Iversen
fa8c7ecc58 build-system: iOS, change location of install-root
move from build-ios/install-root/<arch> to
SSRF_CLONE/install-root/ios/<arch>

move fat libraries, include and bin to SSRF_CLONE/install-root/ios

Call "make" and not "make qmake_all" which is just a FORCE dependency.

Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-18 13:29:25 +09:00
jan Iversen
543e65e987 build-system: iOS, use ~/Qt
packaging/ios/build.sh expected a link ./Qt to the Qt installation.
scripts/build.sh expect ~/Qt to contain the Qt installation

change to ~/Qt and thus no longer need link

Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-18 13:29:25 +09:00
jan Iversen
a637415de1 build-system: add uploadDiveLogsDE to iOS build
Update iOS project solution file

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11 12:36:43 -05:00
jan Iversen
2949ea0fd9 build-system: add uploadDiveShare to iOS build
Update iOS project solution file

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11 11:08:51 -05:00
jan Iversen
9ea46f196a mac: correct Xcode project schemes
Update schemes to only allow run.

Now it is possible to build/run/debug mobileExecutable as
well as desktop from within Xcode.

Xcode demands that the path to the debug executable it not relative,
this of course gives a portability problem.

The path selected are
~/develop/src/subsurface/build....
to at least give it a shine of not being fixed.

Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-10 16:49:27 -08:00
Berthold Stoeger
4b1a3a1a6e Selection: move selection functions from divelist.c to selection.c
Since we now have a selection.c translation unit, put the selection-
related functions there.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-12-04 13:00:23 +01:00
jan Iversen
06973d7ea0 packaging/ios: add new export files in core to project
Update Subsurface-mobile.pro to contain the new exportfuncs
and referenced files.

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-03 21:30:39 -08:00
jan Iversen
e8a6042951 mac: create Xcode project for mobile (on a desktop)
Create Xcode project, allowing easy editing of all sources.
the project uses "make mobile" and "make desktop" to generate the project,
so all CMake changes are automatically updated

the project uses folder references, so adding/removing a source is
automatically updated

The project expect build-mobile and build to be existing as well
as external libraries, so after cloning do a normal build before
using the project.

Signed-off-by: Jan Iversen <jani@apache.org>
2019-11-26 21:54:05 -08:00
Dirk Hohndel
03344b0d9e Android: update README to mention build container
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-20 18:58:43 -08:00
Dirk Hohndel
919a098513 macOS: with Qt 5.13 we need QtDBus again
So don't remove it from the build before signing.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-20 10:47:18 -08:00
Dirk Hohndel
3e5a81edeb macOS: update make package script for Grantlee 5.1
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-20 10:46:35 -08:00
Dirk Hohndel
6eca1b3ead iOS: fix handling of version option to build.sh
This makes it much more consistent and avoids a silly warning.

Also some small README updates.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08 20:50:05 +01:00
Dirk Hohndel
db706193e1 iOS: update Info.plist with better text and missing description key
The NOTICE and copyright are freeform. The new description key is required for
iOS 13, but of course the redundant old key is still required for older
builds...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08 20:50:05 +01:00
Dirk Hohndel
3afcff56d4 iOS: build the debug version of Google maps library if needed
When trying to debug on device Xcode really wants a debug build (which is
nearly unusably slow, but that's a different issue).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08 20:50:05 +01:00
Dirk Hohndel
a0c47e0fbc iOS: explicitly disable open source SSL implementations
Those aren't allowed on iOS and adding these two flags removes some confusing
warnings that look like errors in the build log.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08 20:50:05 +01:00
Dirk Hohndel
3265efcd96 iOS: small change to storeIcon
This was updated by Xcode - just checking it in so that running Xcode doesn't
cause dirty source tree.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08 20:50:05 +01:00
Dirk Hohndel
39203a7ebd GitHub Action: add iOS build
This is incredibly brute force, downloading a 3+GB installer and
installing all of the Qt/iOS binaries.

This first attempt is mainly to get an idea how long this will take and
if this will fit within the size constraints of the build VM.  This
commit doesn't even try to build, yet.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-10-19 08:55:31 -04: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
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
00550d9284 Android: work around Android 5.x issues with OpenSSL
The Qt documentation has specific suggestions how to build our own
version of OpenSSL in order to work on Android 5.x:
https://doc.qt.io/qt-5/android-openssl-support.html

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
Anton Lundin
a30e6b306f android-build: Add some more libzip hacks
This hacks the libzip build to not try to find zlib, because it fails
doing so on modern NDK. We just tell it that its there, and be done with
it.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2019-10-04 09:16:30 -07:00
Anton Lundin
43cd80dfc1 android-build: Add support for x86_64
This adds support for building x86_64 apks.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2019-10-04 09:16:30 -07:00
Anton Lundin
dbdfb9b517 android-build: Load variables file relative source dir
Not everybody have their build dir in the same place, but we can always
find the files relative each other.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2019-10-04 09:16:30 -07:00
Dirk Hohndel
7fa25de58a Android: allow passing through -quick argument
So even setups relying on the wrapper script can do faster rebuilds.
This also cleans up a bug that made passing through the release
parameter fail in the past, and removes overly verbose debugging output.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-10-02 08:04:49 -07:00
Dirk Hohndel
9a35519a2a Android: bundle default font for use in OnePlus devices
This is working around a Qt Bug https://bugreports.qt.io/browse/QTBUG-69494
which prevents correct rendering of the OnePlus fonts.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-09-21 15:13:10 -07:00
Dirk Hohndel
318ddc7227 Android: ensure higher build number for arm64 APK
Google Play allows uploading two APKs, but only if the arm64 one
has a higher build number.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-07-19 21:46:07 -07:00
Dirk Hohndel
658ac2bb78 Android: small change to keep exports together
Simply move that export to the top of the file with the others.

Suggested-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-07-18 06:39:00 -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
9a70c260e8 Android: rework build of OpenSSL to get it to build link and run
This is squashed commit consisting of a number of subjects, all intended
to get our app to build, link and run on device, but as the steps are
small (but non-trivial), I document them in this one commit.

1) Do not use OpenSSLs install targets, but simply copy the wanted build
artifacts manually. The main reason for this, is that the install
targets want to install a lot more than we build, so it also builds
parts of the OpenSSL suite that we will never use.

2) As Android does not like shared libraries with embedded versioning
(and the used androiddeployqt actively prevents adding versioned
libraries to the build), strip all this data from the generated shared
libraries. This trick was already there, but its adapted to all possible
conflicts.

3) The OpenSSL config script seems rather broken, resulted in failed
builds, and calling the underlying Configure is simpler.

4) Finally, parts of the OpenSSL code uses stdio things like stdout,
stderr, etc. These showed up as undeclared external on build time. Well,
luckily, there was an easy way out using 2 -D(efines). This feels hacky,
but does the job (and we are not interested in the output of OpenSSL in
our app).

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
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
Berthold Stoeger
619d3fb1fd Cleanup: move gas-functions to own translation unit
But only functions that operate only on gases. Functions concerning
cylinders or dives remain in dive.c or are moved to equipment.c

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-06-19 13:11:10 -07:00
Berthold Stoeger
bff80cf462 Cleanup: move unit-related functions to own translation unit
Create a units.c translation unit.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-06-19 13:11:10 -07:00
Berthold Stoeger
7f4d9db962 Cleanup: move trip-related functions into own translation unit
These functions were spread out over dive.c and divelist.c.
Move them into their own file to make all this a bit less monolithic.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-06-19 13:11:10 -07:00
Berthold Stoeger
6200909ba4 Cleanup: move tag functions into own translation unit
Make dive.h a bit slimmer. It's only a drop in the bucket - but at
least when modifying tag functions not the *whole* application is
rebuilt anymore.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-06-19 13:11:10 -07:00
Berthold Stoeger
75767c456a Turn application state into enum
The application state was encoded in a QByteArray. Thus, there was
no compile-time checking. Typos would lead to silent failures.

Turn the application state into an enum. Use the enum-class construct,
so that the values don't polute the global namespace. Moreover,
this makes them strongly typed, i.e. they don't auto-convert to
integers.

A disadvantage is that the enums now have to be cast to int
explicitly when used to index an array.

Replace two hash-maps in MainWindow to arrays of fixed sizes.

Move the application-state details into their own files.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-05-12 12:33:55 -07:00
Berthold Stoeger
926b6895bb Build: add DiveListNotifier.cpp to qmake project file
In the future, we will need DiveListNotifier.cpp in mobile builds.
Therefore, add it to the qmake project file for iOS.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-04-12 18:19:07 +03:00
Dirk Hohndel
4c26bd5522 build-system: macOS: more hacking around paths
This really is mostly for my scripting and how I build the official packages.
But there isn't much harm having it in the repo. And it makes my life easier.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-04-12 09:30:06 +02:00
Rolf Eike Beer
d104506f98 CMake: use builtin method to not use BZip2
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-21 19:30:14 -07:00