+2009-10-03 Ankit Jain <jankit@novell.com>
+
+ * Project.cs (OS): New.
+ (InitializeProperties): Set 'OS' as a pre-defined property, set to
+ 'Windows_NT', 'Unix' or 'OSX' depending on the platform.
+
2009-10-02 Ankit Jain <jankit@novell.com>
* Expression.cs (Parse): Don't change '/' to '\\', not required.
EvaluatedProperties.AddProperty (new BuildProperty ("MSBuildToolsPath", parentEngine.BinPath, PropertyType.Reserved));
EvaluatedProperties.AddProperty (new BuildProperty ("MSBuildExtensionsPath", ExtensionsPath, PropertyType.Reserved));
EvaluatedProperties.AddProperty (new BuildProperty ("MSBuildProjectDefaultTargets", DefaultTargets, PropertyType.Reserved));
+ EvaluatedProperties.AddProperty (new BuildProperty ("OS", OS, PropertyType.Environment));
// FIXME: make some internal method that will work like GetDirectoryName but output String.Empty on null/String.Empty
string projectDir;
internal static string XmlNamespace {
get { return ns; }
}
+
+ static string OS {
+ get {
+ PlatformID pid = Environment.OSVersion.Platform;
+ switch ((int)pid) {
+ case 128:
+ case 4:
+ return "Unix";
+ case 6:
+ return "OSX";
+ default:
+ return "Windows_NT";
+ }
+ }
+ }
+
}
}