[gnome-builder] run-manager: copy build environment to runner
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] run-manager: copy build environment to runner
- Date: Sat, 9 Sep 2017 01:15:43 +0000 (UTC)
commit 366cdb75ee1bd48adbe5e5e201473a675a980891
Author: Christian Hergert <chergert redhat com>
Date: Fri Sep 8 18:14:59 2017 -0700
run-manager: copy build environment to runner
Eventually we need separate values for this, but for now this should do.
This just sets the environment when setting up the new IdeRunner.
libide/runner/ide-run-manager.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/libide/runner/ide-run-manager.c b/libide/runner/ide-run-manager.c
index 5c185f3..9e7a917 100644
--- a/libide/runner/ide-run-manager.c
+++ b/libide/runner/ide-run-manager.c
@@ -28,6 +28,7 @@
#include "buildsystem/ide-build-target.h"
#include "buildsystem/ide-configuration.h"
#include "buildsystem/ide-configuration-manager.h"
+#include "buildsystem/ide-environment.h"
#include "runner/ide-run-manager.h"
#include "runner/ide-run-manager-private.h"
#include "runner/ide-runner.h"
@@ -380,6 +381,7 @@ do_run_async (IdeRunManager *self,
IdeContext *context;
IdeConfigurationManager *config_manager;
IdeConfiguration *config;
+ IdeEnvironment *environment;
IdeRuntime *runtime;
g_autoptr(IdeRunner) runner = NULL;
GCancellable *cancellable;
@@ -430,6 +432,14 @@ do_run_async (IdeRunManager *self,
}
}
+ /* Add our environment variables. Currently, these are coming
+ * from the *build* environment because we do not yet have a
+ * way to differentiate between build environment and runtime
+ * for the application.
+ */
+ environment = ide_runner_get_environment (runner);
+ ide_environment_copy_into (ide_configuration_get_environment (config), environment, TRUE);
+
g_signal_emit (self, signals [RUN], 0, runner);
if (ide_runner_get_failed (runner))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]