Use eina_prefix for generation path to resource of enventor library.
This way provide the ability to determine the runtime location of the library. Makes possible to use enventor library on the Windows platform.
This commit is contained in:
parent
59a5faf6e0
commit
148ad69c3b
|
@ -110,9 +110,6 @@ EFL_WITH_BIN([eolian-cxx], [eolian-cxx], [eolian_cxx])
|
|||
AM_CONDITIONAL([HAVE_EOLIAN_GEN], [true])
|
||||
AM_CONDITIONAL([HAVE_EOLIAN_CXX], [true])
|
||||
|
||||
ENVENTOR_DEFINE=" -DENVENTOR_THEME_PATH=\\\"${datadir}/enventor/themes/\\\" "
|
||||
AC_SUBST([ENVENTOR_DEFINE])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
src/Makefile
|
||||
|
|
|
@ -14,8 +14,7 @@ AM_CPPFLAGS = -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" \
|
|||
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
|
||||
-I$(top_srcdir)/src/bin \
|
||||
-I$(top_srcdir)/src/include \
|
||||
@ENVENTOR_CFLAGS@ \
|
||||
@ENVENTOR_DEFINE@
|
||||
@ENVENTOR_CFLAGS@
|
||||
|
||||
lib_LTLIBRARIES = libenventor.la
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ const char SIG_FOCUSED[] = "focused";
|
|||
static int _enventor_init_count = 0;
|
||||
static int _enventor_log_dom = -1;
|
||||
static Ecore_Event_Handler *_key_down_handler = NULL;
|
||||
static Eina_Prefix *pfx = NULL;
|
||||
|
||||
static Eina_Bool
|
||||
key_down_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *ev)
|
||||
|
@ -94,9 +95,12 @@ enventor_init(int argc, char **argv)
|
|||
_enventor_log_dom = EINA_LOG_DOMAIN_GLOBAL;
|
||||
}
|
||||
|
||||
snprintf(EDJE_PATH, sizeof(EDJE_PATH), "%s/enventor.edj",
|
||||
ENVENTOR_THEME_PATH);
|
||||
pfx = eina_prefix_new(NULL, enventor_init, "ENVENTOR", "enventor", NULL,
|
||||
PACKAGE_BIN_DIR, PACKAGE_LIB_DIR,
|
||||
PACKAGE_DATA_DIR, PACKAGE_DATA_DIR);
|
||||
|
||||
snprintf(EDJE_PATH, sizeof(EDJE_PATH), "%s/themes/enventor.edj",
|
||||
eina_prefix_data_get(pfx));
|
||||
srand(time(NULL));
|
||||
|
||||
_key_down_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN,
|
||||
|
@ -124,6 +128,7 @@ enventor_shutdown(void)
|
|||
eina_log_domain_unregister(_enventor_log_dom);
|
||||
_enventor_log_dom = -1;
|
||||
}
|
||||
eina_prefix_free(pfx);
|
||||
|
||||
elm_shutdown();
|
||||
eio_shutdown();
|
||||
|
|
Loading…
Reference in New Issue