* Allows MRMs to import libraries in the OpenSim bin directory.

* Syntax: //@DEPENDS:library.dll
0.6.5-rc1
Adam Frisby 2009-04-09 15:46:02 +00:00
parent a5ceb1a2a0
commit f44694c28e
1 changed files with 16 additions and 5 deletions

View File

@ -217,12 +217,23 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
string rootPath =
Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory);
List<string> libraries = new List<string>();
string[] lines = Script.Split(new string[] {"\n"}, StringSplitOptions.RemoveEmptyEntries);
foreach (string s in lines)
{
if(s.StartsWith("//@DEPENDS:"))
{
libraries.Add(s.Replace("//@DEPENDS:", ""));
}
}
// TODO: Add Libraries
parameters.ReferencedAssemblies.Add(Path.Combine(rootPath,
"OpenSim.Region.OptionalModules.dll"));
parameters.ReferencedAssemblies.Add(Path.Combine(rootPath,
"log4net.dll"));
libraries.Add("OpenSim.Region.OptionalModules.dll");
libraries.Add("log4net.dll");
foreach (string library in libraries)
{
parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, library));
}
parameters.GenerateExecutable = false;
parameters.OutputAssembly = OutFile;