From 1d41fd4984308a4b811f40aca18a90a79f243020 Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Sat, 18 Aug 2007 19:54:04 +0000 Subject: Working on AppDomains. Scripting is now officially broken. :] --- .../Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs | 11 +++++++---- .../ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | 2 +- .../ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs | 11 ++++++----- 3 files changed, 14 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL') diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs index 6e992be..4c2ceb0 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs @@ -52,10 +52,13 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL System.CodeDom.Compiler.CompilerParameters parameters = new CompilerParameters(); parameters.IncludeDebugInformation = true; // Add all available assemblies - foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) - { - parameters.ReferencedAssemblies.Add(asm.Location); - } + //foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) + //{ + // Console.WriteLine("Adding assembly: " + asm.Location); + // parameters.ReferencedAssemblies.Add(asm.Location); + //} + + parameters.ReferencedAssemblies.Add(this.GetType().Assembly.CodeBase); //parameters.ReferencedAssemblies.Add("OpenSim.Region.Environment"); parameters.GenerateExecutable = false; parameters.OutputAssembly = OutFile; diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs index 2427cc2..81f8e2d 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs @@ -228,7 +228,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL // Add namespace, class name and inheritance Return = "namespace SecondLife {\r\n"; - Return += "public class Script : OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.LSL_BaseClass {\r\n"; + Return += "[Serializable] public class Script : OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.LSL_BaseClass {\r\n"; Return += @"public Script() { }"+"\r\n"; Return += Script; Return += "} }\r\n"; diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs index bdae95d..eb3d871 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs @@ -7,21 +7,22 @@ using System.Threading; namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL { - public class LSL_BaseClass : MarshalByRefObject, LSL_BuiltIn_Commands_Interface + [Serializable] + public class LSL_BaseClass : LSL_BuiltIn_Commands_Interface { - public LSL_BuiltIn_Commands m_LSL_Functions; + public LSL_BuiltIn_Commands_Interface m_LSL_Functions; public LSL_BaseClass() { } - public string State + public string State() { - get { return m_LSL_Functions.State; } + return m_LSL_Functions.State(); } - public void Start(LSL_BuiltIn_Commands LSL_Functions) + public void Start(LSL_BuiltIn_Commands_Interface LSL_Functions) { m_LSL_Functions = LSL_Functions; -- cgit v1.1