diff options
author | Mike Blumenkrantz <zmike@samsung.com> | 2018-07-05 17:26:42 -0400 |
---|---|---|
committer | SangHyeon Jade Lee <sh10233.lee@samsung.com> | 2018-07-12 11:34:47 +0900 |
commit | b8da2890fe56a072e7aad484af1b2c502bc0b3ed (patch) | |
tree | 10b145d07735113e038c3a59ec058361c2aa8aa2 | |
parent | 75cb22dc5839322a31e248b33702fc18db85c9ee (diff) | |
download | efl-b8da2890fe56a072e7aad484af1b2c502bc0b3ed.tar.gz |
efreet: simplify and fix efreetd launch
this previously used an entire eina prefix to determine where to find
efreetd, when a simpler approach would have been to just pass the directory
where it's being installed
this also inhibited running the correct efreetd during in-tree builds and tests,
as it was using the install prefix instead of the in-tree wrapper script
@fix
fix T6713
Differential Revision: https://phab.enlightenment.org/D6516
-rw-r--r-- | src/Makefile_Efreet.am | 5 | ||||
-rw-r--r-- | src/lib/efreet/efreet_cache.c | 15 |
2 files changed, 11 insertions, 9 deletions
diff --git a/src/Makefile_Efreet.am b/src/Makefile_Efreet.am index f955cec33e..8912919892 100644 --- a/src/Makefile_Efreet.am +++ b/src/Makefile_Efreet.am @@ -11,6 +11,7 @@ EFREET_COMMON_CPPFLAGS = -I$(top_builddir)/src/lib/efl \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_DATA_DIR=\"$(datadir)/efreet\" \ -DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)\" \ +-DPACKAGE_SRC_DIR=\"$(abs_top_srcdir)\" \ -DDATA_DIR=\"$(datadir)\" \ -DLOCALE_DIR=\"@LOCALE_DIR@\" \ @EFREET_CFLAGS@ @@ -43,7 +44,9 @@ lib/efreet/efreet_uri.c \ lib/efreet/efreet_cache.c \ lib/efreet/efreet_private.h \ lib/efreet/efreet_xml.h \ -lib/efreet/efreet_cache_private.h +lib/efreet/efreet_cache_private.h \ +static_libs/buildsystem/buildsystem.h \ +static_libs/buildsystem/buildsystem_autotools.c lib_efreet_libefreet_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl $(EFREET_COMMON_CPPFLAGS) lib_efreet_libefreet_la_LIBADD = @EFREET_LIBS@ @EVIL_LIBS@ diff --git a/src/lib/efreet/efreet_cache.c b/src/lib/efreet/efreet_cache.c index 8ede4614d6..2a9bdef74d 100644 --- a/src/lib/efreet/efreet_cache.c +++ b/src/lib/efreet/efreet_cache.c @@ -37,7 +37,6 @@ struct _Efreet_Old_Cache }; static Ecore_Ipc_Server *ipc = NULL; -static Eina_Prefix *pfx = NULL; static Ecore_Event_Handler *hnd_add = NULL; static Ecore_Event_Handler *hnd_del = NULL; static Ecore_Event_Handler *hnd_data = NULL; @@ -101,6 +100,7 @@ static void icon_cache_update_free(void *data, void *ev); static void *hash_array_string_add(void *hash, const char *key, void *data); static Eina_Bool disable_cache; +static Eina_Bool run_in_tree; EAPI int EFREET_EVENT_ICON_CACHE_UPDATE = 0; EAPI int EFREET_EVENT_DESKTOP_CACHE_UPDATE = 0; @@ -117,8 +117,10 @@ _ipc_launch(void) char buf[PATH_MAX]; int num = 0; - if (!pfx) snprintf(buf, sizeof(buf), "efreetd"); - else snprintf(buf, sizeof(buf), "%s/efreetd", eina_prefix_bin_get(pfx)); + if (run_in_tree) + bs_binary_get(buf, sizeof(buf), "efreet", "efreetd"); + else + snprintf(buf, sizeof(buf), PACKAGE_BIN_DIR "/efreetd"); ecore_exe_run(buf, NULL); while ((!ipc) && (num < 500)) { @@ -307,6 +309,8 @@ efreet_cache_init(void) ERR("Failed to create directory '%s'", buf); } + run_in_tree = !!getenv("EFL_RUN_IN_TREE"); + EFREET_EVENT_ICON_CACHE_UPDATE = ecore_event_type_new(); EFREET_EVENT_DESKTOP_CACHE_UPDATE = ecore_event_type_new(); EFREET_EVENT_DESKTOP_CACHE_BUILD = ecore_event_type_new(); @@ -321,9 +325,6 @@ efreet_cache_init(void) if (efreet_cache_update) { - pfx = eina_prefix_new - (NULL, efreet_icon_cache_file, "EFREET", "efreet", "checkme", - PACKAGE_BIN_DIR, PACKAGE_LIB_DIR, PACKAGE_DATA_DIR, PACKAGE_DATA_DIR); if (disable_cache) ipc = NULL; else @@ -428,7 +429,6 @@ efreet_cache_shutdown(void) IF_RELEASE(util_cache_file); if (ipc) ecore_ipc_server_del(ipc); - if (pfx) eina_prefix_free(pfx); if (hnd_add) ecore_event_handler_del(hnd_add); if (hnd_del) ecore_event_handler_del(hnd_del); if (hnd_data) ecore_event_handler_del(hnd_data); @@ -436,7 +436,6 @@ efreet_cache_shutdown(void) ecore_ipc_shutdown(); ipc = NULL; - pfx = NULL; hnd_add = NULL; hnd_del = NULL; hnd_data = NULL; |