mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-05-11 17:09:36 +00:00
Merge pull request #514 from QuasarApp/moreLogs
Added more logs into packing step
This commit is contained in:
commit
3fe52b6f78
@ -11,6 +11,7 @@
|
|||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include <deployconfig.h>
|
#include <deployconfig.h>
|
||||||
#include <distromodule.h>
|
#include <distromodule.h>
|
||||||
|
#include <quasarapp.h>
|
||||||
|
|
||||||
iDistribution::~iDistribution() = default;
|
iDistribution::~iDistribution() = default;
|
||||||
|
|
||||||
@ -46,11 +47,17 @@ bool iDistribution::unpackFile(const QFileInfo &resource,
|
|||||||
|
|
||||||
QByteArray inputData = file.readAll();
|
QByteArray inputData = file.readAll();
|
||||||
file.close();
|
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;
|
return false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
file.setFileName(target + "/" + resource.fileName());
|
file.setFileName(target + "/" + resource.fileName());
|
||||||
if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
|
if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
|
||||||
|
QuasarAppUtils::Params::log(QString("impossible to write in file: %0 ").arg(file.fileName()),
|
||||||
|
QuasarAppUtils::Error);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -242,6 +249,10 @@ bool iDistribution::deployIcon(TemplateInfo &info ,const DistroModule& pkg) {
|
|||||||
QFileInfo iconInfo(pkg.icon());
|
QFileInfo iconInfo(pkg.icon());
|
||||||
info.Icon = releativeLocation(pkg) + "/icons/" + iconInfo.fileName();
|
info.Icon = releativeLocation(pkg) + "/icons/" + iconInfo.fileName();
|
||||||
if (!copyFile(pkg.icon(), localData + "/icons/", false)) {
|
if (!copyFile(pkg.icon(), localData + "/icons/", false)) {
|
||||||
|
|
||||||
|
QuasarAppUtils::Params::log(QString("fail to copy icon: %0 ").arg(pkg.icon()),
|
||||||
|
QuasarAppUtils::Error);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ class DependenciesScanner;
|
|||||||
class PluginsParser;
|
class PluginsParser;
|
||||||
class Packing;
|
class Packing;
|
||||||
|
|
||||||
|
|
||||||
enum exitCodes {
|
enum exitCodes {
|
||||||
Good = 0x0,
|
Good = 0x0,
|
||||||
PrepareError = 0x1,
|
PrepareError = 0x1,
|
||||||
|
@ -51,8 +51,12 @@ bool Packing::create() {
|
|||||||
if (!package)
|
if (!package)
|
||||||
return false;
|
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;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
auto commands = package->runCmd();
|
auto commands = package->runCmd();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user