mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-04-28 10:44:33 +00:00
added more logs into packing step
This commit is contained in:
parent
6d37039351
commit
a9ced89451
@ -11,6 +11,7 @@
|
||||
#include <QMap>
|
||||
#include <deployconfig.h>
|
||||
#include <distromodule.h>
|
||||
#include <quasarapp.h>
|
||||
|
||||
iDistribution::~iDistribution() = default;
|
||||
|
||||
@ -46,11 +47,17 @@ bool iDistribution::unpackFile(const QFileInfo &resource,
|
||||
|
||||
QByteArray inputData = file.readAll();
|
||||
file.close();
|
||||
if (!QDir().mkpath(target))
|
||||
if (!QDir().mkpath(target)) {
|
||||
QuasarAppUtils::Params::log(QString("impossible to create path : %0 ").arg(target),
|
||||
QuasarAppUtils::Error);
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
file.setFileName(target + "/" + resource.fileName());
|
||||
if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
|
||||
QuasarAppUtils::Params::log(QString("impossible to write in file: %0 ").arg(file.fileName()),
|
||||
QuasarAppUtils::Error);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -242,6 +249,10 @@ bool iDistribution::deployIcon(TemplateInfo &info ,const DistroModule& pkg) {
|
||||
QFileInfo iconInfo(pkg.icon());
|
||||
info.Icon = releativeLocation(pkg) + "/icons/" + iconInfo.fileName();
|
||||
if (!copyFile(pkg.icon(), localData + "/icons/", false)) {
|
||||
|
||||
QuasarAppUtils::Params::log(QString("fail to copy icon: %0 ").arg(pkg.icon()),
|
||||
QuasarAppUtils::Error);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ class DependenciesScanner;
|
||||
class PluginsParser;
|
||||
class Packing;
|
||||
|
||||
|
||||
enum exitCodes {
|
||||
Good = 0x0,
|
||||
PrepareError = 0x1,
|
||||
|
@ -51,8 +51,12 @@ bool Packing::create() {
|
||||
if (!package)
|
||||
return false;
|
||||
|
||||
if (!package->deployTemplate(*this))
|
||||
if (!package->deployTemplate(*this)) {
|
||||
QuasarAppUtils::Params::log(QString("Deploy package template error ocured. Package: %0.").
|
||||
arg(package->getClassName()),
|
||||
QuasarAppUtils::Error);
|
||||
return false;
|
||||
}
|
||||
|
||||
auto commands = package->runCmd();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user