Work in progress on SECS stuff. Have been holding it off until after 0.6 release. Still messy as hell and doesn't really work yet. Will undergo dramatic changes. AND MOST IMPORTANTLY: Will be conformed to work in coop with todays DNE and XEngine, hopefully one day providing a common interface for all components.

This commit is contained in:
Tedd Hansen
2008-11-08 17:35:48 +00:00
parent cf0a14bec9
commit 9511a8c763
53 changed files with 2997 additions and 573 deletions

View File

@@ -25,20 +25,46 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Text;
using OpenSim.ApplicationPlugins.ScriptEngine.Components;
using Microsoft.CSharp;
using OpenSim.ScriptEngine.Shared;
namespace OpenSim.ScriptEngine.Components.DotNetEngine.Compilers
{
public class Compiler_CS: CompilerBase
public class Compiler_CS : CILCompiler, IScriptCompiler
{
public override void Start()
private string[] ScriptUsing = new string[]
{
"System",
"OpenSim.ScriptEngine.Shared",
"OpenSim.Region.ScriptEngine.Shared",
"System.Collections.Generic"
};
public Compiler_CS()
{
CompileProvider = new CSharpCodeProvider();
}
public override void Close()
public override string PreProcessScript(ref string script)
{
string s = "";
foreach (string u in ScriptUsing)
{
s += "using " + u + ";";
}
s += "\r\n"
+ String.Empty + "namespace ScriptAssemblies { "
+ String.Empty + "public class UserScript" + " : " + ScriptInheritFrom + " { \r\n" +
@"public Script() { } " +
script +
"} }\r\n";
return s;
}
}
}