| 1392 | } |
| 1393 | |
| 1394 | bool ConfigParser::initExtraPath() { |
| 1395 | const auto listLibDir = QuasarAppUtils::Params::getArg("libDir"). |
| 1396 | split(DeployCore::getSeparator(0)); |
| 1397 | |
| 1398 | QDir dir; |
| 1399 | |
| 1400 | for (const auto &i : listLibDir) { |
| 1401 | QFileInfo info(QuasarAppUtils::PlatformUtils::transportPathToSnapRoot(i)); |
| 1402 | if (info.isDir()) { |
| 1403 | if (_config.targets().contains(info.absoluteFilePath())) { |
| 1404 | |
| 1405 | qDebug() << "Skip the extra library path because it is target!"; |
| 1406 | continue; |
| 1407 | } |
| 1408 | |
| 1409 | if (_config.envirement.isIgnore(info.absoluteFilePath())) { |
| 1410 | |
| 1411 | qCritical() << QString("Failed to set libDir path!" |
| 1412 | " The %0 path will be ignored because" |
| 1413 | " this path is child path of the targetDir path" |
| 1414 | " or manually added into ignore environment."). |
| 1415 | arg(info.absoluteFilePath()); |
| 1416 | return false; |
| 1417 | } |
| 1418 | |
| 1419 | dir.setPath(info.absoluteFilePath()); |
| 1420 | auto extraDirs = getSetDirsRecursive(QDir::fromNativeSeparators(info.absoluteFilePath()), _config.depchLimit); |
| 1421 | _config.extraPaths.addExtraPaths(extraDirs); |
| 1422 | |
| 1423 | _config.envirement.addEnv(Envirement::recursiveInvairement(dir, 0, _config.depchLimit)); |
| 1424 | } else if (i.size() > 1) { |
| 1425 | |
| 1426 | _config.extraPaths.addExtraPathsMasks({i}); |
| 1427 | qDebug() << i + " is added as a path mask"; |
| 1428 | } else { |
| 1429 | qDebug() << i + " not added in path mask because" |
| 1430 | " the path mask must be large 2 characters"; |
| 1431 | } |
| 1432 | } |
| 1433 | |
| 1434 | return true; |
| 1435 | } |
| 1436 | |
| 1437 | void ConfigParser::addExtraNamesMasks(const QStringList& listNamesMasks) { |
| 1438 | for (const auto &i : listNamesMasks) { |
nothing calls this directly
no test coverage detected