Improve macdeployqt patch
This commit is contained in:
parent
85b59e79d3
commit
beacea0482
21
3rdparty/macdeployqt/shared.cpp
vendored
21
3rdparty/macdeployqt/shared.cpp
vendored
@ -197,16 +197,25 @@ OtoolInfo findDependencyInfo(const QString &binaryPath)
|
|||||||
}
|
}
|
||||||
|
|
||||||
outputLines.removeFirst(); // remove line containing the binary path
|
outputLines.removeFirst(); // remove line containing the binary path
|
||||||
|
|
||||||
if (binaryPath.contains(".framework/") || binaryPath.endsWith(".dylib")) {
|
if (binaryPath.contains(".framework/") || binaryPath.endsWith(".dylib")) {
|
||||||
const auto match = regexp.match(outputLines.first());
|
const auto match = regexp.match(outputLines.first());
|
||||||
if (match.hasMatch()) {
|
if (match.hasMatch()) {
|
||||||
info.installName = match.captured(1);
|
QString installname = match.captured(1);
|
||||||
info.compatibilityVersion = QVersionNumber::fromString(match.captured(2));
|
if (QFileInfo(binaryPath).fileName() == QFileInfo(installname).fileName()) {
|
||||||
info.currentVersion = QVersionNumber::fromString(match.captured(3));
|
info.installName = installname;
|
||||||
} else {
|
info.compatibilityVersion = QVersionNumber::fromString(match.captured(2));
|
||||||
LogError() << "Could not parse otool output line:" << outputLines.first();
|
info.currentVersion = QVersionNumber::fromString(match.captured(3));
|
||||||
|
outputLines.removeFirst();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
info.installName = binaryPath;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
LogError() << "Could not parse otool output line:" << outputLines.first();
|
||||||
|
outputLines.removeFirst();
|
||||||
}
|
}
|
||||||
//outputLines.removeFirst();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const QString &outputLine : outputLines) {
|
for (const QString &outputLine : outputLines) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user