mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-04-29 11:14:33 +00:00
60 lines
1.3 KiB
C++
60 lines
1.3 KiB
C++
#include "defaultdistro.h"
|
|
|
|
#include <deployconfig.h>
|
|
#include <deploycore.h>
|
|
#include <packagecontrol.h>
|
|
#include <pathutils.h>
|
|
|
|
DefaultDistro::DefaultDistro(FileManager *fileManager)
|
|
:iDistribution(fileManager){
|
|
|
|
};
|
|
|
|
bool DefaultDistro::deployTemplate(PackageControl & ctrl) {
|
|
// default template
|
|
const DeployConfig *cfg = DeployCore::_config;
|
|
|
|
for (auto it = cfg->packages().begin();
|
|
it != cfg->packages().end(); ++it) {
|
|
auto package = it.value();
|
|
QString Name = PathUtils::stripPath(it.key());
|
|
|
|
QString targetLocation;
|
|
if (cfg->getDefaultPackage() == Name) {
|
|
targetLocation = cfg->getTargetDir();
|
|
} else {
|
|
targetLocation = cfg->getTargetDir() + "/" + it.key();
|
|
}
|
|
|
|
if (!ctrl.copyPackage(it.key(), targetLocation)) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
Envirement DefaultDistro::toolKitEnv() const {
|
|
return {};
|
|
}
|
|
|
|
QString DefaultDistro::runCmd() {
|
|
return "";
|
|
}
|
|
|
|
QStringList DefaultDistro::runArg() const {
|
|
return {};
|
|
}
|
|
|
|
bool DefaultDistro::removeTemplate() const {
|
|
return true;
|
|
}
|
|
|
|
QProcessEnvironment DefaultDistro::processEnvirement() const {
|
|
return QProcessEnvironment::systemEnvironment();
|
|
}
|
|
|
|
QStringList DefaultDistro::outPutFiles() const {
|
|
return {};
|
|
}
|