{
public static class ToolLocationHelper
{
+ static string lib_mono_dir;
+ static string [] mono_dir;
+
+ static ToolLocationHelper ()
+ {
+ string assemblyLocation;
+ DirectoryInfo t1, t2;
+
+ // /usr/local/lib/mono/1.0
+ assemblyLocation = Path.GetDirectoryName (typeof (object).Assembly.Location);
+ t1 = new DirectoryInfo (assemblyLocation);
+
+ // usr/local/lib/mono
+ t2 = t1.Parent;
+
+ lib_mono_dir = t2.FullName;
+ if (Environment.GetEnvironmentVariable ("TESTING_MONO") != null) {
+ mono_dir = new string [] {
+ Path.Combine (lib_mono_dir, "net_1_0"),
+ Path.Combine (lib_mono_dir, "net_2_0"),
+ Path.Combine (lib_mono_dir, "net_2_0"),
+ Path.Combine (lib_mono_dir, "net_3_5"),
+ Path.Combine (lib_mono_dir, "net_4_0")
+ };
+ } else {
+ mono_dir = new string [] {
+ Path.Combine (lib_mono_dir, "1.0"),
+ Path.Combine (lib_mono_dir, "2.0"),
+ Path.Combine (lib_mono_dir, "2.0"),
+ Path.Combine (lib_mono_dir, "3.5"),
+ Path.Combine (lib_mono_dir, "4.0")
+ };
+ }
+
+ }
+
[MonoTODO]
public static string GetDotNetFrameworkRootRegistryKey (TargetDotNetFrameworkVersion version)
{
throw new NotImplementedException ();
}
- [MonoTODO]
public static string GetPathToDotNetFramework (TargetDotNetFrameworkVersion version)
{
- throw new NotImplementedException ();
+ return mono_dir [(int)version];
}
[MonoTODO]
throw new NotImplementedException ();
}
- [MonoTODO]
public static string GetPathToDotNetFrameworkSdk (TargetDotNetFrameworkVersion version)
{
- throw new NotImplementedException ();
+ return GetPathToDotNetFramework (version);
}
[MonoTODO]
}
}
-#endif
\ No newline at end of file
+#endif