forked from enlightenment/efl
emotion: make intree running work
Summary: before it would have only worked if there would have been the architecture in the path, which was definitly not the case. This fixes the problems. Depends on D6795 Subscribers: cedric, #reviewers, #committers, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6819
This commit is contained in:
parent
26bedebc18
commit
e308513f2e
|
@ -93,9 +93,15 @@ _emotion_modules_load(void)
|
||||||
const char **itr;
|
const char **itr;
|
||||||
for (itr = built_modules; *itr != NULL; itr++)
|
for (itr = built_modules; *itr != NULL; itr++)
|
||||||
{
|
{
|
||||||
|
Eina_Module *m;
|
||||||
bs_mod_get(buf, sizeof(buf), "emotion", *itr);
|
bs_mod_get(buf, sizeof(buf), "emotion", *itr);
|
||||||
_emotion_modules = eina_module_list_get(_emotion_modules, buf,
|
m = eina_module_new(buf);
|
||||||
EINA_FALSE, NULL, NULL);
|
|
||||||
|
if (!m) continue;
|
||||||
|
|
||||||
|
if (!_emotion_modules)
|
||||||
|
_emotion_modules = eina_array_new(4);
|
||||||
|
eina_array_push(_emotion_modules, m);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -313,8 +319,8 @@ _find_mod(const char *name)
|
||||||
EINA_ARRAY_ITER_NEXT(_emotion_modules, i, m, iterator)
|
EINA_ARRAY_ITER_NEXT(_emotion_modules, i, m, iterator)
|
||||||
{
|
{
|
||||||
const char *path = eina_module_file_get(m);
|
const char *path = eina_module_file_get(m);
|
||||||
const char *p, *p1, *p2;
|
const char *p, *p1, *p2, *p3;
|
||||||
int found, len;
|
int found, len, len2;
|
||||||
|
|
||||||
if ((!path) || (!path[0])) continue;
|
if ((!path) || (!path[0])) continue;
|
||||||
// path is /*/modulename/ARCH/module.* - we want "modulename"
|
// path is /*/modulename/ARCH/module.* - we want "modulename"
|
||||||
|
@ -330,6 +336,7 @@ _find_mod(const char *name)
|
||||||
// found == 1 -> p = /module.*
|
// found == 1 -> p = /module.*
|
||||||
// found == 2 -> p = /ARCH/module.*
|
// found == 2 -> p = /ARCH/module.*
|
||||||
// found == 3 -> p = /modulename/ARCH/module.*
|
// found == 3 -> p = /modulename/ARCH/module.*
|
||||||
|
if (found == 1) p3 = p;
|
||||||
if (found == 2) p2 = p;
|
if (found == 2) p2 = p;
|
||||||
if (found == 3)
|
if (found == 3)
|
||||||
{
|
{
|
||||||
|
@ -342,9 +349,10 @@ _find_mod(const char *name)
|
||||||
{
|
{
|
||||||
p1++;
|
p1++;
|
||||||
len = p2 - p1;
|
len = p2 - p1;
|
||||||
if (len == inlen)
|
len2 = p3 - (p2 + 1);
|
||||||
|
if (len == inlen || len2 == inlen)
|
||||||
{
|
{
|
||||||
if (!strncmp(p1, name, len)) return m;
|
if (!strncmp(p1, name, len) || !strncmp(p2 + 1, name, len2)) return m;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue