aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler
diff options
context:
space:
mode:
authorTedd Hansen2007-08-18 22:09:07 +0000
committerTedd Hansen2007-08-18 22:09:07 +0000
commit240712ca9fc726653e2a03b944baa8b6f8155b07 (patch)
tree6fd919d0983ba3d108aee5adeec0a9a751dff760 /OpenSim/Region/ScriptEngine/DotNetEngine/Compiler
parentScript loads into separate AppDomain without errors. Events and llFunctions n... (diff)
downloadopensim-SC_OLD-240712ca9fc726653e2a03b944baa8b6f8155b07.zip
opensim-SC_OLD-240712ca9fc726653e2a03b944baa8b6f8155b07.tar.gz
opensim-SC_OLD-240712ca9fc726653e2a03b944baa8b6f8155b07.tar.bz2
opensim-SC_OLD-240712ca9fc726653e2a03b944baa8b6f8155b07.tar.xz
Scripts are working again. Scripts are now loaded into limited AppDomains (no security yet).
*phew* that only took me 12 hours of coding...
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs29
2 files changed, 30 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs
index 435ee08..ad2717c 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs
@@ -61,7 +61,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
61 61
62 string rootPath = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory); 62 string rootPath = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory);
63 string rootPathSE = Path.GetDirectoryName(this.GetType().Assembly.Location); 63 string rootPathSE = Path.GetDirectoryName(this.GetType().Assembly.Location);
64 Console.WriteLine("Assembly location: " + rootPath); 64 //Console.WriteLine("Assembly location: " + rootPath);
65 parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Common.dll")); 65 parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Common.dll"));
66 parameters.ReferencedAssemblies.Add(Path.Combine(rootPathSE, "OpenSim.Region.ScriptEngine.DotNetEngine.dll")); 66 parameters.ReferencedAssemblies.Add(Path.Combine(rootPathSE, "OpenSim.Region.ScriptEngine.DotNetEngine.dll"));
67 67
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs
index 84fa9eb..7334e6f 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs
@@ -4,6 +4,8 @@ using System.Text;
4using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler; 4using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler;
5using OpenSim.Region.ScriptEngine.Common; 5using OpenSim.Region.ScriptEngine.Common;
6using System.Threading; 6using System.Threading;
7using System.Reflection;
8
7 9
8namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL 10namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
9{ 11{
@@ -46,6 +48,33 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
46 return; 48 return;
47 } 49 }
48 50
51 public void ExecuteEvent(string FunctionName, object[] args)
52 {
53 //foreach (MemberInfo mi in this.GetType().GetMembers())
54 //{
55 //if (mi.ToString().ToLower().Contains("default"))
56 //{
57 // Console.WriteLine("Member found: " + mi.ToString());
58 //}
59 //}
60
61 Type type = this.GetType();
62
63 Console.WriteLine("ScriptEngine Invoke: \"" + this.State() + "_event_" + FunctionName + "\"");
64
65 try
66 {
67 type.InvokeMember(this.State() + "_event_" + FunctionName, BindingFlags.InvokeMethod, null, this, args);
68 }
69 catch (Exception e)
70 {
71 // TODO: Send to correct place
72 Console.WriteLine("ScriptEngine Exception attempting to executing script function: " + e.ToString());
73 }
74
75
76 }
77
49 78
50 79
51 // 80 //