aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJeff Ames2008-05-01 15:50:58 +0000
committerJeff Ames2008-05-01 15:50:58 +0000
commite9e97d69dc837ef9fa03d97bbb69f2fd99a43950 (patch)
tree60c0479e5d2071927eba6955aec89cdd51c20d5e
parent* Removing duplicate files that somehow got undeleted from TortoiseSVN. Fixed. (diff)
downloadopensim-SC_OLD-e9e97d69dc837ef9fa03d97bbb69f2fd99a43950.zip
opensim-SC_OLD-e9e97d69dc837ef9fa03d97bbb69f2fd99a43950.tar.gz
opensim-SC_OLD-e9e97d69dc837ef9fa03d97bbb69f2fd99a43950.tar.bz2
opensim-SC_OLD-e9e97d69dc837ef9fa03d97bbb69f2fd99a43950.tar.xz
Add basic OS X support to LaunchSLClient
-rw-r--r--OpenSim/Tools/LaunchSLClient/LaunchSLClient/Form1.cs40
1 files changed, 35 insertions, 5 deletions
diff --git a/OpenSim/Tools/LaunchSLClient/LaunchSLClient/Form1.cs b/OpenSim/Tools/LaunchSLClient/LaunchSLClient/Form1.cs
index 61aefa0..1cddb2b 100644
--- a/OpenSim/Tools/LaunchSLClient/LaunchSLClient/Form1.cs
+++ b/OpenSim/Tools/LaunchSLClient/LaunchSLClient/Form1.cs
@@ -138,13 +138,9 @@ namespace LaunchSLClient
138 addLocalSandbox(ref menuItems); 138 addLocalSandbox(ref menuItems);
139 addLocalGrid(ref menuItems); 139 addLocalGrid(ref menuItems);
140 } 140 }
141 else
142 {
143 MessageBox.Show("No OpenSim installed. Showing public grids only", "No OpenSim");
144 }
145 } 141 }
146 142
147 private void getClient(ref string exePath, ref string runLine, ref string exeFlags) 143 private void getClientWindows(ref string exePath, ref string runLine, ref string exeFlags)
148 { 144 {
149 // get executable path from registry 145 // get executable path from registry
150 RegistryKey regKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Linden Research, Inc.\SecondLife"); 146 RegistryKey regKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Linden Research, Inc.\SecondLife");
@@ -164,6 +160,40 @@ namespace LaunchSLClient
164 Registry.LocalMachine.Close(); 160 Registry.LocalMachine.Close();
165 } 161 }
166 162
163 private void getClientMacOSX(ref string exePath, ref string runLine, ref string exeFlags)
164 {
165 if (Directory.Exists("/Applications/Second Life.app"))
166 {
167 exePath = "/Applications/Second Life.app/Contents/MacOS";
168 }
169
170 runLine = exePath + "/Second Life";
171 exeFlags = "";
172 }
173
174 private void getClientUnix(ref string exePath, ref string runLine, ref string exeFlags)
175 {
176 }
177
178 private void getClient(ref string exePath, ref string runLine, ref string exeFlags)
179 {
180 if (Environment.OSVersion.Platform == PlatformID.Unix)
181 {
182 if (File.Exists("/System/Library/Frameworks/Cocoa.framework/Cocoa"))
183 {
184 getClientMacOSX(ref exePath, ref runLine, ref exeFlags);
185 }
186 else
187 {
188 getClientUnix(ref exePath, ref runLine, ref exeFlags);
189 }
190 }
191 else
192 {
193 getClientWindows(ref exePath, ref runLine, ref exeFlags);
194 }
195 }
196
167 public Form1() 197 public Form1()
168 { 198 {
169 InitializeComponent(); 199 InitializeComponent();