summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-07-30 13:24:24 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-07-30 15:42:40 -0400
commiteea696f9d8dd8d6f2a61127f088b38fa62c508ac (patch)
tree733cb60926258a505289a89087a983528bd79853
parenta3e01008a49c8e8c408446f56da75e3a1e50dbfe (diff)
fix wizard module loading when E_MODULE_SRC_PATH is set
-rw-r--r--src/modules/wizard/e_mod_main.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/modules/wizard/e_mod_main.c b/src/modules/wizard/e_mod_main.c
index ab38b7b20..90b178908 100644
--- a/src/modules/wizard/e_mod_main.c
+++ b/src/modules/wizard/e_mod_main.c
@@ -48,6 +48,7 @@ e_modapi_init(E_Module *m)
48 Eina_List *files; 48 Eina_List *files;
49 char buf[PATH_MAX]; 49 char buf[PATH_MAX];
50 char *file; 50 char *file;
51 const char *src_path;
51 52
52 wiz_module = m; 53 wiz_module = m;
53 e_wizard_init(); 54 e_wizard_init();
@@ -56,7 +57,11 @@ e_modapi_init(E_Module *m)
56 e_config->scale.use_custom = 1; 57 e_config->scale.use_custom = 1;
57 e_config->scale.factor = 1.2; 58 e_config->scale.factor = 1.2;
58 e_scale_update(); 59 e_scale_update();
59 snprintf(buf, sizeof(buf), "%s/%s", e_module_dir_get(m), MODULE_ARCH); 60 src_path = getenv("E_MODULE_SRC_PATH");
61 if (src_path)
62 snprintf(buf, sizeof(buf), "%s/.libs", e_module_dir_get(m));
63 else
64 snprintf(buf, sizeof(buf), "%s/%s", e_module_dir_get(m), MODULE_ARCH);
60 files = ecore_file_ls(buf); 65 files = ecore_file_ls(buf);
61 files = eina_list_sort(files, 0, (Eina_Compare_Cb)_cb_sort_files); 66 files = eina_list_sort(files, 0, (Eina_Compare_Cb)_cb_sort_files);
62 EINA_LIST_FREE(files, file) 67 EINA_LIST_FREE(files, file)
@@ -65,8 +70,11 @@ e_modapi_init(E_Module *m)
65 { 70 {
66 void *handle; 71 void *handle;
67 72
68 snprintf(buf, sizeof(buf), "%s/%s/%s", 73 if (src_path)
69 e_module_dir_get(m), MODULE_ARCH, file); 74 snprintf(buf, sizeof(buf), "%s/.libs/%s", e_module_dir_get(m), file);
75 else
76 snprintf(buf, sizeof(buf), "%s/%s/%s",
77 e_module_dir_get(m), MODULE_ARCH, file);
70 handle = dlopen(buf, RTLD_NOW | RTLD_GLOBAL); 78 handle = dlopen(buf, RTLD_NOW | RTLD_GLOBAL);
71 if (handle) 79 if (handle)
72 e_wizard_page_add(handle, 80 e_wizard_page_add(handle,