mirror of
https://github.com/audacity/linuxdeploy.git
synced 2026-04-13 15:19:49 -05:00
Fix deployLibrary destinationPath construction.
This commit is contained in:
@@ -333,7 +333,7 @@ namespace linuxdeploy {
|
||||
return patchelfPath;
|
||||
}
|
||||
|
||||
bool deployLibrary(const bf::path& path, int recursionLevel = 0, bool forceDeploy = false, const bf::path& destination = bf::path()) {
|
||||
bool deployLibrary(const bf::path& path, int recursionLevel = 0, bool forceDeploy = false,const bf::path &destination = bf::path()) {
|
||||
auto logPrefix = getLogPrefix(recursionLevel);
|
||||
|
||||
if (!forceDeploy && hasBeenVisitedAlready(path)) {
|
||||
@@ -341,6 +341,7 @@ namespace linuxdeploy {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
static auto isInExcludelist = [&logPrefix](const bf::path& fileName) {
|
||||
for (const auto& excludePattern : generatedExcludelist) {
|
||||
// simple string match is faster than using fnmatch
|
||||
@@ -378,6 +379,12 @@ namespace linuxdeploy {
|
||||
|
||||
auto destinationPath = destination.empty() ? appDirPath / "usr/lib/" : destination;
|
||||
|
||||
// not sure whether this is 100% bullet proof, but it simulates the cp command behavior
|
||||
if (destinationPath.string().back() == '/' || bf::is_directory(destinationPath)) {
|
||||
destinationPath /= path.filename();
|
||||
}
|
||||
|
||||
|
||||
deployFile(path, destinationPath);
|
||||
deployCopyrightFiles(path, logPrefix);
|
||||
|
||||
@@ -399,8 +406,9 @@ namespace linuxdeploy {
|
||||
rpath = "$ORIGIN/" + relPath.string() + ":$ORIGIN";
|
||||
}
|
||||
|
||||
setElfRPathOperations[destinationPath / path.filename()] = rpath;
|
||||
stripOperations.insert(destinationPath / path.filename());
|
||||
|
||||
setElfRPathOperations[destinationPath] = rpath;
|
||||
stripOperations.insert(destinationPath);
|
||||
|
||||
if (!deployElfDependencies(path, recursionLevel))
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user