feature/relative-plugin-paths - #302
Conversation
|
I assume that this PR is for testing purposes only so it is not intended to be merged, right? Also why don't you just do |
93980be to
8088acf
Compare
e91d354 to
fb2e4f5
Compare
92fc559 to
a01ed69
Compare
d8636bc to
c5fa7b9
Compare
e412ad0 to
fe82fc3
Compare
|
@csoler correct, it targets testers (typically running several versions side by side) — a normal install is unaffected: the relative dirs simply don't exist there and the system path is still searched. About the plain |
6a8124f to
b7d709c
Compare
csoler
left a comment
There was a problem hiding this comment.
It seems to me that this PR is quite a lot of code as compared to what it wants to do, especially that it complicates a lot rsinit.cc and this file it is already pretty long:
-
removing duplicate paths is not useful because the plugin manager can easily remove duplicate files by replacing the member std::vector with a std::map<RsFileHash,PluginInfo> (or use some temporary std::map that is later converted to std::vector, in order to avoid changing too much code). It's way simpler indeed to remove duplicates based on hash of the plugins rather than based on expanded directory names (which is system-dependent).
-
I don't see the need for a special treatment for relative paths. Just append them to currentExecutablePath() and that's all.
| #include <vector> | ||
|
|
||
| namespace { | ||
| std::string resolvePathTextually(const std::string& path) |
There was a problem hiding this comment.
There is a function doing exactly this already: canonicalize_file_name() in glibc. See how it's used in rsdir.cc. It can be called using RsDirUtil::removeSymLinks() which also...removes the symbolic links in the path.
50484a8 to
1f8ae24
Compare
1f8ae24 to
1b4f397
Compare
feature/relative-plugin-paths
Useful for testing environments. When running this branch, RetroShare will dynamically resolve the executable's directory and first look for plugins in ../lib/retroshare/extensions6/ and ./lib/retroshare/extensions6/ (relative to the binary's location) before falling back to the hardcoded system path.