mirror of
https://github.com/audacity/linuxdeploy.git
synced 2025-12-10 21:08:48 -06:00
commit
4c5b9c5daf
@ -56,6 +56,18 @@ namespace linuxdeploy {
|
|||||||
return split(s, '\n');
|
return split(s, '\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static std::string join(const std::vector<std::string> &strings, const std::string &delimiter) {
|
||||||
|
std::string result;
|
||||||
|
for (size_t i = 0; i < strings.size(); i++) {
|
||||||
|
result += strings[i];
|
||||||
|
|
||||||
|
if (i != strings.size() - 1) {
|
||||||
|
result += delimiter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
static inline std::string strLower(std::string s) {
|
static inline std::string strLower(std::string s) {
|
||||||
std::transform(s.begin(), s.end(), s.begin(), [](unsigned char c) { return std::tolower(c); });
|
std::transform(s.begin(), s.end(), s.begin(), [](unsigned char c) { return std::tolower(c); });
|
||||||
return s;
|
return s;
|
||||||
|
|||||||
@ -834,7 +834,14 @@ namespace linuxdeploy {
|
|||||||
if (!d->deployElfDependencies(sharedLibrary))
|
if (!d->deployElfDependencies(sharedLibrary))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
d->setElfRPathOperations[sharedLibrary] = "$ORIGIN";
|
const auto rpath = elf_file::ElfFile(sharedLibrary).getRPath();
|
||||||
|
auto rpathList = util::split(rpath, ':');
|
||||||
|
if (std::find(rpathList.begin(), rpathList.end(), "$ORIGIN") == rpathList.end()) {
|
||||||
|
rpathList.push_back("$ORIGIN");
|
||||||
|
d->setElfRPathOperations[sharedLibrary] = util::join(rpathList, ":");
|
||||||
|
} else {
|
||||||
|
d->setElfRPathOperations[sharedLibrary] = rpath;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// used to bundle dependencies of executables or libraries in the AppDir without moving them
|
// used to bundle dependencies of executables or libraries in the AppDir without moving them
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user