aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tools/LaunchSLClient/LaunchSLClient/Form1.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Tools/LaunchSLClient/LaunchSLClient/Form1.cs')
-rw-r--r--OpenSim/Tools/LaunchSLClient/LaunchSLClient/Form1.cs25
1 files changed, 11 insertions, 14 deletions
diff --git a/OpenSim/Tools/LaunchSLClient/LaunchSLClient/Form1.cs b/OpenSim/Tools/LaunchSLClient/LaunchSLClient/Form1.cs
index 700c004..a0eca6e 100644
--- a/OpenSim/Tools/LaunchSLClient/LaunchSLClient/Form1.cs
+++ b/OpenSim/Tools/LaunchSLClient/LaunchSLClient/Form1.cs
@@ -36,7 +36,6 @@ using System.Drawing;
36using System.Text; 36using System.Text;
37using System.Text.RegularExpressions; 37using System.Text.RegularExpressions;
38using System.Windows.Forms; 38using System.Windows.Forms;
39using Microsoft.Win32;
40 39
41namespace LaunchSLClient 40namespace LaunchSLClient
42{ 41{
@@ -96,9 +95,9 @@ namespace LaunchSLClient
96 95
97 private void addLocalSandbox(ref ArrayList menuItems) 96 private void addLocalSandbox(ref ArrayList menuItems)
98 { 97 {
99 // build sandbox URL from Regions\default.xml 98 // build sandbox URL from Regions/default.xml
100 // this is highly dependant on a standard default.xml 99 // this is highly dependant on a standard default.xml
101 if (File.Exists(@"Regions\default.xml")) 100 if (File.Exists("Regions/default.xml"))
102 { 101 {
103 string sandboxHostName = ""; 102 string sandboxHostName = "";
104 string sandboxPort = ""; 103 string sandboxPort = "";
@@ -106,7 +105,7 @@ namespace LaunchSLClient
106 105
107 Regex myRegex = new Regex(".*internal_ip_port=\\\"(?<port>.*?)\\\".*external_host_name=\\\"(?<name>.*?)\\\".*"); 106 Regex myRegex = new Regex(".*internal_ip_port=\\\"(?<port>.*?)\\\".*external_host_name=\\\"(?<name>.*?)\\\".*");
108 107
109 FileInfo defaultFile = new FileInfo(@"Regions\default.xml"); 108 FileInfo defaultFile = new FileInfo("Regions/default.xml");
110 StreamReader stream = defaultFile.OpenText(); 109 StreamReader stream = defaultFile.OpenText();
111 do 110 do
112 { 111 {
@@ -136,10 +135,10 @@ namespace LaunchSLClient
136 { 135 {
137 //build local grid URL from network_servers_information.xml 136 //build local grid URL from network_servers_information.xml
138 // this is highly dependant on a standard default.xml 137 // this is highly dependant on a standard default.xml
139 if (File.Exists(@"network_servers_information.xml")) 138 if (File.Exists("network_servers_information.xml"))
140 { 139 {
141 string text; 140 string text;
142 FileInfo defaultFile = new FileInfo(@"network_servers_information.xml"); 141 FileInfo defaultFile = new FileInfo("network_servers_information.xml");
143 Regex myRegex = new Regex(".*UserServerURL=\\\"(?<url>.*?)\\\".*"); 142 Regex myRegex = new Regex(".*UserServerURL=\\\"(?<url>.*?)\\\".*");
144 StreamReader stream = defaultFile.OpenText(); 143 StreamReader stream = defaultFile.OpenText();
145 144
@@ -168,13 +167,11 @@ namespace LaunchSLClient
168 167
169 private void addLocalSims(ref ArrayList menuItems) 168 private void addLocalSims(ref ArrayList menuItems)
170 { 169 {
171 // find opensim directory 170 string configDir = m_machineConfig.GetConfigDir();
172 RegistryKey exeKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\OpenSim\OpenSim");
173 if (exeKey != null)
174 {
175 Object simPath = exeKey.GetValue("Path");
176 171
177 Directory.SetCurrentDirectory(simPath.ToString()); //this should be set to wherever we decide to put the binaries 172 if (!string.IsNullOrEmpty(configDir))
173 {
174 Directory.SetCurrentDirectory(configDir);
178 175
179 addLocalSandbox(ref menuItems); 176 addLocalSandbox(ref menuItems);
180 addLocalGrid(ref menuItems); 177 addLocalGrid(ref menuItems);
@@ -193,10 +190,10 @@ namespace LaunchSLClient
193 190
194 System.Diagnostics.Process proc = new System.Diagnostics.Process(); 191 System.Diagnostics.Process proc = new System.Diagnostics.Process();
195 proc.StartInfo.FileName = runLine; 192 proc.StartInfo.FileName = runLine;
196 proc.StartInfo.Arguments = exeFlags.ToString() + " " + runUrl; 193 proc.StartInfo.Arguments = exeFlags + " " + runUrl;
197 proc.StartInfo.UseShellExecute = false; 194 proc.StartInfo.UseShellExecute = false;
198 proc.StartInfo.RedirectStandardOutput = false; 195 proc.StartInfo.RedirectStandardOutput = false;
199 proc.StartInfo.WorkingDirectory = exePath.ToString(); 196 proc.StartInfo.WorkingDirectory = exePath;
200 proc.Start(); 197 proc.Start();
201 proc.WaitForExit(); 198 proc.WaitForExit();
202 } 199 }