Another rebuild of the build files! :O

More XML config stuff in ServiceManager
zircon^2
gareth 2007-05-30 00:24:31 +00:00
parent d35db9eb5d
commit e9aa24feff
4 changed files with 20 additions and 8 deletions

View File

@ -5,16 +5,17 @@ using System.ServiceProcess;
using System.Xml; using System.Xml;
using System.IO; using System.IO;
using libsecondlife; using libsecondlife;
using OpenSim.GenericConfig;
public class OpenGridMasterService : System.ServiceProcess.ServiceBase { public class OpenGridMasterService : System.ServiceProcess.ServiceBase {
private Thread ServiceWorkerThread; private Thread ServiceWorkerThread;
private static string GridURL; private static string GridURL; // URL of grid server
private static string SimSendKey; private static string GridSimKey; // key sent from Grid>Sim
private static string SimRecvKey; private static string SimGridKey; // key sent Sim>Grid
private static string AssetURL; private static string AssetURL; // URL of asset server
private static string UserSendKey; private static string UserSendKey; // key sent from user>sim
private static string UserRecvKey; private static string UserRecvKey; // key sent from sim>user
public OpenGridMasterService() public OpenGridMasterService()
{ {
@ -83,8 +84,13 @@ public class OpenGridMasterService : System.ServiceProcess.ServiceBase {
p.StartInfo.Arguments = "-dumpxmlconf"; p.StartInfo.Arguments = "-dumpxmlconf";
p.Start(); p.Start();
StreamReader reader=new StreamReader("opengrid-cfgdump.xml"); XmlConfig GridConf = new XmlConfig("opengrid-cfg.xml");
string configxml = reader.ReadToEnd(); GridConf.LoadData();
GridURL="http://" + GridConf.GetAttribute("ListenAddr") + ":" + GridConf.GetAttribute("ListenPort") + "/";
StreamReader reader=new StreamReader("opengrid-cfg.xml");
string configxml = reader.ReadToEnd();
return configxml; return configxml;
} catch(Exception e) { } catch(Exception e) {
Console.WriteLine("An error occurred while running the grid server, please rectify it and try again"); Console.WriteLine("An error occurred while running the grid server, please rectify it and try again");

View File

@ -74,6 +74,10 @@
<HintPath>..\..\bin\libsecondlife.dll</HintPath> <HintPath>..\..\bin\libsecondlife.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="OpenSim.GenericConfig.Xml" >
<HintPath>OpenSim.GenericConfig.Xml.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
</ItemGroup> </ItemGroup>

View File

@ -22,6 +22,7 @@
<include name="System.ServiceProcess.dll" /> <include name="System.ServiceProcess.dll" />
<include name="System.Xml.dll" /> <include name="System.Xml.dll" />
<include name="../../bin/libsecondlife.dll" /> <include name="../../bin/libsecondlife.dll" />
<include name="../../bin/OpenSim.GenericConfig.Xml.dll" />
</references> </references>
</csc> </csc>
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" /> <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />

View File

@ -675,6 +675,7 @@
<Reference name="System.ServiceProcess" localCopy="false"/> <Reference name="System.ServiceProcess" localCopy="false"/>
<Reference name="System.Xml" localCopy="false"/> <Reference name="System.Xml" localCopy="false"/>
<Reference name="libsecondlife.dll"/> <Reference name="libsecondlife.dll"/>
<Reference name="OpenSim.GenericConfig.Xml"/>
<Files> <Files>
<Match pattern="*.cs" recurse="true"/> <Match pattern="*.cs" recurse="true"/>