[gnome-builder/wip/gtk4-port] plugins/flatpak: add aux helper for run context
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port] plugins/flatpak: add aux helper for run context
- Date: Wed, 22 Jun 2022 04:49:24 +0000 (UTC)
commit 777cd37c8412edb08f5554c6eab92475647c3679
Author: Christian Hergert <chergert redhat com>
Date: Tue Jun 21 21:48:33 2022 -0700
plugins/flatpak: add aux helper for run context
src/plugins/flatpak/gbp-flatpak-aux.c | 21 +++++++++++++++++++++
src/plugins/flatpak/gbp-flatpak-aux.h | 8 +++++---
2 files changed, 26 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/flatpak/gbp-flatpak-aux.c b/src/plugins/flatpak/gbp-flatpak-aux.c
index 14f3b04c7..6d74f9f52 100644
--- a/src/plugins/flatpak/gbp-flatpak-aux.c
+++ b/src/plugins/flatpak/gbp-flatpak-aux.c
@@ -182,3 +182,24 @@ gbp_flatpak_aux_apply (IdeSubprocessLauncher *launcher,
return count;
}
+
+void
+gbp_flatpak_aux_append_to_run_context (IdeRunContext *run_context)
+{
+ static const char *arg;
+
+ g_return_if_fail (IDE_IS_RUN_CONTEXT (run_context));
+ g_return_if_fail (initialized);
+
+ if (arg == NULL)
+ arg = g_strdup_printf ("--bind-mount=/run/host/font-dirs.xml=%s",
+ g_file_peek_path (mapped));
+
+ for (guint i = 0; i < maps->len; i++)
+ {
+ const char *element = g_ptr_array_index (maps, i);
+ ide_run_context_append_argv (run_context, element);
+ }
+
+ ide_run_context_append_argv (run_context, arg);
+}
diff --git a/src/plugins/flatpak/gbp-flatpak-aux.h b/src/plugins/flatpak/gbp-flatpak-aux.h
index 6c01a35d4..4a270b827 100644
--- a/src/plugins/flatpak/gbp-flatpak-aux.h
+++ b/src/plugins/flatpak/gbp-flatpak-aux.h
@@ -20,12 +20,14 @@
#pragma once
+#include <libide-foundry.h>
#include <libide-threading.h>
G_BEGIN_DECLS
-void gbp_flatpak_aux_init (void);
-int gbp_flatpak_aux_apply (IdeSubprocessLauncher *launcher,
- int position);
+void gbp_flatpak_aux_init (void);
+int gbp_flatpak_aux_apply (IdeSubprocessLauncher *launcher,
+ int position);
+void gbp_flatpak_aux_append_to_run_context (IdeRunContext *run_context);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]