forked from enlightenment/enlightenment
fix wizard module loading when E_MODULE_SRC_PATH is set
This commit is contained in:
parent
043a0b13bb
commit
9bf1bd514b
|
@ -48,6 +48,7 @@ e_modapi_init(E_Module *m)
|
||||||
Eina_List *files;
|
Eina_List *files;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
char *file;
|
char *file;
|
||||||
|
const char *src_path;
|
||||||
|
|
||||||
wiz_module = m;
|
wiz_module = m;
|
||||||
e_wizard_init();
|
e_wizard_init();
|
||||||
|
@ -56,6 +57,10 @@ e_modapi_init(E_Module *m)
|
||||||
e_config->scale.use_custom = 1;
|
e_config->scale.use_custom = 1;
|
||||||
e_config->scale.factor = 1.2;
|
e_config->scale.factor = 1.2;
|
||||||
e_scale_update();
|
e_scale_update();
|
||||||
|
src_path = getenv("E_MODULE_SRC_PATH");
|
||||||
|
if (src_path)
|
||||||
|
snprintf(buf, sizeof(buf), "%s/.libs", e_module_dir_get(m));
|
||||||
|
else
|
||||||
snprintf(buf, sizeof(buf), "%s/%s", e_module_dir_get(m), MODULE_ARCH);
|
snprintf(buf, sizeof(buf), "%s/%s", e_module_dir_get(m), MODULE_ARCH);
|
||||||
files = ecore_file_ls(buf);
|
files = ecore_file_ls(buf);
|
||||||
files = eina_list_sort(files, 0, (Eina_Compare_Cb)_cb_sort_files);
|
files = eina_list_sort(files, 0, (Eina_Compare_Cb)_cb_sort_files);
|
||||||
|
@ -65,6 +70,9 @@ e_modapi_init(E_Module *m)
|
||||||
{
|
{
|
||||||
void *handle;
|
void *handle;
|
||||||
|
|
||||||
|
if (src_path)
|
||||||
|
snprintf(buf, sizeof(buf), "%s/.libs/%s", e_module_dir_get(m), file);
|
||||||
|
else
|
||||||
snprintf(buf, sizeof(buf), "%s/%s/%s",
|
snprintf(buf, sizeof(buf), "%s/%s/%s",
|
||||||
e_module_dir_get(m), MODULE_ARCH, file);
|
e_module_dir_get(m), MODULE_ARCH, file);
|
||||||
handle = dlopen(buf, RTLD_NOW | RTLD_GLOBAL);
|
handle = dlopen(buf, RTLD_NOW | RTLD_GLOBAL);
|
||||||
|
|
Loading…
Reference in New Issue