2007-03-10 Marek Sieradzki <marek.sieradzki@gmail.com>
authorMarek Sieradzki <msierad@mono-cvs.ximian.com>
Sat, 10 Mar 2007 13:35:49 +0000 (13:35 -0000)
committerMarek Sieradzki <msierad@mono-cvs.ximian.com>
Sat, 10 Mar 2007 13:35:49 +0000 (13:35 -0000)
        * Vbc.cs: Implemented.

svn path=/trunk/mcs/; revision=74047

mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ChangeLog
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Vbc.cs

index c8255f22e783a189903b945d4363f8e4e59c02a0..a99b2e97df3e92e9a92ec362985b618d40ff9f02 100644 (file)
@@ -1,3 +1,7 @@
+2007-03-10  Marek Sieradzki  <marek.sieradzki@gmail.com>
+
+       * Vbc.cs: Implemented.
+
 2007-03-08  Marek Sieradzki  <marek.sieradzki@gmail.com>
 
        * MSBuild.cs (Execute): Copy referenced project's dlls to output
index fff7e3fa5cccf93d0e66d288408fc278d061673f..ba9c0ecd0855da9741ae2d4d9abd72d3bb1ad97c 100644 (file)
@@ -45,6 +45,7 @@ namespace Microsoft.Build.Tasks {
                        base.AddResponseFileCommands (commandLine);
 
                        commandLine.AppendSwitchIfNotNull ("/lib:", AdditionalLibPaths, ",");
+
                        if (Bag ["AllowUnsafeBlocks"] != null)
                                if (AllowUnsafeBlocks)
                                        commandLine.AppendSwitch ("/unsafe+");
index f494f6c3eebd12a749c921cd7c4450bc9f69c683..07a081e16094b5f90edfe75735004a788c3809d4 100644 (file)
 //
-//// UpdateManifest.cs
-/////
-///// Author:
-/////      Leszek Ciesielski  <skolima@gmail.com>
-/////
-///// Copyright (C) 2006 Forcom (http://www.forcom.com.pl/)
-/////
-///// Permission is hereby granted, free of charge, to any person obtaining
-///// a copy of this software and associated documentation files (the
-///// "Software"), to deal in the Software without restriction, including
-///// without limitation the rights to use, copy, modify, merge, publish,
-///// distribute, sublicense, and/or sell copies of the Software, and to
-///// permit persons to whom the Software is furnished to do so, subject to
-///// the following conditions:
-///// 
-///// The above copyright notice and this permission notice shall be
-///// included in all copies or substantial portions of the Software.
-///// 
-///// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-///// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-///// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-///// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-///// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-///// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-///// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-/////
-///
+// UpdateManifest.cs
+//
+// Author:
+//      Leszek Ciesielski  <skolima@gmail.com>
+//      Marek Sieradzki  <marek.sieradzki@gmail.com>
+//
+// Copyright (C) 2006 Forcom (http://www.forcom.com.pl/)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #if NET_2_0
 
 using System;
+using System.IO;
 using Microsoft.Build.Framework;
 using Microsoft.Build.Utilities;
 
-namespace Microsoft.Build.Tasks
-{
-       public class Vbc : ManagedCompiler
-       {
-               [MonoTODO]
-               protected override bool ValidateParameters ()
+namespace Microsoft.Build.Tasks {
+
+       public class Vbc : ManagedCompiler {
+
+               public Vbc ()
                {
-                       throw new NotImplementedException ();
-               }
-               
-               [MonoTODO]
-               public string RootNamespace {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-                       set {
-                               throw new NotImplementedException ();
-                       }
-               }
-               
-               [MonoTODO]
-               public string SdkPath {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-                       set {
-                               throw new NotImplementedException ();
-                       }
-               }
-               
-               [MonoTODO]
-               public bool TargetCompactFramework {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-                       set {
-                               throw new NotImplementedException ();
-                       }
-               }
-               
-               [MonoTODO]
-               public bool UseHostCompilerIfAvailable {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-                       set {
-                               throw new NotImplementedException ();
-                       }
                }
-               
-               [MonoTODO]
-               public string Verbosity {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-                       set {
-                               throw new NotImplementedException ();
-                       }
-               }
-               
-               [MonoTODO]
-               public string WarningsAsErrors {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-                       set {
-                               throw new NotImplementedException ();
-                       }
-               }
-               
-               [MonoTODO]
-               public string WarningsNotAsErrors {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-                       set {
-                               throw new NotImplementedException ();
-                       }
-               }
-               
-               [MonoTODO]
-               protected override string ToolName {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-               }
-               
+
                [MonoTODO]
                protected internal override void AddResponseFileCommands (
                                CommandLineBuilderExtension commandLine )
                {
-                       throw new NotImplementedException ();
+                       base.AddResponseFileCommands (commandLine);
+
+                       commandLine.AppendSwitchIfNotNull ("/libpath:", AdditionalLibPaths, ",");
+
+                       commandLine.AppendSwitchIfNotNull ("/baseaddress:", BaseAddress);
+
+                       commandLine.AppendSwitchIfNotNull ("/define:", DefineConstants);
+
+                       // DisabledWarnings
+
+                       commandLine.AppendSwitchIfNotNull ("/doc", DocumentationFile);
+
+                       // ErrorReport
+                       
+                       // GenerateDocumentation
+                       
+                       if (Imports != null)
+                               foreach (ITaskItem item in Imports)
+                                       commandLine.AppendSwitchIfNotNull ("/imports:", item.ItemSpec);
+                       
+                       commandLine.AppendSwitchIfNotNull ("/main:", MainEntryPoint);
+
+                       // NoStandardLib
+                       
+                       if (NoWarnings)
+                               commandLine.AppendSwitch ("/nowarn");
+
+                       commandLine.AppendSwitchIfNotNull ("/optioncompare:", OptionCompare);
+
+                       if (Bag ["OptionExplicit"] != null)
+                               if (OptionExplicit)
+                                       commandLine.AppendSwitch ("/optionexplicit+");
+                               else
+                                       commandLine.AppendSwitch ("/optionexplicit-");
+
+                       if (Bag ["OptionStrict"] != null)
+                               if (OptionStrict)
+                                       commandLine.AppendSwitch ("/optionstrict+");
+                               else
+                                       commandLine.AppendSwitch ("/optionstrict-");
+
+                       // OptionStrictType
+                       
+                       // Platform
+                       
+                       if (References != null)
+                               foreach (ITaskItem item in References)
+                                       commandLine.AppendSwitchIfNotNull ("/reference:", item.ItemSpec);
+       
+                       if (Bag ["RemoveIntegerChecks"] != null)
+                               if (RemoveIntegerChecks)
+                                       commandLine.AppendSwitch ("/removeintchecks+");
+                               else
+                                       commandLine.AppendSwitch ("/removeintchecks-");
+
+                       if (ResponseFiles != null)
+                               foreach (ITaskItem item in ResponseFiles)
+                                       commandLine.AppendFileNameIfNotNull (String.Format ("@{0}", item.ItemSpec));
+
+                       commandLine.AppendSwitchIfNotNull ("/rootnamespace:", RootNamespace);
+
+                       commandLine.AppendSwitchIfNotNull ("/sdkpath:", SdkPath);
+
+                       // TargetCompactFramework
+                       
+                       // Verbosity
+
+                       // WarningsAsErrors
+
+                       // WarningsNotAsErrors
+
                }
                
                [MonoTODO]
@@ -136,7 +127,7 @@ namespace Microsoft.Build.Tasks
                [MonoTODO]
                protected override string GenerateFullPathToTool ()
                {
-                       throw new NotImplementedException ();
+                       return Path.Combine (ToolPath, ToolName);
                }
                
                [MonoTODO]
@@ -144,151 +135,142 @@ namespace Microsoft.Build.Tasks
                {
                        throw new NotImplementedException ();
                }
-               
+
                [MonoTODO]
-               public Vbc ()
+               protected override bool ValidateParameters ()
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
                public string BaseAddress {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-                       set {
-                               throw new NotImplementedException ();
-                       }
+                       get { return (string) Bag ["BaseAddress"]; }
+                       set { Bag ["BaseAddress"] = value; }
                }
                
                [MonoTODO]
                public string DisabledWarnings  {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-                       set {
-                               throw new NotImplementedException ();
-                       }
+                       get { return (string) Bag ["DisabledWarnings"]; }
+                       set { Bag ["DisabledWarnings"] = value; }
                }
                
                [MonoTODO]
                public string DocumentationFile {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-                       set {
-                               throw new NotImplementedException ();
-                       }
+                       get { return (string) Bag ["DocumentationFile"]; }
+                       set { Bag ["DocumentationFile"] = value; }
                }
                
                [MonoTODO]
                public string ErrorReport {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-                       set {
-                               throw new NotImplementedException ();
-                       }
+                       get { return (string) Bag ["ErrorReport"]; }
+                       set { Bag ["ErrorReport"] = value; }
                }
                
                [MonoTODO]
                public bool GenerateDocumentation {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-                       set {
-                               throw new NotImplementedException ();
-                       }
+                       get { return GetBoolParameterWithDefault ("GenerateDocumentation", false); }
+                       set { Bag ["GenerateDocumentation"] = value; }
                }
                
                [MonoTODO]
-               public ITaskItem[] Imports {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-                       set {
-                               throw new NotImplementedException ();
-                       }
+               public ITaskItem [] Imports {
+                       get { return (ITaskItem []) Bag ["Imports"]; }
+                       set { Bag ["Imports"] = value; }
                }
                
                [MonoTODO]
                public bool NoStandardLib {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-                       set {
-                               throw new NotImplementedException ();
-                       }
+                       get { return GetBoolParameterWithDefault ("NoStandardLib", false); }
+                       set { Bag ["NoStandardLib"] = value; }
                }
                
                [MonoTODO]
                public bool NoWarnings {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-                       set {
-                               throw new NotImplementedException ();
-                       }
+                       get { return GetBoolParameterWithDefault ("NoWarnings", false); }
+                       set { Bag ["NoWarnings"] = value; }
                }
                
                [MonoTODO]
                public string OptionCompare {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-                       set {
-                               throw new NotImplementedException ();
-                       }
+                       get { return (string) Bag ["OptionCompare"]; }
+                       set { Bag ["OptionCompare"] = value; }
                }
                
                [MonoTODO]
                public bool OptionExplicit {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-                       set {
-                               throw new NotImplementedException ();
-                       }
+                       get { return GetBoolParameterWithDefault ("OptionExplicit", false); }
+                       set { Bag ["OpExplicit"] = value; }
                }
                
                [MonoTODO]
                public bool OptionStrict {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-                       set {
-                               throw new NotImplementedException ();
-                       }
+                       get { return GetBoolParameterWithDefault ("OptionStrict", false); }
+                       set { Bag ["OptionStrict"] = value; }
                }
                
                [MonoTODO]
                public string OptionStrictType {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-                       set {
-                               throw new NotImplementedException ();
-                       }
+                       get { return (string) Bag ["OptionStrictType"]; }
+                       set { Bag ["OptionStrictType"] = value; }
                }
                
                [MonoTODO]
                public string Platform {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-                       set {
-                               throw new NotImplementedException ();
-                       }
+                       get { return (string) Bag ["Platfrom"]; }
+                       set { Bag ["Platform"] = value; }
                }
                
                [MonoTODO]
                public bool RemoveIntegerChecks {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-                       set {
-                               throw new NotImplementedException ();
-                       }
+                       get { return GetBoolParameterWithDefault ("RemoveIntegerChecks", false); }
+                       set { Bag ["RemoveIntegerChecks"] = value; }
+               }
+
+               [MonoTODO]
+               public string RootNamespace {
+                       get { return (string) Bag ["RootNamespace"]; }
+                       set { Bag ["RootNamespace"] = value; }
+               }
+
+               [MonoTODO]
+               public string SdkPath {
+                       get { return (string) Bag ["SdkPath"]; }
+                       set { Bag ["SdkPath"] = value; }
+               }
+
+               [MonoTODO]
+               public bool TargetCompactFramework {
+                       get { return (bool) Bag ["TargetCompactFramework"]; }
+                       set { Bag ["TargetCompactFramework"] = value; }
+               }
+
+               [MonoTODO]
+               protected override string ToolName {
+                       get { return "vbnc"; }
+               }
+
+               [MonoTODO]
+               public bool UseHostCompilerIfAvailable {
+                       get { return (bool) Bag ["UseHostCompilerIfAvailable"]; }
+                       set { Bag ["UseHostCompilerIfAvailable"] = value; }
+               }
+
+               [MonoTODO]
+               public string Verbosity {
+                       get { return (string) Bag ["Verbosity"]; }
+                       set { Bag ["Verbosity"] = value; }
+               }
+
+               [MonoTODO]
+               public string WarningsAsErrors {
+                       get { return (string) Bag ["WarningsAsErrors"]; }
+                       set { Bag ["WarningsAsErrors"] = value; }
+               }
+               
+               [MonoTODO]
+               public string WarningsNotAsErrors {
+                       get { return (string) Bag ["WarningsNotAsErrors"]; }
+                       set { Bag ["WarningsNotAsErrors"] = value; }
                }
        }
 }