change package paths

This commit is contained in:
Andrei Yankovich 2020-02-26 16:51:28 +03:00
parent b6b0dd0757
commit 52db7424b6
6 changed files with 21 additions and 21 deletions

View File

@ -331,7 +331,7 @@ bool ConfigParser::initDistroStruct() {
split(DeployCore::getSeparator(0), QString::SkipEmptyParts);
auto erroLog = [](const QString &flag){
QuasarAppUtils::Params::verboseLog(QString("Set %0 fail, becouse you try set %0 for not inited package."
QuasarAppUtils::Params::verboseLog(QString("Set %0 fail, because you try set %0 for not inited package."
" Use 'targetPackage' flag for init the packages").arg(flag),
QuasarAppUtils::Error);
};
@ -419,7 +419,7 @@ bool ConfigParser::initPackages() {
for (auto it = list.begin(); it != list.end(); ++it) {
if (!configuredTargets.contains(it.key())) {
configuredTargets.insert(it.key());
it.value()->setSufix(package);
it.value()->setPackage(package);
}
}
@ -449,7 +449,7 @@ bool ConfigParser::initQmlInput() {
}
auto erroLog = [](const QString &flag){
QuasarAppUtils::Params::verboseLog(QString("Set %0 fail, becouse you try set %0 for not inited package."
QuasarAppUtils::Params::verboseLog(QString("Set %0 fail, because you try set %0 for not inited package."
" Use 'targetPackage' flag for init the packages").arg(flag),
QuasarAppUtils::Error);
};
@ -1026,7 +1026,7 @@ void ConfigParser::setExtraPath(const QStringList &value) {
QFileInfo info(i);
if (info.isDir()) {
if (_config.targets().contains(info.absoluteFilePath())) {
QuasarAppUtils::Params::verboseLog("skip the extra lib path becouse it is target!",
QuasarAppUtils::Params::verboseLog("skip the extra lib path because it is target!",
QuasarAppUtils::Info);
continue;
}
@ -1043,7 +1043,7 @@ void ConfigParser::setExtraPath(const QStringList &value) {
QuasarAppUtils::Params::verboseLog(i + " added like a path mask",
QuasarAppUtils::Info);
} else {
QuasarAppUtils::Params::verboseLog(i + " not added in path mask becouse"
QuasarAppUtils::Params::verboseLog(i + " not added in path mask because"
" the path mask must be large 2 characters",
QuasarAppUtils::Warning);
}
@ -1058,7 +1058,7 @@ void ConfigParser::setExtraNames(const QStringList &value) {
QuasarAppUtils::Params::verboseLog(i + " added like a file name mask",
QuasarAppUtils::Info);
} else {
QuasarAppUtils::Params::verboseLog(i + " not added in file mask becouse"
QuasarAppUtils::Params::verboseLog(i + " not added in file mask because"
" the file mask must be large 2 characters",
QuasarAppUtils::Warning);
}
@ -1163,7 +1163,7 @@ bool ConfigParser::smartMoveTargets() {
QFileInfo target(i.key());
QString targetPath = _config.getTargetDir() + i.value().getSufix();
QString targetPath = _config.getTargetDir() + "/" + i.value().getPackage();
if (DeployCore::isLib(target)) {
targetPath += _config.getDistro(i.key()).getLibOutDir();
@ -1178,7 +1178,7 @@ bool ConfigParser::smartMoveTargets() {
auto newTargetKey = targetPath + "/" + target.fileName();
temp.unite(moveTarget(i.value(), newTargetKey));
_config.packagesEdit()[i.value().getSufix()].addTarget(newTargetKey);
_config.packagesEdit()[i.value().getPackage()].addTarget(newTargetKey);
}

View File

@ -19,8 +19,8 @@ DeployConfig::getTargetsListByFilter(const QString &filter) {
QString DeployConfig::getTargetDir(const QString &target) const {
if (_targets.contains(target))
return targetDir + _targets.value(target).getSufix();
return targetDir;
return targetDir + "/" + _targets.value(target).getPackage();
return targetDir + "/";
}
void DeployConfig::setTargetDir(const QString &target) {
@ -28,7 +28,7 @@ void DeployConfig::setTargetDir(const QString &target) {
}
DistroModule DeployConfig::getDistro(const QString &target) const {
return _packages.value(_targets.value(target).getSufix());
return _packages.value(_targets.value(target).getPackage());
}
DistroModule DeployConfig::getDistroFromPackage(const QString &package) const {

View File

@ -375,14 +375,14 @@ void FileManager::clear(const QString& targetDir, bool force) {
if (index.value().isFile()) {
if (removeFile(index.value())) {
qInfo() << "Remove " << index.value().absoluteFilePath() << " becouse it is deployed file";
qInfo() << "Remove " << index.value().absoluteFilePath() << " because it is deployed file";
}
} else {
QDir qdir(index.value().absoluteFilePath());
if (!qdir.entryList(QDir::NoDotAndDotDot | QDir::AllEntries).count()) {
qdir.removeRecursively();
qInfo() << "Remove " << index.value().absoluteFilePath() << " becouse it is empty";
qInfo() << "Remove " << index.value().absoluteFilePath() << " because it is empty";
}
}
}

View File

@ -11,12 +11,12 @@ TargetInfo::TargetInfo() {
}
QString TargetInfo::getSufix() const {
return sufix;
QString TargetInfo::getPackage() const {
return package;
}
void TargetInfo::setSufix(const QString &value) {
sufix = value;
void TargetInfo::setPackage(const QString &value) {
package = value;
}

View File

@ -16,11 +16,11 @@ class DEPLOYSHARED_EXPORT TargetInfo: public LibInfo
public:
TargetInfo();
QString getSufix() const;
void setSufix(const QString &value);
QString getPackage() const;
void setPackage(const QString &value);
private:
QString sufix = "";
QString package = "";
};
#endif // TARGETINFO_H

View File

@ -1401,7 +1401,7 @@ void deploytest::testPackages() {
bin += "," + target2;
bin += "," + target3;
auto packageString = "/package1/;" + QFileInfo(target1).absoluteFilePath() + ",/package2/;" + QFileInfo(target2).absoluteFilePath();
auto packageString = "package1;" + QFileInfo(target1).absoluteFilePath() + ",package2/ZzZ;" + QFileInfo(target2).absoluteFilePath();
comapareTree = Modules::separetedPackageslibs();