diff --git a/Prebuild/ChangeLog b/Prebuild/ChangeLog index c1c8be1dbd..a7d06129a6 100644 --- a/Prebuild/ChangeLog +++ b/Prebuild/ChangeLog @@ -1,5 +1,7 @@ 2017, August Unit Umarov * add Freak Tech patch for prefer32bit default to false + * fix comand line target override + * fix CSharp target assembly name 2015, June Fly-Man- * V2.0.7 (WhiteCore Build) diff --git a/Prebuild/prebuild.xml b/Prebuild/prebuild.xml index 724a7ce61c..3891268c1d 100644 --- a/Prebuild/prebuild.xml +++ b/Prebuild/prebuild.xml @@ -40,6 +40,7 @@ C.J. Adams-Collier (cjac@colliertech.org) John Hurliman (john.hurliman@intel.com) WhiteCore build (2015) Rowan Deppeler (greythan@gmail.com) + OpenSim build (2017) AJLDuarte The Prebuild project generator diff --git a/Prebuild/src/Core/Kernel.cs b/Prebuild/src/Core/Kernel.cs index 535913ee53..218f28ecd3 100644 --- a/Prebuild/src/Core/Kernel.cs +++ b/Prebuild/src/Core/Kernel.cs @@ -89,6 +89,7 @@ namespace Prebuild.Core readonly List m_Solutions = new List(); string m_Target; + bool cmdlineTargetFramework; FrameworkVersion m_TargetFramework; //Overrides all project settings string m_Conditionals; //Adds to all project settings public string ForcedConditionals { get { return m_Conditionals; } } @@ -327,6 +328,7 @@ namespace Prebuild.Core m_Log.Write("C.J. Adams-Collier (cjac@colliertech.org),"); m_Log.Write("John Hurliman (john.hurliman@intel.com),"); m_Log.Write("WhiteCore build 2015 (greythane@gmail.com),"); + m_Log.Write("OpenSim build 2017 Ubit Umarov,"); m_Log.Write (""); m_Log.Write("See 'prebuild /usage' for help"); m_Log.Write(); @@ -602,7 +604,7 @@ namespace Prebuild.Core dataNode = preNode; dataNode.Parent = parent; - if (dataNode is ProjectNode) + if (cmdlineTargetFramework && dataNode is ProjectNode) { ((ProjectNode)dataNode).FrameworkVersion = m_TargetFramework; } @@ -663,7 +665,10 @@ namespace Prebuild.Core m_Target = m_CommandLine["target"]; m_Conditionals = m_CommandLine["conditionals"]; if(m_CommandLine["targetframework"] != null) + { m_TargetFramework = (FrameworkVersion)Enum.Parse (typeof (FrameworkVersion), m_CommandLine["targetframework"]); + cmdlineTargetFramework = true; + } m_Clean = m_CommandLine["clean"]; string removeDirs = m_CommandLine["removedir"]; if(removeDirs != null && removeDirs.Length == 0) diff --git a/Prebuild/src/Core/Targets/VS2012Target.cs b/Prebuild/src/Core/Targets/VS2012Target.cs new file mode 100644 index 0000000000..e21c97a258 --- /dev/null +++ b/Prebuild/src/Core/Targets/VS2012Target.cs @@ -0,0 +1,138 @@ +using System; + +using Prebuild.Core.Attributes; +using Prebuild.Core.Nodes; + +namespace Prebuild.Core.Targets +{ + + /// + /// + /// + [Target("vs2012")] + public class VS2012Target : VSGenericTarget + { + #region Fields + + string solutionVersion = "12.00"; + string productVersion = "11.0.61030.0"; + string schemaVersion = "2.0"; + string versionName = "Visual Studio 2012"; + string name = "vs2012"; + VSVersion version = VSVersion.VS11; + + #endregion + + #region Properties + + /// + /// Gets or sets the solution version. + /// + /// The solution version. + public override string SolutionVersion + { + get + { + return solutionVersion; + } + } + + /// + /// Gets or sets the product version. + /// + /// The product version. + public override string ProductVersion + { + get + { + return productVersion; + } + } + + /// + /// Gets or sets the schema version. + /// + /// The schema version. + public override string SchemaVersion + { + get + { + return schemaVersion; + } + } + + /// + /// Gets or sets the name of the version. + /// + /// The name of the version. + public override string VersionName + { + get + { + return versionName; + } + } + + /// + /// Gets or sets the version. + /// + /// The version. + public override VSVersion Version + { + get + { + return version; + } + } + + /// + /// Gets the name. + /// + /// The name. + public override string Name + { + get + { + return name; + } + } + + protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion) + { + switch (frameworkVersion) + { + case FrameworkVersion.v4_6_1: + case FrameworkVersion.v4_6: + return "ToolsVersion=\"14.0\""; + case FrameworkVersion.v4_5_1: + case FrameworkVersion.v4_5: + case FrameworkVersion.v4_0: + case FrameworkVersion.v3_5: + return "ToolsVersion=\"4.0\""; + case FrameworkVersion.v3_0: + return "ToolsVersion=\"3.0\""; + default: + return "ToolsVersion=\"2.0\""; + } + } + + public override string SolutionTag + { + get { return "# Visual Studio 2012"; } + } + + #endregion + + #region Constructors + + /// + /// Initializes a new instance of the class. + /// + public VS2012Target() + : base() + { + } + + #endregion + } +} diff --git a/Prebuild/src/Core/Targets/VS2013Target.cs b/Prebuild/src/Core/Targets/VS2013Target.cs new file mode 100644 index 0000000000..96d8294988 --- /dev/null +++ b/Prebuild/src/Core/Targets/VS2013Target.cs @@ -0,0 +1,139 @@ +using System; + +using Prebuild.Core.Attributes; +using Prebuild.Core.Nodes; + +namespace Prebuild.Core.Targets +{ + + /// + /// + /// + [Target("vs2013")] + public class VS2013Target : VSGenericTarget + { + #region Fields + + string solutionVersion = "12.00"; + string productVersion = "12.0.31101"; + string schemaVersion = "2.0"; + string versionName = "Visual Studio 2013"; + string name = "vs2013"; + VSVersion version = VSVersion.VS12; + + #endregion + + #region Properties + + /// + /// Gets or sets the solution version. + /// + /// The solution version. + public override string SolutionVersion + { + get + { + return solutionVersion; + } + } + + /// + /// Gets or sets the product version. + /// + /// The product version. + public override string ProductVersion + { + get + { + return productVersion; + } + } + + /// + /// Gets or sets the schema version. + /// + /// The schema version. + public override string SchemaVersion + { + get + { + return schemaVersion; + } + } + + /// + /// Gets or sets the name of the version. + /// + /// The name of the version. + public override string VersionName + { + get + { + return versionName; + } + } + + /// + /// Gets or sets the version. + /// + /// The version. + public override VSVersion Version + { + get + { + return version; + } + } + + /// + /// Gets the name. + /// + /// The name. + public override string Name + { + get + { + return name; + } + } + + protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion) + { + switch (frameworkVersion) + { + case FrameworkVersion.v4_6_1: + case FrameworkVersion.v4_6: + return "ToolsVersion=\"14.0\""; + case FrameworkVersion.v4_5_1: + case FrameworkVersion.v4_5: + return "ToolsVersion=\"12.0\""; + case FrameworkVersion.v4_0: + case FrameworkVersion.v3_5: + return "ToolsVersion=\"4.0\""; + case FrameworkVersion.v3_0: + return "ToolsVersion=\"3.0\""; + default: + return "ToolsVersion=\"2.0\""; + } + } + + public override string SolutionTag + { + get { return "# Visual Studio 2013"; } + } + + #endregion + + #region Constructors + + /// + /// Initializes a new instance of the class. + /// + public VS2013Target() + : base() + { + } + + #endregion + } +} diff --git a/Prebuild/src/Core/Targets/VS2015Target.cs b/Prebuild/src/Core/Targets/VS2015Target.cs new file mode 100644 index 0000000000..b487979cee --- /dev/null +++ b/Prebuild/src/Core/Targets/VS2015Target.cs @@ -0,0 +1,143 @@ +using System; +using System.IO; +using System.Text; + +using Prebuild.Core.Attributes; +using Prebuild.Core.Interfaces; +using Prebuild.Core.Nodes; +using Prebuild.Core.Utilities; +using System.CodeDom.Compiler; + +namespace Prebuild.Core.Targets +{ + + /// + /// + /// + [Target("vs2015")] + public class VS2015Target : VSGenericTarget + { + #region Fields + + string solutionVersion = "12.00"; + string productVersion = "14.0.23107.0"; + string schemaVersion = "2.0"; + string versionName = "Visual Studio 14"; + string name = "vs2015"; + VSVersion version = VSVersion.VS15; + + #endregion + + #region Properties + + /// + /// Gets or sets the solution version. + /// + /// The solution version. + public override string SolutionVersion + { + get + { + return solutionVersion; + } + } + + /// + /// Gets or sets the product version. + /// + /// The product version. + public override string ProductVersion + { + get + { + return productVersion; + } + } + + /// + /// Gets or sets the schema version. + /// + /// The schema version. + public override string SchemaVersion + { + get + { + return schemaVersion; + } + } + + /// + /// Gets or sets the name of the version. + /// + /// The name of the version. + public override string VersionName + { + get + { + return versionName; + } + } + + /// + /// Gets or sets the version. + /// + /// The version. + public override VSVersion Version + { + get + { + return version; + } + } + + /// + /// Gets the name. + /// + /// The name. + public override string Name + { + get + { + return name; + } + } + + protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion) + { + switch (frameworkVersion) + { + case FrameworkVersion.v4_6_1: + case FrameworkVersion.v4_6: + return "ToolsVersion=\"14.0\""; + case FrameworkVersion.v4_5: + return "ToolsVersion=\"12.0\""; + case FrameworkVersion.v4_0: + case FrameworkVersion.v3_5: + return "ToolsVersion=\"4.0\""; + case FrameworkVersion.v3_0: + return "ToolsVersion=\"3.0\""; + default: + return "ToolsVersion=\"2.0\""; + } + } + + public override string SolutionTag + { + get { return "# Visual Studio 14"; } + } + + #endregion + + #region Constructors + + /// + /// Initializes a new instance of the class. + /// + public VS2015Target() + : base() + { + } + + #endregion + } +} \ No newline at end of file diff --git a/bin/Prebuild.exe b/bin/Prebuild.exe index e50006fe9e..f18b714e0a 100755 Binary files a/bin/Prebuild.exe and b/bin/Prebuild.exe differ