aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs
diff options
context:
space:
mode:
authorAdam Frisby2009-04-09 15:46:02 +0000
committerAdam Frisby2009-04-09 15:46:02 +0000
commitf44694c28eee8bf3593f23a39607fb62e9299309 (patch)
tree0db767ad2ac7089bb9035cfacb266d2ddf7bb614 /OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs
parentFrom: Christopher Yeoh <yeohc@au1.ibm.com> (diff)
downloadopensim-SC_OLD-f44694c28eee8bf3593f23a39607fb62e9299309.zip
opensim-SC_OLD-f44694c28eee8bf3593f23a39607fb62e9299309.tar.gz
opensim-SC_OLD-f44694c28eee8bf3593f23a39607fb62e9299309.tar.bz2
opensim-SC_OLD-f44694c28eee8bf3593f23a39607fb62e9299309.tar.xz
* Allows MRMs to import libraries in the OpenSim bin directory.
* Syntax: //@DEPENDS:library.dll
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs21
1 files changed, 16 insertions, 5 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs
index b978d7c..5c249b9 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs
@@ -217,12 +217,23 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
217 string rootPath = 217 string rootPath =
218 Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory); 218 Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory);
219 219
220 List<string> libraries = new List<string>();
221 string[] lines = Script.Split(new string[] {"\n"}, StringSplitOptions.RemoveEmptyEntries);
222 foreach (string s in lines)
223 {
224 if(s.StartsWith("//@DEPENDS:"))
225 {
226 libraries.Add(s.Replace("//@DEPENDS:", ""));
227 }
228 }
220 229
221 // TODO: Add Libraries 230 libraries.Add("OpenSim.Region.OptionalModules.dll");
222 parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, 231 libraries.Add("log4net.dll");
223 "OpenSim.Region.OptionalModules.dll")); 232
224 parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, 233 foreach (string library in libraries)
225 "log4net.dll")); 234 {
235 parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, library));
236 }
226 237
227 parameters.GenerateExecutable = false; 238 parameters.GenerateExecutable = false;
228 parameters.OutputAssembly = OutFile; 239 parameters.OutputAssembly = OutFile;