diff --git a/OpenSim/Tools/LaunchSLClient/LaunchSLClient/Form1.cs b/OpenSim/Tools/LaunchSLClient/LaunchSLClient/Form1.cs index 61aefa052c..1cddb2ba41 100644 --- a/OpenSim/Tools/LaunchSLClient/LaunchSLClient/Form1.cs +++ b/OpenSim/Tools/LaunchSLClient/LaunchSLClient/Form1.cs @@ -138,13 +138,9 @@ namespace LaunchSLClient addLocalSandbox(ref menuItems); addLocalGrid(ref menuItems); } - else - { - MessageBox.Show("No OpenSim installed. Showing public grids only", "No OpenSim"); - } } - private void getClient(ref string exePath, ref string runLine, ref string exeFlags) + private void getClientWindows(ref string exePath, ref string runLine, ref string exeFlags) { // get executable path from registry RegistryKey regKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Linden Research, Inc.\SecondLife"); @@ -164,6 +160,40 @@ namespace LaunchSLClient Registry.LocalMachine.Close(); } + private void getClientMacOSX(ref string exePath, ref string runLine, ref string exeFlags) + { + if (Directory.Exists("/Applications/Second Life.app")) + { + exePath = "/Applications/Second Life.app/Contents/MacOS"; + } + + runLine = exePath + "/Second Life"; + exeFlags = ""; + } + + private void getClientUnix(ref string exePath, ref string runLine, ref string exeFlags) + { + } + + private void getClient(ref string exePath, ref string runLine, ref string exeFlags) + { + if (Environment.OSVersion.Platform == PlatformID.Unix) + { + if (File.Exists("/System/Library/Frameworks/Cocoa.framework/Cocoa")) + { + getClientMacOSX(ref exePath, ref runLine, ref exeFlags); + } + else + { + getClientUnix(ref exePath, ref runLine, ref exeFlags); + } + } + else + { + getClientWindows(ref exePath, ref runLine, ref exeFlags); + } + } + public Form1() { InitializeComponent();