From 179fd31b77cf5e4bb7f5a2de99bde2f2b44c8848 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Wed, 13 Feb 2013 11:35:46 +0000 Subject: add api and lets test it - i'll document it later, but need to test first. SVN revision: 83867 --- src/lib/evas/file/evas_module.c | 43 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'src/lib/evas/file') diff --git a/src/lib/evas/file/evas_module.c b/src/lib/evas/file/evas_module.c index 0378423a6a..0a5e302a22 100644 --- a/src/lib/evas/file/evas_module.c +++ b/src/lib/evas/file/evas_module.c @@ -615,3 +615,46 @@ _evas_module_libdir_get(void) if (!pfx) return NULL; return eina_prefix_lib_get(pfx); } + +EAPI const char * +evas_cserve_path_get(void) +{ + static char buf[PATH_MAX]; + const char *lib; + Eina_Bool shutdown = EINA_FALSE; + + if (!pfx) + { + shutdown = EINA_TRUE; + eina_init(); + pfx = eina_prefix_new + (NULL, _evas_module_libdir_get, "EVAS", "evas", "checkme", + PACKAGE_BIN_DIR, PACKAGE_LIB_DIR, + PACKAGE_DATA_DIR, PACKAGE_DATA_DIR); + if (!pfx) + { + eina_shutdown(); + return NULL; + } + } + lib = eina_prefix_lib_get(pfx); + if (!lib) + { + if (shutdown) + { + eina_prefix_free(pfx); + pfx = NULL; + eina_shutdown(); + } + return NULL; + } + snprintf(buf, sizeof(buf), "%s/evas/cserve2/bin/%s/evas_cserve2", + lib, MODULE_ARCH); + if (shutdown) + { + eina_prefix_free(pfx); + pfx = NULL; + eina_shutdown(); + } + return buf; +} -- cgit v1.2.1