aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
AgeCommit message (Collapse)Author
2015-10-30Single CMake to handle the modelsGravatar Tomaz Canabrava
This one was pretty easy because of the work I did a few months ago to separate the models from the UI. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30main.cpp -> {android-main, desktop-main}Gravatar Tomaz Canabrava
This is needed to compile both in a single call to make. Also it will help removing some of the mistakes in the current android version: it always created the mainwindow, even without using it for anything, so tons of memory will be freed now for the android version, making it snappier and smoother. This is a necessary move so we don't need to #ifdef all over the place for the two different versions, and imo the changes needed to keep both versions will not be that huge if we keep things in subsurface-core sane. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Move qt-ui to desktop-widgetsGravatar Tomaz Canabrava
Since we have now destkop and mobile versions, 'qt-ui' was a very poor name choice for a folder that contains only destkop-enabled widgets. Also, move the graphicsview-common.h/cpp to subsurface-core because it doesn't depend on qgraphicsview, it merely implements all the colors that we use throughout Subsurface, and we will use colors on both desktop and mobile versions Same thing applies for metrics.h/cpp Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Move the icons to the icons folderGravatar Tomaz Canabrava
There was no reason at all to keep those icons on the root folder. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Modify code to make it compile after rebaseGravatar Tomaz Canabrava
Did a git rebase and some stuff changed in the meantime; This is a compatibility commit: Add a few include directories on the cmake to quiet some ui_headers.h not being found (the ones that are created automatically by uic) and a few noiseances like models requiring interface functionality. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Move all core-functionality to subsurface-coreGravatar Tomaz Canabrava
And adapt a new CMakeLists.txt file for it. On the way I've also found out that we where double-compilling a few files. I've also set the subsurface-core as a include_path but that was just to reduce the noise on this commit, since I plan to remove it from the include path to make it obligatory to specify something like include "subsurface-core/dive.h" for the header files. Since the app is growing quite a bit we ended up having a few different files with almost same name that did similar things, I want to kill that (for instance Dive.h, dive.h, PrintDive.h and such). Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Start to clean CMakeGravatar Tomaz Canabrava
CMake can be a good system but if we keep everything into one big cmake file things can go nuts really quick. Since I already took quite a start on an subsurface layer separation some time ago, I'm improving it by making each module on Subsurface depend on it's own CMake module. This first patch moves the qt-ui part to qt-ui/CMakeLists.txt file, it cleans tons of the main cmake file ( moving all parts to the in ternal folder ), and makes things more easily manageable by the programmer that will change the ui bits, he doesn't need to play hide and seek with the CMakeLists.txt file anymore, trying to figure out where should he put his newly generated file. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-29Add subsurface.debug script to help debugging and install it (for Linux only)Gravatar Guillaume GARDET
This patch adds subsurface.debug script and install it for Linux. Instead of running subsurface, you can run subsurface.debug which will launch subsurface as usual, but will monitor subsurface exit and run gdb automatically if subsurface crashes and it creates a crashlog in $HOME/. Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-26Cmake: fix incorrect modification of a QT_LIBRARIESGravatar Dirk Hohndel
It's a list, not a string. Treating it as a string creates all kinds of exciting weird errors that make no sense. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-26Fix building without BT supportGravatar Dirk Hohndel
I guess no one had tried this in a while. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-18Use hidapi on MacGravatar Dirk Hohndel
This allows us to support the Suunto EON Steel on Mac, assuming the matching libdivecomputer version from the Subsurface-branch. If that was compiled with the hdiapi lib then hopefully the build for Subsurface should find that library as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-08Move the algorithm to divesite.cpp fileGravatar Tomaz Canabrava
This shouldn't be on the maintab.cpp, this file is already too convoluted. [Dirk Hohndel: slightly refactored this commit and the next one to make the code actually work and make the split across the two commits more reasonable] Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06Cmake: ensure marbledata is actually copied into the build directoryGravatar Dirk Hohndel
This can be done regarless of whether Marble is enabled or not. No harm done. Fixes #937 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-05Add test for import, merge and renumberingGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-04Make TestGitStorage run lastGravatar Dirk Hohndel
This can take a long time on slow connections so it makes sense to run all the other tests first. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-28Cmake: make libssh2 library path explicitGravatar Dirk Hohndel
Under certain conditions on my Mac the build process will happily find libssh2 but then at link time can't figure out where it is. Making the path to the library explicit seems to fix that issue. This commit also adds the code to dump all visible variables at the end of the cmake file (commented out). I have looked this up online, added it to address an issue, and then removed it quite a few times... I figure I might as well keep it there for the next time I need it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-22Cmake: add LIBMARBLE_FROM_PKGCONFIG and some Marble related fixesGravatar Lubomir I. Ivanov
This patch adds the option to retrive Marble with pkg-config in a similar way to Grantlee, libgit2, etc. It reorganizes the "if(NO_MARBLE)" case to be the "else()" of if(NOT NO_MARBLE). Also, it adds the "-r" option to "rm" here: add_custom_target(link_marble_data ALL COMMAND rm -rf ./marbledata ... as otherwise it fails on Win32/Msys with "marbledata is a directory". Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-06Cmake: make Grantlee5 requiredGravatar Dirk Hohndel
Otherwise printing doesn't work. And we get weird build errors. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-01Cmake: turn on printing by defaultGravatar Dirk Hohndel
As we get closer to the 4.5 release we should try to make sure we build with printing enabled everywhere and just turn it off if we no it's not supported. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31Add a new model: SsrfFilterProxyModelGravatar Tomaz Canabrava
Add a new Model, it's the QSortFilterProxyModel that accepts functions to filter / sort. so instead of creating a new class for each different sorting (overkill), now we can just create a function and pass to this class. I'll rework the filtering system of subsurface to use this - in the meantime I've created this to ease the creation of another filter: the dive sites by gps coordinates. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-30Add test for dive site duplication bugGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-27Cmake: install grantlee plugins on MacGravatar Dirk Hohndel
And add a small message that two potential ERRORS that are thrown in the deploy step are actually harmless. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25Add simple test for git storageGravatar Dirk Hohndel
This just makes sure that writing data to git storage and reading it back gives you the same result. Without the fixed generation of initial dive site UUIDs this fails. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-21Cmake: fix cross compiling on WindowsGravatar Dirk Hohndel
Cmake has a bug that causes the moc process not being handed the necessary defines for the architecture we are building for. Also we were missing a library to make the BT implementation on Windows work. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Connect up serial_ftdi custom serialGravatar Anton Lundin
This connects the serial_ftdi implementation to subsurface, and builds libftdi1 for the android builds. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Turn serial_ftdi.c into a custom_serialGravatar Anton Lundin
This cleans up serial_ftdi.c from being a libdivecomputer source and making it into a subsurface custom_serial. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-17Cmake: automatically create version for Mac bundleGravatar Dirk Hohndel
The version info that is used for the Mac bundle is created at cmake run time, not at make run time. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-16Cmake: only link against libusb-1.0 if it was foundGravatar Dirk Hohndel
This should work much better as libusb is really only required if you want support for all the dive computers (e.g., Atomics Aquatics Cobalt family). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-15Add DiveSitePicturesModelGravatar Tomaz Canabrava
This model should be used inside the Edit Dive Site mode. It should display all photos from all dives that are part of this dive site, ignoring trips. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20Only enable Bluetooth support if building against Qt5.4 or newerGravatar Dirk Hohndel
Also remove the quick hack from commit 947fda14c5d1 ("Bluetooth support: quick build fix for Qt5.2"). I should have thought this through before pushing that commit, but oh well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-18Remove now unneeded defineGravatar Anton Lundin
This removes the extra Q_OS_ANDROID define to prevent a redefined warning. Somehow, the qt headers didn't define Q_OS_ANDROID previously, but how does. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-17QML UI: Implement showing of the dive profile on QMLGravatar Grace Karanja
Link the QMLProfile class to the DiveList.qml file. The profile is displayed above the dive details. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-07-16Fix libssh libssl linker order for AndroidGravatar Anton Lundin
We need to link things in the correct order, even on android. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16Cmake: use correct variable to find make commandGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-14Cmake: don't hardcode the make commandGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-13Android build: statically link against libssl and libcryptoGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-10Cmake: use the mobile icon for Android apkGravatar Dirk Hohndel
The first attempt missed the second spot where this was set. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-09Add different icon for mobile appGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-09Teach android build about subsurface-mobileGravatar Anton Lundin
This teaches android build.sh and cmake about how to build the qml ui of subsurface-mobile as a apk. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-08Use qt-android-cmake to produce a android apkGravatar Anton Lundin
This introduces code to use qt-android-cmake to produce a working apk. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-08Make the libssh linking optionalGravatar Anton Lundin
Due to bugs in libgit2, we force linking with libssh2 to add git-over-ssh support. On android we currency don't want libssh2 due to its dependency chain, so this makes the libssh2 force linking opt-out. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-06Cmake: make Facebook support an actual optionGravatar Dirk Hohndel
This way we can selectively turn off Facebook support. And turning off both Facebook support and support for the user manual allows us to not rely on QWebKit which once again allows debugging Subsurface with valgrind on Arch Linux. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-06Implement the custom Bluetooth serial communication and use itGravatar Claudiu Olteanu
Create a custom Bluetooth serial communication using the QTBluetooth API and use it when the Bluetooth download mode is enabled. First try to connect on RFCOMM channel 1 because this is the default RFCOMM channel of SPP service for most devices. If this doesn't work try again on RFCOMM channel number 5 because it could be a Petrel2 device. Add a fake open function for the custom implementation. This is used when the selected device is HW OSTC 2N and the Bluetooth mode is activated, then fake the open call of the serial device. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-06Add a dialog for remote Bluetooth devices selectionGravatar Claudiu Olteanu
Implement a dialog which can be used for remote Bluetooth devices selection and to control the local Bluetooth device. Functionalities of the widget: - expose information about the local BT device - scan for remote BT devices - pair/unpair with a remote BT device - turn on/off the local BT device - logging - save the selected BT device The selection dialog is created when the bluetoothMode checkbox is enabled. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-05Cmake: only build print related files if NO_PRINTING isn't setGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-05Correctly include QtQuick when building for mobileGravatar Grace Karanja
The changed introduced in d880040d breaks mobile builds by not correctly linking with QtQuick. This change fixes that by fixing the incorrect line in CMakeLists.txt so that the correct QtQuick headers will be found. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-05Merge branch 'custom-print' of github.com:neolit123/subsurfaceGravatar Dirk Hohndel
2015-07-05Printing: add TemplateEdit form to source treeGravatar Gehad elrobey
The TemplateEdit class works to customize the tempalate before printing, User can select the font-size, font-type, color-palette, linespacing and editing the template HTML code. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-05Add simple test for the dive plannerGravatar Dirk Hohndel
This sets up a standard dive scenario (30 minutes at 260ft/79m, EAN36 and Oxygen as deco gases, last stop at 20ft/6m) and calls the planner to set up a dive plan given certain standard gases. Instead of trying to verify the complete plans it checks that we switch to the deco gases at the right depth and the complete duration of the dive matches our expectation. The test intentionally fails right now for imperial as we have the wrong switch depth for Oxygen. See how useful tests are? On the downside, the test does NOT produce the same plan as Subsurface when I try to create a consistent setup for both - and I have not been able to figure out why. There must be some other parameters that I'm not setting, but I haven't identified them, yet. It's very small differences, for example in the metric case the stops at 21m, 9m, and 6m are each one minute shorter in the test than it what Subsurface calculates. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-02Merge branch 'taxonomy'Gravatar Dirk Hohndel