Re: new, little patch and some questions

aurelien naldi <[email protected]>
Newsgroups gmane.comp.gnome.devtools
Message-ID <1070452055.1239.1.camel@localhost>
Le mer 03/12/2003 à 10:13, Markus Bertheau a écrit :

> > here are two little patch that allow the current cvs version of
> > gnome-build to compile and scaffold to run make from the UI.
> 
> Please use diff -u.

sorry, here are corrected patches

-- 
aurelien
scaffold.patch (text/x-patch, 1.5 KB)
Index: plugins/project-manager/project-tool.c
===================================================================
RCS file: /cvs/gnome/scaffold/plugins/project-manager/project-tool.c,v
retrieving revision 1.50
diff -u -r1.50 project-tool.c
--- plugins/project-manager/project-tool.c	14 Sep 2003 17:32:42 -0000	1.50
+++ plugins/project-manager/project-tool.c	3 Dec 2003 11:16:57 -0000
@@ -805,6 +805,17 @@
 static void
 build_default_cb (BonoboUIComponent *uic, ScaffoldTool *tool)
 {
+	ProjectTool *proj_tool = (ProjectTool *)tool;
+	GError *err = NULL;
+	gchar *str;
+
+	gbf_project_build (proj_tool->project, "all", &err);
+	if (err != NULL) {
+		str = g_strdup_printf (_("An error occurred during building: '%s'"),
+				       err->message);
+		g_free (str);
+		g_error_free (err);
+	}
 }
 
 static void
@@ -814,7 +825,8 @@
 	GError *err = NULL;
 	gchar *str;
 
-	gbf_project_clean (proj_tool->project, &err);
+	//gbf_project_clean (proj_tool->project, &err);
+	gbf_project_build (proj_tool->project, "clean", &err);
 	if (err != NULL) {
 		str = g_strdup_printf (_("An error occurred during cleaning: '%s'"),
 				       err->message);
@@ -826,6 +838,17 @@
 static void
 build_config_cb (BonoboUIComponent *uic, ScaffoldTool *tool)
 {
+	ProjectTool *proj_tool = (ProjectTool *)tool;
+	GError *err = NULL;
+	gchar *str;
+
+	gbf_project_build (proj_tool->project, "configure", &err);
+	if (err != NULL) {
+		str = g_strdup_printf (_("An error occurred during configuring: '%s'"),
+				       err->message);
+		g_free (str);
+		g_error_free (err);
+	}
 }
 
 static void
gnome-build.patch (text/x-patch, 2.4 KB)
Index: src/backends/libgbf_am/gbf-am-project.c
===================================================================
RCS file: /cvs/gnome/gnome-build/src/backends/libgbf_am/gbf-am-project.c,v
retrieving revision 1.47
diff -u -r1.47 gbf-am-project.c
--- src/backends/libgbf_am/gbf-am-project.c	14 Sep 2003 17:27:16 -0000	1.47
+++ src/backends/libgbf_am/gbf-am-project.c	3 Dec 2003 11:44:44 -0000
@@ -2341,9 +2341,27 @@
 	project = GBF_AM_PROJECT (_project);
 	op = g_new0 (GbfAmProjectOp, 1);
 	op->project = project;
-	// FIXME
 	op->type = BUILD;
-	//op->build_type = type;
+	// FIXME this ain't nice, works for now ?
+	if (0 == strcmp(id,"prepare"))
+	{
+		op->build_type = GBF_BUILD_PREPARE;
+	} else if (0 == strcmp(id, "configure"))
+	{
+		op->build_type = GBF_BUILD_CONFIGURE;
+	} else if (0 == strcmp(id, "clean"))
+	{
+		op->build_type = GBF_BUILD_CLEAN;
+	} else if (0 == strcmp(id, "all"))
+	{
+		op->build_type = GBF_BUILD_ALL;
+	} else if (0 == strcmp(id, "current"))
+	{
+		op->build_type = GBF_BUILD_CURRENT;
+	} else if (0 == strcmp(id, "install"))
+	{
+		op->build_type = GBF_BUILD_INSTALL;
+	}
 
 	queue_push_op (project, op);
 }
Index: src/gbf/glue-factory.c
===================================================================
RCS file: /cvs/gnome/gnome-build/src/gbf/glue-factory.c,v
retrieving revision 1.3
diff -u -r1.3 glue-factory.c
--- src/gbf/glue-factory.c	9 Apr 2003 04:56:50 -0000	1.3
+++ src/gbf/glue-factory.c	3 Dec 2003 11:44:44 -0000
@@ -181,7 +181,7 @@
 	      goto move_to_next_dir;
 	    }
 
-	  if (!g_module_symbol (module, "glue_get_component_type", (gpointer *)&get_type_func))
+	  if (!g_module_symbol (module, "glue_get_component_type", (gpointer )&get_type_func))
 	    {
 	      g_module_close (module);
 	      goto move_to_next_dir;
Index: src/gbf/glue-plugin.c
===================================================================
RCS file: /cvs/gnome/gnome-build/src/gbf/glue-plugin.c,v
retrieving revision 1.2
diff -u -r1.2 glue-plugin.c
--- src/gbf/glue-plugin.c	9 Apr 2003 04:56:50 -0000	1.2
+++ src/gbf/glue-plugin.c	3 Dec 2003 11:44:44 -0000
@@ -56,7 +56,7 @@
       return FALSE;
     }
   
-  if (!g_module_symbol (plugin->module, "glue_register_components", (gpointer *)&func))
+  if (!g_module_symbol (plugin->module, "glue_register_components", (gpointer )&func))
     {
       g_warning ("could not load plugin: %s", g_module_error ());
       g_module_close (plugin->module);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.