Skip to content

Commit b661b39

Browse files
authored
Closes probonopd#138, the function 'getBinaryDependencies' was never used
1 parent c8aac71 commit b661b39

File tree

1 file changed

+0
-47
lines changed

1 file changed

+0
-47
lines changed

shared/shared.cpp

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -577,53 +577,6 @@ QList<LibraryInfo> getQtLibrariesForPaths(const QStringList &paths, const QStrin
577577
return result;
578578
}
579579

580-
QStringList getBinaryDependencies(const QString executablePath,
581-
const QString &path,
582-
const QList<QString> &additionalBinariesContainingRpaths)
583-
{
584-
QStringList binaries;
585-
586-
const QList<DylibInfo> dependencies = findDependencyInfo(path).dependencies;
587-
588-
bool rpathsLoaded = false;
589-
QSet<QString> rpaths;
590-
591-
// return bundle-local dependencies. (those starting with @executable_path)
592-
foreach (const DylibInfo &info, dependencies) {
593-
QString trimmedLine = info.binaryPath;
594-
if (trimmedLine.startsWith("@executable_path/")) {
595-
QString binary = QDir::cleanPath(executablePath + trimmedLine.mid(QStringLiteral("@executable_path/").length()));
596-
if (binary != path)
597-
binaries.append(binary);
598-
} else if (trimmedLine.startsWith("@rpath/")) {
599-
if (!rpathsLoaded) {
600-
rpaths = getBinaryRPaths(path, true, executablePath);
601-
foreach (const QString &binaryPath, additionalBinariesContainingRpaths) {
602-
QSet<QString> binaryRpaths = getBinaryRPaths(binaryPath, true);
603-
rpaths += binaryRpaths;
604-
}
605-
rpathsLoaded = true;
606-
}
607-
bool resolved = false;
608-
foreach (const QString &rpath, rpaths) {
609-
QString binary = QDir::cleanPath(rpath + "/" + trimmedLine.mid(QStringLiteral("@rpath/").length()));
610-
LogDebug() << "Checking for" << binary;
611-
if (QFile::exists(binary)) {
612-
binaries.append(binary);
613-
resolved = true;
614-
break;
615-
}
616-
}
617-
if (!resolved && !rpaths.isEmpty()) {
618-
LogError() << "Cannot resolve rpath" << trimmedLine;
619-
LogError() << " using" << rpaths;
620-
}
621-
}
622-
}
623-
624-
return binaries;
625-
}
626-
627580
// copies everything _inside_ sourcePath to destinationPath
628581
bool recursiveCopy(const QString &sourcePath, const QString &destinationPath)
629582
{

0 commit comments

Comments
 (0)