diff --git a/Deploy/configparser.cpp b/Deploy/configparser.cpp index 71470cb..ce79174 100644 --- a/Deploy/configparser.cpp +++ b/Deploy/configparser.cpp @@ -1116,7 +1116,7 @@ void ConfigParser::initExtraNames() { const auto deployExtraNames = [this](const QStringList& listNamesMasks){ for (const auto &i : listNamesMasks) { if (i.size() > 1) { - _config.extraPaths.addtExtraNamesMasks({i}); + _config.allowedPaths.addtExtraNamesMasks({i}); QuasarAppUtils::Params::log(i + " added like a file name mask", QuasarAppUtils::Info); diff --git a/Deploy/deployconfig.h b/Deploy/deployconfig.h index dc17609..1da9f20 100644 --- a/Deploy/deployconfig.h +++ b/Deploy/deployconfig.h @@ -41,6 +41,11 @@ public: */ Extra extraPaths; + /** + * @brief allowedPaths - it is list with filters for allowed pathes, files or libraries + */ + Extra allowedPaths; + /** * @brief envirement - envirement for find libraries */ diff --git a/Deploy/deploycore.cpp b/Deploy/deploycore.cpp index 4cb551e..4a95798 100644 --- a/Deploy/deploycore.cpp +++ b/Deploy/deploycore.cpp @@ -135,6 +135,10 @@ LibPriority DeployCore::getLibPriority(const QString &lib) { return AlienLib; } + if (isAllowedLib(lib)) { + return AllowedLib; + } + return SystemLib; } @@ -542,6 +546,11 @@ bool DeployCore::isAlienLib(const QString &lib) { lib.contains("/PROGRAM FILES", ONLY_WIN_CASE_INSENSIATIVE); } +bool DeployCore::isAllowedLib(const QString &lib) { + QFileInfo info(lib); + return _config->allowedPaths.contains(info.absoluteFilePath()); +} + QStringList DeployCore::Qt3rdpartyLibs(Platform platform) { QStringList result; diff --git a/Deploy/deploycore.h b/Deploy/deploycore.h index 9f43eee..b25bf6f 100644 --- a/Deploy/deploycore.h +++ b/Deploy/deploycore.h @@ -56,11 +56,25 @@ enum Platform { GeneralFile = 0x0100 }; +/** + * @brief The LibPriority enum This is library priority. + * The lower the priority of the topics, the library is the most suitable for distribution. + */ enum LibPriority : int { + // ================= General Libraryes + /// This is qt libraryes. QtLib = 0x0, + /// This is user libraryes. ExtraLib, + /// This is qt 3dParty and user libraryes. (distribution-safe libraries) + AllowedLib, + + // ================= System Libraryes + /// This is rest of all libraryes (frm system and another). SystemLib, + /// This is libraryes from another proggram distributions. AlienLib, + /// This is General Files. NotFile = 0xF, }; @@ -166,6 +180,13 @@ public: static QChar getSeparator(int lvl); static bool isAlienLib(const QString &lib); + /** + * @brief isAllowedLib This method checks the library if the library is allowed or not, allowet libraryes is added with extraLibs method. + * @param lib This is library fuul path + * @return true if lirary is allowed + */ + static bool isAllowedLib(const QString &lib); + /** * @brief QtThreethepartyLibs This method return list of 3rdparty libraryes of qt for selected platform. * @param platform This is OS name.