summaryrefslogtreecommitdiffstats
path: root/wonkoclient/main.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-04-09 23:51:01 +0200
committerPetr Mrázek <peterix@gmail.com>2016-04-30 23:59:23 +0200
commitfcd4a482f759cd58ee319a51082d0146b7e426e2 (patch)
tree52bd8227d4889d7e02b3cce43c24d48fec825e60 /wonkoclient/main.cpp
parent00e5968bd28ab1df33b3a39dbac8cda99aa2a0d2 (diff)
downloadMultiMC-fcd4a482f759cd58ee319a51082d0146b7e426e2.tar
MultiMC-fcd4a482f759cd58ee319a51082d0146b7e426e2.tar.gz
MultiMC-fcd4a482f759cd58ee319a51082d0146b7e426e2.tar.lz
MultiMC-fcd4a482f759cd58ee319a51082d0146b7e426e2.tar.xz
MultiMC-fcd4a482f759cd58ee319a51082d0146b7e426e2.zip
NOISSUE tiny skeleton for a CLI wonko client
Diffstat (limited to 'wonkoclient/main.cpp')
-rw-r--r--wonkoclient/main.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/wonkoclient/main.cpp b/wonkoclient/main.cpp
new file mode 100644
index 00000000..1ee6d881
--- /dev/null
+++ b/wonkoclient/main.cpp
@@ -0,0 +1,29 @@
+//
+// Created by robotbrain on 3/26/16.
+//
+
+#include "WonkoClient.h"
+#include <QApplication>
+#include <QDebug>
+#include <QtWidgets/QInputDialog>
+#include <QtGui/QDesktopServices>
+#include <QDir>
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ if (a.arguments().contains("-d"))
+ {
+ int i = a.arguments().lastIndexOf("-d") + 1;
+ if (i < a.arguments().length())
+ {
+ QDir dir = QDir::current();
+ dir.cd(a.arguments()[i]);
+ QDir::setCurrent(dir.absolutePath());
+ qDebug() << "Using " << dir.absolutePath();
+ }
+ }
+ MMCC.initGlobalSettings();
+ MMCC.registerLists();
+ return a.exec();
+}