Bug 241892. Trying loading gtk-sharp from the GAC for detection.
This commit is contained in:
		| @@ -55,15 +55,33 @@ namespace launcher | |||||||
|  |  | ||||||
|         private static bool IsGTKSharpInstalled() |         private static bool IsGTKSharpInstalled() | ||||||
|         { |         { | ||||||
|  |  | ||||||
|  |             // try loading the gtk-sharp assembly | ||||||
|  |             try | ||||||
|  |             { | ||||||
|  |                 System.Reflection.Assembly assm = System.Reflection.Assembly.Load("gtk-sharp, Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"); | ||||||
|  |                 if (assm != null) | ||||||
|  |                 { | ||||||
|  |                     System.Diagnostics.Trace.WriteLine("Found gtk-sharp in the GAC");                     | ||||||
|  |                     return true; | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             catch (Exception e) | ||||||
|  |             { | ||||||
|  |  | ||||||
|  |             } | ||||||
|  |  | ||||||
|  |  | ||||||
|             // check the registry for the existence of GTK |             // check the registry for the existence of GTK | ||||||
|             string sGTK = ReadRegKey(Registry.LocalMachine, "Software\\GTK\\2.0", "Path"); |             string sGTK = ReadRegKey(Registry.LocalMachine, "Software\\GTK\\2.0", "Path"); | ||||||
|  |              | ||||||
|             if (sGTK != null) |             if (sGTK != null) | ||||||
|             { |             { | ||||||
|                 System.Diagnostics.Trace.WriteLine("GTK Path is: " + sGTK); |                 System.Diagnostics.Trace.WriteLine("GTK Path is: " + sGTK); | ||||||
|                 return true; |                 return true; | ||||||
|             } |             } | ||||||
|             else |             else | ||||||
|             { |             {                 | ||||||
|                 NoGTKSharpForm form = new NoGTKSharpForm(); |                 NoGTKSharpForm form = new NoGTKSharpForm(); | ||||||
|                 form.ShowDialog(); |                 form.ShowDialog(); | ||||||
|                 return false; |                 return false; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user