summaryrefslogtreecommitdiffstats
path: root/packaging
AgeCommit message (Collapse)Author
2020-10-30build-system: Docker build for 64bit MXEGravatar Dirk Hohndel
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-30build-system: adapt the smtk2ssrf script for 64bit WindowsGravatar Dirk Hohndel
Quite analogous to the Subsurface Windows build script. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-30build-system: first steps towards a 64bit Windows buildGravatar Dirk Hohndel
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-30build-system: add libmtp for our Windows buildsGravatar Dirk Hohndel
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-25cleanup: move interpolate inline function to its own header fileGravatar Berthold Stoeger
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-25cleanup: split out divecomputer functions from dive.cGravatar Berthold Stoeger
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-25cleanup: break out event-related code into event.[c|h]Gravatar Berthold Stoeger
In an effort to reduce the size of dive.h and dive.c, break out the event related functions. Moreover event-names were handled by the profile-code, collect that also in the new source files. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-10-25undo: add device related undo commandsGravatar Berthold Stoeger
Add commands for deleting devices and editing device nicknames to include the device-handling in the undo system. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-10-24build-system: switch to using C++17 as default C++ dialectGravatar Berthold Stoeger
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-23core: add a small helper-struct that keeps track of xml-parametersGravatar Berthold Stoeger
The XML-parameter code is a mess. Ownership is unclear. Allocation and freeing of strings is in different functions. Sometimes only every second string is free()d, because keys are not copied. But this is done inconsistently. The caller has to know how many parameters the callee may add. Instead, let's add a small helper-struct that uses C++ memory management, but exports a C-API. The array for the XML-library is generated on the fly. This is only the implementation, the old code is not yet replaced. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-10-09packaging/windows: add the /styles folderGravatar Lubomir I. Ivanov
For Windows, the Subsurface installers do not include the file "qwindowsvistastyle.dll" required to make the applications that are published to have a native look. Modify the MXE *build.sh scripts to include the file as "plugins/styles/qwindowsvistastyle.dll". Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2020-10-08build-system: remove Grantlee from the packaging scriptsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-29filter: add filter preset undo commandsGravatar Berthold Stoeger
Add undo commands to add / edit / delete filter presets. These are styled after the other undo commands: On changes, the UI is informed by DiveListNotifier signals. Editing is a simple std::swap of values. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-09-29filter: add (very primitive) filterpresetmodelGravatar Berthold Stoeger
Implement a trivial model to provide the filter preset names to the UI. Sadly, for now this features the QWidget/QML column / name dichotomy. However, in this simple case that shouldn't be too much of an issue. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-09-29filter: add primitive filter presetsGravatar Berthold Stoeger
Add a rudimentary list of filter presets to the core. The list is sorted by name. Access is provided via a C interface so that the presets can be written to the git and XML logs. Internally, the list is realized by a C++ vector for convenience (euphemism for laziness). Morover, a C++ interface is provided for the UI. Currently names of the presets cannot be edited, since this would mean that the order of the list changes. This may be implemented later if required. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-09-29filter: add filter constraint modelGravatar Berthold Stoeger
Add a model that keeps track of a list of filter constraint and makes them accessible from Qt. Sadly, this is mostly repetitive boiler-plate code, but this is due to Qt's model/view-API, which is a perfect example of how *not* to design a reasonable modern API. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-09-29filter: add filter constraint object to the coreGravatar Berthold Stoeger
Adds a filter constraint object to the core, which represents one constraint the user can filter dives with. The plan is to write these constraints to the XML and git logs. Therefore, this code is written in C-style except when it comes to handling strings and dates, which is just too painful in plain C. There is one pointer to QStringList in the class, though when compiled with C, this is simply transformed into a pointer to void. Granted, that smells of an ugly hack. However it's more pragmatic than self-flaggelation with C string and list handling. A filter constraint is supposed to be a very general thing, which can filter for strings, multiple-choice lists, numerical ranges and date ranges. Range constraints have a range mode: less-or-equal, greater-or-equal or in-range. Text constraints have a string mode: startswith, substring or exact. All the data are accessed via setter and getter functions for at least basic levels of isolation, despite being written with a C-interface in mind. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-09-28build-system: update OBS spec fileGravatar Dirk Hohndel
Just trying to keep things in sync with what we actually use in the automated builds. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-28build-system: document how to create a Windows installerGravatar Dirk Hohndel
These are the instructions that I use at this point. Removed a long obsolete script - it's been many, many years since that last was useful (it was still using qmake to try to build Subsurface) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-19build-system/packaging: add bluez dependency for Linux buildsGravatar Dirk Hohndel
I hope this captures all the variations Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-13build-system/macOS: change signing to re-enable notarizationGravatar Dirk Hohndel
This continues to be useless for other people as it requires my signing key, but when signed like this I can then successfully submit the dmg for notarization, so I'll update the signing script in order not to lose that magic... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-13build-system/macOS: use consistent code to pick SDKGravatar Dirk Hohndel
Hardcoding versions was kinda silly. This now matches what's in build.sh. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-13cleanup: fold core/divecomputer.cpp into core/device.cGravatar Berthold Stoeger
core/device.h was declaring a number of functions that were related to divecomputers (dcs): creating a fake dc for manually entered dives and registering / accessing dc nicknames. On could argue whether these should be lumped together, but it is what it is. However, part of that was implemented in C++/Qt code in a separate core/divecomputer.cpp file. Some function therein where only accessible to C++ and declared in core/divecomputer.h. All in all, a big mess. Let's simply combine the files and conditionally compile the C++-only functions depending on the __cplusplus define. Yes, that means turning device.c into device.cpp. A brave soul might turn the C++/Qt code into C code if they whish later on. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-09-04Implement Seac SeacSync databaser parser.Gravatar James Wobser
Dives for the seac action computer are imported by the seacsync program into two tables in an sqlite3 database. The dive information is read from the headers_dive table. The dive_data table is then queried for each dive to get samples. The seac action computer is the only current supported computer by the seacsync program. It only supports two gas mixes, so the parser will toggle between two cylinders whenever it detects a change in the active O2 mix. Dive start time is stored in UTC with a timezone offset. A helper function to read this was added to qthelper. Default cases have been added to some switch statements to assist in future development for other dive types and salinity. Example database has been added to ./dives/TestDiveSeacSync.db Signed-off-by: James Wobser <james.wobser@gmail.com>
2020-09-03build-system: update Ubuntu distros that we build forGravatar Dirk Hohndel
Eoan no longer accepts builds, Groovy Gorilla will be the next one. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-06-25build-system/MXE: build with more up to date MXE tools.Gravatar Paul Buxton
- 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-05-27Android: install translations into the right placeGravatar Dirk Hohndel
When updating the NDK I forgot to adjust the install destination for the translations. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-05-09add Berthold to the list of explicitly mentioned developersGravatar Dirk Hohndel
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-06media: add small C++ helper describing a picture structGravatar Berthold Stoeger
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-06undo: implement undo of setting a picture time by drag&dropGravatar Berthold Stoeger
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-04-27build-system/Android: add missing install-qt.shGravatar Dirk Hohndel
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-26move GitHub url to the Subsurface orgGravatar Dirk Hohndel
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-25GitHub Actions: use the Qt 5.13.2 based Android build containerGravatar Dirk Hohndel
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-25build-system/android: remove libusb at QTestGravatar Dirk Hohndel
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-25build-system/Android: use PREFIX outside of NDKGravatar Dirk Hohndel
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-25build-system/Android: use install-qt.sh to install QtGravatar Dirk Hohndel
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-25build-system/Android: create standalone toolchain in wrapper scriptGravatar Dirk Hohndel
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-25build-system/Android: update some dependency versionsGravatar Dirk Hohndel
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-25build-system/Android: remove no longer supported Qt versionsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-19build-system: cleanup Ubuntu/Debian scriptGravatar Dirk Hohndel
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-19build-system: simplify and clean up OBS make-package scriptGravatar Dirk Hohndel
The previous version wasn't quite ready for prime time. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-19build-system: remove OBS support from Ubuntu/Debian scriptsGravatar Dirk Hohndel
This feels much cleaner. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-19build-system: create separate OBS make-packageGravatar Dirk Hohndel
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-18cleanup: fix image reference in Android READMEGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-18build-system: update Ubuntu/Debian package scriptGravatar Dirk Hohndel
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-18build-system: remove references to docs we no longer shipGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-18build-system: silence one more warning for Ubuntu/Debian buildsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-18build-system: get ready for switching to libgit2 1.0Gravatar Dirk Hohndel
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-18build-system: add missing dependencies for Ubuntu/Debian buildGravatar Dirk Hohndel
And acknowledge the current file format standard. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-18build-system: update copyright years in Ubuntu/Debian filesGravatar Dirk Hohndel
And remove an optional entry (which we would have to keep changing otherwise). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>