mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-04-30 03:34:34 +00:00
68 lines
1.2 KiB
C++
68 lines
1.2 KiB
C++
|
#include "deb.h"
|
||
|
|
||
|
#include <deployconfig.h>
|
||
|
#include <pathutils.h>
|
||
|
#include <packagecontrol.h>
|
||
|
|
||
|
Deb::Deb(FileManager *fileManager):
|
||
|
iDistribution(fileManager)
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
bool Deb::deployTemplate(PackageControl &pkg) {
|
||
|
// default template
|
||
|
const DeployConfig *cfg = DeployCore::_config;
|
||
|
|
||
|
for (auto it = cfg->packages().begin();
|
||
|
it != cfg->packages().end(); ++it) {
|
||
|
auto package = it.value();
|
||
|
|
||
|
TemplateInfo info;
|
||
|
info.Name = PathUtils::stripPath(it.key());
|
||
|
bool fDefaultPakcage = cfg->getDefaultPackage() == info.Name;
|
||
|
|
||
|
if (fDefaultPakcage) {
|
||
|
QFileInfo targetInfo(*package.targets().begin());
|
||
|
info.Name = targetInfo.baseName();
|
||
|
}
|
||
|
|
||
|
if (!package.name().isEmpty()) {
|
||
|
info.Name = package.name();
|
||
|
}
|
||
|
|
||
|
auto location = cfg->getTargetDir() + "/" + getLocation() + "/" + info.Name;
|
||
|
|
||
|
if (!pkg.movePackage(it.key(), location)) {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
bool Deb::removeTemplate() const {
|
||
|
|
||
|
}
|
||
|
|
||
|
Envirement Deb::toolKitEnv() const {
|
||
|
|
||
|
}
|
||
|
|
||
|
QProcessEnvironment Deb::processEnvirement() const {
|
||
|
|
||
|
}
|
||
|
|
||
|
QString Deb::runCmd() {
|
||
|
|
||
|
}
|
||
|
|
||
|
QStringList Deb::runArg() const {
|
||
|
|
||
|
}
|
||
|
|
||
|
QStringList Deb::outPutFiles() const {
|
||
|
|
||
|
}
|