aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2018-07-05 17:26:42 -0400
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2018-07-06 15:51:59 +0200
commit36fc0ce77ee61c3ebb2529a0f05fcdf0b6986725 (patch)
treedbfb6603249738549c6eee10bb739b8fb61fd443
parentecore-con/proxy_helper: fix in-tree run path (diff)
downloadefl-36fc0ce77ee61c3ebb2529a0f05fcdf0b6986725.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 https://phab.enlightenment.org/T6713 Differential Revision: https://phab.enlightenment.org/D6516
-rw-r--r--src/Makefile_Efreet.am5
-rw-r--r--src/lib/efreet/efreet_cache.c15
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;