diff options
| author | Victor Tran <vicr12345@gmail.com> | 2018-07-13 00:39:24 +1000 |
|---|---|---|
| committer | Victor Tran <vicr12345@gmail.com> | 2018-07-13 00:39:24 +1000 |
| commit | abc4021919f406ee25e101122144879f8770d51d (patch) | |
| tree | 9f835b216b8481e84fb988e495da42c1aa1aa20a /installer/main.cpp | |
| parent | 2adcd4f24eca2fa529c42fc1165319bcc4ea179e (diff) | |
| download | theInstaller-abc4021919f406ee25e101122144879f8770d51d.tar.gz theInstaller-abc4021919f406ee25e101122144879f8770d51d.tar.bz2 theInstaller-abc4021919f406ee25e101122144879f8770d51d.zip | |
Uninstall support
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(); |
