[gnome-builder] initial BuildStream plugin
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] initial BuildStream plugin
- Date: Tue, 21 Dec 2021 00:33:41 +0000 (UTC)
commit 04ac0370d22d09be828bb99ffaaca5807e635f19
Author: Adam Jones <adam jones codethink co uk>
Date: Wed Mar 13 15:30:07 2019 +0000
initial BuildStream plugin
src/plugins/buildstream/buildstream.plugin | 14 +++++++++
src/plugins/buildstream/buildstream_plugin.py | 41 +++++++++++++++++++++++++++
src/plugins/meson.build | 1 +
3 files changed, 56 insertions(+)
---
diff --git a/src/plugins/buildstream/buildstream.plugin b/src/plugins/buildstream/buildstream.plugin
new file mode 100644
index 000000000..bc6a4d418
--- /dev/null
+++ b/src/plugins/buildstream/buildstream.plugin
@@ -0,0 +1,14 @@
+# BuildStream plugin
+
+[Plugin]
+Authors=Adam
+Builtin=true
+Description=Provides integration with the BuildStream build tool
+Depends=editor;buildui;
+Hidden=true
+Loader=python3
+Module=buildstream_plugin
+Name=BuildStream
+X-Builder-ABI=@PACKAGE_ABI@
+X-Project-File-Filter-Name=BuildStream (project.conf)
+X-Project-File-Filter-Pattern=project.conf
\ No newline at end of file
diff --git a/src/plugins/buildstream/buildstream_plugin.py b/src/plugins/buildstream/buildstream_plugin.py
new file mode 100644
index 000000000..1d4f36746
--- /dev/null
+++ b/src/plugins/buildstream/buildstream_plugin.py
@@ -0,0 +1,41 @@
+from gi.repository import Ide
+from gi.repository import Gio
+from gi.repository import GObject
+
+class BuildStreamBuildSystemDiscovery(Ide.SimpleBuildSystemDiscovery):
+ def __init__(self, *args, **kwargs):
+ super().__init__(*args, **kwargs)
+ print('find bst file............................\n')
+ self.props.glob = 'project.conf'
+ self.props.hint = 'buildstream_plugin'
+ self.props.priority = 4000
+
+class BuildStreamBuildSystem(Ide.Object, Ide.BuildSystem):
+ project_file = GObject.Property(type=Gio.File)
+
+ def do_get_id(self):
+ return 'buildstream'
+
+ def do_get_display(self):
+ return 'BuildStream'
+
+ def do_get_priority(self):
+ return 2000
+
+class BuildStreamPipelineAddin(Ide.Object, Ide.PipelineAddin):
+
+ def do_load(self, pipeline):
+
+ context = self.get_context()
+
+ print(context)
+
+ build_system = Ide.BuildSystem.from_context(context)
+
+ if type(build_system) != BuildStreamBuildSystem:
+ return
+
+ build_launcher = pipeline.create_launcher()
+ build_launcher.set_cwd(srcdir)
+ build_launcher.push_argv("bst")
+ build_launcher.push_argv('compile')
diff --git a/src/plugins/meson.build b/src/plugins/meson.build
index 9efa95505..6ca14f9cf 100644
--- a/src/plugins/meson.build
+++ b/src/plugins/meson.build
@@ -41,6 +41,7 @@ subdir('autotools')
subdir('beautifier')
subdir('blueprint')
subdir('buildconfig')
+subdir('buildstream')
subdir('buildsystem')
subdir('buildui')
subdir('buffer-monitor')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]