diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | 38 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | 7 |
2 files changed, 24 insertions, 21 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs index d8c0ba5..959164b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | |||
@@ -32,7 +32,7 @@ using System.Globalization; | |||
32 | using System.Reflection; | 32 | using System.Reflection; |
33 | using System.IO; | 33 | using System.IO; |
34 | using Microsoft.CSharp; | 34 | using Microsoft.CSharp; |
35 | using Microsoft.JScript; | 35 | //using Microsoft.JScript; |
36 | using Microsoft.VisualBasic; | 36 | using Microsoft.VisualBasic; |
37 | using log4net; | 37 | using log4net; |
38 | using OpenSim.Region.Framework.Interfaces; | 38 | using OpenSim.Region.Framework.Interfaces; |
@@ -82,7 +82,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
82 | 82 | ||
83 | private static CSharpCodeProvider CScodeProvider = new CSharpCodeProvider(); | 83 | private static CSharpCodeProvider CScodeProvider = new CSharpCodeProvider(); |
84 | private static VBCodeProvider VBcodeProvider = new VBCodeProvider(); | 84 | private static VBCodeProvider VBcodeProvider = new VBCodeProvider(); |
85 | private static JScriptCodeProvider JScodeProvider = new JScriptCodeProvider(); | 85 | // private static JScriptCodeProvider JScodeProvider = new JScriptCodeProvider(); |
86 | private static CSharpCodeProvider YPcodeProvider = new CSharpCodeProvider(); // YP is translated into CSharp | 86 | private static CSharpCodeProvider YPcodeProvider = new CSharpCodeProvider(); // YP is translated into CSharp |
87 | private static YP2CSConverter YP_Converter = new YP2CSConverter(); | 87 | private static YP2CSConverter YP_Converter = new YP2CSConverter(); |
88 | 88 | ||
@@ -395,9 +395,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
395 | case enumCompileType.vb: | 395 | case enumCompileType.vb: |
396 | compileScript = CreateVBCompilerScript(compileScript); | 396 | compileScript = CreateVBCompilerScript(compileScript); |
397 | break; | 397 | break; |
398 | case enumCompileType.js: | 398 | // case enumCompileType.js: |
399 | compileScript = CreateJSCompilerScript(compileScript); | 399 | // compileScript = CreateJSCompilerScript(compileScript); |
400 | break; | 400 | // break; |
401 | case enumCompileType.yp: | 401 | case enumCompileType.yp: |
402 | compileScript = CreateYPCompilerScript(compileScript); | 402 | compileScript = CreateYPCompilerScript(compileScript); |
403 | break; | 403 | break; |
@@ -420,16 +420,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
420 | } | 420 | } |
421 | } | 421 | } |
422 | 422 | ||
423 | private static string CreateJSCompilerScript(string compileScript) | 423 | // private static string CreateJSCompilerScript(string compileScript) |
424 | { | 424 | // { |
425 | compileScript = String.Empty + | 425 | // compileScript = String.Empty + |
426 | "import OpenSim.Region.ScriptEngine.Shared; import System.Collections.Generic;\r\n" + | 426 | // "import OpenSim.Region.ScriptEngine.Shared; import System.Collections.Generic;\r\n" + |
427 | "package SecondLife {\r\n" + | 427 | // "package SecondLife {\r\n" + |
428 | "class Script extends OpenSim.Region.ScriptEngine.Shared.ScriptBase.ScriptBaseClass { \r\n" + | 428 | // "class Script extends OpenSim.Region.ScriptEngine.Shared.ScriptBase.ScriptBaseClass { \r\n" + |
429 | compileScript + | 429 | // compileScript + |
430 | "} }\r\n"; | 430 | // "} }\r\n"; |
431 | return compileScript; | 431 | // return compileScript; |
432 | } | 432 | // } |
433 | 433 | ||
434 | private static string CreateCSCompilerScript(string compileScript) | 434 | private static string CreateCSCompilerScript(string compileScript) |
435 | { | 435 | { |
@@ -580,10 +580,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
580 | } | 580 | } |
581 | } while (!complete); | 581 | } while (!complete); |
582 | break; | 582 | break; |
583 | case enumCompileType.js: | 583 | // case enumCompileType.js: |
584 | results = JScodeProvider.CompileAssemblyFromSource( | 584 | // results = JScodeProvider.CompileAssemblyFromSource( |
585 | parameters, Script); | 585 | // parameters, Script); |
586 | break; | 586 | // break; |
587 | case enumCompileType.yp: | 587 | case enumCompileType.yp: |
588 | results = YPcodeProvider.CompileAssemblyFromSource( | 588 | results = YPcodeProvider.CompileAssemblyFromSource( |
589 | parameters, Script); | 589 | parameters, Script); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index d30d2dc..18351ad 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | |||
@@ -541,7 +541,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
541 | m_CurrentResult = null; | 541 | m_CurrentResult = null; |
542 | } | 542 | } |
543 | 543 | ||
544 | return true; | 544 | return false; |
545 | } | 545 | } |
546 | 546 | ||
547 | public void SetState(string state) | 547 | public void SetState(string state) |
@@ -991,7 +991,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
991 | public string GetXMLState() | 991 | public string GetXMLState() |
992 | { | 992 | { |
993 | bool run = Running; | 993 | bool run = Running; |
994 | Stop(100); | 994 | bool stopped = Stop(100); |
995 | Running = run; | 995 | Running = run; |
996 | 996 | ||
997 | // We should not be doing this, but since we are about to | 997 | // We should not be doing this, but since we are about to |
@@ -1002,6 +1002,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
1002 | 1002 | ||
1003 | // Force an update of the in-memory plugin data | 1003 | // Force an update of the in-memory plugin data |
1004 | // | 1004 | // |
1005 | if (!stopped) | ||
1006 | return String.Empty; | ||
1007 | |||
1005 | PluginData = AsyncCommandManager.GetSerializationData(m_Engine, m_ItemID); | 1008 | PluginData = AsyncCommandManager.GetSerializationData(m_Engine, m_ItemID); |
1006 | 1009 | ||
1007 | return ScriptSerializer.Serialize(this); | 1010 | return ScriptSerializer.Serialize(this); |