mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-02-07 15:28:47 +01:00
macdeployqt: Simplify code in changeInstallName
This commit is contained in:
parent
46d927291c
commit
b071a4df70
14
3rdparty/macdeployqt/shared.cpp
vendored
14
3rdparty/macdeployqt/shared.cpp
vendored
@ -858,17 +858,11 @@ void changeInstallName(const QString &bundlePath, const FrameworkInfo &framework
|
|||||||
} else {
|
} else {
|
||||||
deployedInstallName = framework.deployedInstallName;
|
deployedInstallName = framework.deployedInstallName;
|
||||||
}
|
}
|
||||||
changeInstallName(framework.installName, deployedInstallName, binary);
|
if (!framework.sourceFilePath.isEmpty()) {
|
||||||
// Workaround for the case when the library ID name is a symlink, while the dependencies
|
changeInstallName(framework.sourceFilePath, deployedInstallName, binary);
|
||||||
// specified using the canonical path to the library (QTBUG-56814)
|
|
||||||
QString canonicalInstallName = QFileInfo(framework.installName).canonicalFilePath();
|
|
||||||
if (!canonicalInstallName.isEmpty() && canonicalInstallName != framework.installName) {
|
|
||||||
changeInstallName(canonicalInstallName, deployedInstallName, binary);
|
|
||||||
}
|
}
|
||||||
// Homebrew workaround, resolve symlink /usr/local/opt/library to /usr/local/Cellar/library
|
if (!framework.installName.isEmpty() && framework.installName != framework.sourceFilePath) {
|
||||||
if (framework.installName.startsWith("/usr/local/opt/") && framework.installName.count('/') >= 5) {
|
changeInstallName(framework.installName, deployedInstallName, binary);
|
||||||
canonicalInstallName = QFileInfo(framework.installName.section('/', 0, 4)).canonicalFilePath() + "/" + framework.installName.section('/', 5);
|
|
||||||
changeInstallName(canonicalInstallName, deployedInstallName, binary);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user