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/DatabaseProjectNode.cs | 94 ++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 Prebuild/src/Core/Nodes/DatabaseProjectNode.cs (limited to 'Prebuild/src/Core/Nodes/DatabaseProjectNode.cs') diff --git a/Prebuild/src/Core/Nodes/DatabaseProjectNode.cs b/Prebuild/src/Core/Nodes/DatabaseProjectNode.cs new file mode 100644 index 0000000..8696a79 --- /dev/null +++ b/Prebuild/src/Core/Nodes/DatabaseProjectNode.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.Xml; + +using Prebuild.Core.Attributes; +using Prebuild.Core.Interfaces; +using Prebuild.Core.Utilities; + +namespace Prebuild.Core.Nodes +{ + [DataNode("DatabaseProject")] + public class DatabaseProjectNode : DataNode + { + string name; + string path; + string fullpath; + Guid guid = Guid.NewGuid(); + readonly List authors = new List(); + readonly List references = new List(); + + public Guid Guid + { + get { return guid; } + } + + public string Name + { + get { return name; } + } + + public string Path + { + get { return path; } + } + + public string FullPath + { + get { return fullpath; } + } + + public IEnumerable References + { + get { return references; } + } + + public override void Parse(XmlNode node) + { + name = Helper.AttributeValue(node, "name", name); + path = Helper.AttributeValue(node, "path", name); + + try + { + fullpath = Helper.ResolvePath(path); + } + catch + { + throw new WarningException("Could not resolve Solution path: {0}", path); + } + + Kernel.Instance.CurrentWorkingDirectory.Push(); + + try + { + Helper.SetCurrentDir(fullpath); + + if (node == null) + { + throw new ArgumentNullException("node"); + } + + foreach (XmlNode child in node.ChildNodes) + { + IDataNode dataNode = Kernel.Instance.ParseNode(child, this); + + if (dataNode == null) + continue; + + if (dataNode is AuthorNode) + authors.Add((AuthorNode)dataNode); + else if (dataNode is DatabaseReferenceNode) + references.Add((DatabaseReferenceNode)dataNode); + } + } + finally + { + Kernel.Instance.CurrentWorkingDirectory.Pop(); + } + + base.Parse(node); + } + } +} -- cgit v1.1