From 9511a8c76370f21e839114007dcd2b25c69b009a Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Sat, 8 Nov 2008 17:35:48 +0000 Subject: 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. --- .../Components/DotNetEngine/Compilers/Compiler_JS.cs | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_JS.cs') diff --git a/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_JS.cs b/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_JS.cs index 3dc8d86..5e9bfba 100644 --- a/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_JS.cs +++ b/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_JS.cs @@ -25,20 +25,32 @@ * 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.JScript; +using OpenSim.ScriptEngine.Shared; namespace OpenSim.ScriptEngine.Components.DotNetEngine.Compilers { - public class Compiler_JS : CompilerBase + public class Compiler_JS : CILCompiler, IScriptCompiler { - public override void Start() + + public Compiler_JS() { + CompileProvider = new JScriptCodeProvider() as CodeDomProvider; } - public override void Close() + public override string PreProcessScript(ref string script) { + return + "import OpenSim.Region.ScriptEngine.Shared; import System.Collections.Generic;\r\n" + + "package SecondLife {\r\n" + + "class Script extends OpenSim.Region.ScriptEngine.Shared.ScriptBase.ScriptBaseClass { \r\n" + + script + + "} }\r\n"; + } + } } -- cgit v1.1