aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Prebuild/src/Core/Utilities
diff options
context:
space:
mode:
authorlbsa712009-02-19 14:16:22 +0000
committerlbsa712009-02-19 14:16:22 +0000
commite36c452d4e891073768fd70915a65531f806f831 (patch)
tree40f7ec86c6813a7221f39f4e4483f81337b13158 /Prebuild/src/Core/Utilities
parent* Ignored some bins (diff)
downloadopensim-SC_OLD-e36c452d4e891073768fd70915a65531f806f831.zip
opensim-SC_OLD-e36c452d4e891073768fd70915a65531f806f831.tar.gz
opensim-SC_OLD-e36c452d4e891073768fd70915a65531f806f831.tar.bz2
opensim-SC_OLD-e36c452d4e891073768fd70915a65531f806f831.tar.xz
* Reverted Prebuild commit due to strange run-time errors.
Diffstat (limited to 'Prebuild/src/Core/Utilities')
-rw-r--r--Prebuild/src/Core/Utilities/CommandLineCollection.cs9
-rw-r--r--Prebuild/src/Core/Utilities/CurrentDirectory.cs9
-rw-r--r--Prebuild/src/Core/Utilities/Helper.cs25
-rw-r--r--Prebuild/src/Core/Utilities/Log.cs9
4 files changed, 43 insertions, 9 deletions
diff --git a/Prebuild/src/Core/Utilities/CommandLineCollection.cs b/Prebuild/src/Core/Utilities/CommandLineCollection.cs
index 22752aa..5733547 100644
--- a/Prebuild/src/Core/Utilities/CommandLineCollection.cs
+++ b/Prebuild/src/Core/Utilities/CommandLineCollection.cs
@@ -23,6 +23,15 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: robloach $
30 * $Date: 2006-09-26 07:30:53 +0900 (Tue, 26 Sep 2006) $
31 * $Revision: 165 $
32 */
33#endregion
34
26using System; 35using System;
27using System.Collections; 36using System.Collections;
28using System.Collections.Specialized; 37using System.Collections.Specialized;
diff --git a/Prebuild/src/Core/Utilities/CurrentDirectory.cs b/Prebuild/src/Core/Utilities/CurrentDirectory.cs
index 5fabdf0..abbed52 100644
--- a/Prebuild/src/Core/Utilities/CurrentDirectory.cs
+++ b/Prebuild/src/Core/Utilities/CurrentDirectory.cs
@@ -23,6 +23,15 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-01-28 09:49:58 +0900 (Sat, 28 Jan 2006) $
31 * $Revision: 71 $
32 */
33#endregion
34
26using System; 35using System;
27using System.Collections; 36using System.Collections;
28 37
diff --git a/Prebuild/src/Core/Utilities/Helper.cs b/Prebuild/src/Core/Utilities/Helper.cs
index 9a0d131..19093ce 100644
--- a/Prebuild/src/Core/Utilities/Helper.cs
+++ b/Prebuild/src/Core/Utilities/Helper.cs
@@ -23,6 +23,15 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2007-02-14 05:58:03 +0900 (Wed, 14 Feb 2007) $
31 * $Revision: 205 $
32 */
33#endregion
34
26using System; 35using System;
27using System.Collections; 36using System.Collections;
28using System.Diagnostics; 37using System.Diagnostics;
@@ -280,8 +289,6 @@ namespace Prebuild.Core.Utilities
280 return true; 289 return true;
281 } 290 }
282 291
283 static readonly char seperator = Path.DirectorySeparatorChar;
284
285 // This little gem was taken from the NeL source, thanks guys! 292 // This little gem was taken from the NeL source, thanks guys!
286 /// <summary> 293 /// <summary>
287 /// Makes a relative path 294 /// Makes a relative path
@@ -291,8 +298,8 @@ namespace Prebuild.Core.Utilities
291 /// <returns>Path that will get from startPath to endPath</returns> 298 /// <returns>Path that will get from startPath to endPath</returns>
292 public static string MakePathRelativeTo(string startPath, string endPath) 299 public static string MakePathRelativeTo(string startPath, string endPath)
293 { 300 {
294 string tmp = NormalizePath(startPath, seperator); 301 string tmp = NormalizePath(startPath, '/');
295 string src = NormalizePath(endPath, seperator); 302 string src = NormalizePath(endPath, '/');
296 string prefix = ""; 303 string prefix = "";
297 304
298 while(true) 305 while(true)
@@ -305,14 +312,14 @@ namespace Prebuild.Core.Utilities
305 { 312 {
306 return "./"; 313 return "./";
307 } 314 }
308 if((src.Length > tmp.Length) && src[tmp.Length - 1] != seperator) 315 if ((src.Length > tmp.Length) && src[tmp.Length-1] != '/' && src[tmp.Length-1] != '\\')
309 { 316 {
310 } 317 }
311 else 318 else
312 { 319 {
313 ret = prefix + endPath.Substring(size, endPath.Length - size); 320 ret = prefix + endPath.Substring(size, endPath.Length - size);
314 ret = ret.Trim(); 321 ret = ret.Trim();
315 if(ret[0] == seperator) 322 if(ret[0] == '/' || ret[0] == '\\')
316 { 323 {
317 ret = "." + ret; 324 ret = "." + ret;
318 } 325 }
@@ -327,8 +334,8 @@ namespace Prebuild.Core.Utilities
327 break; 334 break;
328 } 335 }
329 336
330 int lastPos = tmp.LastIndexOf(seperator, tmp.Length - 2); 337 int lastPos = tmp.LastIndexOf('/', tmp.Length - 2);
331 int prevPos = tmp.IndexOf(seperator); 338 int prevPos = tmp.IndexOf('/');
332 339
333 if((lastPos == prevPos) || (lastPos == -1)) 340 if((lastPos == prevPos) || (lastPos == -1))
334 { 341 {
@@ -336,7 +343,7 @@ namespace Prebuild.Core.Utilities
336 } 343 }
337 344
338 tmp = tmp.Substring(0, lastPos + 1); 345 tmp = tmp.Substring(0, lastPos + 1);
339 prefix += ".." + seperator.ToString(); 346 prefix += "../";
340 } 347 }
341 348
342 return endPath; 349 return endPath;
diff --git a/Prebuild/src/Core/Utilities/Log.cs b/Prebuild/src/Core/Utilities/Log.cs
index 548e987..e8105ac 100644
--- a/Prebuild/src/Core/Utilities/Log.cs
+++ b/Prebuild/src/Core/Utilities/Log.cs
@@ -23,6 +23,15 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-01-28 09:49:58 +0900 (Sat, 28 Jan 2006) $
31 * $Revision: 71 $
32 */
33#endregion
34
26using System; 35using System;
27using System.IO; 36using System.IO;
28 37