aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-11-13 19:04:17 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-12-03 13:26:55 -0800
commit057c151fe8592ec5f160ae5f7891c1f1b5c998dc (patch)
tree4fad01c8503872722de5e56638e614a9549ba61c /core
parenta23c3d0bb1a0e103f3dea9f93960992080753156 (diff)
downloadsubsurface-057c151fe8592ec5f160ae5f7891c1f1b5c998dc.tar.gz
build-system: start adding a headless build
Right now this doesn't do a thing, but it gives us a nice target that has far fewer dependencies and should contain enough parts to download stuff from a divecomputer and then sync that with cloud storage. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core')
-rw-r--r--core/divefilter.cpp4
-rw-r--r--core/qthelper.cpp2
-rw-r--r--core/subsurfacestartup.c4
3 files changed, 8 insertions, 2 deletions
diff --git a/core/divefilter.cpp b/core/divefilter.cpp
index 23d023b9d..0aa78e53b 100644
--- a/core/divefilter.cpp
+++ b/core/divefilter.cpp
@@ -5,7 +5,7 @@
#include "gettextfromc.h"
#include "qthelper.h"
#include "subsurface-qt/divelistnotifier.h"
-#ifndef SUBSURFACE_MOBILE
+#if !defined(SUBSURFACE_MOBILE) && !defined(SUBSURFACE_DOWNLOADER)
#include "desktop-widgets/mapwidget.h"
#include "desktop-widgets/mainwindow.h"
#include "desktop-widgets/divelistview.h"
@@ -103,7 +103,7 @@ bool DiveFilter::showDive(const struct dive *d) const
[d] (const filter_constraint &c) { return filter_constraint_match_dive(c, d); });
}
-#ifndef SUBSURFACE_MOBILE
+#if !defined(SUBSURFACE_MOBILE) && !defined(SUBSURFACE_DOWNLOADER)
void DiveFilter::startFilterDiveSites(QVector<dive_site *> ds)
{
if (++diveSiteRefCount > 1) {
diff --git a/core/qthelper.cpp b/core/qthelper.cpp
index fd19e78a3..2e74c5625 100644
--- a/core/qthelper.cpp
+++ b/core/qthelper.cpp
@@ -419,6 +419,8 @@ QString getUserAgent()
// replace all other ':' with ' ' so that this is easy to parse
#ifdef SUBSURFACE_MOBILE
QString userAgent = QString("Subsurface-mobile:%1(%2):").arg(subsurface_mobile_version()).arg(subsurface_canonical_version());
+#elif SUBSURFACE_DOWNLOADER
+ QString userAgent = QString("Subsurface-downloader:%1:").arg(subsurface_canonical_version());
#else
QString userAgent = QString("Subsurface:%1:").arg(subsurface_canonical_version());
#endif
diff --git a/core/subsurfacestartup.c b/core/subsurfacestartup.c
index bdb908ea5..c12357cbc 100644
--- a/core/subsurfacestartup.c
+++ b/core/subsurfacestartup.c
@@ -132,7 +132,11 @@ void print_version()
static bool version_printed = false;
if (version_printed)
return;
+#if defined(SUBSURFACE_DOWNLOADER)
+ printf("Subsurface-downloader v%s,\n", subsurface_git_version());
+#else
printf("Subsurface v%s,\n", subsurface_git_version());
+#endif
printf("built with libdivecomputer v%s\n", dc_version(NULL));
print_qt_versions();
int git_maj, git_min, git_rev;