diff options
author | Justin Clarke Casey | 2008-05-07 23:59:57 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-05-07 23:59:57 +0000 |
commit | d8aaf2ccf11f67277544c5d72ed7dadd63e93ae2 (patch) | |
tree | e53af5a2b94126ee0220995828b9fc0e4951a790 /OpenSim/Region/Application | |
parent | * Change LSL -> C# translated script console output to use the logger (at DEB... (diff) | |
download | opensim-SC_OLD-d8aaf2ccf11f67277544c5d72ed7dadd63e93ae2.zip opensim-SC_OLD-d8aaf2ccf11f67277544c5d72ed7dadd63e93ae2.tar.gz opensim-SC_OLD-d8aaf2ccf11f67277544c5d72ed7dadd63e93ae2.tar.bz2 opensim-SC_OLD-d8aaf2ccf11f67277544c5d72ed7dadd63e93ae2.tar.xz |
* For no good reason (since there are a hundred million other things to fix), change formatting of version information printed to the log
* Push printing down into OpenSimMain so both console and consoleless configurations will get it
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 49 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimMainConsole.cs | 37 | ||||
-rw-r--r-- | OpenSim/Region/Application/VersionInfo.cs | 2 |
3 files changed, 51 insertions, 37 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index f704dd2..735f662 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -53,6 +53,11 @@ namespace OpenSim | |||
53 | { | 53 | { |
54 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 54 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
55 | 55 | ||
56 | /// <summary> | ||
57 | /// Holds a human readable build version for this server. | ||
58 | /// </summary> | ||
59 | protected string buildVersion; | ||
60 | |||
56 | protected string proxyUrl; | 61 | protected string proxyUrl; |
57 | protected int proxyOffset = 0; | 62 | protected int proxyOffset = 0; |
58 | 63 | ||
@@ -337,12 +342,56 @@ namespace OpenSim | |||
337 | { | 342 | { |
338 | WorldHasComeToAnEnd.Set(); | 343 | WorldHasComeToAnEnd.Set(); |
339 | } | 344 | } |
345 | |||
346 | /// <summary> | ||
347 | /// Print the version information available to the library. This include a subversion number if the root | ||
348 | /// .svn/entries file is present. | ||
349 | /// </summary> | ||
350 | protected void printAvailableVersionInformation() | ||
351 | { | ||
352 | // Set BuildVersion String for Show version command | ||
353 | string svnFileName = "../.svn/entries"; | ||
354 | string inputLine = null; | ||
355 | int strcmp; | ||
356 | |||
357 | if (File.Exists(svnFileName)) | ||
358 | { | ||
359 | StreamReader EntriesFile = File.OpenText(svnFileName); | ||
360 | inputLine = EntriesFile.ReadLine(); | ||
361 | while (inputLine != null) | ||
362 | { | ||
363 | // using the dir svn revision at the top of entries file | ||
364 | strcmp = String.Compare(inputLine, "dir"); | ||
365 | if (strcmp == 0) | ||
366 | { | ||
367 | buildVersion = EntriesFile.ReadLine(); | ||
368 | break; | ||
369 | } | ||
370 | else | ||
371 | { | ||
372 | inputLine = EntriesFile.ReadLine(); | ||
373 | } | ||
374 | } | ||
375 | EntriesFile.Close(); | ||
376 | } | ||
377 | |||
378 | if ((buildVersion != null) && (buildVersion.Length > 0)) | ||
379 | { | ||
380 | m_log.Info("[STARTUP]: OpenSim version: " + VersionInfo.Version + ", SVN build r" + buildVersion + "\n"); | ||
381 | } | ||
382 | else | ||
383 | { | ||
384 | m_log.Info("[STARTUP]: OpenSim version: " + VersionInfo.Version + "\n"); | ||
385 | } | ||
386 | } | ||
340 | 387 | ||
341 | /// <summary> | 388 | /// <summary> |
342 | /// Performs initialisation of the scene, such as loading configuration from disk. | 389 | /// Performs initialisation of the scene, such as loading configuration from disk. |
343 | /// </summary> | 390 | /// </summary> |
344 | protected void InternalStartUp() | 391 | protected void InternalStartUp() |
345 | { | 392 | { |
393 | printAvailableVersionInformation(); | ||
394 | |||
346 | StatsManager.StartCollectingSimExtraStats(); | 395 | StatsManager.StartCollectingSimExtraStats(); |
347 | 396 | ||
348 | // Do baseclass startup sequence: OpenSim.Region.ClientStack.RegionApplicationBase.StartUp | 397 | // Do baseclass startup sequence: OpenSim.Region.ClientStack.RegionApplicationBase.StartUp |
diff --git a/OpenSim/Region/Application/OpenSimMainConsole.cs b/OpenSim/Region/Application/OpenSimMainConsole.cs index ab835ba..2653273 100644 --- a/OpenSim/Region/Application/OpenSimMainConsole.cs +++ b/OpenSim/Region/Application/OpenSimMainConsole.cs | |||
@@ -55,7 +55,6 @@ namespace OpenSim | |||
55 | 55 | ||
56 | private string m_timedScript = "disabled"; | 56 | private string m_timedScript = "disabled"; |
57 | private Timer m_scriptTimer; | 57 | private Timer m_scriptTimer; |
58 | private string buildVersion = null; | ||
59 | 58 | ||
60 | public OpenSimMainConsole(IConfigSource configSource) | 59 | public OpenSimMainConsole(IConfigSource configSource) |
61 | : base(configSource) | 60 | : base(configSource) |
@@ -112,42 +111,8 @@ namespace OpenSim | |||
112 | m_scriptTimer.Interval = 1200 * 1000; | 111 | m_scriptTimer.Interval = 1200 * 1000; |
113 | m_scriptTimer.Elapsed += RunAutoTimerScript; | 112 | m_scriptTimer.Elapsed += RunAutoTimerScript; |
114 | } | 113 | } |
114 | |||
115 | PrintFileToConsole("startuplogo.txt"); | 115 | PrintFileToConsole("startuplogo.txt"); |
116 | |||
117 | // Set BuildVersion String for Show version command | ||
118 | string svnFileName = "../.svn/entries"; | ||
119 | string inputLine = null; | ||
120 | int strcmp; | ||
121 | |||
122 | if (File.Exists(svnFileName)) | ||
123 | { | ||
124 | StreamReader EntriesFile = File.OpenText(svnFileName); | ||
125 | inputLine = EntriesFile.ReadLine(); | ||
126 | while (inputLine != null) | ||
127 | { | ||
128 | // using the dir svn revision at the top of entries file | ||
129 | strcmp = String.Compare(inputLine, "dir"); | ||
130 | if (strcmp == 0) | ||
131 | { | ||
132 | buildVersion = EntriesFile.ReadLine(); | ||
133 | break; | ||
134 | } | ||
135 | else | ||
136 | { | ||
137 | inputLine = EntriesFile.ReadLine(); | ||
138 | } | ||
139 | } | ||
140 | EntriesFile.Close(); | ||
141 | } | ||
142 | |||
143 | if ((buildVersion != null) && (buildVersion.Length > 0)) | ||
144 | { | ||
145 | m_log.Info("OpenSim " + VersionInfo.Version + " r" + buildVersion + "\n"); | ||
146 | } | ||
147 | else | ||
148 | { | ||
149 | m_log.Info("OpenSim " + VersionInfo.Version + "\n"); | ||
150 | } | ||
151 | } | 116 | } |
152 | 117 | ||
153 | protected ConsoleBase CreateConsole() | 118 | protected ConsoleBase CreateConsole() |
diff --git a/OpenSim/Region/Application/VersionInfo.cs b/OpenSim/Region/Application/VersionInfo.cs index 6e0d30b..f9146c5 100644 --- a/OpenSim/Region/Application/VersionInfo.cs +++ b/OpenSim/Region/Application/VersionInfo.cs | |||
@@ -31,6 +31,6 @@ namespace OpenSim | |||
31 | /// </summary> | 31 | /// </summary> |
32 | public class VersionInfo | 32 | public class VersionInfo |
33 | { | 33 | { |
34 | public static string Version = "0.5, SVN build "; | 34 | public static string Version = "trunk (0.5.6 and additional code)"; |
35 | } | 35 | } |
36 | } | 36 | } |