forked from enlightenment/efl
elementary: be able to specify elementary private data subdirectory.
SVN revision: 67356
This commit is contained in:
parent
8994e4038b
commit
2b7a2bfba5
|
@ -684,6 +684,14 @@ AM_CONDITIONAL([HAVE_PO], [test "x${have_po}" = "xyes"])
|
|||
|
||||
EFL_CHECK_PATH_MAX
|
||||
|
||||
elementary_base_dir=".elementary"
|
||||
AC_ARG_WITH([elementary-base-dir],
|
||||
[AC_HELP_STRING([--with-elementary-base-dir=PATH], [specify the subdirectory for all elementary data @<:@default=${elementary_base_dir}@:>@])],
|
||||
[elementary_base_dir=${withval}],
|
||||
[elementary_base_dir=".elementary"])
|
||||
|
||||
AC_MSG_NOTICE([ELEMENTARY_BASE_DIR set to ${elementary_base_dir}])
|
||||
AC_DEFINE_UNQUOTED(ELEMENTARY_BASE_DIR, "${elementary_base_dir}", "subdirectory for all elementary data")
|
||||
|
||||
### Build and install examples
|
||||
EFL_CHECK_BUILD_EXAMPLES([enable_build_examples="yes"], [enable_build_examples="no"])
|
||||
|
|
|
@ -414,7 +414,7 @@ _elm_user_dir_snprintf(char *dst,
|
|||
home = "/";
|
||||
|
||||
user_dir_len = eina_str_join_len(dst, size, '/', home, strlen(home),
|
||||
".elementary", sizeof(".elementary") - 1);
|
||||
ELEMENTARY_BASE_DIR, sizeof(ELEMENTARY_BASE_DIR) - 1);
|
||||
|
||||
off = user_dir_len + 1;
|
||||
if (off >= size)
|
||||
|
|
|
@ -115,7 +115,7 @@ _elm_module_load(Elm_Module *m)
|
|||
home = getenv("HOME");
|
||||
if (home)
|
||||
{
|
||||
snprintf(buf, sizeof(buf), "%s/.elementary/modules/%s/%s/module" EFL_SHARED_EXTENSION, home, m->name, MODULE_ARCH);
|
||||
snprintf(buf, sizeof(buf), "%s/"ELEMENTARY_BASE_DIR"/modules/%s/%s/module" EFL_SHARED_EXTENSION, home, m->name, MODULE_ARCH);
|
||||
m->module = eina_module_new(buf);
|
||||
if (m->module && eina_module_load (m->module) == EINA_TRUE)
|
||||
{
|
||||
|
@ -124,9 +124,9 @@ _elm_module_load(Elm_Module *m)
|
|||
{
|
||||
m->shutdown_func = eina_module_symbol_get(m->module, "elm_modapi_shutdown");
|
||||
m->so_path = eina_stringshare_add(buf);
|
||||
snprintf(buf, sizeof(buf), "%s/.elementary/modules/%s/%s", home, m->name, MODULE_ARCH);
|
||||
snprintf(buf, sizeof(buf), "%s/"ELEMENTARY_BASE_DIR"/modules/%s/%s", home, m->name, MODULE_ARCH);
|
||||
m->bin_dir = eina_stringshare_add(buf);
|
||||
snprintf(buf, sizeof(buf), "%s/.elementary/modules/%s", home, m->name);
|
||||
snprintf(buf, sizeof(buf), "%s/"ELEMENTARY_BASE_DIR"/modules/%s", home, m->name);
|
||||
m->data_dir = eina_stringshare_add(buf);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -75,7 +75,7 @@ _elm_theme_theme_element_try(Elm_Theme *th, const char *home, const char *f, con
|
|||
snprintf(buf, sizeof(buf), "%s/%s", home, f + 2);
|
||||
return _elm_theme_find_try(th, buf, group);
|
||||
}
|
||||
snprintf(buf, sizeof(buf), "%s/.elementary/themes/%s.edj", home, f);
|
||||
snprintf(buf, sizeof(buf), "%s/"ELEMENTARY_BASE_DIR"/themes/%s.edj", home, f);
|
||||
file = _elm_theme_find_try(th, buf, group);
|
||||
if (file) return file;
|
||||
snprintf(buf, sizeof(buf), "%s/themes/%s.edj", _elm_data_dir, f);
|
||||
|
@ -148,7 +148,7 @@ _elm_theme_theme_data_try(Elm_Theme *th, const char *home, const char *f, const
|
|||
snprintf(buf, sizeof(buf), "%s/%s", home, f + 2);
|
||||
return _elm_theme_find_try(th, buf, key);
|
||||
}
|
||||
snprintf(buf, sizeof(buf), "%s/.elementary/themes/%s.edj", home, f);
|
||||
snprintf(buf, sizeof(buf), "%s/"ELEMENTARY_BASE_DIR"/themes/%s.edj", home, f);
|
||||
data = _elm_theme_find_data_try(th, buf, key);
|
||||
if (data) return data;
|
||||
snprintf(buf, sizeof(buf), "%s/themes/%s.edj", _elm_data_dir, f);
|
||||
|
@ -544,7 +544,7 @@ elm_theme_list_item_path_get(const char *f, Eina_Bool *in_search_path)
|
|||
snprintf(buf, sizeof(buf), "%s/%s", home, f + 2);
|
||||
return strdup(buf);
|
||||
}
|
||||
snprintf(buf, sizeof(buf), "%s/.elementary/themes/%s.edj", home, f);
|
||||
snprintf(buf, sizeof(buf), "%s/"ELEMENTARY_BASE_DIR"/themes/%s.edj", home, f);
|
||||
if (ecore_file_exists(buf))
|
||||
{
|
||||
if (in_search_path) *in_search_path = EINA_TRUE;
|
||||
|
@ -616,11 +616,11 @@ elm_theme_name_available_list_new(void)
|
|||
if (!home) home = "";
|
||||
}
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s/.elementary/themes", home);
|
||||
snprintf(buf, sizeof(buf), "%s/"ELEMENTARY_BASE_DIR"/themes", home);
|
||||
dir = ecore_file_ls(buf);
|
||||
EINA_LIST_FREE(dir, file)
|
||||
{
|
||||
snprintf(buf, sizeof(buf), "%s/.elementary/themes/%s", home, file);
|
||||
snprintf(buf, sizeof(buf), "%s/"ELEMENTARY_BASE_DIR"/themes/%s", home, file);
|
||||
if ((!ecore_file_is_dir(buf)) && (ecore_file_size(buf) > 0))
|
||||
{
|
||||
s = strchr(file, '.');
|
||||
|
|
Loading…
Reference in New Issue