4
1
mirror of https://github.com/QuasarApp/CQtDeployer.git synced 2025-05-05 14:09:35 +00:00

fix work with multipackage project

This commit is contained in:
Andrei Yankovich 2020-12-02 13:50:33 +03:00
parent 00e0f2c7b9
commit ad42202fa8
4 changed files with 13 additions and 3 deletions

@ -495,6 +495,8 @@ bool ConfigParser::initPackages() {
if (fdefaultPackage) {
_config.packagesEdit().insert(defaultPackage, {});
_config.setDefaultPackage(defaultPackage);
} else {
_config.setDefaultPackage(_config.packages().begin().key());
}
return true;

@ -26,10 +26,10 @@ FileManager::FileManager() {
bool FileManager::initDir(const QString &path) {
if (!QFileInfo::exists(path)) {
addToDeployed(path);
if (!QDir().mkpath(path)) {
return false;
}
addToDeployed(path);
}
return true;
@ -62,9 +62,8 @@ void FileManager::loadDeployemendFiles(const QString &targetDir) {
bool FileManager::addToDeployed(const QString& path) {
auto info = QFileInfo(path);
if (info.isFile() || !info.exists()) {
if (info.exists()) {
_deployedFiles += info.absoluteFilePath();
if (!QFile::setPermissions(path, static_cast<QFile::Permission>(0x7775))) {
QuasarAppUtils::Params::log("permishens set fail", QuasarAppUtils::Warning);
}

@ -68,6 +68,9 @@ bool Packing::create() {
_proc->start();
if (!_proc->waitForStarted()) {
QuasarAppUtils::Params::log(_proc->errorString(), QuasarAppUtils::Error);
QuasarAppUtils::Params::log(QString("Process error code: %0").arg(_proc->error()),
QuasarAppUtils::Error);
return false;
}

@ -162,6 +162,8 @@ private slots:
void testDependencyMap();
void testQmlScaner();
void customTest();
};
bool deploytest::runProcess(const QString &DistroPath,
@ -987,6 +989,10 @@ void deploytest::testQmlScaner() {
}
void deploytest::customTest() {
}
void deploytest::testQmlExtrct() {
QmlCreator creator("./");
auto imports = creator.getQmlImports();