[gnome-builder] build: install gnome-builder-worker to $libexecdir



commit 4c569b6bdea001dc4b8e29d20af279d514e4bc7b
Author: Christian Hergert <chergert redhat com>
Date:   Sun Jun 5 14:12:26 2016 -0700

    build: install gnome-builder-worker to $libexecdir
    
    There is no reason for the worker to be in /usr/bin.

 libide/Makefile.am          |    1 +
 libide/ide-worker-manager.c |   10 +++++++++-
 src/Makefile.am             |    4 ++++
 3 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/libide/Makefile.am b/libide/Makefile.am
index b0ba7c2..a20b296 100644
--- a/libide/Makefile.am
+++ b/libide/Makefile.am
@@ -446,6 +446,7 @@ libide_1_0_la_includes = \
        -DPACKAGE_DATADIR="\"${datadir}\"" \
        -DPACKAGE_LOCALE_DIR=\""${datadir}/locale"\" \
        -DPACKAGE_LIBDIR=\""${libdir}"\" \
+       -DPACKAGE_LIBEXECDIR=\""${libexecdir}"\" \
        -DBUILDDIR=\""${abs_top_builddir}"\" \
        -DSRCDIR=\""${abs_top_srcdir}"\" \
        -I$(top_builddir)/libide \
diff --git a/libide/ide-worker-manager.c b/libide/ide-worker-manager.c
index 91753ad..387eaf0 100644
--- a/libide/ide-worker-manager.c
+++ b/libide/ide-worker-manager.c
@@ -204,12 +204,20 @@ ide_worker_manager_get_worker_process (IdeWorkerManager *self,
   if (worker_process == NULL)
     {
       g_autofree gchar *address = NULL;
+      const gchar *path = PACKAGE_LIBEXECDIR G_DIR_SEPARATOR_S "gnome-builder-worker";
 
       address = g_strdup_printf ("%s,guid=%s",
                                  g_dbus_server_get_client_address (self->dbus_server),
                                  g_dbus_server_get_guid (self->dbus_server));
 
-      worker_process = ide_worker_process_new ("gnome-builder-worker", plugin_name, address);
+      /*
+       * If we are running out of tree, rely on PATH to access
+       * gnome-builder-worker from the build directory.
+       */
+      if (g_getenv ("GB_IN_TREE_PLUGINS") != NULL)
+        path = "gnome-builder-worker";
+
+      worker_process = ide_worker_process_new (path, plugin_name, address);
       g_hash_table_insert (self->plugin_name_to_worker, g_strdup (plugin_name), worker_process);
       ide_worker_process_run (worker_process);
     }
diff --git a/src/Makefile.am b/src/Makefile.am
index 686592b..3fdc5bc 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,7 +1,11 @@
 bin_PROGRAMS = \
        gnome-builder \
        gnome-builder-cli \
+       $(NULL)
+
+libexec_PROGRAMS = \
        gnome-builder-worker \
+       $(NULL)
 
 AM_CPPFLAGS = \
        -DPACKAGE_LOCALE_DIR=\""${datadir}/locale"\" \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]