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:
@@ -3,7 +3,6 @@
|
||||
// can be found in the LICENSE file.
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <iostream>
|
||||
#include <unistd.h>
|
||||
#include <string>
|
||||
#include "atom.h"
|
||||
@@ -59,9 +58,11 @@ int main(int argc, char *argv[]) {
|
||||
if (szWorkingDir == NULL)
|
||||
return -1;
|
||||
|
||||
std::string fullPath = argv[0];
|
||||
fullPath = fullPath.substr(0, fullPath.length() - 5);
|
||||
szPath = fullPath.c_str();
|
||||
std::string appDir = io_util_app_directory();
|
||||
if (appDir.empty())
|
||||
return -1;
|
||||
|
||||
szPath = appDir.c_str();
|
||||
|
||||
std::string pathToOpen;
|
||||
if (argc >= 2) {
|
||||
@@ -111,7 +112,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
window_info.SetAsChild(vbox);
|
||||
|
||||
std::string path = io_utils_real_app_path("/../index.html");
|
||||
std::string path = io_utils_real_app_path("/index.html");
|
||||
if (path.empty())
|
||||
return -1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user