Author: lluis
Date: 2007-04-21 06:10:07 -0400 (Sat, 21 Apr 2007)
New Revision: 76039
Modified:
trunk/monodevelop/Extras/MonoDevelop.Autotools/ChangeLog
trunk/monodevelop/Extras/MonoDevelop.Autotools/Handler.cs
trunk/monodevelop/Extras/MonoDevelop.Autotools/SimpleProjectMakefileHandler.cs
trunk/monodevelop/Extras/MonoDevelop.Autotools/TarballTargetEditorWidget.cs
Log:
* SimpleProjectMakefileHandler.cs, TarballTargetEditorWidget.cs: Track
api changes.
* Handler.cs: Track api changes. Added support for exporting a
selection of projects from a solution.
Modified: trunk/monodevelop/Extras/MonoDevelop.Autotools/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/MonoDevelop.Autotools/ChangeLog 2007-04-21
08:18:30 UTC (rev 76038)
+++ trunk/monodevelop/Extras/MonoDevelop.Autotools/ChangeLog 2007-04-21
10:10:07 UTC (rev 76039)
@@ -1,3 +1,10 @@
+2007-04-21 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+
+ * SimpleProjectMakefileHandler.cs, TarballTargetEditorWidget.cs: Track
+ api changes.
+ * Handler.cs: Track api changes. Added support for exporting a
+ selection of projects from a solution.
+
2007-04-19 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* MonoDevelop.Autotools.addin.xml, Commands.cs,
Modified: trunk/monodevelop/Extras/MonoDevelop.Autotools/Handler.cs
===================================================================
--- trunk/monodevelop/Extras/MonoDevelop.Autotools/Handler.cs 2007-04-21
08:18:30 UTC (rev 76038)
+++ trunk/monodevelop/Extras/MonoDevelop.Autotools/Handler.cs 2007-04-21
10:10:07 UTC (rev 76039)
@@ -46,7 +46,11 @@
public override bool CanBuild (CombineEntry entry)
{
Combine combine = entry as Combine;
- if ( combine == null ) return false;
+ if (combine == null)
+ combine = entry.ParentCombine;
+ if (combine == null)
+ return false;
+
SolutionDeployer deployer = new SolutionDeployer ();
return deployer.CanDeploy ( combine );
}
@@ -62,13 +66,27 @@
}
- protected override void OnBuild (IProgressMonitor monitor,
CombineEntry entry)
+ protected override void OnBuild (IProgressMonitor monitor,
DeployContext ctx)
{
string tmpFolder =
Runtime.FileService.CreateTempDirectory ();
Combine combine = null;
+ CombineEntry entry = RootCombineEntry;
try {
- string efile = Services.ProjectService.Export
(new NullProgressMonitor (), entry.FileName, tmpFolder, null, true);
+ string[] childEntries;
+ if (entry is Combine) {
+ CombineEntry[] ents = GetChildEntries
();
+ childEntries = new string [ents.Length];
+ for (int n=0; n<ents.Length; n++)
+ childEntries [n] = ents
[n].FileName;
+ }
+ else {
+ // If the entry is not a combine, use
the parent combine as base combine
+ childEntries = new string [] {
entry.FileName };
+ entry = entry.ParentCombine;
+ }
+
+ string efile = Services.ProjectService.Export
(new NullProgressMonitor (), entry.FileName, childEntries, tmpFolder, null);
combine =
Services.ProjectService.ReadCombineEntry (efile, new NullProgressMonitor ()) as
Combine;
combine.Build (monitor);
@@ -77,12 +95,11 @@
SolutionDeployer deployer = new
SolutionDeployer ();
- using (DeployContext ctx = new DeployContext
(this, "Linux", null)) {
- if (DefaultConfiguration == null ||
DefaultConfiguration == "")
- deployer.Deploy ( ctx, combine,
TargetDir, monitor );
- else
- deployer.Deploy ( ctx, combine,
DefaultConfiguration, TargetDir, monitor );
- }
+ if (DefaultConfiguration == null ||
DefaultConfiguration == "")
+ deployer.Deploy ( ctx, combine,
TargetDir, monitor );
+ else
+ deployer.Deploy ( ctx, combine,
DefaultConfiguration, TargetDir, monitor );
+
} finally {
if (combine != null)
combine.Dispose ();
@@ -110,14 +127,14 @@
public class TarballTargetEditor: IPackageBuilderEditor
{
- public bool CanEdit (PackageBuilder target, CombineEntry entry)
+ public bool CanEdit (PackageBuilder target)
{
return target is TarballDeployTarget;
}
- public Gtk.Widget CreateEditor (PackageBuilder target,
CombineEntry entry)
+ public Gtk.Widget CreateEditor (PackageBuilder target)
{
- return new TarballTargetEditorWidget
((TarballDeployTarget) target, (Combine) entry);
+ return new TarballTargetEditorWidget
((TarballDeployTarget) target);
}
}
}
Modified:
trunk/monodevelop/Extras/MonoDevelop.Autotools/SimpleProjectMakefileHandler.cs
===================================================================
---
trunk/monodevelop/Extras/MonoDevelop.Autotools/SimpleProjectMakefileHandler.cs
2007-04-21 08:18:30 UTC (rev 76038)
+++
trunk/monodevelop/Extras/MonoDevelop.Autotools/SimpleProjectMakefileHandler.cs
2007-04-21 10:10:07 UTC (rev 76039)
@@ -170,7 +170,7 @@
StringBuilder deployBinaries = new
StringBuilder ();
Hashtable deployDirs = new Hashtable ();
- DeployFileCollection deployFiles =
DeployService.GetDeployFiles (ctx.DeployContext, project);
+ DeployFileCollection deployFiles =
DeployService.GetDeployFiles (ctx.DeployContext, new CombineEntry[] { project
});
foreach (DeployFile dfile in deployFiles) {
if (dfile.SourcePath ==
project.GetOutputFileName ())
continue;
Modified:
trunk/monodevelop/Extras/MonoDevelop.Autotools/TarballTargetEditorWidget.cs
===================================================================
--- trunk/monodevelop/Extras/MonoDevelop.Autotools/TarballTargetEditorWidget.cs
2007-04-21 08:18:30 UTC (rev 76038)
+++ trunk/monodevelop/Extras/MonoDevelop.Autotools/TarballTargetEditorWidget.cs
2007-04-21 10:10:07 UTC (rev 76039)
@@ -9,8 +9,10 @@
{
public class TarballTargetEditorWidget : VBox
{
- public TarballTargetEditorWidget (TarballDeployTarget target,
Combine targetCombine)
+ public TarballTargetEditorWidget (TarballDeployTarget target)
{
+ Combine targetCombine = target.RootCombineEntry as
Combine;
+
HBox dir_entry = new HBox ();
Label lab = new Label ( GettextCatalog.GetString
("Deploy directory:") );
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches