Add basic OS X support to LaunchSLClient

0.6.0-stable
Jeff Ames 2008-05-01 15:50:58 +00:00
parent 5da028f6ef
commit e9e97d69dc
1 changed files with 35 additions and 5 deletions

View File

@ -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();