diff options
author | Tedd Hansen | 2007-08-18 19:54:04 +0000 |
---|---|---|
committer | Tedd Hansen | 2007-08-18 19:54:04 +0000 |
commit | 1d41fd4984308a4b811f40aca18a90a79f243020 (patch) | |
tree | 8752672490125f9809e3801088a7a53b74103432 /OpenSim/Region/ScriptEngine/DotNetEngine/Compiler | |
parent | Moved LSL_BuiltIn_Commands_Interface.cs to a separate library (OpenSim.Region... (diff) | |
download | opensim-SC-1d41fd4984308a4b811f40aca18a90a79f243020.zip opensim-SC-1d41fd4984308a4b811f40aca18a90a79f243020.tar.gz opensim-SC-1d41fd4984308a4b811f40aca18a90a79f243020.tar.bz2 opensim-SC-1d41fd4984308a4b811f40aca18a90a79f243020.tar.xz |
Working on AppDomains. Scripting is now officially broken. :]
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler')
4 files changed, 18 insertions, 12 deletions
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 | |||
52 | System.CodeDom.Compiler.CompilerParameters parameters = new CompilerParameters(); | 52 | System.CodeDom.Compiler.CompilerParameters parameters = new CompilerParameters(); |
53 | parameters.IncludeDebugInformation = true; | 53 | parameters.IncludeDebugInformation = true; |
54 | // Add all available assemblies | 54 | // Add all available assemblies |
55 | foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) | 55 | //foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) |
56 | { | 56 | //{ |
57 | parameters.ReferencedAssemblies.Add(asm.Location); | 57 | // Console.WriteLine("Adding assembly: " + asm.Location); |
58 | } | 58 | // parameters.ReferencedAssemblies.Add(asm.Location); |
59 | //} | ||
60 | |||
61 | parameters.ReferencedAssemblies.Add(this.GetType().Assembly.CodeBase); | ||
59 | //parameters.ReferencedAssemblies.Add("OpenSim.Region.Environment"); | 62 | //parameters.ReferencedAssemblies.Add("OpenSim.Region.Environment"); |
60 | parameters.GenerateExecutable = false; | 63 | parameters.GenerateExecutable = false; |
61 | parameters.OutputAssembly = OutFile; | 64 | 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 | |||
228 | 228 | ||
229 | // Add namespace, class name and inheritance | 229 | // Add namespace, class name and inheritance |
230 | Return = "namespace SecondLife {\r\n"; | 230 | Return = "namespace SecondLife {\r\n"; |
231 | Return += "public class Script : OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.LSL_BaseClass {\r\n"; | 231 | Return += "[Serializable] public class Script : OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.LSL_BaseClass {\r\n"; |
232 | Return += @"public Script() { }"+"\r\n"; | 232 | Return += @"public Script() { }"+"\r\n"; |
233 | Return += Script; | 233 | Return += Script; |
234 | Return += "} }\r\n"; | 234 | 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; | |||
7 | 7 | ||
8 | namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | 8 | namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL |
9 | { | 9 | { |
10 | public class LSL_BaseClass : MarshalByRefObject, LSL_BuiltIn_Commands_Interface | 10 | [Serializable] |
11 | public class LSL_BaseClass : LSL_BuiltIn_Commands_Interface | ||
11 | { | 12 | { |
12 | 13 | ||
13 | public LSL_BuiltIn_Commands m_LSL_Functions; | 14 | public LSL_BuiltIn_Commands_Interface m_LSL_Functions; |
14 | 15 | ||
15 | public LSL_BaseClass() | 16 | public LSL_BaseClass() |
16 | { | 17 | { |
17 | } | 18 | } |
18 | public string State | 19 | public string State() |
19 | { | 20 | { |
20 | get { return m_LSL_Functions.State; } | 21 | return m_LSL_Functions.State(); |
21 | } | 22 | } |
22 | 23 | ||
23 | 24 | ||
24 | public void Start(LSL_BuiltIn_Commands LSL_Functions) | 25 | public void Start(LSL_BuiltIn_Commands_Interface LSL_Functions) |
25 | { | 26 | { |
26 | m_LSL_Functions = LSL_Functions; | 27 | m_LSL_Functions = LSL_Functions; |
27 | 28 | ||
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs index 8c2e799..6401163 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs | |||
@@ -14,7 +14,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
14 | /// <summary> | 14 | /// <summary> |
15 | /// Contains all LSL ll-functions. This class will be in Default AppDomain. | 15 | /// Contains all LSL ll-functions. This class will be in Default AppDomain. |
16 | /// </summary> | 16 | /// </summary> |
17 | [Serializable] | ||
18 | public class LSL_BuiltIn_Commands: LSL_BuiltIn_Commands_Interface | 17 | public class LSL_BuiltIn_Commands: LSL_BuiltIn_Commands_Interface |
19 | { | 18 | { |
20 | private System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); | 19 | private System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); |
@@ -30,7 +29,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
30 | } | 29 | } |
31 | 30 | ||
32 | 31 | ||
33 | public string State = "default"; | 32 | private string m_state = "default"; |
33 | public string State() { | ||
34 | return m_state; | ||
35 | } | ||
34 | 36 | ||
35 | public Scene World | 37 | public Scene World |
36 | { | 38 | { |