[gnome-builder] jhbuild: locate jhbuild on wayland sessions
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] jhbuild: locate jhbuild on wayland sessions
- Date: Tue, 28 Jun 2016 00:03:57 +0000 (UTC)
commit 327d600fadb0b6d2c3542103ce71259ea74ca201
Author: Christian Hergert <chergert redhat com>
Date: Tue Jun 21 16:10:33 2016 -0700
jhbuild: locate jhbuild on wayland sessions
plugins/jhbuild/jhbuild_plugin.py | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/plugins/jhbuild/jhbuild_plugin.py b/plugins/jhbuild/jhbuild_plugin.py
index 3fc3d5d..3a7483c 100644
--- a/plugins/jhbuild/jhbuild_plugin.py
+++ b/plugins/jhbuild/jhbuild_plugin.py
@@ -34,10 +34,19 @@ class JhbuildRuntime(Ide.Runtime):
def __init__(self, *args, **kwargs):
Ide.Runtime.__init__(self, *args, **kwargs)
+ def get_jhbuild_path(self):
+ # Wayland session doesn't have ~/.local/
+ path = os.path.expanduser('~/.local/bin/jhbuild')
+ if os.path.exists(path):
+ return path
+ else:
+ # Rely on search path
+ return 'jhbuild'
+
def do_create_launcher(self):
try:
launcher = Ide.Runtime.do_create_launcher(self)
- launcher.push_argv('jhbuild')
+ launcher.push_argv(self.get_jhbuild_path())
launcher.push_argv('run')
return launcher
except GLib.Error:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]