From 551f2af39f2bc003bef9ba388ccb4a6d87f2f36b Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Sat, 18 Aug 2007 20:53:13 +0000 Subject: 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. --- .../ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs') diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs index 4c2ceb0..c29b9f4 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs @@ -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; -- cgit v1.1