mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Also take YP/commented out JS references from script engine CodeTools.
Fixes build break from d3387d591a
This commit is contained in:
@@ -85,9 +85,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
|
||||
|
||||
private static CSharpCodeProvider CScodeProvider = new CSharpCodeProvider();
|
||||
private static VBCodeProvider VBcodeProvider = new VBCodeProvider();
|
||||
// private static JScriptCodeProvider JScodeProvider = new JScriptCodeProvider();
|
||||
private static CSharpCodeProvider YPcodeProvider = new CSharpCodeProvider(); // YP is translated into CSharp
|
||||
private static YP2CSConverter YP_Converter = new YP2CSConverter();
|
||||
|
||||
// private static int instanceID = new Random().Next(0, int.MaxValue); // Unique number to use on our compiled files
|
||||
private static UInt64 scriptCompileCounter = 0; // And a counter
|
||||
@@ -404,12 +401,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
|
||||
WriteMapFile(assembly + ".map", linemap);
|
||||
}
|
||||
|
||||
if (language == enumCompileType.yp)
|
||||
{
|
||||
// Its YP, convert it to C#
|
||||
compileScript = YP_Converter.Convert(Script);
|
||||
}
|
||||
|
||||
switch (language)
|
||||
{
|
||||
case enumCompileType.cs:
|
||||
@@ -424,13 +415,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
|
||||
compileScript = CreateVBCompilerScript(
|
||||
compileScript, m_scriptEngine.ScriptClassName, m_scriptEngine.ScriptBaseClassName);
|
||||
break;
|
||||
// case enumCompileType.js:
|
||||
// compileScript = CreateJSCompilerScript(compileScript, m_scriptEngine.ScriptBaseClassName);
|
||||
// break;
|
||||
case enumCompileType.yp:
|
||||
compileScript = CreateYPCompilerScript(
|
||||
compileScript, m_scriptEngine.ScriptClassName,m_scriptEngine.ScriptBaseClassName);
|
||||
break;
|
||||
}
|
||||
|
||||
assembly = CompileFromDotNetText(compileScript, language, asset, assembly);
|
||||
@@ -488,22 +472,6 @@ namespace SecondLife
|
||||
return compileScript;
|
||||
}
|
||||
|
||||
private static string CreateYPCompilerScript(string compileScript, string className, string baseClassName)
|
||||
{
|
||||
compileScript = String.Empty +
|
||||
"using OpenSim.Region.ScriptEngine.Shared.YieldProlog; " +
|
||||
"using OpenSim.Region.ScriptEngine.Shared; using System.Collections.Generic;\r\n" +
|
||||
String.Empty + "namespace SecondLife { " +
|
||||
String.Empty + "public class " + className + " : " + baseClassName + " { \r\n" +
|
||||
//@"public Script() { } " +
|
||||
@"static OpenSim.Region.ScriptEngine.Shared.YieldProlog.YP YP=null; " +
|
||||
@"public " + className + "() { YP= new OpenSim.Region.ScriptEngine.Shared.YieldProlog.YP(); } " +
|
||||
compileScript +
|
||||
"} }\r\n";
|
||||
|
||||
return compileScript;
|
||||
}
|
||||
|
||||
private static string CreateVBCompilerScript(string compileScript, string className, string baseClassName)
|
||||
{
|
||||
compileScript = String.Empty +
|
||||
@@ -635,14 +603,6 @@ namespace SecondLife
|
||||
}
|
||||
} while (!complete);
|
||||
break;
|
||||
// case enumCompileType.js:
|
||||
// results = JScodeProvider.CompileAssemblyFromSource(
|
||||
// parameters, Script);
|
||||
// break;
|
||||
case enumCompileType.yp:
|
||||
results = YPcodeProvider.CompileAssemblyFromSource(
|
||||
parameters, Script);
|
||||
break;
|
||||
default:
|
||||
throw new Exception("Compiler is not able to recongnize " +
|
||||
"language type \"" + lang.ToString() + "\"");
|
||||
|
||||
Reference in New Issue
Block a user