* 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 =
|
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;
|
||||||
|
|
Loading…
Reference in New Issue