[Kde-bindings] KDE/kdebindings/csharp/plasma

Arno Rehn kde at arnorehn.de
Sat Aug 23 12:25:40 UTC 2008


SVN commit 851273 by arnorehn:

* Also check for referenced assemblies in the same path as the main assembly.

CCMAIL: kde-bindings at kde.org



 M  +3 -0      ChangeLog  
 M  +7 -1      src/PlasmaScriptengineKimono_Applet.cs  


--- trunk/KDE/kdebindings/csharp/plasma/ChangeLog #851272:851273
@@ -1,3 +1,6 @@
+2008-08-23  Arno Rehn  <arno at arnorehn.de>
+* Also check for referenced assemblies in the same path as the main assembly.
+
 2008-08-12  Arno Rehn  <arno at arnorehn.de>
 * Sizes of applets are now correctly restored.
 * debug--
--- trunk/KDE/kdebindings/csharp/plasma/src/PlasmaScriptengineKimono_Applet.cs #851272:851273
@@ -21,6 +21,7 @@
 namespace PlasmaScriptengineKimono {
 
     using System;
+    using System.IO;
     using System.Text;
     using System.Reflection;
     using System.Collections.Generic;
@@ -46,7 +47,12 @@
             // the newly loaded assembly might contain reference other bindings that need to be initialized
             foreach (AssemblyName an in appletAssembly.GetReferencedAssemblies()) {
                 // if the binding has already been initialized (e.g. in SmokeInvocation.InitRuntime()), continue.
-                Assembly a = Assembly.Load(an);
+                Assembly a = null;
+                try {
+                    a = Assembly.Load(an);
+                } catch (FileNotFoundException e) {
+                    a = Assembly.LoadFile(Path.Combine(Path.GetDirectoryName(appletAssembly.Location), an.Name + ".dll"));
+                }
                 if (SmokeInvocation.InitializedAssemblies.Contains(a)) continue;
                 AssemblySmokeInitializer attr = (AssemblySmokeInitializer) Attribute.GetCustomAttribute(a, typeof(AssemblySmokeInitializer));
                 if (attr != null) attr.CallInitSmoke();



More information about the Kde-bindings mailing list