diff options
Diffstat (limited to 'src/lib/evas/file')
-rw-r--r-- | src/lib/evas/file/evas_module.c | 43 |
1 files changed, 43 insertions, 0 deletions
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) | |||
615 | if (!pfx) return NULL; | 615 | if (!pfx) return NULL; |
616 | return eina_prefix_lib_get(pfx); | 616 | return eina_prefix_lib_get(pfx); |
617 | } | 617 | } |
618 | |||
619 | EAPI const char * | ||
620 | evas_cserve_path_get(void) | ||
621 | { | ||
622 | static char buf[PATH_MAX]; | ||
623 | const char *lib; | ||
624 | Eina_Bool shutdown = EINA_FALSE; | ||
625 | |||
626 | if (!pfx) | ||
627 | { | ||
628 | shutdown = EINA_TRUE; | ||
629 | eina_init(); | ||
630 | pfx = eina_prefix_new | ||
631 | (NULL, _evas_module_libdir_get, "EVAS", "evas", "checkme", | ||
632 | PACKAGE_BIN_DIR, PACKAGE_LIB_DIR, | ||
633 | PACKAGE_DATA_DIR, PACKAGE_DATA_DIR); | ||
634 | if (!pfx) | ||
635 | { | ||
636 | eina_shutdown(); | ||
637 | return NULL; | ||
638 | } | ||
639 | } | ||
640 | lib = eina_prefix_lib_get(pfx); | ||
641 | if (!lib) | ||
642 | { | ||
643 | if (shutdown) | ||
644 | { | ||
645 | eina_prefix_free(pfx); | ||
646 | pfx = NULL; | ||
647 | eina_shutdown(); | ||
648 | } | ||
649 | return NULL; | ||
650 | } | ||
651 | snprintf(buf, sizeof(buf), "%s/evas/cserve2/bin/%s/evas_cserve2", | ||
652 | lib, MODULE_ARCH); | ||
653 | if (shutdown) | ||
654 | { | ||
655 | eina_prefix_free(pfx); | ||
656 | pfx = NULL; | ||
657 | eina_shutdown(); | ||
658 | } | ||
659 | return buf; | ||
660 | } | ||