diff options
Diffstat (limited to 'Prebuild/src/Core/Nodes/FilesNode.cs')
-rw-r--r-- | Prebuild/src/Core/Nodes/FilesNode.cs | 56 |
1 files changed, 44 insertions, 12 deletions
diff --git a/Prebuild/src/Core/Nodes/FilesNode.cs b/Prebuild/src/Core/Nodes/FilesNode.cs index 05b2255..7c1dd19 100644 --- a/Prebuild/src/Core/Nodes/FilesNode.cs +++ b/Prebuild/src/Core/Nodes/FilesNode.cs | |||
@@ -26,9 +26,9 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
26 | #region CVS Information | 26 | #region CVS Information |
27 | /* | 27 | /* |
28 | * $Source$ | 28 | * $Source$ |
29 | * $Author: jendave $ | 29 | * $Author: borrillis $ |
30 | * $Date: 2006-09-20 09:42:51 +0200 (on, 20 sep 2006) $ | 30 | * $Date: 2007-05-25 01:03:16 +0900 (Fri, 25 May 2007) $ |
31 | * $Revision: 164 $ | 31 | * $Revision: 243 $ |
32 | */ | 32 | */ |
33 | #endregion | 33 | #endregion |
34 | 34 | ||
@@ -56,7 +56,8 @@ namespace Prebuild.Core.Nodes | |||
56 | private Hashtable m_ResourceNames; | 56 | private Hashtable m_ResourceNames; |
57 | private Hashtable m_CopyToOutputs; | 57 | private Hashtable m_CopyToOutputs; |
58 | private Hashtable m_Links; | 58 | private Hashtable m_Links; |
59 | 59 | private Hashtable m_LinkPaths; | |
60 | private Hashtable m_PreservePaths; | ||
60 | 61 | ||
61 | #endregion | 62 | #endregion |
62 | 63 | ||
@@ -73,7 +74,9 @@ namespace Prebuild.Core.Nodes | |||
73 | m_ResourceNames = new Hashtable(); | 74 | m_ResourceNames = new Hashtable(); |
74 | m_CopyToOutputs = new Hashtable(); | 75 | m_CopyToOutputs = new Hashtable(); |
75 | m_Links = new Hashtable(); | 76 | m_Links = new Hashtable(); |
76 | } | 77 | m_LinkPaths = new Hashtable(); |
78 | m_PreservePaths = new Hashtable(); | ||
79 | } | ||
77 | 80 | ||
78 | #endregion | 81 | #endregion |
79 | 82 | ||
@@ -127,6 +130,15 @@ namespace Prebuild.Core.Nodes | |||
127 | return (bool) this.m_Links[file]; | 130 | return (bool) this.m_Links[file]; |
128 | } | 131 | } |
129 | 132 | ||
133 | public string GetLinkPath( string file ) | ||
134 | { | ||
135 | if ( !this.m_LinkPaths.ContainsKey( file ) ) | ||
136 | { | ||
137 | return string.Empty; | ||
138 | } | ||
139 | return (string)this.m_LinkPaths[ file ]; | ||
140 | } | ||
141 | |||
130 | /// <summary> | 142 | /// <summary> |
131 | /// | 143 | /// |
132 | /// </summary> | 144 | /// </summary> |
@@ -157,6 +169,21 @@ namespace Prebuild.Core.Nodes | |||
157 | return (string)m_ResourceNames[file]; | 169 | return (string)m_ResourceNames[file]; |
158 | } | 170 | } |
159 | 171 | ||
172 | /// <summary> | ||
173 | /// | ||
174 | /// </summary> | ||
175 | /// <param name="file"></param> | ||
176 | /// <returns></returns> | ||
177 | public bool GetPreservePath( string file ) | ||
178 | { | ||
179 | if ( !m_PreservePaths.ContainsKey( file ) ) | ||
180 | { | ||
181 | return false; | ||
182 | } | ||
183 | |||
184 | return (bool)m_PreservePaths[ file ]; | ||
185 | } | ||
186 | |||
160 | /// <summary> | 187 | /// <summary> |
161 | /// | 188 | /// |
162 | /// </summary> | 189 | /// </summary> |
@@ -181,8 +208,10 @@ namespace Prebuild.Core.Nodes | |||
181 | m_BuildActions[fileNode.Path] = fileNode.BuildAction; | 208 | m_BuildActions[fileNode.Path] = fileNode.BuildAction; |
182 | m_SubTypes[fileNode.Path] = fileNode.SubType; | 209 | m_SubTypes[fileNode.Path] = fileNode.SubType; |
183 | m_ResourceNames[fileNode.Path] = fileNode.ResourceName; | 210 | m_ResourceNames[fileNode.Path] = fileNode.ResourceName; |
184 | this.m_Links[fileNode.Path] = fileNode.IsLink; | 211 | this.m_PreservePaths[ fileNode.Path ] = fileNode.PreservePath; |
185 | this.m_CopyToOutputs[fileNode.Path] = fileNode.CopyToOutput; | 212 | this.m_Links[ fileNode.Path ] = fileNode.IsLink; |
213 | this.m_LinkPaths[ fileNode.Path ] = fileNode.LinkPath; | ||
214 | this.m_CopyToOutputs[ fileNode.Path ] = fileNode.CopyToOutput; | ||
186 | 215 | ||
187 | } | 216 | } |
188 | } | 217 | } |
@@ -191,14 +220,17 @@ namespace Prebuild.Core.Nodes | |||
191 | { | 220 | { |
192 | foreach(string file in ((MatchNode)dataNode).Files) | 221 | foreach(string file in ((MatchNode)dataNode).Files) |
193 | { | 222 | { |
223 | MatchNode matchNode = (MatchNode)dataNode; | ||
194 | if (!m_Files.Contains(file)) | 224 | if (!m_Files.Contains(file)) |
195 | { | 225 | { |
196 | m_Files.Add(file); | 226 | m_Files.Add(file); |
197 | m_BuildActions[file] = ((MatchNode)dataNode).BuildAction; | 227 | m_BuildActions[ file ] = matchNode.BuildAction; |
198 | m_SubTypes[file] = ((MatchNode)dataNode).SubType; | 228 | m_SubTypes[ file ] = matchNode.SubType; |
199 | m_ResourceNames[file] = ((MatchNode)dataNode).ResourceName; | 229 | m_ResourceNames[ file ] = matchNode.ResourceName; |
200 | this.m_Links[file] = ((MatchNode) dataNode).IsLink; | 230 | this.m_PreservePaths[ file ] = matchNode.PreservePath; |
201 | this.m_CopyToOutputs[file] = ((MatchNode) dataNode).CopyToOutput; | 231 | this.m_Links[ file ] = matchNode.IsLink; |
232 | this.m_LinkPaths[ file ] = matchNode.LinkPath; | ||
233 | this.m_CopyToOutputs[ file ] = matchNode.CopyToOutput; | ||
202 | 234 | ||
203 | } | 235 | } |
204 | } | 236 | } |