[gnome-builder/wip/project-selector: 64/72] libide: require libgit2-glib with SSH and Threading support.
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/project-selector: 64/72] libide: require libgit2-glib with SSH and Threading support.
- Date: Tue, 7 Apr 2015 23:03:03 +0000 (UTC)
commit 8b51f0c7b1a35360e86635b535770ca08ceeb1af
Author: Christian Hergert <christian hergert me>
Date: Mon Apr 6 18:01:43 2015 -0700
libide: require libgit2-glib with SSH and Threading support.
libide/ide.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/libide/ide.c b/libide/ide.c
index 406b26b..9ac7f44 100644
--- a/libide/ide.c
+++ b/libide/ide.c
@@ -18,6 +18,7 @@
#include <glib/gi18n.h>
#include <libgit2-glib/ggit.h>
+#include <stdlib.h>
#include "gconstructor.h"
#include "ide.h"
@@ -77,6 +78,8 @@ ide_set_program_name (const gchar *program_name)
static void
ide_init_ctor (void)
{
+ GgitFeatureFlags ggit_flags;
+
g_type_ensure (IDE_TYPE_CONTEXT);
g_type_ensure (IDE_TYPE_BUILD_SYSTEM);
g_type_ensure (IDE_TYPE_VCS);
@@ -163,5 +166,20 @@ ide_init_ctor (void)
-200);
modeline_parser_init ();
+
ggit_init ();
+
+ ggit_flags = ggit_get_features ();
+
+ if ((ggit_flags & GGIT_FEATURE_THREADS) == 0)
+ {
+ g_error (_("Builder requires libgit2-glib with threading support."));
+ exit (EXIT_FAILURE);
+ }
+
+ if ((ggit_flags & GGIT_FEATURE_SSH) == 0)
+ {
+ g_error (_("Builder requires libgit2-glib with SSH support."));
+ exit (EXIT_FAILURE);
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]