mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Attempt to locate SL client in LaunchSLClient under other Unices.
This commit is contained in:
@@ -43,13 +43,13 @@ namespace LaunchSLClient
|
||||
exePath = "/Applications/Second Life Release Candidate.app/Contents/MacOS";
|
||||
}
|
||||
|
||||
runLine = exePath + "/Second Life";
|
||||
exeFlags = "";
|
||||
runLine = Path.Combine(exePath, "Second Life");
|
||||
exeFlags = string.Empty;
|
||||
}
|
||||
|
||||
public override string GetConfigDir()
|
||||
{
|
||||
return "";
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,14 +34,24 @@ namespace LaunchSLClient
|
||||
{
|
||||
public override void GetClient(ref string exePath, ref string runLine, ref string exeFlags)
|
||||
{
|
||||
exePath = "";
|
||||
runLine = "secondlife";
|
||||
exeFlags = "";
|
||||
exePath = string.Empty;
|
||||
exeFlags = string.Empty;
|
||||
|
||||
foreach (string path in Environment.GetEnvironmentVariable("PATH").Split(':'))
|
||||
{
|
||||
if (File.Exists(Path.Combine(path, "secondlife")))
|
||||
{
|
||||
exePath = path;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
runLine = Path.Combine(exePath, "secondlife");
|
||||
}
|
||||
|
||||
public override string GetConfigDir()
|
||||
{
|
||||
return "";
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace LaunchSLClient
|
||||
string exe = regKey.GetValue("Exe").ToString();
|
||||
exeFlags = regKey.GetValue("Flags").ToString();
|
||||
exePath = regKey.GetValue("").ToString();
|
||||
runLine = exePath + "\\" + exe;
|
||||
runLine = Path.Combine(exePath, exe);
|
||||
Registry.LocalMachine.Flush();
|
||||
Registry.LocalMachine.Close();
|
||||
}
|
||||
@@ -56,7 +56,14 @@ namespace LaunchSLClient
|
||||
{
|
||||
RegistryKey key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\OpenSim\OpenSim");
|
||||
|
||||
return key == null ? "" : key.GetValue("Path").ToString();
|
||||
if (key == null)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
return key.GetValue("Path").ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user