mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Mobile: Remove unused components from build.
Remove import / export components that are not supported in the mobile version from the mobild build. Signed-off-by: Michael Keller <github@ike.ch>
This commit is contained in:
parent
972b7a0643
commit
c8f0f82182
4 changed files with 17 additions and 22 deletions
|
@ -56,27 +56,17 @@ SOURCES += subsurface-mobile-main.cpp \
|
||||||
core/filterconstraint.cpp \
|
core/filterconstraint.cpp \
|
||||||
core/filterpreset.cpp \
|
core/filterpreset.cpp \
|
||||||
core/filterpresettable.cpp \
|
core/filterpresettable.cpp \
|
||||||
core/fit_file.cpp \
|
|
||||||
core/divelist.cpp \
|
core/divelist.cpp \
|
||||||
core/divelog.cpp \
|
core/divelog.cpp \
|
||||||
core/gas-model.cpp \
|
core/gas-model.cpp \
|
||||||
core/gaspressures.cpp \
|
core/gaspressures.cpp \
|
||||||
core/git-access.cpp \
|
core/git-access.cpp \
|
||||||
core/globals.cpp \
|
core/globals.cpp \
|
||||||
core/liquivision.cpp \
|
|
||||||
core/load-git.cpp \
|
core/load-git.cpp \
|
||||||
core/parse-xml.cpp \
|
core/parse-xml.cpp \
|
||||||
core/parse.cpp \
|
core/parse.cpp \
|
||||||
core/picture.cpp \
|
core/picture.cpp \
|
||||||
core/sample.cpp \
|
core/sample.cpp \
|
||||||
core/import-suunto.cpp \
|
|
||||||
core/import-shearwater.cpp \
|
|
||||||
core/import-seac.cpp \
|
|
||||||
core/import-cobalt.cpp \
|
|
||||||
core/import-divinglog.cpp \
|
|
||||||
core/import-csv.cpp \
|
|
||||||
core/import-asd.cpp \
|
|
||||||
core/import-logtrak.cpp \
|
|
||||||
core/save-html.cpp \
|
core/save-html.cpp \
|
||||||
core/statistics.cpp \
|
core/statistics.cpp \
|
||||||
core/worldmap-save.cpp \
|
core/worldmap-save.cpp \
|
||||||
|
@ -84,11 +74,8 @@ SOURCES += subsurface-mobile-main.cpp \
|
||||||
core/version.cpp \
|
core/version.cpp \
|
||||||
core/save-git.cpp \
|
core/save-git.cpp \
|
||||||
core/datatrak.cpp \
|
core/datatrak.cpp \
|
||||||
core/ostctools.cpp \
|
|
||||||
core/divesoft.cpp \
|
|
||||||
core/planner.cpp \
|
core/planner.cpp \
|
||||||
core/save-xml.cpp \
|
core/save-xml.cpp \
|
||||||
core/cochran.cpp \
|
|
||||||
core/deco.cpp \
|
core/deco.cpp \
|
||||||
core/divesite.cpp \
|
core/divesite.cpp \
|
||||||
core/equipment.cpp \
|
core/equipment.cpp \
|
||||||
|
@ -225,7 +212,6 @@ HEADERS += \
|
||||||
core/divesite.h \
|
core/divesite.h \
|
||||||
core/divesitetable.h \
|
core/divesitetable.h \
|
||||||
core/checkcloudconnection.h \
|
core/checkcloudconnection.h \
|
||||||
core/cochran.h \
|
|
||||||
core/color.h \
|
core/color.h \
|
||||||
core/configuredivecomputer.h \
|
core/configuredivecomputer.h \
|
||||||
core/datatrak.h \
|
core/datatrak.h \
|
||||||
|
@ -382,7 +368,6 @@ android {
|
||||||
../install-root-$${QT_ARCH}/lib/libzip.a \
|
../install-root-$${QT_ARCH}/lib/libzip.a \
|
||||||
../install-root-$${QT_ARCH}/lib/libxslt.a \
|
../install-root-$${QT_ARCH}/lib/libxslt.a \
|
||||||
../install-root-$${QT_ARCH}/lib/libxml2.a \
|
../install-root-$${QT_ARCH}/lib/libxml2.a \
|
||||||
../install-root-$${QT_ARCH}/lib/libsqlite3.a \
|
|
||||||
../install-root-$${QT_ARCH}/lib/libssl_1_1.so \
|
../install-root-$${QT_ARCH}/lib/libssl_1_1.so \
|
||||||
../install-root-$${QT_ARCH}/lib/libcrypto_1_1.so \
|
../install-root-$${QT_ARCH}/lib/libcrypto_1_1.so \
|
||||||
../googlemaps-build/libplugins_geoservices_qtgeoservices_googlemaps_$${QT_ARCH}.so
|
../googlemaps-build/libplugins_geoservices_qtgeoservices_googlemaps_$${QT_ARCH}.so
|
||||||
|
@ -399,7 +384,6 @@ android {
|
||||||
|
|
||||||
INCLUDEPATH += ../install-root-$${QT_ARCH}/include/ \
|
INCLUDEPATH += ../install-root-$${QT_ARCH}/include/ \
|
||||||
../install-root/lib/libzip/include \
|
../install-root/lib/libzip/include \
|
||||||
../install-root-$${QT_ARCH}/include/libxstl \
|
|
||||||
../install-root-$${QT_ARCH}/include/libxml2 \
|
../install-root-$${QT_ARCH}/include/libxml2 \
|
||||||
../install-root-$${QT_ARCH}/include/libexstl \
|
../install-root-$${QT_ARCH}/include/libexstl \
|
||||||
../install-root-$${QT_ARCH}/include/openssl \
|
../install-root-$${QT_ARCH}/include/openssl \
|
||||||
|
@ -434,13 +418,11 @@ ios {
|
||||||
$${ARCH_PATH}/lib/qml/org/kde/kirigami.2/libkirigamiplugin.a \
|
$${ARCH_PATH}/lib/qml/org/kde/kirigami.2/libkirigamiplugin.a \
|
||||||
../googlemaps-build/libqtgeoservices_googlemaps.a \
|
../googlemaps-build/libqtgeoservices_googlemaps.a \
|
||||||
-liconv \
|
-liconv \
|
||||||
-lsqlite3 \
|
|
||||||
-lxml2
|
-lxml2
|
||||||
|
|
||||||
LIBS += -framework MessageUI
|
LIBS += -framework MessageUI
|
||||||
|
|
||||||
INCLUDEPATH += $${ARCH_PATH}/include/ \
|
INCLUDEPATH += $${ARCH_PATH}/include/ \
|
||||||
$${ARCH_PATH}/include/libxstl \
|
|
||||||
$${ARCH_PATH}/include/libexstl \
|
$${ARCH_PATH}/include/libexstl \
|
||||||
$${ARCH_PATH}/include/openssl \
|
$${ARCH_PATH}/include/openssl \
|
||||||
. \
|
. \
|
||||||
|
|
|
@ -325,8 +325,10 @@ std::vector<const dive_site *> getDiveSitesToExport(bool selectedOnly)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(SUBSURFACE_MOBILE)
|
||||||
QFuture<int> exportUsingStyleSheet(const QString &filename, bool doExport, int units,
|
QFuture<int> exportUsingStyleSheet(const QString &filename, bool doExport, int units,
|
||||||
const QString &stylesheet, bool anonymize)
|
const QString &stylesheet, bool anonymize)
|
||||||
{
|
{
|
||||||
return QtConcurrent::run(export_dives_xslt, filename.toUtf8(), doExport, units, stylesheet.toUtf8(), anonymize);
|
return QtConcurrent::run(export_dives_xslt, filename.toUtf8(), doExport, units, stylesheet.toUtf8(), anonymize);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -109,6 +109,7 @@ static int db_test_func(void *, int, char **data, char **)
|
||||||
return *data[0] == '0';
|
return *data[0] == '0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(SUBSURFACE_MOBILE)
|
||||||
static int try_to_open_db(const char *filename, std::string &mem, struct divelog *log)
|
static int try_to_open_db(const char *filename, std::string &mem, struct divelog *log)
|
||||||
{
|
{
|
||||||
sqlite3 *handle;
|
sqlite3 *handle;
|
||||||
|
@ -189,6 +190,7 @@ static int try_to_open_db(const char *filename, std::string &mem, struct divelog
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Cochran comma-separated values: depth in feet, temperature in F, pressure in psi.
|
* Cochran comma-separated values: depth in feet, temperature in F, pressure in psi.
|
||||||
|
@ -206,6 +208,7 @@ static int try_to_open_db(const char *filename, std::string &mem, struct divelog
|
||||||
*
|
*
|
||||||
* Followed by the data values (all comma-separated, all one long line).
|
* Followed by the data values (all comma-separated, all one long line).
|
||||||
*/
|
*/
|
||||||
|
#if !defined(SUBSURFACE_MOBILE)
|
||||||
static int open_by_filename(const char *filename, const char *fmt, std::string &mem, struct divelog *log)
|
static int open_by_filename(const char *filename, const char *fmt, std::string &mem, struct divelog *log)
|
||||||
{
|
{
|
||||||
// hack to be able to provide a comment for the translated string
|
// hack to be able to provide a comment for the translated string
|
||||||
|
@ -236,13 +239,16 @@ static int open_by_filename(const char *filename, const char *fmt, std::string &
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int parse_file_buffer(const char *filename, std::string &mem, struct divelog *log)
|
static int parse_file_buffer(const char *filename, std::string &mem, struct divelog *log)
|
||||||
{
|
{
|
||||||
|
#if !defined(SUBSURFACE_MOBILE)
|
||||||
int ret;
|
int ret;
|
||||||
const char *fmt = strrchr(filename, '.');
|
const char *fmt = strrchr(filename, '.');
|
||||||
if (fmt && (ret = open_by_filename(filename, fmt + 1, mem, log)) != 0)
|
if (fmt && (ret = open_by_filename(filename, fmt + 1, mem, log)) != 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (mem.empty())
|
if (mem.empty())
|
||||||
return report_error("Out of memory parsing file %s\n", filename);
|
return report_error("Out of memory parsing file %s\n", filename);
|
||||||
|
@ -297,6 +303,7 @@ int parse_file(const char *filename, struct divelog *log)
|
||||||
return report_error(translate("gettextFromC", "Empty file '%s'"), filename);
|
return report_error(translate("gettextFromC", "Empty file '%s'"), filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(SUBSURFACE_MOBILE)
|
||||||
fmt = strrchr(filename, '.');
|
fmt = strrchr(filename, '.');
|
||||||
if (fmt && (!strcasecmp(fmt + 1, "DB") || !strcasecmp(fmt + 1, "BAK") || !strcasecmp(fmt + 1, "SQL"))) {
|
if (fmt && (!strcasecmp(fmt + 1, "DB") || !strcasecmp(fmt + 1, "BAK") || !strcasecmp(fmt + 1, "SQL"))) {
|
||||||
if (!try_to_open_db(filename, mem, log))
|
if (!try_to_open_db(filename, mem, log))
|
||||||
|
@ -336,6 +343,7 @@ int parse_file(const char *filename, struct divelog *log)
|
||||||
if (fmt && (!strcasecmp(fmt + 1, "asd"))) {
|
if (fmt && (!strcasecmp(fmt + 1, "asd"))) {
|
||||||
return scubapro_asd_import(mem, log);
|
return scubapro_asd_import(mem, log);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return parse_file_buffer(filename, mem, log);
|
return parse_file_buffer(filename, mem, log);
|
||||||
}
|
}
|
||||||
|
|
11
core/file.h
11
core/file.h
|
@ -13,10 +13,17 @@
|
||||||
struct divelog;
|
struct divelog;
|
||||||
struct zip;
|
struct zip;
|
||||||
|
|
||||||
|
#if !defined(SUBSURFACE_MOBILE)
|
||||||
extern int ostctools_import(std::string &buffer, struct divelog *log);
|
extern int ostctools_import(std::string &buffer, struct divelog *log);
|
||||||
extern int divesoft_import(const std::string &buffer, struct divelog *log);
|
extern int divesoft_import(const std::string &buffer, struct divelog *log);
|
||||||
|
extern int logtrak_import(const std::string &mem, struct divelog *log);
|
||||||
|
extern int scubapro_asd_import(const std::string &mem, struct divelog *log);
|
||||||
extern int fit_file_import(const std::string &buffer, struct divelog *log);
|
extern int fit_file_import(const std::string &buffer, struct divelog *log);
|
||||||
|
|
||||||
|
extern int try_to_open_cochran(const char *filename, std::string &mem, struct divelog *log);
|
||||||
|
extern int try_to_open_liquivision(const char *filename, std::string &mem, struct divelog *log);
|
||||||
|
#endif
|
||||||
|
|
||||||
extern int parse_file(const char *filename, struct divelog *log);
|
extern int parse_file(const char *filename, struct divelog *log);
|
||||||
extern int try_to_open_zip(const char *filename, struct divelog *log);
|
extern int try_to_open_zip(const char *filename, struct divelog *log);
|
||||||
|
|
||||||
|
@ -31,10 +38,6 @@ extern int subsurface_stat(const char *path, struct stat *buf);
|
||||||
extern struct zip *subsurface_zip_open_readonly(const char *path, int flags, int *errorp);
|
extern struct zip *subsurface_zip_open_readonly(const char *path, int flags, int *errorp);
|
||||||
extern int subsurface_zip_close(struct zip *zip);
|
extern int subsurface_zip_close(struct zip *zip);
|
||||||
extern std::pair<std::string, int> readfile(const char *filename); // return data, errorcode pair.
|
extern std::pair<std::string, int> readfile(const char *filename); // return data, errorcode pair.
|
||||||
extern int try_to_open_cochran(const char *filename, std::string &mem, struct divelog *log);
|
|
||||||
extern int try_to_open_liquivision(const char *filename, std::string &mem, struct divelog *log);
|
|
||||||
extern int datatrak_import(std::string &mem, std::string &wl_mem, struct divelog *log);
|
extern int datatrak_import(std::string &mem, std::string &wl_mem, struct divelog *log);
|
||||||
extern int logtrak_import(const std::string &mem, struct divelog *log);
|
|
||||||
extern int scubapro_asd_import(const std::string &mem, struct divelog *log);
|
|
||||||
|
|
||||||
#endif // FILE_H
|
#endif // FILE_H
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue