* 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 = string rootPath =
Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory); 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 libraries.Add("OpenSim.Region.OptionalModules.dll");
parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, libraries.Add("log4net.dll");
"OpenSim.Region.OptionalModules.dll"));
parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, foreach (string library in libraries)
"log4net.dll")); {
parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, library));
}
parameters.GenerateExecutable = false; parameters.GenerateExecutable = false;
parameters.OutputAssembly = OutFile; parameters.OutputAssembly = OutFile;