diff options
-rw-r--r-- | extras/ValaBinding/ChangeLog | 10 | ||||
-rw-r--r-- | extras/ValaBinding/Gui/EditPackagesDialog.cs | 2 | ||||
-rw-r--r-- | extras/ValaBinding/Project/ValaProject.cs | 21 | ||||
-rw-r--r-- | extras/ValaBinding/Project/ValaProjectServiceExtension.cs | 4 |
4 files changed, 23 insertions, 14 deletions
diff --git a/extras/ValaBinding/ChangeLog b/extras/ValaBinding/ChangeLog index 3816453f16..d21402187a 100644 --- a/extras/ValaBinding/ChangeLog +++ b/extras/ValaBinding/ChangeLog @@ -1,3 +1,13 @@ +2009-12-01 Lluis Sanchez Gual <lluis@novell.com> + + * Project/ValaProject.cs: + * Gui/EditPackagesDialog.cs: + * Project/ValaProjectServiceExtension.cs: Introduced the + ConfigurationSelector class to all methods that previously + took a configuration name as string. This eliminates the + ambiguity between solution configuration names and project + configuration names. + 2009-11-20 Michael Hutchinson <mhutchinson@novell.com> * Project/ValaProject.cs: Track API. diff --git a/extras/ValaBinding/Gui/EditPackagesDialog.cs b/extras/ValaBinding/Gui/EditPackagesDialog.cs index bf9dfbb812..d6b7c179fd 100644 --- a/extras/ValaBinding/Gui/EditPackagesDialog.cs +++ b/extras/ValaBinding/Gui/EditPackagesDialog.cs @@ -204,7 +204,7 @@ namespace MonoDevelop.ValaBinding ValaProject proj = c as ValaProject; ValaProjectConfiguration conf = proj.GetConfiguration (IdeApp.Workspace.ActiveConfiguration) as ValaProjectConfiguration; if (conf.CompileTarget != CompileTarget.Bin) { - proj.WriteMDPkgPackage (conf.Id); + proj.WriteMDPkgPackage (conf.Selector); package = new ProjectPackage (proj); packages.Add (package); } diff --git a/extras/ValaBinding/Project/ValaProject.cs b/extras/ValaBinding/Project/ValaProject.cs index 07581d9891..421be9b30b 100644 --- a/extras/ValaBinding/Project/ValaProject.cs +++ b/extras/ValaBinding/Project/ValaProject.cs @@ -211,7 +211,7 @@ namespace MonoDevelop.ValaBinding /// <summary> /// Ths pkg-config package is for internal MonoDevelop use only, it is not deployed. /// </summary> - public void WriteMDPkgPackage (string configuration) + public void WriteMDPkgPackage (ConfigurationSelector configuration) { string pkgfile = Path.Combine (BaseDirectory, Name + ".md.pc"); @@ -242,7 +242,7 @@ namespace MonoDevelop.ValaBinding /// This is the pkg-config package that gets deployed. /// <returns>The pkg-config package's filename</returns> /// </summary> - private string WriteDeployablePkgPackage (string configuration) + private string WriteDeployablePkgPackage (ConfigurationSelector configuration) { // FIXME: This should probably be grabed from somewhere. string prefix = "/usr/local"; @@ -270,7 +270,7 @@ namespace MonoDevelop.ValaBinding return pkgfile; } - protected override BuildResult DoBuild (IProgressMonitor monitor, string configuration) + protected override BuildResult DoBuild (IProgressMonitor monitor, ConfigurationSelector configuration) { ValaProjectConfiguration pc = (ValaProjectConfiguration)GetConfiguration(configuration); pc.SourceDirectory = BaseDirectory; @@ -290,7 +290,7 @@ namespace MonoDevelop.ValaBinding return cmd; } - protected override bool OnGetCanExecute (MonoDevelop.Projects.ExecutionContext context, string solutionConfiguration) + protected override bool OnGetCanExecute (MonoDevelop.Projects.ExecutionContext context, ConfigurationSelector solutionConfiguration) { ValaProjectConfiguration conf = (ValaProjectConfiguration)GetConfiguration(solutionConfiguration); ExecutionCommand cmd = CreateExecutionCommand (conf); @@ -300,10 +300,9 @@ namespace MonoDevelop.ValaBinding protected override void DoExecute (IProgressMonitor monitor, ExecutionContext context, - string solutionConfiguration, - string itemConfiguration) + ConfigurationSelector configuration) { - ValaProjectConfiguration conf = (ValaProjectConfiguration)GetConfiguration(itemConfiguration); + ValaProjectConfiguration conf = (ValaProjectConfiguration) GetConfiguration (configuration); bool pause = conf.PauseConsoleOutput; IConsole console; @@ -343,7 +342,7 @@ namespace MonoDevelop.ValaBinding } } - protected override FilePath OnGetOutputFileName (string configuration) + public override FilePath GetOutputFileName (ConfigurationSelector configuration) { ValaProjectConfiguration conf = (ValaProjectConfiguration)GetConfiguration(configuration); return conf.OutputDirectory.Combine (conf.CompiledOutputName); @@ -445,7 +444,7 @@ namespace MonoDevelop.ValaBinding if (!package.IsProject){ ProjectInformationManager.Instance.Get (this).AddPackage (package.Name); } } - public DeployFileCollection GetDeployFiles (string configuration) + public DeployFileCollection GetDeployFiles (ConfigurationSelector configuration) { DeployFileCollection deployFiles = new DeployFileCollection (); @@ -514,8 +513,8 @@ namespace MonoDevelop.ValaBinding string ldpath = string.Empty; string packagePath = Path.GetDirectoryName(package.File); - foreach (string pc in GetConfigurations ()) { - ValaProjectConfiguration valapc = GetConfiguration (pc) as ValaProjectConfiguration; + foreach (ItemConfiguration pc in Configurations) { + ValaProjectConfiguration valapc = pc as ValaProjectConfiguration; if (null == valapc){ continue; } ValaCompilationParameters vcp = (ValaCompilationParameters)valapc.CompilationParameters; diff --git a/extras/ValaBinding/Project/ValaProjectServiceExtension.cs b/extras/ValaBinding/Project/ValaProjectServiceExtension.cs index 4b66fd1946..490823ccba 100644 --- a/extras/ValaBinding/Project/ValaProjectServiceExtension.cs +++ b/extras/ValaBinding/Project/ValaProjectServiceExtension.cs @@ -44,7 +44,7 @@ namespace MonoDevelop.ValaBinding { public class ValaProjectServiceExtension : ProjectServiceExtension { - protected override BuildResult Build (IProgressMonitor monitor, SolutionEntityItem entry, string configuration) + protected override BuildResult Build (IProgressMonitor monitor, SolutionEntityItem entry, ConfigurationSelector configuration) { ValaProject project = entry as ValaProject; @@ -63,7 +63,7 @@ namespace MonoDevelop.ValaBinding return base.Build (monitor, entry, configuration); } - protected override void Clean (IProgressMonitor monitor, SolutionEntityItem entry, string configuration) + protected override void Clean (IProgressMonitor monitor, SolutionEntityItem entry, ConfigurationSelector configuration) { base.Clean (monitor, entry, configuration); |