* Allows MRMs to import libraries in the OpenSim bin directory.
* Syntax: //@DEPENDS:library.dll0.6.5-rc1
parent
a5ceb1a2a0
commit
f44694c28e
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue