aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs
index 33be6ec..6eadb0e 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs
@@ -16,16 +16,21 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
16 { 16 {
17 17
18 18
19 string OutFile = Path.GetFileNameWithoutExtension(LSOFileName); 19 // Output assembly name
20 string OutFile = Path.GetFileNameWithoutExtension(LSOFileName) + ".dll";
20 21
21 // TODO: Add error handling 22 // TODO: Add error handling
22 string CS_Code = LSL_Converter.Convert(File.ReadAllText(LSOFileName)); 23 string CS_Code = LSL_Converter.Convert(File.ReadAllText(LSOFileName));
23 24
25 // Do actual compile
24 System.CodeDom.Compiler.CompilerParameters parameters = new CompilerParameters(); 26 System.CodeDom.Compiler.CompilerParameters parameters = new CompilerParameters();
25 parameters.GenerateExecutable = true; 27 parameters.IncludeDebugInformation = true;
28 parameters.ReferencedAssemblies.Add("OpenSim.Region.Environment");
29 parameters.GenerateExecutable = false;
26 parameters.OutputAssembly = OutFile; 30 parameters.OutputAssembly = OutFile;
27 CompilerResults results = codeProvider.CompileAssemblyFromSource(parameters, CS_Code); 31 CompilerResults results = codeProvider.CompileAssemblyFromSource(parameters, CS_Code);
28 32
33 // Go through errors
29 // TODO: Return errors to user somehow 34 // TODO: Return errors to user somehow
30 if (results.Errors.Count > 0) 35 if (results.Errors.Count > 0)
31 { 36 {