forked from enlightenment/enlightenment
1. no more strip/unstrip of path/ld_library_paht - i think we no
longer need or want it. 2. prepend e's bin dir to PATH and lib dir to LD_LIBRARY_PATH for better "it just works" usability. :) SVN revision: 73430
This commit is contained in:
parent
838a240e9b
commit
6188192e4e
|
@ -140,6 +140,31 @@ _xdg_data_dirs_augment(void)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_env_path_prepend(const char *env, const char *path)
|
||||
{
|
||||
char *p, *p2, *s;
|
||||
int len = 0, len2 = 0;
|
||||
|
||||
p = getenv(env);
|
||||
if (p) len = strlen(p);
|
||||
p2 = (char *)path;
|
||||
if (p2) len2 = strlen(p2);
|
||||
s = malloc(len + 1 + len2 + 1);
|
||||
if (s)
|
||||
{
|
||||
s[0] = 0;
|
||||
if (p) strcat(s, p);
|
||||
if (p2)
|
||||
{
|
||||
strcat(s, ":");
|
||||
strcat(s, p2);
|
||||
}
|
||||
e_util_env_set(env, s);
|
||||
free(s);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_fix_user_default_edj(void)
|
||||
{
|
||||
|
@ -245,6 +270,9 @@ main(int argc, char **argv)
|
|||
}
|
||||
TS("Determine Prefix Done");
|
||||
|
||||
_env_path_prepend("PATH", e_prefix_bin_get());
|
||||
_env_path_prepend("LD_LIBRARY_PATH", e_prefix_lib_get());
|
||||
|
||||
/* for debugging by redirecting stdout of e to a log file to tail */
|
||||
setvbuf(stdout, NULL, _IONBF, 0);
|
||||
|
||||
|
|
|
@ -936,12 +936,13 @@ e_util_file_time_get(time_t ftime)
|
|||
return s;
|
||||
}
|
||||
|
||||
static char *prev_ld_library_path = NULL;
|
||||
static char *prev_path = NULL;
|
||||
//static char *prev_ld_library_path = NULL;
|
||||
//static char *prev_path = NULL;
|
||||
|
||||
EAPI void
|
||||
e_util_library_path_strip(void)
|
||||
{
|
||||
/* disabled as i think we dont need/want this anymore - leftover from a bygone era
|
||||
char *p, *p2;
|
||||
|
||||
p = getenv("LD_LIBRARY_PATH");
|
||||
|
@ -962,11 +963,13 @@ e_util_library_path_strip(void)
|
|||
if (p2) p2++;
|
||||
e_util_env_set("PATH", p2);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
EAPI void
|
||||
e_util_library_path_restore(void)
|
||||
{
|
||||
/* disabled as i think we dont need/want this anymore - leftover from a bygone era
|
||||
if (prev_ld_library_path)
|
||||
{
|
||||
e_util_env_set("LD_LIBRARY_PATH", prev_ld_library_path);
|
||||
|
@ -977,6 +980,7 @@ e_util_library_path_restore(void)
|
|||
e_util_env_set("PATH", prev_path);
|
||||
E_FREE(prev_path);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
EAPI Evas_Object *
|
||||
|
|
Loading…
Reference in New Issue