2018-08-19 11:00:13 +03:00
|
|
|
/*
|
2019-01-26 07:54:56 +03:00
|
|
|
* Copyright (C) 2018-2019 QuasarApp.
|
2018-08-19 11:00:13 +03:00
|
|
|
* Distributed under the lgplv3 software license, see the accompanying
|
|
|
|
* Everyone is permitted to copy and distribute verbatim copies
|
|
|
|
* of this license document, but changing it is not allowed.
|
2018-10-24 17:26:42 +03:00
|
|
|
*/
|
2018-08-19 11:00:13 +03:00
|
|
|
|
2019-09-08 13:37:33 +03:00
|
|
|
#include "cqt.h"
|
2018-08-17 20:47:49 +03:00
|
|
|
#include "deploy.h"
|
2019-09-08 13:37:33 +03:00
|
|
|
#include "extracter.h"
|
|
|
|
#include "filemanager.h"
|
2018-10-24 17:26:42 +03:00
|
|
|
#include <quasarapp.h>
|
2019-08-24 01:04:36 +03:00
|
|
|
|
2019-09-08 13:37:33 +03:00
|
|
|
Deploy::Deploy() {
|
|
|
|
_fileManager = new FileManager();
|
|
|
|
_paramsParser = new CQT(_fileManager);
|
|
|
|
_extracter = new Extracter(_fileManager);
|
2018-08-18 22:36:28 +03:00
|
|
|
}
|
|
|
|
|
2019-09-08 13:37:33 +03:00
|
|
|
bool Deploy::prepare() {
|
|
|
|
return _paramsParser->parseParams();
|
2019-06-19 22:48:19 +03:00
|
|
|
}
|
|
|
|
|
2019-09-08 13:37:33 +03:00
|
|
|
int Deploy::deploy() {
|
|
|
|
_fileManager->loadDeployemendFiles(_paramsParser->config()->targetDir);
|
|
|
|
_extracter->deploy();
|
|
|
|
_fileManager->saveDeploymendFiles(_paramsParser->config()->targetDir);
|
2019-05-25 19:09:43 +03:00
|
|
|
|
2019-09-08 13:37:33 +03:00
|
|
|
return 0;
|
2019-01-16 22:17:49 +03:00
|
|
|
}
|