LSL Compiler now only referring required assemblies (DotNetEngine and Common). Changed Vector and Rotation to custom types (stored in Common) that needs to be changed later. No longer using Axiom. Script support still broken.

This commit is contained in:
Tedd Hansen
2007-08-18 20:53:13 +00:00
parent 1d41fd4984
commit 551f2af39f
8 changed files with 341 additions and 279 deletions

View File

@@ -8,6 +8,7 @@ using System.Reflection;
namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
{
public class Compiler
{
private LSL2CSConverter LSL_Converter = new LSL2CSConverter();
@@ -52,13 +53,17 @@ 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())
//{
// Console.WriteLine("Adding assembly: " + asm.Location);
// 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);
string rootPath = Path.GetDirectoryName(this.GetType().Assembly.Location);
Console.WriteLine("Assembly location: " + rootPath);
parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Common.dll"));
parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.DotNetEngine.dll"));
//parameters.ReferencedAssemblies.Add("OpenSim.Region.Environment");
parameters.GenerateExecutable = false;
parameters.OutputAssembly = OutFile;