diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-11-22 17:31:05 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-12-03 13:26:55 -0800 |
commit | eac59a79d8e9589ccc3f1c8879478fd1b9502eef (patch) | |
tree | a92c990c06008ab34b917e4ce7bdab776d340ee0 /core | |
parent | faf4736675167838883a4a10bc30182857d25c32 (diff) | |
download | subsurface-eac59a79d8e9589ccc3f1c8879478fd1b9502eef.tar.gz |
build-system/downloader: cli-downloader isn't part of the core
It's part of the main excutable / helper and needs to be linked before
all of our support libraries.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/CMakeLists.txt | 5 | ||||
-rw-r--r-- | core/cli-downloader.cpp | 39 |
2 files changed, 0 insertions, 44 deletions
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 51ccf608f..1ed24019c 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -20,10 +20,6 @@ if(FTDISUPPORT) set(SERIAL_FTDI serial_ftdi.c) endif() -if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DownloaderExecutable") - set(DOWNLOADER cli-downloader.cpp) -endif() - if(BTSUPPORT) add_definitions(-DBT_SUPPORT) set(BT_SRC_FILES desktop-widgets/btdeviceselectiondialog.cpp) @@ -256,7 +252,6 @@ set(SUBSURFACE_CORE_LIB_SRCS ${SERIAL_FTDI} ${PLATFORM_SRC} ${BT_CORE_SRC_FILES} - ${DOWNLOADER} ) source_group("Subsurface Core" FILES ${SUBSURFACE_CORE_LIB_SRCS}) diff --git a/core/cli-downloader.cpp b/core/cli-downloader.cpp deleted file mode 100644 index 77053c0c7..000000000 --- a/core/cli-downloader.cpp +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -#include "qt-models/diveimportedmodel.h" - -#include <QObject> -#include <QUndoStack> - - -void cliDownloader(const char *vendor, const char *product, const char *device) -{ - DiveImportedModel *diveImportedModel = new DiveImportedModel(); - DiveImportedModel::connect(diveImportedModel, &DiveImportedModel::downloadFinished, [] { - // do something useful at the end of the download - printf("Finished\n"); - }); - - auto data = diveImportedModel->thread.data(); - data->setVendor(vendor); - data->setProduct(product); - data->setBluetoothMode(false); - if (data->vendor() == "Uemis") { - char *colon; - char *devname = strdup(device); - if ((colon = strstr(devname, ":\\ (UEMISSDA)")) != NULL) { - *(colon + 2) = '\0'; - fprintf(stderr, "shortened devname to \"%s\"", devname); - } - data->setDevName(devname); - } else { - data->setDevName(device); - } - - // some assumptiond - should all be configurable - data->setForceDownload(false); - data->setSaveLog(true); - data->setSaveDump(false); - - // before we start, remember where the dive_table ended - diveImportedModel->startDownload(); -} |