From dd9640cda82bca8125289f292238ea6b447cc6e9 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Thu, 19 Feb 2009 12:48:38 +0000 Subject: === PREBUILD UPSTREAMS UPDATE : POTENTIAL BREAKAGE === * Applied upstreams changes to allow for auditing and debugging in our various environments. * This should, in theory, bring back 'multiple ref dirs'. * Temporarily Removed xmlns because prebuild-1.7 schema does not allow for multiple solutions per prebuild node (This will be a moot issue once the Prebuild node is moved out of prebuild.xml) * Autotools target: Various minor fixes * MonoDevelop Target : No changes. * Nant Target: Various minor fixes, support for net-3.5 and mono-2.0/3.5 targets * Sharpdevelop targets: No changes. * VS Targets: Refactored into using VSGenericTarget, and supports 2.0-3.5 * XCode Target: No changes. --- Regressions and outstanding issues --- * The Solution is assigned a random Guid - will lead to unnecessary reloads and loss of user settings. --- New features of Prebuild 2.0.4 --- * (Better) support for Web, WinForms and Database Projects and build actions * Conditional Framework Version compilation support (1.1, 2.0-3.5) * ArrayList -> List<>, ICollection -> IList (this means Prebuild can generate 1.1 solutions, but can't itself be built under 1.1 - how very meta) * Added preprocessor directive. --- Prebuild/src/Core/Nodes/FileNode.cs | 42 +++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 18 deletions(-) (limited to 'Prebuild/src/Core/Nodes/FileNode.cs') diff --git a/Prebuild/src/Core/Nodes/FileNode.cs b/Prebuild/src/Core/Nodes/FileNode.cs index 083dba5..1520fcb 100644 --- a/Prebuild/src/Core/Nodes/FileNode.cs +++ b/Prebuild/src/Core/Nodes/FileNode.cs @@ -23,15 +23,6 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O */ #endregion -#region CVS Information -/* - * $Source$ - * $Author: borrillis $ - * $Date: 2007-05-25 01:03:16 +0900 (Fri, 25 May 2007) $ - * $Revision: 243 $ - */ -#endregion - using System; using System.IO; using System.Xml; @@ -39,6 +30,7 @@ using System.Xml; using Prebuild.Core.Attributes; using Prebuild.Core.Interfaces; using Prebuild.Core.Utilities; +using Prebuild.Core.Targets; namespace Prebuild.Core.Nodes { @@ -93,7 +85,11 @@ namespace Prebuild.Core.Nodes /// /// /// - UserControl + UserControl, + /// + /// + /// + CodeBehind, } public enum CopyToOutput @@ -113,9 +109,9 @@ namespace Prebuild.Core.Nodes private string m_Path; private string m_ResourceName = ""; - private BuildAction m_BuildAction = BuildAction.Compile; + private BuildAction? m_BuildAction; private bool m_Valid; - private SubType m_SubType = SubType.Code; + private SubType? m_SubType; private CopyToOutput m_CopyToOutput = CopyToOutput.Never; private bool m_Link = false; private string m_LinkPath = string.Empty; @@ -155,7 +151,11 @@ namespace Prebuild.Core.Nodes { get { - return m_BuildAction; + if (m_BuildAction != null) + return m_BuildAction.Value; + else + return GetBuildActionByFileName(this.Path); + } } @@ -189,7 +189,10 @@ namespace Prebuild.Core.Nodes { get { - return m_SubType; + if (m_SubType != null) + return m_SubType.Value; + else + return GetSubTypeByFileName(this.Path); } } @@ -227,10 +230,13 @@ namespace Prebuild.Core.Nodes /// public override void Parse(XmlNode node) { - m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction), - Helper.AttributeValue(node, "buildAction", m_BuildAction.ToString())); - m_SubType = (SubType)Enum.Parse(typeof(SubType), - Helper.AttributeValue(node, "subType", m_SubType.ToString())); + string buildAction = Helper.AttributeValue(node, "buildAction", String.Empty); + if (buildAction != string.Empty) + m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction), buildAction); + string subType = Helper.AttributeValue(node, "subType", string.Empty); + if (subType != String.Empty) + m_SubType = (SubType)Enum.Parse(typeof(SubType), subType); + m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString()); this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString)); if ( this.m_Link == true ) -- cgit v1.1