mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-04-27 10:14:32 +00:00
ref #422 fixed tests on linux
This commit is contained in:
parent
7b3071e0af
commit
e151550e59
@ -1139,7 +1139,7 @@ void ConfigParser::initExtraNames() {
|
||||
*
|
||||
*/
|
||||
if (isNeededQt()) {
|
||||
auto libs = DeployCore::Qt3rdpartyLibs( _config.getPlatform(""));
|
||||
auto libs = DeployCore::Qt3rdpartyLibs( _config.getPlatformOfAll());
|
||||
deployExtraNames(libs);
|
||||
}
|
||||
}
|
||||
|
@ -65,18 +65,19 @@ Platform DeployConfig::getPlatform(const QString& package) const {
|
||||
for( auto it = disto.targets().cbegin(); it != disto.targets().cend(); ++it) {
|
||||
result = result | _targets.value(*it).getPlatform();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Platform DeployConfig::getPlatformOfAll() const {
|
||||
Platform result = Platform::UnknownPlatform;
|
||||
|
||||
for( auto it = _targets.cbegin(); it != _targets.cend(); ++it) {
|
||||
result = result | it.value().getPlatform();
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
|
||||
}
|
||||
|
||||
const QHash<QString, TargetInfo> &DeployConfig::targets() const {
|
||||
|
@ -89,12 +89,17 @@ public:
|
||||
/**
|
||||
* @brief getPlatform This method return a platform of distribution.
|
||||
* If you set a pacakge name then this method return platform of package.
|
||||
* IF package name is empty or not exits then method return platform for all distribution.
|
||||
* @param package This is name of pacakge. Set this parameter to empty string for get a distribution of all pacakges.
|
||||
* @return platform of distribution.
|
||||
*/
|
||||
Platform getPlatform(const QString& package) const;
|
||||
|
||||
/**
|
||||
* @brief getPlatformOfAll This method return paltform of all targets of distributuon.
|
||||
* @return platform of all targets.
|
||||
*/
|
||||
Platform getPlatformOfAll() const;
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
|
@ -513,13 +513,17 @@ QString DeployCore::getMSVCVersion(MSVCVersion msvc) {
|
||||
}
|
||||
|
||||
bool DeployCore::isQtLib(const QString &lib) {
|
||||
QFileInfo info((lib));
|
||||
QFileInfo info(lib);
|
||||
/*
|
||||
* Task https://github.com/QuasarApp/CQtDeployer/issues/422
|
||||
* All qt libs need to contains the Qt label.
|
||||
*/
|
||||
bool isQt = isLib(info) && info.fileName().contains("Qt", ONLY_WIN_CASE_INSENSIATIVE);
|
||||
|
||||
if (_config) {
|
||||
isQt = isQt && _config->qtDir.isQt(info.absoluteFilePath());
|
||||
}
|
||||
|
||||
if (isQt && QuasarAppUtils::Params::isEndable("noQt") &&
|
||||
!QuasarAppUtils::Params::isEndable("qmake")) {
|
||||
return false;
|
||||
|
@ -65,3 +65,17 @@ Platform QtDir::getQtPlatform() const {
|
||||
void QtDir::setQtPlatform(const Platform &value) {
|
||||
qtPlatform = value;
|
||||
}
|
||||
|
||||
bool QtDir::isQt(QString path) const {
|
||||
|
||||
path = PathUtils::fixPath(path);
|
||||
|
||||
return
|
||||
(!libs.isEmpty() && path.contains(libs)) ||
|
||||
(!bins.isEmpty() && path.contains(bins)) ||
|
||||
(!libexecs.isEmpty() && path.contains(libexecs)) ||
|
||||
(!plugins.isEmpty() && path.contains(plugins)) ||
|
||||
(!qmls.isEmpty() && path.contains(qmls)) ||
|
||||
(!translations.isEmpty() && path.contains(translations)) ||
|
||||
(!resources.isEmpty() && path.contains(resources));
|
||||
}
|
||||
|
@ -35,6 +35,12 @@ public:
|
||||
Platform getQtPlatform() const;
|
||||
void setQtPlatform(const Platform &value);
|
||||
|
||||
/**
|
||||
* @brief isQt - This method check a path for belonging to QtDirs.
|
||||
* @param path This is cheecked path of library or any qt file.
|
||||
* @return true if object is qt.
|
||||
*/
|
||||
bool isQt(QString path) const;
|
||||
};
|
||||
|
||||
#endif // QTDIR_H
|
||||
|
@ -1598,7 +1598,8 @@ void deploytest::testIgnore() {
|
||||
|
||||
runTestParams({"-bin", bin, "clear" ,
|
||||
"-qmake", qmake,
|
||||
"-ignoreEnv", TestQtDir + "/lib," + TestQtDir + "/bin" }, &comapareTree);
|
||||
"-ignoreEnv", TestQtDir + "/lib," + TestQtDir + "/bin" },
|
||||
&comapareTree);
|
||||
|
||||
|
||||
comapareTree = TestModule.qtLibs() - removeTree;
|
||||
|
Loading…
x
Reference in New Issue
Block a user