QNX: Deploy only *.so.? libs

While on Unix systems, libQt5XYZ.so* are symlinks to libQt5XYZ.so.1.2.3, on
Windows hosts these files are copies instead of actual symlinks. Therefore,
when deploying from a Windows host, all the duplicates get uploaded to the
target, effectively taking a lot of unnecessary space.

Because Qt QNX apps link only agains *.so.? files, we deploy only those when
on Windows hosts.

Change-Id: I8f9f3f3a30d227b907f94f30ca47636dcb345eec
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Tobias Nätterlund <tobias.naetterlund@kdab.com>
Reviewed-by: Filipe Azevedo <filipe.azevedo@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This commit is contained in:
Rafael Roquetto
2014-12-04 11:45:06 -02:00
parent 6a30fa9f53
commit b36c399272
2 changed files with 15 additions and 4 deletions

View File

@@ -245,7 +245,16 @@ QList<ProjectExplorer::DeployableFile> QnxDeployQtLibrariesDialog::gatherFiles()
QTC_ASSERT(qtVersion, return result);
result.append(gatherFiles(qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_LIBS"))));
if (Utils::HostOsInfo::isWindowsHost()) {
result.append(gatherFiles(qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_LIBS")),
QString(), QStringList() << QLatin1String("*.so.?")));
result.append(gatherFiles(qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_LIBS"))
+ QLatin1String("/fonts")));
} else {
result.append(gatherFiles(
qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_LIBS"))));
}
result.append(gatherFiles(qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_PLUGINS"))));
result.append(gatherFiles(qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_IMPORTS"))));
result.append(gatherFiles(qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_QML"))));
@@ -254,14 +263,15 @@ QList<ProjectExplorer::DeployableFile> QnxDeployQtLibrariesDialog::gatherFiles()
}
QList<ProjectExplorer::DeployableFile> QnxDeployQtLibrariesDialog::gatherFiles(
const QString &dirPath, const QString &baseDirPath)
const QString &dirPath, const QString &baseDirPath, const QStringList &nameFilters)
{
QList<ProjectExplorer::DeployableFile> result;
if (dirPath.isEmpty())
return result;
QDir dir(dirPath);
QFileInfoList list = dir.entryInfoList(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot);
QFileInfoList list = dir.entryInfoList(nameFilters,
QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot);
for (int i = 0; i < list.size(); ++i) {
QFileInfo fileInfo = list.at(i);