aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs10
1 files changed, 7 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
index 734d4d5..c10143b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
@@ -291,6 +291,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
291 public void PerformScriptCompile(string Script, string asset, UUID ownerUUID, 291 public void PerformScriptCompile(string Script, string asset, UUID ownerUUID,
292 out string assembly, out Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> linemap) 292 out string assembly, out Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> linemap)
293 { 293 {
294// m_log.DebugFormat("[Compiler]: Compiling script\n{0}", Script);
295
294 linemap = null; 296 linemap = null;
295 m_warnings.Clear(); 297 m_warnings.Clear();
296 298
@@ -357,6 +359,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
357 if (Script.StartsWith("//yp", true, CultureInfo.InvariantCulture)) 359 if (Script.StartsWith("//yp", true, CultureInfo.InvariantCulture))
358 language = enumCompileType.yp; 360 language = enumCompileType.yp;
359 361
362// m_log.DebugFormat("[Compiler]: Compile language is {0}", language);
363
360 if (!AllowedCompilers.ContainsKey(language.ToString())) 364 if (!AllowedCompilers.ContainsKey(language.ToString()))
361 { 365 {
362 // Not allowed to compile to this language! 366 // Not allowed to compile to this language!
@@ -417,7 +421,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
417 } 421 }
418 422
419 assembly = CompileFromDotNetText(compileScript, language, asset, assembly); 423 assembly = CompileFromDotNetText(compileScript, language, asset, assembly);
420 return;
421 } 424 }
422 425
423 public string[] GetWarnings() 426 public string[] GetWarnings()
@@ -491,6 +494,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
491 /// <returns>Filename to .dll assembly</returns> 494 /// <returns>Filename to .dll assembly</returns>
492 internal string CompileFromDotNetText(string Script, enumCompileType lang, string asset, string assembly) 495 internal string CompileFromDotNetText(string Script, enumCompileType lang, string asset, string assembly)
493 { 496 {
497// m_log.DebugFormat("[Compiler]: Compiling to assembly\n{0}", Script);
498
494 string ext = "." + lang.ToString(); 499 string ext = "." + lang.ToString();
495 500
496 // Output assembly name 501 // Output assembly name
@@ -531,8 +536,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
531 536
532 parameters.IncludeDebugInformation = true; 537 parameters.IncludeDebugInformation = true;
533 538
534 string rootPath = 539 string rootPath = AppDomain.CurrentDomain.BaseDirectory;
535 Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory);
536 540
537 parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, 541 parameters.ReferencedAssemblies.Add(Path.Combine(rootPath,
538 "OpenSim.Region.ScriptEngine.Shared.dll")); 542 "OpenSim.Region.ScriptEngine.Shared.dll"));