diff options
author | Adam Frisby | 2007-06-05 13:18:44 +0000 |
---|---|---|
committer | Adam Frisby | 2007-06-05 13:18:44 +0000 |
commit | 75f9b25b41b5a80025e17808b5b2d9fe7295d54e (patch) | |
tree | cd96e948447cc9a030c7ce537d25da06ea40db5e /OpenGridServices/ServiceManager | |
parent | * "We are" message is now a status text message. (diff) | |
download | opensim-SC-75f9b25b41b5a80025e17808b5b2d9fe7295d54e.zip opensim-SC-75f9b25b41b5a80025e17808b5b2d9fe7295d54e.tar.gz opensim-SC-75f9b25b41b5a80025e17808b5b2d9fe7295d54e.tar.bz2 opensim-SC-75f9b25b41b5a80025e17808b5b2d9fe7295d54e.tar.xz |
* Fixed OGS build
* Converted to new console interfaces
* Fixed other minor issues which somehow snuck in
Diffstat (limited to '')
-rw-r--r-- | OpenGridServices/ServiceManager/ServiceManager.cs | 54 | ||||
-rw-r--r-- | OpenGridServices/ServiceManager/ServiceManager.csproj | 41 | ||||
-rw-r--r-- | OpenGridServices/ServiceManager/ServiceManager.exe.build | 1 |
3 files changed, 54 insertions, 42 deletions
diff --git a/OpenGridServices/ServiceManager/ServiceManager.cs b/OpenGridServices/ServiceManager/ServiceManager.cs index 1de9475..8200b5b 100644 --- a/OpenGridServices/ServiceManager/ServiceManager.cs +++ b/OpenGridServices/ServiceManager/ServiceManager.cs | |||
@@ -52,8 +52,8 @@ public class OpenGridMasterService : System.ServiceProcess.ServiceBase { | |||
52 | XmlNode rootnode = doc.FirstChild; | 52 | XmlNode rootnode = doc.FirstChild; |
53 | if (rootnode.Name != "regions") | 53 | if (rootnode.Name != "regions") |
54 | { | 54 | { |
55 | EventLog.WriteEntry("ERROR! bad XML in opengrid-master-cfg.xml - expected regions tag"); | 55 | EventLog.WriteEntry("ERROR! bad XML in opengrid-master-cfg.xml - expected regions tag"); |
56 | Console.WriteLine("Sorry, could not startup the service - please check your opengrid-master-cfg.xml file: missing regions tag"); | 56 | Console.WriteLine("Sorry, could not startup the service - please check your opengrid-master-cfg.xml file: missing regions tag"); |
57 | (new ServiceController("OpenGridServices-master")).Stop(); | 57 | (new ServiceController("OpenGridServices-master")).Stop(); |
58 | } | 58 | } |
59 | 59 | ||
@@ -72,8 +72,8 @@ public class OpenGridMasterService : System.ServiceProcess.ServiceBase { | |||
72 | } | 72 | } |
73 | 73 | ||
74 | private static string SetupGrid() | 74 | private static string SetupGrid() |
75 | { | 75 | { |
76 | Console.WriteLine("Running external program (OpenGridServices.GridServer.exe) to configure the grid server"); | 76 | Console.WriteLine("Running external program (OpenGridServices.GridServer.exe) to configure the grid server"); |
77 | try { | 77 | try { |
78 | Process p = new Process(); | 78 | Process p = new Process(); |
79 | 79 | ||
@@ -92,8 +92,8 @@ public class OpenGridMasterService : System.ServiceProcess.ServiceBase { | |||
92 | string configxml = reader.ReadToEnd(); | 92 | string configxml = reader.ReadToEnd(); |
93 | 93 | ||
94 | return configxml; | 94 | return configxml; |
95 | } catch(Exception e) { | 95 | } catch(Exception e) { |
96 | Console.WriteLine("An error occurred while running the grid server, please rectify it and try again"); | 96 | Console.WriteLine("An error occurred while running the grid server, please rectify it and try again"); |
97 | Console.WriteLine(e.ToString()); | 97 | Console.WriteLine(e.ToString()); |
98 | Environment.Exit(1); | 98 | Environment.Exit(1); |
99 | } | 99 | } |
@@ -121,9 +121,9 @@ public class OpenGridMasterService : System.ServiceProcess.ServiceBase { | |||
121 | 121 | ||
122 | string listenaddr; | 122 | string listenaddr; |
123 | string simconfigxml; | 123 | string simconfigxml; |
124 | LLUUID SimUUID; | 124 | LLUUID SimUUID; |
125 | 125 | ||
126 | Console.WriteLine("Setting up region servers"); | 126 | Console.WriteLine("Setting up region servers"); |
127 | Console.Write("Please specify a path to store your region data (e.g /etc/opensim/regions: "); | 127 | Console.Write("Please specify a path to store your region data (e.g /etc/opensim/regions: "); |
128 | string regionpath=Console.ReadLine(); | 128 | string regionpath=Console.ReadLine(); |
129 | 129 | ||
@@ -134,11 +134,11 @@ public class OpenGridMasterService : System.ServiceProcess.ServiceBase { | |||
134 | baseport=Convert.ToUInt16(Console.ReadLine()); | 134 | baseport=Convert.ToUInt16(Console.ReadLine()); |
135 | 135 | ||
136 | 136 | ||
137 | listenaddr=Console.ReadLine(); | 137 | listenaddr=Console.ReadLine(); |
138 | 138 | ||
139 | Console.WriteLine("Now ready to configure regions, please answer the questions about each region in turn"); | 139 | Console.WriteLine("Now ready to configure regions, please answer the questions about each region in turn"); |
140 | for(int i=0; i<=numofregions; i++) { | 140 | for(int i=0; i<=numofregions; i++) { |
141 | Console.WriteLine("Configuring region number " + i.ToString()); | 141 | Console.WriteLine("Configuring region number " + i.ToString()); |
142 | 142 | ||
143 | Console.Write("Region name: "); | 143 | Console.Write("Region name: "); |
144 | regionname=Console.ReadLine(); | 144 | regionname=Console.ReadLine(); |
@@ -177,13 +177,13 @@ public class OpenGridMasterService : System.ServiceProcess.ServiceBase { | |||
177 | bool region=false; | 177 | bool region=false; |
178 | while(choice!="OK") | 178 | while(choice!="OK") |
179 | { | 179 | { |
180 | Console.Clear(); | 180 | Console.Clear(); |
181 | Console.WriteLine("Please select the components you would like to run on this server:\n"); | 181 | Console.WriteLine("Please select the components you would like to run on this server:\n"); |
182 | 182 | ||
183 | Console.WriteLine("1 - [" + (grid ? "X" : " ") + "] Grid server - this service handles co-ordinates of regions/sims on the grid"); | 183 | Console.WriteLine("1 - [" + (grid ? "X" : " ") + "] Grid server - this service handles co-ordinates of regions/sims on the grid"); |
184 | Console.WriteLine("2 - [" + (user ? "X" : " ") + "] User server - this service handles user login, profiles, inventory and IM"); | 184 | Console.WriteLine("2 - [" + (user ? "X" : " ") + "] User server - this service handles user login, profiles, inventory and IM"); |
185 | Console.WriteLine("3 - [" + (asset ? "X" : " ") + "] Asset server - this service handles storage of assets such as textures, objects, sounds, scripts"); | 185 | Console.WriteLine("3 - [" + (asset ? "X" : " ") + "] Asset server - this service handles storage of assets such as textures, objects, sounds, scripts"); |
186 | Console.WriteLine("4 - [" + (region ? "X" : " ") + "] Region server - this is the main opensim server and can run without the above services, it handles physics simulation, terrain, building and other such features"); | 186 | Console.WriteLine("4 - [" + (region ? "X" : " ") + "] Region server - this is the main opensim server and can run without the above services, it handles physics simulation, terrain, building and other such features"); |
187 | 187 | ||
188 | 188 | ||
189 | Console.Write("Type a number to toggle a choice or type OK to accept your current choices: "); | 189 | Console.Write("Type a number to toggle a choice or type OK to accept your current choices: "); |
@@ -217,15 +217,15 @@ public class OpenGridMasterService : System.ServiceProcess.ServiceBase { | |||
217 | public static void Main() | 217 | public static void Main() |
218 | { | 218 | { |
219 | if(!File.Exists("opengrid-master-cfg.xml")) | 219 | if(!File.Exists("opengrid-master-cfg.xml")) |
220 | { | 220 | { |
221 | Console.WriteLine("Could not find a config file, running initial setup"); | 221 | Console.WriteLine("Could not find a config file, running initial setup"); |
222 | InitSetup(); | 222 | InitSetup(); |
223 | } | 223 | } |
224 | Console.WriteLine("Starting up OGS master service"); | 224 | Console.WriteLine("Starting up OGS master service"); |
225 | try { | 225 | try { |
226 | ServiceBase.Run(new OpenGridMasterService()); | 226 | ServiceBase.Run(new OpenGridMasterService()); |
227 | } catch(Exception e) { | 227 | } catch(Exception e) { |
228 | Console.WriteLine("THIS SHOULD NEVER HAPPEN!!!!!!!!!!!!!!!!!!!!!"); | 228 | Console.WriteLine("THIS SHOULD NEVER HAPPEN!!!!!!!!!!!!!!!!!!!!!"); |
229 | Console.WriteLine(e.ToString()); | 229 | Console.WriteLine(e.ToString()); |
230 | } | 230 | } |
231 | } | 231 | } |
diff --git a/OpenGridServices/ServiceManager/ServiceManager.csproj b/OpenGridServices/ServiceManager/ServiceManager.csproj index e23ce83..b461bd1 100644 --- a/OpenGridServices/ServiceManager/ServiceManager.csproj +++ b/OpenGridServices/ServiceManager/ServiceManager.csproj | |||
@@ -1,4 +1,4 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
2 | <PropertyGroup> | 2 | <PropertyGroup> |
3 | <ProjectType>Local</ProjectType> | 3 | <ProjectType>Local</ProjectType> |
4 | <ProductVersion>8.0.50727</ProductVersion> | 4 | <ProductVersion>8.0.50727</ProductVersion> |
@@ -6,7 +6,8 @@ | |||
6 | <ProjectGuid>{E141F4EE-0000-0000-0000-000000000000}</ProjectGuid> | 6 | <ProjectGuid>{E141F4EE-0000-0000-0000-000000000000}</ProjectGuid> |
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | 7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | 8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
9 | <ApplicationIcon></ApplicationIcon> | 9 | <ApplicationIcon> |
10 | </ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | 11 | <AssemblyKeyContainerName> |
11 | </AssemblyKeyContainerName> | 12 | </AssemblyKeyContainerName> |
12 | <AssemblyName>ServiceManager</AssemblyName> | 13 | <AssemblyName>ServiceManager</AssemblyName> |
@@ -15,9 +16,11 @@ | |||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | 16 | <DefaultTargetSchema>IE50</DefaultTargetSchema> |
16 | <DelaySign>false</DelaySign> | 17 | <DelaySign>false</DelaySign> |
17 | <OutputType>Exe</OutputType> | 18 | <OutputType>Exe</OutputType> |
18 | <AppDesignerFolder></AppDesignerFolder> | 19 | <AppDesignerFolder> |
20 | </AppDesignerFolder> | ||
19 | <RootNamespace>ServiceManager</RootNamespace> | 21 | <RootNamespace>ServiceManager</RootNamespace> |
20 | <StartupObject></StartupObject> | 22 | <StartupObject> |
23 | </StartupObject> | ||
21 | <FileUpgradeFlags> | 24 | <FileUpgradeFlags> |
22 | </FileUpgradeFlags> | 25 | </FileUpgradeFlags> |
23 | </PropertyGroup> | 26 | </PropertyGroup> |
@@ -28,7 +31,8 @@ | |||
28 | <ConfigurationOverrideFile> | 31 | <ConfigurationOverrideFile> |
29 | </ConfigurationOverrideFile> | 32 | </ConfigurationOverrideFile> |
30 | <DefineConstants>TRACE;DEBUG</DefineConstants> | 33 | <DefineConstants>TRACE;DEBUG</DefineConstants> |
31 | <DocumentationFile></DocumentationFile> | 34 | <DocumentationFile> |
35 | </DocumentationFile> | ||
32 | <DebugSymbols>True</DebugSymbols> | 36 | <DebugSymbols>True</DebugSymbols> |
33 | <FileAlignment>4096</FileAlignment> | 37 | <FileAlignment>4096</FileAlignment> |
34 | <Optimize>False</Optimize> | 38 | <Optimize>False</Optimize> |
@@ -37,7 +41,8 @@ | |||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | 41 | <RemoveIntegerChecks>False</RemoveIntegerChecks> |
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | 42 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> |
39 | <WarningLevel>4</WarningLevel> | 43 | <WarningLevel>4</WarningLevel> |
40 | <NoWarn></NoWarn> | 44 | <NoWarn> |
45 | </NoWarn> | ||
41 | </PropertyGroup> | 46 | </PropertyGroup> |
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | 47 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | 48 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> |
@@ -46,7 +51,8 @@ | |||
46 | <ConfigurationOverrideFile> | 51 | <ConfigurationOverrideFile> |
47 | </ConfigurationOverrideFile> | 52 | </ConfigurationOverrideFile> |
48 | <DefineConstants>TRACE</DefineConstants> | 53 | <DefineConstants>TRACE</DefineConstants> |
49 | <DocumentationFile></DocumentationFile> | 54 | <DocumentationFile> |
55 | </DocumentationFile> | ||
50 | <DebugSymbols>False</DebugSymbols> | 56 | <DebugSymbols>False</DebugSymbols> |
51 | <FileAlignment>4096</FileAlignment> | 57 | <FileAlignment>4096</FileAlignment> |
52 | <Optimize>True</Optimize> | 58 | <Optimize>True</Optimize> |
@@ -55,35 +61,40 @@ | |||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | 61 | <RemoveIntegerChecks>False</RemoveIntegerChecks> |
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | 62 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> |
57 | <WarningLevel>4</WarningLevel> | 63 | <WarningLevel>4</WarningLevel> |
58 | <NoWarn></NoWarn> | 64 | <NoWarn> |
65 | </NoWarn> | ||
59 | </PropertyGroup> | 66 | </PropertyGroup> |
60 | <ItemGroup> | 67 | <ItemGroup> |
61 | <Reference Include="System" > | 68 | <Reference Include="System"> |
62 | <HintPath>System.dll</HintPath> | 69 | <HintPath>System.dll</HintPath> |
63 | <Private>False</Private> | 70 | <Private>False</Private> |
64 | </Reference> | 71 | </Reference> |
65 | <Reference Include="System.ServiceProcess" > | 72 | <Reference Include="System.ServiceProcess"> |
66 | <HintPath>System.ServiceProcess.dll</HintPath> | 73 | <HintPath>System.ServiceProcess.dll</HintPath> |
67 | <Private>False</Private> | 74 | <Private>False</Private> |
68 | </Reference> | 75 | </Reference> |
69 | <Reference Include="System.Xml" > | 76 | <Reference Include="System.Xml"> |
70 | <HintPath>System.Xml.dll</HintPath> | 77 | <HintPath>System.Xml.dll</HintPath> |
71 | <Private>False</Private> | 78 | <Private>False</Private> |
72 | </Reference> | 79 | </Reference> |
73 | <Reference Include="libsecondlife.dll" > | 80 | <Reference Include="libsecondlife.dll"> |
74 | <HintPath>..\..\bin\libsecondlife.dll</HintPath> | 81 | <HintPath>..\..\bin\libsecondlife.dll</HintPath> |
75 | <Private>False</Private> | 82 | <Private>False</Private> |
76 | </Reference> | 83 | </Reference> |
77 | <Reference Include="OpenSim.GenericConfig.Xml" > | 84 | <Reference Include="OpenSim.GenericConfig.Xml"> |
78 | <HintPath>OpenSim.GenericConfig.Xml.dll</HintPath> | 85 | <HintPath>OpenSim.GenericConfig.Xml.dll</HintPath> |
79 | <Private>False</Private> | 86 | <Private>False</Private> |
80 | </Reference> | 87 | </Reference> |
88 | <Reference Include="OpenSim.Framework.dll"> | ||
89 | <HintPath>..\..\bin\OpenSim.Framework.dll</HintPath> | ||
90 | <Private>False</Private> | ||
91 | </Reference> | ||
81 | </ItemGroup> | 92 | </ItemGroup> |
82 | <ItemGroup> | 93 | <ItemGroup> |
83 | </ItemGroup> | 94 | </ItemGroup> |
84 | <ItemGroup> | 95 | <ItemGroup> |
85 | <Compile Include="ServiceManager.cs"> | 96 | <Compile Include="ServiceManager.cs"> |
86 | <SubType>Code</SubType> | 97 | <SubType>Component</SubType> |
87 | </Compile> | 98 | </Compile> |
88 | </ItemGroup> | 99 | </ItemGroup> |
89 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> | 100 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> |
@@ -93,4 +104,4 @@ | |||
93 | <PostBuildEvent> | 104 | <PostBuildEvent> |
94 | </PostBuildEvent> | 105 | </PostBuildEvent> |
95 | </PropertyGroup> | 106 | </PropertyGroup> |
96 | </Project> | 107 | </Project> \ No newline at end of file |
diff --git a/OpenGridServices/ServiceManager/ServiceManager.exe.build b/OpenGridServices/ServiceManager/ServiceManager.exe.build index eb66f82..5e1dd72 100644 --- a/OpenGridServices/ServiceManager/ServiceManager.exe.build +++ b/OpenGridServices/ServiceManager/ServiceManager.exe.build | |||
@@ -23,6 +23,7 @@ | |||
23 | <include name="System.Xml.dll" /> | 23 | <include name="System.Xml.dll" /> |
24 | <include name="../../bin/libsecondlife.dll" /> | 24 | <include name="../../bin/libsecondlife.dll" /> |
25 | <include name="../../bin/OpenSim.GenericConfig.Xml.dll" /> | 25 | <include name="../../bin/OpenSim.GenericConfig.Xml.dll" /> |
26 | <include name="../../bin/OpenSim.Framework.dll" /> | ||
26 | </references> | 27 | </references> |
27 | </csc> | 28 | </csc> |
28 | <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" /> | 29 | <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" /> |