From 81f01a12960a5004cde8321794c002e1ad9522b3 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 27 Mar 2007 20:19:35 +0000 Subject: * vaseline + duct-tape. --- Prebuild/Prebuild.sln | 28 ++++++++++++++-------------- Prebuild/src/Core/Targets/NAntTarget.cs | 23 +++++++++++------------ Prebuild/src/Prebuild.csproj | 19 +++++++++++-------- 3 files changed, 36 insertions(+), 34 deletions(-) (limited to 'Prebuild') diff --git a/Prebuild/Prebuild.sln b/Prebuild/Prebuild.sln index b36ed1e..0f35f18 100644 --- a/Prebuild/Prebuild.sln +++ b/Prebuild/Prebuild.sln @@ -1,19 +1,19 @@ Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Prebuild", "src\Prebuild.csproj", "{6A56621D-A328-4E23-96E3-0514A3817BAF}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Prebuild", "src\Prebuild.csproj", "{90DC3E1A-3A71-47DA-A7BE-CDA0C9828E1D}" EndProject Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {6A56621D-A328-4E23-96E3-0514A3817BAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6A56621D-A328-4E23-96E3-0514A3817BAF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6A56621D-A328-4E23-96E3-0514A3817BAF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6A56621D-A328-4E23-96E3-0514A3817BAF}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {90DC3E1A-3A71-47DA-A7BE-CDA0C9828E1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {90DC3E1A-3A71-47DA-A7BE-CDA0C9828E1D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {90DC3E1A-3A71-47DA-A7BE-CDA0C9828E1D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {90DC3E1A-3A71-47DA-A7BE-CDA0C9828E1D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection EndGlobal diff --git a/Prebuild/src/Core/Targets/NAntTarget.cs b/Prebuild/src/Core/Targets/NAntTarget.cs index 242bb9c..0f0deb2 100644 --- a/Prebuild/src/Core/Targets/NAntTarget.cs +++ b/Prebuild/src/Core/Targets/NAntTarget.cs @@ -77,14 +77,14 @@ namespace Prebuild.Core.Targets return tmpPath; } - private static string BuildReference(SolutionNode solution, ReferenceNode refr) + private static string BuildReference(SolutionNode solution, ProjectNode currentProject, ReferenceNode refr) { string ret = ""; if(solution.ProjectsTable.ContainsKey(refr.Name)) { - ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name]; - - string finalPath = Helper.NormalizePath( ((ReferencePathNode) project.ReferencePaths[0]).Path + refr.Name + ".dll", '/'); + ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name]; + + string finalPath = Helper.NormalizePath(((ReferencePathNode)currentProject.ReferencePaths[0]).Path + refr.Name + ".dll", '/'); return finalPath; } @@ -126,12 +126,11 @@ namespace Prebuild.Core.Targets string ret = ""; if(solution.ProjectsTable.ContainsKey(refr.Name)) { - ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name]; - string fileRef = FindFileReference(refr.Name, project); - string finalPath = Helper.NormalizePath(Helper.MakeReferencePath(project.FullPath + "/${build.dir}/"), '/'); - ret += finalPath; - return ret; - } + ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name]; + string finalPath = Helper.NormalizePath(((ReferencePathNode)project.ReferencePaths[0]).Path, '/'); + + return finalPath; + } else { ProjectNode project = (ProjectNode)refr.Parent; @@ -226,7 +225,7 @@ namespace Prebuild.Core.Targets { if (refr.LocalCopy) { - ss.WriteLine(" ", '/')); + ss.WriteLine(" ", '/')); } } ss.WriteLine(" "); @@ -316,7 +315,7 @@ namespace Prebuild.Core.Targets ss.WriteLine(" "); foreach(ReferenceNode refr in project.References) { - string path = Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReference(solution, refr)), '/'); + string path = Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReference(solution, project, refr)), '/'); ss.WriteLine(" " ); } ss.WriteLine(" "); diff --git a/Prebuild/src/Prebuild.csproj b/Prebuild/src/Prebuild.csproj index c1ab9b2..3727947 100644 --- a/Prebuild/src/Prebuild.csproj +++ b/Prebuild/src/Prebuild.csproj @@ -1,4 +1,4 @@ - + Local 8.0.50727 @@ -17,7 +17,8 @@ IE50 false Exe - + + Prebuild Prebuild.Prebuild @@ -30,7 +31,8 @@ DEBUG;TRACE - + + True 4096 False @@ -48,7 +50,8 @@ TRACE - + + False 4096 True @@ -60,15 +63,15 @@ 1595 - + System.EnterpriseServices.dll False - + System.Xml.dll False - + System.dll False @@ -202,4 +205,4 @@ - + \ No newline at end of file -- cgit v1.1