summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-04-10cmake: allow looking for optional librariesGravatar Dirk Hohndel
And use this to look for libusb. If it's there then libdivecomputer likely was linked against it. If it isn't then we don't need it, either. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09Update the INSTALL file to reflect the switch to cmakeGravatar Dirk Hohndel
The cross building instructions for Windows are still lacking. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09Update the mxe based sample scriptGravatar Dirk Hohndel
Working on making the different ways we build things more consistent Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09build.sh: use "install-root" for our local install destinationGravatar Dirk Hohndel
This seems less confusing then calling it just "install". Also adjust our cmake/Modules/Find... files accordingly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09Recmode: Fix ascent gas consumption.Gravatar Joakim Bygdell
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09Recmode: Allow the user to specify gas reserve.Gravatar Joakim Bygdell
Since most regulators have an intermediate pressure of 10bar the minimum value is 10 while the max is 99. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09Recmode: Take safety stop into account when calculating ascent gas consumption.Gravatar Joakim Bygdell
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09Move the translations to it's own subfolderGravatar Tomaz Canabrava
By adding a new CMakeLists.txt file and configuring the translations inside of it's folder, the buildsystem will compile everything on that folder. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09Use Qt5Translations to deal with translationsGravatar Tomaz Canabrava
And remove the old code that did the same thing in a very complex way. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09We use static library if we find - option was not being used.Gravatar Tomaz Canabrava
Currently we search for a static library and if we don't find it, we search for a shared library. If one of them is found, we return success but if none of them is found, error. So - A static library for libgit and libdivecomputer is preferred over the shared one. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-08Update build script to cross build Windows using mxeGravatar Dirk Hohndel
The MinGW based script is still there for reference, but that's no longer how I build the Windows binaries. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-08Update the packaging script to my latest versionGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-08When building from tar file, check .gitversion to get the correct versionGravatar Dirk Hohndel
Distribution builds on Linux tend to be made from tar files, not from git trees. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-08Update the build rules for .deb based buildsGravatar Dirk Hohndel
With this we also give up on building daily builds on Ubuntu 12.04 The cmake based infrastructure very much assumes Qt5 at this point. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-08Update OBS spec file to current versionGravatar Dirk Hohndel
The old one was a) outdated and b) didn't work with cmake so it was rather misleading to have here. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-08Remove the outdated and mislreading READMEGravatar Dirk Hohndel
It's been a LONG time since this was correct Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07cmake: fix typoGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07There's no need to search for a qmake anymoreGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07Small changes to the build-scriptGravatar Tomaz Canabrava
- libgits version bump to 0.22 (0.21.5 didn't worked here) - call cmake in build.sh instead of qmake. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07Make it compilant with the build scriptGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07Add FindLibdivecomputer.cmakeGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07Add a FindLIBGIT2 based on our FindMarble.Gravatar Tomaz Canabrava
It currently searches for the .a (preferred) or the .so in the following directories, in order: ${CMAKE_CURRENT_SOURCE_DIR}/../libgit2, /usr/local, and /usr. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07Simplify libgit handling on main CMakeLists.txtGravatar Tomaz Canabrava
We will use the OPTIONS variable to decide to find the .a or the .so, so there's no need to do checks here. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07Add build optionsGravatar Tomaz Canabrava
- add an option to toogle between libgit2 from package vs built from source - add two options that will be used in the future: use static/dynamic lib Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07No need to specify Marble dir anymoreGravatar Tomaz Canabrava
We are already looking for the default directory. *if* cmake doesn't find Marble automatically, the user needs to specify -DMARBLE_INCLUDE_DIR and -DMARBLE_LIBRARIES Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07Search for Marble in the default build folderGravatar Tomaz Canabrava
Now we search for Marble in the default build folder, too, which is CMAKE_CURRENT_SOURCE_DIR/.. Also look for both regular Marble and for our Subsurface branch of Marble (which uses a different library name). Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07Move the pkg_config_library macro to its own fileGravatar Tomaz Canabrava
The pkg_config_library macro is a helper macro and was generating noise on the main CMakeLists.txt file, so I moved it to another file. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07FindMarble moved to cmake/ModulesGravatar Tomaz Canabrava
This is the correct way to deal with CMake Modules (or at least, the default way). All our custom CMakeFiles will be here. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07Simplify finding QtGravatar Tomaz Canabrava
Qt5 Supports Components, which means that we can list the components we need to find, instead of specifying one for each line. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-06Remove the subsurface manpageGravatar Dirk Hohndel
Useless, completely out of date. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-05cmake: second attempt to install our ssrfmarble libGravatar Dirk Hohndel
Sorry for the noise. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-05cmake: on Linux install our special marble libraryGravatar Dirk Hohndel
If we build our own library, make sure it gets installed as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-05cmake: add libz to end of linker line on LinuxGravatar Dirk Hohndel
While I don't need this when building on Fedora 20, OBS builds for openSUSE appear to fail without this. Strange. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-05Read stored planner prefs when starting.Gravatar Joakim Bygdell
Back in 5bf23381e we started storing planner settings in prefs. We need to read those settings back when we start the planner. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-05Shorten the first leg of the planner.Gravatar Joakim Bygdell
With the addition of gas reserves in recreational mode we need to make sure that the first leg is short enough that we have more gas left than the specified reserve even when using small cylinders like LP72. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-05cmake: the application name should be capitalized on MacGravatar Dirk Hohndel
We want Subsurface.app but subsurface and subsurface.exe Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04cmake: try to get the dependency on the .qm files rightGravatar Dirk Hohndel
This is still not something I'm 100% sure I got right. But at least now it correctly rebuilds the .qm files... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04Update Mac convenience shell scriptGravatar Dirk Hohndel
This script likely is useless for anyone but me, but I like having it in the source tree in case others can benefit from seeing how the packages are built. This now is based on out-of-tree cmake builds. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04cmake: use the correct macdeployqt command nameGravatar Dirk Hohndel
Oops, that was silly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04cmake: correctly create a Mac bundleGravatar Dirk Hohndel
Don't try to install the TARGET into the Subsurface.app or we get a neat infinite recursion. As a bundle cmake does all these things automagically. Right now the version is hard coded which is ugly but since it's determined in a separate cmake file it seemed non-obvious how to do this right... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04cmake: try to pick a useful default for the location of Qt translationsGravatar Dirk Hohndel
Not sure if this will work for most installations - it does work for mine. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04cmake: don't always create .qm filesGravatar Dirk Hohndel
The cmake keywords still confuse me at times. A custom target is always recreated. How silly. But the correct (I think) implementation is actually easier... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04cmake: Mac install into Subsurface.appGravatar Dirk Hohndel
I guess I should add the code to move that app to /Applications but I never use it this way... not sure how many people really install from source on a Mac, anyway. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04cmake: make sure we have no emptry Qt translation namesGravatar Dirk Hohndel
When building on a Mac for some reason I was getting an empty translation file name (and therefore and entry that was the whole directory and not a translation file. This is a bit clumsy but it fixes the problem. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04Fix build on older MacsGravatar Dirk Hohndel
In commit 39ffb0fced85 ("Fix Subsurface build with Qt 5.4.1 and later") Thiago was a bit too aggressive removing some of our ifdefs for building with older versions of the SDK... I need at least this patch to still build on the machine that I use to create the official binaries. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04OSTCTools-Add two sample divesGravatar Salvador Cuñat
Adds two test dives for OSTCTools. I've kept the original naming. Num 173 selected because it implies using EAN32. Num 80, provided in forum by Philippe Tescari, selected because involves gas changes (although user don't seems to have set different gas mixes). Sadly, both dives seems to be from 2N/C devices. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04cmake: add ostctools.cGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04libdivecomputer.c: Remove unused parameter in parse_gasmixesGravatar Salvador Cuñat
data pointer is not used, so it can be safely removed. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04OSTCTools-Add support to import .dive filesGravatar Salvador Cuñat
OSTCTools is a windows based software by Robert Angeymar which performs configuration upgrade, memory analysis and download tasks for H&W OSTC devices. Downloaded dives are stored in files (one archive each) with the raw binary data heavily padded at the begining of the file, and some other data not included in H&W dive header protocol as the device's serial number. The import function simply takes the raw data part of the file and lets libdivecomputer do the parseing. Then adds some additional info as OSTC reported dive number and serial device number. Please note that OSTCTools is *not* a real logging software, it simply gets the DC raw data, so there isn't any information about dive site, equipment and so. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04Move extern declaration to header fileGravatar Salvador Cuñat
Move extern declaration of function datatrak_import() to file.h, where it fits better than in file.c Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>