diff options
Diffstat (limited to 'installer/main.cpp')
| -rw-r--r-- | installer/main.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/installer/main.cpp b/installer/main.cpp index 4b62834..b29c90d 100644 --- a/installer/main.cpp +++ b/installer/main.cpp @@ -1,8 +1,11 @@ #include "mainwindow.h" #include "process/installworker.h" +#include "process/removeworker.h" +#include "maintainwindow.h" #include <QApplication> #include <QTranslator> #include <QLibraryInfo> +#include <QFile> int main(int argc, char *argv[]) { @@ -26,8 +29,22 @@ int main(int argc, char *argv[]) a.setQuitOnLastWindowClosed(false); return a.exec(); + } else if (a.arguments().contains("--remove")) { + //Remove mode + RemoveWorker worker; + if (!worker.startWork()) return 1; + + a.setQuitOnLastWindowClosed(false); + return a.exec(); + } else if (QFile(a.applicationDirPath() + "/uninstall.json").exists()) { + //Modify UI mode + MaintainWindow w; + w.show(); + + return a.exec(); } + //Install UI mode MainWindow w; w.show(); |
