summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-12-30Describy configuring copy-paste on mobileGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-12-30Travis: use 5.12.03 Docker image for AndroidGravatar Dirk Hohndel
With this we have working arm and arm64 images (except that the arm64 image crashes when using Bluetooth). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-12-30Android Dockerfile: add latest cmake 3.13.2Gravatar Dirk Hohndel
cmake 3.10 (which comes with Ubuntu 18.04) in combination with Qt 5.12 and the current qt-android-cmake causes an odd bug. Paths are set with a double slash at the start '//' and later in the process this causes garbled path names for some of the objects which in return causes the APKs built in the container to fail. Upgrading the cmake inside the container to 3.13.2 fixes that problem. All the credit for identifying the problem and figuring out a solution goes to Jan Mulder. The resulting container was pushed to Docker hub as version to 5.12.03. Reported-by: Jan Mulder <jlmulder@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-12-30Android Docker: give the docker build its own output treeGravatar Jan Mulder
Again, this is relevant for developers that do local docker android builds, and normal android builds. A normal build uses the directory subsurface-mobile-build-arm(64), and when doing a docker android build this directory is shared between host and container. That sharing is good, as it nicely exposes the build tree to the host (for easy compare, inspection, etc.). But reusing the same tree as the local one is inconvenient (and possibly dangerous due to all kinds of caching issues). So, give the docker build its own output tree for the shared subsurface-mobile-build-arm(64) build output. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-12-30Android Docker: give the android builder its own nameGravatar Jan Mulder
Users that use docker locally for Windows style build and Android style builds will (probably) not like that we use the same name for both docker containers. So, give the android builder its own name. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-12-30Android build: always reconfigure libdivecomputerGravatar Jan Mulder
This fix makes no difference from usage of this script in Travis context, as every build starts from a clean VM, but the very few developers that build for Android locally, and that want to use the new style docker container builds as well, things are broken. libdivecomputer has build artifacts in its source tree (and that source tree is shared between local and docker run). So it happens that libdivecomputer is configured locally, and afterwards fails to build in docker build as its already configured, but not for the docker image its now running in. The fix is simple. Always reconfigure libdivecomputer when using this script. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-12-30Android: build both 32 and 64 bit binariesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-12-30Travis: find the Android apk in the right spotGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-12-30Travis: Android build wrapper now runs inside our containerGravatar Dirk Hohndel
So we don't need the pre-built binaries anymore, and we don't need the travis_wait hack anymore for potentially slow downloads as that is all installed in the container already. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-12-30Android Dockerfile: ugly hack to deal with current NDK compile problemsGravatar Dirk Hohndel
As explained in commit 449d4ee33d ("Android build: add explanation for huge hack"). It seems reasonable to add this to our Travis image as that is custom made just to build our Android binaries. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-12-30Android Dockerfile: add comments and try to shrink the image moreGravatar Dirk Hohndel
This image is downloaded on every Travis run. Making it smaller is important. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-12-30Travis: build against the Qt 5.12 Android imageGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-12-30Android: update for Qt 5.12.0Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-12-30Android build: add explanation for huge hackGravatar Jan Mulder
This had to be embedded in the build process (or better, solved for real). Using Cmake, Clang, NDK 18b, Qt 5.12 beta 4, some Subsurface code does not compile. At this point in time, its fully unclear to me why we see the error as it is. Thing fail deep down in Qt and NDK headers on #include <cmath>. Error like "::signbit is not in the global namespace". The most logic reason is an improper order in which include paths are constructed in the build process. Any attempt to find the real reason failed. Even very similar command lines from a qmake build that succeed fail with a cmake style build. The very very dirty hack is commenting out some lines in NDK 18b: "./android-ndk-r18b/sources/cxx-stl/llvm-libc++/include/cmath Comment lines 313-325, and all build, links and runs with no errors related to this known at this point. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-12-30Android build: always use -fPICGravatar Jan Mulder
make sure that all lib code is compiled with -fPIC as things will not link due to error "requires unsupported dynamic reloc R_ARM_REL32" (for arm build). Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-12-30Android build: build openssl before libzipGravatar Jan Mulder
On very clean builds not using the wrapper script, the compile of libzip simply fails because it depend on openssl include files. Simply swap them around. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-12-30Android build: fix openssl build, no_asmGravatar Jan Mulder
Mysteriously, openssl does not compile with clang with a sha256-armv4.S:2638:2: error: invalid instruction, did you mean: adr? The easiest way out is compiling without no_asm. This obviously lowers the bandwidth on the SSL link (as the asm code is there for performance reasons), but it has no visible performance loss in my tests. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-12-30Android build: add arm64 target and compile with clangGravatar Jan Mulder
With a preparation done in the 4 commits before, now add the arm64 and use clang instead of gcc as compiler infrastructure. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-12-30Android build: openssl, do not move source treeGravatar Jan Mulder
Very annoyingly, openssl is re-build and downloaded numerous times when doing partial builds. Reason for this, is that the original checked out git repo is moved away, and build in source (as openssl does ...). So, this simple change leaves the checked out repo in place, and copies the tree to build in. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-12-30Android build: always install libzip.a in lib directoryGravatar Jan Mulder
A subtle one. When compiling for arm64, libzip is the only package we use in mobile that installs its product in lib64. There is no reason for this given the way our build process is. So, simply force the library to reside in lib, independent if we are building arm or arm64 architectures. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-12-30Android build: do not hard code armv7Gravatar Jan Mulder
Simple cleanup. Do not hard code armv7 as we have QT_ARCH. This allows, in the future, for arm64 builds as well. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-12-30Android build: set newer versions and parameterize ANDROID_PLATFORMGravatar Jan Mulder
Hard coding desired ANDROID_PLATFORM on multiple places is simply bad. Fix this. Further, set the variables to a much newer state. CAVEAT: this will likely break android build, so be careful on bisecting. All fixed in next, related commits. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-12-30Travis: use Android docker image for buildGravatar Dirk Hohndel
This should make it easier to make changes to our build environment. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-12-30Android: cleanup build wrapper scriptGravatar Dirk Hohndel
This way it can be run both to create the docker container or independently for a full build. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-12-30Android: create docker containerGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-12-30Android: add Dockerfile for build environmentGravatar Dirk Hohndel
We'll use that on Travis, but anyone can use that on their system. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-12-30Android: allow running android-build-wrapper without buildingGravatar Dirk Hohndel
This way we can use it to fetch dependencies we need up front. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-12-29Mobile: fix editing dive siteGravatar Berthold Stoeger
Commit 68961a169efc37039cd3fda334efb9ad9927444f made it impossible to edit a dive site on mobile if a dive-site was already set: If divesite was non-null, no actions were taken. Remove the conditional. Reported-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-12-29CHANGELOG.md: update with the recent windows.c changeGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-12-29windows.c: fix wrong usage of wcslen() for utf8 conversationGravatar Lubomir I. Ivanov
wcslen() returns the number of characters in a wchar_t string. In the case of WideCharToMultiByte() an estimate for the size of the utf8 buffer is needed. Using wcslen() is incorrect for such a buffer, because for any non-ASCII character the estimate will be off by 1 byte. Call the following instead to obtain the proper UTF8 buffer size for the conversation: WideCharToMultiByte(CP_UTF8, 0, utf16, -1, NULL, 0, NULL, NULL); Also fix some missing "\n" in fprintf() calls. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-12-27Cleanup: remove getDiveId() functionsGravatar Berthold Stoeger
These functions in DiveListSortModel and DiveListModel had no users. Remove them. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-12-27Core: fix BT on Linux, workaround Qt bug on 5.12.0Gravatar Jan Mulder
After upgrading to Qt 5.12.0, download over BT from a DC did not work any more. On the console the message "Connecting to port is not supported (Uuid required)". Linus noticed earlier that we do rather strange processing in this part of the code related to selecting port 1 or port 5. This all seems not needed (any more), but broader testing is advised. This being stripped from the code, the mentioned error from Qt persisted. That is strange in itself, as we did not reference port numbers any more. Step 2 in this commit is actually using an uuid to the call to connectToService. Choosing an uuid seems relatively straightforward as we can use the same one we already use for Android. That is the default BT RFCOMM Serial Port Profile uuid. Interestingly, when changing to this uuid we run immediately in a Qt runtime error telling us "QDBusPendingReply: type ManagedObjectList is not registered with QtDBus.". For these 2 unexpected Qt messages, QTBUG-72742 was made. Studying the Qt source code at this point reveals a possible workaround. Simply create a local QBluetoothLocalDevice object, which, behind the scenes registers the Qt internal ManagedObjectList with QtDBus. In the meantime, Qt agrees that QTBUG-72742 is valid, and that a fix is to be expected in a future version. At that point in time, the declaration of the QBluetoothLocalDevice can be deleted again. In the end, interfacing over BT works again. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-12-23CHANGELOGGravatar Jan Mulder
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-12-23Bluetooth: all states other than HostPoweredOff qualify as validGravatar Jan Mulder
This is an attempt to fix issue #1896. While this seems a Qt issue in combination with very specific Android devices, this might be a fix. Do not check for a very specific state of the local BT controller, but just check if it is powered on. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-12-23Cleanup: remove unused parameter was_autogenGravatar Berthold Stoeger
In commit 6bf4120dbbf7be1b9267e0e86f3948b77870ea71 the trip-flags were replaced by a simple boolean. This made the was_autogen parameter to the remove_dive_from_trip() and unregister_dive_from_trip() functions unused. Remove these parameters. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-12-23Add/clarify email requirement to contribution documentation.Gravatar John Plaxco
Make it easier for new contributors to get going by making the Signed-off-by line more clearly explained. Signed-off-by: John Plaxco <john@johnplaxco.com>
2018-12-23Fix error message capitalization for web services.Gravatar John Plaxco
Capitalize the first letter of error message sentences in this file to be consistent with other error messages in this file and across the project. [Dirk Hohndel: edit to remove the changes to the .ts files] Signed-off-by: John Plaxco <john@johnplaxco.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-12-22Travis: use homebrew addon instead of doing it manuallyGravatar Dirk Hohndel
This should make our mac builds on Travis faster. This also switches to the latest xcode / VM image which helps speed things up (less to update for Homebrew). It turned out that that app directories that we were creating here didn't run for people, anyway, so why even bother with an old image. We still create / upload that image (simply in order to be able to peek into it in case something goes wrong). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-12-23Merge branch 'willemferguson-mobilemanual3'Gravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-12-23Improve error reporting when exporting a selection of 0 dives.Gravatar John Plaxco
If no dives are selected when trying to export a selection, a message is shown that no dives were selected, but it's immediately hidden behind a message saying that a temporary file could not be created. In fact, the creation of the temporary file wasn't never attempted, so the message that the user actually sees is misleading. The solution chosen here is to duplicate the check that at least some dives are selected, and abort early if that case is detected, rather than continuing on to show the additional misleading message. Not elegant, but it gets the job done. Better solutions to this include refactoring prepare_dives_for_divelogs to return something more descriptive than a bool, remove that check from prepare_dives_for_divelogs entirely since it doesn't seem to be a good fit there, or switch to exceptions for handling these problems rather than return values. I don't have sufficient familiarity with the codebase to attempt these more invasive changes, but they should be considered in the future. On a final note, some of the other error messages in this file start with a capital letter, but the one relevant to this particular PR does not. Again, I'm not familiar enough with the codebase (or translations) to know if that's safe to change, so I'll leave that for another time or another developer. Reported-by: John Plaxco Signed-off-by: John Plaxco <john@johnplaxco.com>
2018-12-22Subsurface-mobile user manual V2.1.5Gravatar willemferguson
Updates to the user manual for Subsurface-mobile. Many new figures have been brought in. The text has been overhauled to include latest features and some features that do not exist any more have been removed. Text has been added, explaining the copy-and-paste operation (Thanks, Miika). Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
2018-12-21Mobile: deal with BT name and address when tapping DownloadGravatar Dirk Hohndel
Instead of trying to update this whenever the connection text changes, instead deal with it right before it actually gets used. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-12-21Mobile: add helper function to fill in the BT nameGravatar Dirk Hohndel
For some devices the BT device name is different from the product name. Make sure that name is available to the mobile UI. This helper fills it in from the scan data (based on the device address). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-12-21core: recognize Oceanic Pro Plus X over BLEGravatar Dirk Hohndel
Just like with the Aqualung i770R in 7697003498 this name follows the pattern of a model number in ASCII encoding, followed by the serial number of the device. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-12-21Mobile: force update of ui on pasteGravatar Miika Turkia
Apparently this does the trick of updating the dive list when pasting data on mobile. Tnx janmulder. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-12-21Mobile: initialize copy variablesGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-12-21Add UI info to mobile documentationGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-12-21Mobile: copy the dive data when configuring settingsGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-12-21Mobile: UI for selecting what to copy-pasteGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-12-21CHANGELOGGravatar Jan Mulder
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>