summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/smtk2ssrf.pl2
-rw-r--r--smtk-import/CMakeLists.txt2
-rw-r--r--smtk-import/smtk_standalone.cpp7
3 files changed, 10 insertions, 1 deletions
diff --git a/scripts/smtk2ssrf.pl b/scripts/smtk2ssrf.pl
index 2b1e8a2ac..5367400ce 100755
--- a/scripts/smtk2ssrf.pl
+++ b/scripts/smtk2ssrf.pl
@@ -35,7 +35,7 @@ if ($q->upload("uploaded_file")) {
-size => 50,
-maxlength => 200);
print $q->submit();
- print $q-end_form();
+ print $q->end_form();
# Here we could print some footer stuff as above
diff --git a/smtk-import/CMakeLists.txt b/smtk-import/CMakeLists.txt
index 3b631be8d..785c23887 100644
--- a/smtk-import/CMakeLists.txt
+++ b/smtk-import/CMakeLists.txt
@@ -3,6 +3,8 @@
project(smtk2ssrf)
cmake_minimum_required(VERSION 2.8.11)
+option(COMMANDLINE "Build command line version")
+
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/smtk-import/smtk_standalone.cpp b/smtk-import/smtk_standalone.cpp
index 6385f87ea..2442d70d4 100644
--- a/smtk-import/smtk_standalone.cpp
+++ b/smtk-import/smtk_standalone.cpp
@@ -5,6 +5,7 @@
#include "smrtk2ssrfc_window.h"
#include <QApplication>
#include <QDebug>
+#define COMMANDLINE 1
extern "C" void smartrak_import(const char *file, struct dive_table *table);
@@ -17,13 +18,19 @@ int main(int argc, char *argv[])
{
char *infile, *outfile;
int i;
+#ifndef COMMANDLINE
QApplication a(argc, argv);
Smrtk2ssrfcWindow w;
+#else
+ QCoreApplication a(argc, argv);
+#endif
switch (argc) {
case 1:
+#ifndef COMMANDLINE
w.show();
return a.exec();
+#endif
break;
case 2:
qDebug() << "\nUsage:\n";