From abc4021919f406ee25e101122144879f8770d51d Mon Sep 17 00:00:00 2001 From: Victor Tran Date: Fri, 13 Jul 2018 00:39:24 +1000 Subject: Uninstall support --- installer/main.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'installer/main.cpp') 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 #include #include +#include int main(int argc, char *argv[]) { @@ -25,9 +28,23 @@ int main(int argc, char *argv[]) if (!worker.startWork()) return 1; 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(); -- cgit v1.2.3