forked from qt-creator/qt-creator
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:
@@ -245,7 +245,16 @@ QList<ProjectExplorer::DeployableFile> QnxDeployQtLibrariesDialog::gatherFiles()
|
|||||||
|
|
||||||
QTC_ASSERT(qtVersion, return result);
|
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_PLUGINS"))));
|
||||||
result.append(gatherFiles(qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_IMPORTS"))));
|
result.append(gatherFiles(qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_IMPORTS"))));
|
||||||
result.append(gatherFiles(qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_QML"))));
|
result.append(gatherFiles(qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_QML"))));
|
||||||
@@ -254,14 +263,15 @@ QList<ProjectExplorer::DeployableFile> QnxDeployQtLibrariesDialog::gatherFiles()
|
|||||||
}
|
}
|
||||||
|
|
||||||
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;
|
QList<ProjectExplorer::DeployableFile> result;
|
||||||
if (dirPath.isEmpty())
|
if (dirPath.isEmpty())
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
QDir dir(dirPath);
|
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) {
|
for (int i = 0; i < list.size(); ++i) {
|
||||||
QFileInfo fileInfo = list.at(i);
|
QFileInfo fileInfo = list.at(i);
|
||||||
|
|||||||
@@ -91,7 +91,8 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
QList<ProjectExplorer::DeployableFile> gatherFiles();
|
QList<ProjectExplorer::DeployableFile> gatherFiles();
|
||||||
QList<ProjectExplorer::DeployableFile> gatherFiles(const QString &dirPath,
|
QList<ProjectExplorer::DeployableFile> gatherFiles(const QString &dirPath,
|
||||||
const QString &baseDir = QString());
|
const QString &baseDir = QString(),
|
||||||
|
const QStringList &nameFilters = QStringList());
|
||||||
|
|
||||||
QString fullRemoteDirectory() const;
|
QString fullRemoteDirectory() const;
|
||||||
void checkRemoteDirectoryExistance();
|
void checkRemoteDirectoryExistance();
|
||||||
|
|||||||
Reference in New Issue
Block a user