diff options
author | Jeff Ames | 2008-05-01 18:49:42 +0000 |
---|---|---|
committer | Jeff Ames | 2008-05-01 18:49:42 +0000 |
commit | 239228abd8dc1553577eaf4167a49f64fa50814c (patch) | |
tree | 6f2536aac0c07489e576eb1e0e9eb03e1d85ca77 /OpenSim/Tools | |
parent | added in IUserService functions. These don't do anything yet, (diff) | |
download | opensim-SC_OLD-239228abd8dc1553577eaf4167a49f64fa50814c.zip opensim-SC_OLD-239228abd8dc1553577eaf4167a49f64fa50814c.tar.gz opensim-SC_OLD-239228abd8dc1553577eaf4167a49f64fa50814c.tar.bz2 opensim-SC_OLD-239228abd8dc1553577eaf4167a49f64fa50814c.tar.xz |
Attempt to locate SL client in LaunchSLClient under other Unices.
Diffstat (limited to 'OpenSim/Tools')
3 files changed, 26 insertions, 9 deletions
diff --git a/OpenSim/Tools/LaunchSLClient/LaunchSLClient/OSXConfig.cs b/OpenSim/Tools/LaunchSLClient/LaunchSLClient/OSXConfig.cs index 0d866af..177d7e8 100644 --- a/OpenSim/Tools/LaunchSLClient/LaunchSLClient/OSXConfig.cs +++ b/OpenSim/Tools/LaunchSLClient/LaunchSLClient/OSXConfig.cs | |||
@@ -43,13 +43,13 @@ namespace LaunchSLClient | |||
43 | exePath = "/Applications/Second Life Release Candidate.app/Contents/MacOS"; | 43 | exePath = "/Applications/Second Life Release Candidate.app/Contents/MacOS"; |
44 | } | 44 | } |
45 | 45 | ||
46 | runLine = exePath + "/Second Life"; | 46 | runLine = Path.Combine(exePath, "Second Life"); |
47 | exeFlags = ""; | 47 | exeFlags = string.Empty; |
48 | } | 48 | } |
49 | 49 | ||
50 | public override string GetConfigDir() | 50 | public override string GetConfigDir() |
51 | { | 51 | { |
52 | return ""; | 52 | return string.Empty; |
53 | } | 53 | } |
54 | } | 54 | } |
55 | } | 55 | } |
diff --git a/OpenSim/Tools/LaunchSLClient/LaunchSLClient/UnixConfig.cs b/OpenSim/Tools/LaunchSLClient/LaunchSLClient/UnixConfig.cs index 220ad82..c285066 100644 --- a/OpenSim/Tools/LaunchSLClient/LaunchSLClient/UnixConfig.cs +++ b/OpenSim/Tools/LaunchSLClient/LaunchSLClient/UnixConfig.cs | |||
@@ -34,14 +34,24 @@ namespace LaunchSLClient | |||
34 | { | 34 | { |
35 | public override void GetClient(ref string exePath, ref string runLine, ref string exeFlags) | 35 | public override void GetClient(ref string exePath, ref string runLine, ref string exeFlags) |
36 | { | 36 | { |
37 | exePath = ""; | 37 | exePath = string.Empty; |
38 | runLine = "secondlife"; | 38 | exeFlags = string.Empty; |
39 | exeFlags = ""; | 39 | |
40 | foreach (string path in Environment.GetEnvironmentVariable("PATH").Split(':')) | ||
41 | { | ||
42 | if (File.Exists(Path.Combine(path, "secondlife"))) | ||
43 | { | ||
44 | exePath = path; | ||
45 | break; | ||
46 | } | ||
47 | } | ||
48 | |||
49 | runLine = Path.Combine(exePath, "secondlife"); | ||
40 | } | 50 | } |
41 | 51 | ||
42 | public override string GetConfigDir() | 52 | public override string GetConfigDir() |
43 | { | 53 | { |
44 | return ""; | 54 | return string.Empty; |
45 | } | 55 | } |
46 | } | 56 | } |
47 | } | 57 | } |
diff --git a/OpenSim/Tools/LaunchSLClient/LaunchSLClient/WindowsConfig.cs b/OpenSim/Tools/LaunchSLClient/LaunchSLClient/WindowsConfig.cs index df56bfe..7988d96 100644 --- a/OpenSim/Tools/LaunchSLClient/LaunchSLClient/WindowsConfig.cs +++ b/OpenSim/Tools/LaunchSLClient/LaunchSLClient/WindowsConfig.cs | |||
@@ -47,7 +47,7 @@ namespace LaunchSLClient | |||
47 | string exe = regKey.GetValue("Exe").ToString(); | 47 | string exe = regKey.GetValue("Exe").ToString(); |
48 | exeFlags = regKey.GetValue("Flags").ToString(); | 48 | exeFlags = regKey.GetValue("Flags").ToString(); |
49 | exePath = regKey.GetValue("").ToString(); | 49 | exePath = regKey.GetValue("").ToString(); |
50 | runLine = exePath + "\\" + exe; | 50 | runLine = Path.Combine(exePath, exe); |
51 | Registry.LocalMachine.Flush(); | 51 | Registry.LocalMachine.Flush(); |
52 | Registry.LocalMachine.Close(); | 52 | Registry.LocalMachine.Close(); |
53 | } | 53 | } |
@@ -56,7 +56,14 @@ namespace LaunchSLClient | |||
56 | { | 56 | { |
57 | RegistryKey key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\OpenSim\OpenSim"); | 57 | RegistryKey key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\OpenSim\OpenSim"); |
58 | 58 | ||
59 | return key == null ? "" : key.GetValue("Path").ToString(); | 59 | if (key == null) |
60 | { | ||
61 | return string.Empty; | ||
62 | } | ||
63 | else | ||
64 | { | ||
65 | return key.GetValue("Path").ToString(); | ||
66 | } | ||
60 | } | 67 | } |
61 | } | 68 | } |
62 | } | 69 | } |