Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Toshok <toshok@novell.com>2008-07-23 22:52:50 +0400
committerChris Toshok <toshok@novell.com>2008-07-23 22:52:50 +0400
commit936e6244a94296051ee73f1fa15d5d291fd8de26 (patch)
treead098201647d6a235c753274204199e5afd7fcaa /gui-compare
parentcc3116b483868f97769f178f8fcf73f45579e7d4 (diff)
deal with MONO_GAC_PREFIX
svn path=/trunk/mono-tools/; revision=108589
Diffstat (limited to 'gui-compare')
-rw-r--r--gui-compare/InfoManager.cs39
1 files changed, 33 insertions, 6 deletions
diff --git a/gui-compare/InfoManager.cs b/gui-compare/InfoManager.cs
index 832fbb42..1c42510c 100644
--- a/gui-compare/InfoManager.cs
+++ b/gui-compare/InfoManager.cs
@@ -411,11 +411,16 @@ namespace GuiCompare
});
});
}
-
+
void Populate (Menu container, string caption, string pdir, string collection, string [] elements)
{
string profiledir = System.IO.Path.Combine (monodir, pdir);
-
+ string MONO_GAC_PREFIX = Environment.GetEnvironmentVariable ("MONO_GAC_PREFIX");
+ string[] gac_prefixes = null;
+
+ if (MONO_GAC_PREFIX != null)
+ gac_prefixes = MONO_GAC_PREFIX.Split (':');
+
MenuItem item = new MenuItem (caption);
Menu sub = new Menu ();
item.Submenu = sub;
@@ -429,12 +434,34 @@ namespace GuiCompare
continue;
child = new SeparatorMenuItem ();
} else {
- string assemblyfile = System.IO.Path.Combine (profiledir, e + ".dll");
- string element = e;
- if (!System.IO.File.Exists (assemblyfile)){
- Console.WriteLine ("Skipping {0} as {1} does not have it", e, profiledir);
+ string assemblyfile = null;
+ bool found = false;
+
+ if (gac_prefixes == null) {
+ assemblyfile = System.IO.Path.Combine (profiledir, e + ".dll");
+ found = System.IO.File.Exists (assemblyfile);
+ }
+ else {
+ foreach (string prefix in gac_prefixes) {
+ assemblyfile = System.IO.Path.Combine (
+ System.IO.Path.Combine (
+ System.IO.Path.Combine (
+ System.IO.Path.Combine (prefix, "lib"),
+ "mono"),
+ pdir),
+ e + ".dll");
+ found = System.IO.File.Exists (assemblyfile);
+ if (found)
+ break;
+ }
+ }
+
+ if (!found) {
+ Console.WriteLine ("Skipping {0} for profile {1}, could not locate it in profile dir or MONO_GAC_PREFIX", e, pdir);
continue;
}
+
+ string element = e;
child = new MenuItem (e);
child.Activated += delegate {
StartPresetCompare (assemblyfile, collection, element);