aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorTedd Hansen2007-09-12 13:16:08 +0000
committerTedd Hansen2007-09-12 13:16:08 +0000
commitb12bfb63153f310d3f6bd016648397e003c1ccca (patch)
treeb63dc41928697355a6695dbf4987168626747052
parentEarly alpha version of a GUI tool to configure and start OpenSim. Currently c... (diff)
downloadopensim-SC-b12bfb63153f310d3f6bd016648397e003c1ccca.zip
opensim-SC-b12bfb63153f310d3f6bd016648397e003c1ccca.tar.gz
opensim-SC-b12bfb63153f310d3f6bd016648397e003c1ccca.tar.bz2
opensim-SC-b12bfb63153f310d3f6bd016648397e003c1ccca.tar.xz
GUI also contains option for Stand Alone mode.
-rw-r--r--OpenSim/Tools/OpenSim.GUI/Main.Designer.cs45
-rw-r--r--OpenSim/Tools/OpenSim.GUI/Main.cs106
2 files changed, 122 insertions, 29 deletions
diff --git a/OpenSim/Tools/OpenSim.GUI/Main.Designer.cs b/OpenSim/Tools/OpenSim.GUI/Main.Designer.cs
index b1ed5a4..6350c57 100644
--- a/OpenSim/Tools/OpenSim.GUI/Main.Designer.cs
+++ b/OpenSim/Tools/OpenSim.GUI/Main.Designer.cs
@@ -50,6 +50,9 @@ namespace OpenSim.GUI
50 this.gbLog = new System.Windows.Forms.GroupBox(); 50 this.gbLog = new System.Windows.Forms.GroupBox();
51 this.btnStart = new System.Windows.Forms.Button(); 51 this.btnStart = new System.Windows.Forms.Button();
52 this.btnStop = new System.Windows.Forms.Button(); 52 this.btnStop = new System.Windows.Forms.Button();
53 this.rbGridRegionMode = new System.Windows.Forms.RadioButton();
54 this.rbStandAloneMode = new System.Windows.Forms.RadioButton();
55 this.rbGridServer = new System.Windows.Forms.RadioButton();
53 this.tabLogs.SuspendLayout(); 56 this.tabLogs.SuspendLayout();
54 this.tabMainLog.SuspendLayout(); 57 this.tabMainLog.SuspendLayout();
55 this.tabRegionServer.SuspendLayout(); 58 this.tabRegionServer.SuspendLayout();
@@ -292,11 +295,49 @@ namespace OpenSim.GUI
292 this.btnStop.UseVisualStyleBackColor = true; 295 this.btnStop.UseVisualStyleBackColor = true;
293 this.btnStop.Click += new System.EventHandler(this.btnStop_Click); 296 this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
294 // 297 //
298 // rbGridRegionMode
299 //
300 this.rbGridRegionMode.AutoSize = true;
301 this.rbGridRegionMode.Location = new System.Drawing.Point(407, 18);
302 this.rbGridRegionMode.Name = "rbGridRegionMode";
303 this.rbGridRegionMode.Size = new System.Drawing.Size(76, 17);
304 this.rbGridRegionMode.TabIndex = 4;
305 this.rbGridRegionMode.Text = "Grid region";
306 this.rbGridRegionMode.UseVisualStyleBackColor = true;
307 this.rbGridRegionMode.CheckedChanged += new System.EventHandler(this.rbGridRegionMode_CheckedChanged);
308 //
309 // rbStandAloneMode
310 //
311 this.rbStandAloneMode.AutoSize = true;
312 this.rbStandAloneMode.Checked = true;
313 this.rbStandAloneMode.Location = new System.Drawing.Point(319, 18);
314 this.rbStandAloneMode.Name = "rbStandAloneMode";
315 this.rbStandAloneMode.Size = new System.Drawing.Size(82, 17);
316 this.rbStandAloneMode.TabIndex = 5;
317 this.rbStandAloneMode.TabStop = true;
318 this.rbStandAloneMode.Text = "Stand alone";
319 this.rbStandAloneMode.UseVisualStyleBackColor = true;
320 this.rbStandAloneMode.CheckedChanged += new System.EventHandler(this.rbStandAloneMode_CheckedChanged);
321 //
322 // rbGridServer
323 //
324 this.rbGridServer.AutoSize = true;
325 this.rbGridServer.Location = new System.Drawing.Point(484, 18);
326 this.rbGridServer.Name = "rbGridServer";
327 this.rbGridServer.Size = new System.Drawing.Size(76, 17);
328 this.rbGridServer.TabIndex = 6;
329 this.rbGridServer.Text = "Grid server";
330 this.rbGridServer.UseVisualStyleBackColor = true;
331 this.rbGridServer.CheckedChanged += new System.EventHandler(this.rbGridServer_CheckedChanged);
332 //
295 // Main 333 // Main
296 // 334 //
297 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 335 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
298 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 336 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
299 this.ClientSize = new System.Drawing.Size(583, 299); 337 this.ClientSize = new System.Drawing.Size(583, 299);
338 this.Controls.Add(this.rbGridServer);
339 this.Controls.Add(this.rbStandAloneMode);
340 this.Controls.Add(this.rbGridRegionMode);
300 this.Controls.Add(this.btnStop); 341 this.Controls.Add(this.btnStop);
301 this.Controls.Add(this.btnStart); 342 this.Controls.Add(this.btnStart);
302 this.Controls.Add(this.gbLog); 343 this.Controls.Add(this.gbLog);
@@ -316,6 +357,7 @@ namespace OpenSim.GUI
316 this.tabGridServer.PerformLayout(); 357 this.tabGridServer.PerformLayout();
317 this.gbLog.ResumeLayout(false); 358 this.gbLog.ResumeLayout(false);
318 this.ResumeLayout(false); 359 this.ResumeLayout(false);
360 this.PerformLayout();
319 361
320 } 362 }
321 363
@@ -343,6 +385,9 @@ namespace OpenSim.GUI
343 private InputTextBoxControl txtInputUserServer; 385 private InputTextBoxControl txtInputUserServer;
344 private InputTextBoxControl txtInputAssetServer; 386 private InputTextBoxControl txtInputAssetServer;
345 private InputTextBoxControl txtInputGridServer; 387 private InputTextBoxControl txtInputGridServer;
388 private System.Windows.Forms.RadioButton rbGridRegionMode;
389 private System.Windows.Forms.RadioButton rbStandAloneMode;
390 private System.Windows.Forms.RadioButton rbGridServer;
346 } 391 }
347} 392}
348 393
diff --git a/OpenSim/Tools/OpenSim.GUI/Main.cs b/OpenSim/Tools/OpenSim.GUI/Main.cs
index b9ea209..fb2cdae 100644
--- a/OpenSim/Tools/OpenSim.GUI/Main.cs
+++ b/OpenSim/Tools/OpenSim.GUI/Main.cs
@@ -29,6 +29,8 @@ namespace OpenSim.GUI
29 txtInputRegionServer.KeyPress += new KeyPressEventHandler(txtInputRegionServer_KeyPress); 29 txtInputRegionServer.KeyPress += new KeyPressEventHandler(txtInputRegionServer_KeyPress);
30 30
31 tabLogs.Selected += new TabControlEventHandler(tabLogs_Selected); 31 tabLogs.Selected += new TabControlEventHandler(tabLogs_Selected);
32
33 UpdateTabVisibility();
32 } 34 }
33 35
34 void tabLogs_Selected(object sender, TabControlEventArgs e) 36 void tabLogs_Selected(object sender, TabControlEventArgs e)
@@ -93,33 +95,42 @@ namespace OpenSim.GUI
93 btnStart.Enabled = false; 95 btnStart.Enabled = false;
94 btnStop.Enabled = false; 96 btnStop.Enabled = false;
95 97
96 // Start UserServer 98
97 proc_UserServer = new ProcessManager("OpenSim.Grid.UserServer.exe", ""); 99
98 txtMainLog.AppendText("Starting: UserServer"); 100 if (rbGridServer.Checked)
99 proc_UserServer.OutputDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_UserServer_DataReceived); 101 {
100 proc_UserServer.ErrorDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_UserServer_DataReceived); 102 // Start UserServer
101 proc_UserServer.StartProcess(); 103 proc_UserServer = new ProcessManager("OpenSim.Grid.UserServer.exe", "");
102 System.Threading.Thread.Sleep(2000); 104 txtMainLog.AppendText("Starting: User server" + "\r\n");
103 105 proc_UserServer.OutputDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_UserServer_DataReceived);
104 // Start GridServer 106 proc_UserServer.ErrorDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_UserServer_DataReceived);
105 proc_GridServer = new ProcessManager("OpenSim.Grid.GridServer.exe", ""); 107 proc_UserServer.StartProcess();
106 txtMainLog.AppendText("Starting: GridServer"); 108 System.Threading.Thread.Sleep(2000);
107 proc_GridServer.OutputDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_GridServer_DataReceived); 109
108 proc_GridServer.ErrorDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_GridServer_DataReceived); 110 // Start GridServer
109 proc_GridServer.StartProcess(); 111 proc_GridServer = new ProcessManager("OpenSim.Grid.GridServer.exe", "");
110 System.Threading.Thread.Sleep(2000); 112 txtMainLog.AppendText("Starting: Grid server" + "\r\n");
111 113 proc_GridServer.OutputDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_GridServer_DataReceived);
112 // Start AssetServer 114 proc_GridServer.ErrorDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_GridServer_DataReceived);
113 proc_AssetServer = new ProcessManager("OpenSim.Grid.AssetServer.exe", ""); 115 proc_GridServer.StartProcess();
114 txtMainLog.AppendText("Starting: AssetServer"); 116 System.Threading.Thread.Sleep(2000);
115 proc_AssetServer.OutputDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_AssetServer_DataReceived); 117
116 proc_AssetServer.ErrorDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_AssetServer_DataReceived); 118 // Start AssetServer
117 proc_AssetServer.StartProcess(); 119 proc_AssetServer = new ProcessManager("OpenSim.Grid.AssetServer.exe", "");
118 System.Threading.Thread.Sleep(2000); 120 txtMainLog.AppendText("Starting: Asset server" + "\r\n");
121 proc_AssetServer.OutputDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_AssetServer_DataReceived);
122 proc_AssetServer.ErrorDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_AssetServer_DataReceived);
123 proc_AssetServer.StartProcess();
124 System.Threading.Thread.Sleep(2000);
125 }
119 126
120 // Start OpenSim 127 // Start OpenSim
121 proc_OpenSim = new ProcessManager("OpenSim.EXE", "-gridmode=true"); 128 string p = "";
122 txtMainLog.AppendText("Starting: OpenSim"); 129 if (rbGridServer.Checked)
130 p = "-gridmode=true";
131
132 proc_OpenSim = new ProcessManager("OpenSim.EXE", p);
133 txtMainLog.AppendText("Starting: OpenSim (Region server)" + "\r\n");
123 proc_OpenSim.OutputDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_OpenSim_DataReceived); 134 proc_OpenSim.OutputDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_OpenSim_DataReceived);
124 proc_OpenSim.ErrorDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_OpenSim_DataReceived); 135 proc_OpenSim.ErrorDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_OpenSim_DataReceived);
125 proc_OpenSim.StartProcess(); 136 proc_OpenSim.StartProcess();
@@ -157,22 +168,22 @@ namespace OpenSim.GUI
157 168
158 if (proc_UserServer != null) 169 if (proc_UserServer != null)
159 { 170 {
160 txtMainLog.AppendText("Shutting down UserServer. CPU time used: " + proc_UserServer.TotalProcessorTime); 171 txtMainLog.AppendText("Shutting down UserServer. CPU time used: " + proc_UserServer.TotalProcessorTime.ToString() + "\r\n");
161 proc_UserServer.StopProcess(); 172 proc_UserServer.StopProcess();
162 } 173 }
163 if (proc_GridServer != null) 174 if (proc_GridServer != null)
164 { 175 {
165 txtMainLog.AppendText("Shutting down GridServer. CPU time used: " + proc_GridServer.TotalProcessorTime); 176 txtMainLog.AppendText("Shutting down GridServer. CPU time used: " + proc_GridServer.TotalProcessorTime.ToString() + "\r\n");
166 proc_GridServer.StopProcess(); 177 proc_GridServer.StopProcess();
167 } 178 }
168 if (proc_AssetServer != null) 179 if (proc_AssetServer != null)
169 { 180 {
170 txtMainLog.AppendText("Shutting down AssetServer. CPU time used: " + proc_AssetServer.TotalProcessorTime); 181 txtMainLog.AppendText("Shutting down AssetServer. CPU time used: " + proc_AssetServer.TotalProcessorTime.ToString() + "\r\n");
171 proc_AssetServer.StopProcess(); 182 proc_AssetServer.StopProcess();
172 } 183 }
173 if (proc_OpenSim != null) 184 if (proc_OpenSim != null)
174 { 185 {
175 txtMainLog.AppendText("Shutting down OpenSim. CPU time used: " + proc_OpenSim.TotalProcessorTime); 186 txtMainLog.AppendText("Shutting down OpenSim. CPU time used: " + proc_OpenSim.TotalProcessorTime.ToString() + "\r\n");
176 proc_OpenSim.StopProcess(); 187 proc_OpenSim.StopProcess();
177 } 188 }
178 189
@@ -182,6 +193,43 @@ namespace OpenSim.GUI
182 193
183 } 194 }
184 195
196 private void UpdateTabVisibility()
197 {
198 if (rbStandAloneMode.Checked)
199 {
200 if (tabLogs.TabPages.Contains(tabUserServer))
201 tabLogs.TabPages.Remove(tabUserServer);
202 if (tabLogs.TabPages.Contains(tabGridServer))
203 tabLogs.TabPages.Remove(tabGridServer);
204 if (tabLogs.TabPages.Contains(tabAssetServer))
205 tabLogs.TabPages.Remove(tabAssetServer);
206 }
207 else
208 {
209 if (!tabLogs.TabPages.Contains(tabUserServer))
210 tabLogs.TabPages.Add(tabUserServer);
211 if (!tabLogs.TabPages.Contains(tabGridServer))
212 tabLogs.TabPages.Add(tabGridServer);
213 if (!tabLogs.TabPages.Contains(tabAssetServer))
214 tabLogs.TabPages.Add(tabAssetServer);
215 }
216
217 }
218
219 private void rbStandAloneMode_CheckedChanged(object sender, EventArgs e)
220 {
221 UpdateTabVisibility();
222 }
223
224 private void rbGridRegionMode_CheckedChanged(object sender, EventArgs e)
225 {
226 UpdateTabVisibility();
227 }
228
229 private void rbGridServer_CheckedChanged(object sender, EventArgs e)
230 {
231 UpdateTabVisibility();
232 }
185 233
186 } 234 }
187} \ No newline at end of file 235} \ No newline at end of file