summaryrefslogtreecommitdiff
path: root/AppVersion
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2021-01-05 22:10:30 +0100
committerChristoph Berg <myon@debian.org>2021-01-05 22:10:30 +0100
commit8e43a898258cdf4a3eaec64f06069017b2d24a4d (patch)
tree82cfd1cbc20f8a219522a8036e8a3622eec44440 /AppVersion
parenta42d3323808f2f57138c4a636db7f9f78c30c59f (diff)
parent061dc1a349738747489ef0c0ebeeb4443e369501 (diff)
Update upstream source from tag 'upstream/2.3.0_rc3+repack'
Update to upstream version '2.3.0~rc3+repack' with Debian dir 5129b722b4b0bb33d8e8b0c41dd5606650a3ee38
Diffstat (limited to 'AppVersion')
-rw-r--r--AppVersion/AppVersion.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/AppVersion/AppVersion.cpp b/AppVersion/AppVersion.cpp
new file mode 100644
index 00000000..26cac2c1
--- /dev/null
+++ b/AppVersion/AppVersion.cpp
@@ -0,0 +1,43 @@
+//
+// wsjtx_app_version - a console application that outputs WSJT-X
+// application version
+//
+// This application is only provided as a simple console application
+//
+//
+
+#include <cstdlib>
+#include <iostream>
+#include <exception>
+
+#include <QCoreApplication>
+#include <QCommandLineParser>
+#include <QCommandLineOption>
+
+#include "revision_utils.hpp"
+
+int main (int argc, char * argv[])
+{
+ QCoreApplication app {argc, argv};
+ try
+ {
+ app.setApplicationName ("WSJT-X");
+ app.setApplicationVersion (version());
+
+ QCommandLineParser parser;
+// parser.setApplicationDescription ("\n" PROJECT_DESCRIPTION);
+ parser.addHelpOption ();
+ parser.addVersionOption ();
+ parser.process (app);
+ return EXIT_SUCCESS;
+ }
+ catch (std::exception const& e)
+ {
+ std::cerr << "Error: " << e.what () << '\n';
+ }
+ catch (...)
+ {
+ std::cerr << "Unexpected error\n";
+ }
+ return -1;
+}