mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Add -rpath to linker flags pointing to install directory
This removes the need to have the intermediate shell script that updates the LD_LIBRARY_PATH environment variable
This commit is contained in:
@@ -33,4 +33,17 @@ string io_utils_real_app_path(string relativePath) {
|
||||
return realAppPath;
|
||||
} else
|
||||
return "";
|
||||
}
|
||||
|
||||
string io_util_app_directory() {
|
||||
char path[BUFFER_SIZE];
|
||||
if (readlink("/proc/self/exe", path, BUFFER_SIZE) < 2)
|
||||
return "";
|
||||
|
||||
string appPath(path);
|
||||
unsigned int lastSlash = appPath.rfind("/");
|
||||
if (lastSlash != string::npos)
|
||||
return appPath.substr(0, lastSlash);
|
||||
else
|
||||
return appPath;
|
||||
}
|
||||
Reference in New Issue
Block a user