diff options
author | Justin Clarke Casey | 2008-05-22 00:32:04 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-05-22 00:32:04 +0000 |
commit | 203017f5540f801c25f8345dd8ca30f0bc4de2f8 (patch) | |
tree | fc15222a4207e9147e8ee39559cac8e827102a10 /OpenSim/Region/Application/OpenSimMain.cs | |
parent | * Fix circular dependency from last checkin by passing version as a parameter... (diff) | |
download | opensim-SC_OLD-203017f5540f801c25f8345dd8ca30f0bc4de2f8.zip opensim-SC_OLD-203017f5540f801c25f8345dd8ca30f0bc4de2f8.tar.gz opensim-SC_OLD-203017f5540f801c25f8345dd8ca30f0bc4de2f8.tar.bz2 opensim-SC_OLD-203017f5540f801c25f8345dd8ca30f0bc4de2f8.tar.xz |
* Refactor: Move enhancement of version string with operating system information from Scene to OpenSimMain
* This also means the operating system info will show up in the region console (and hence the logs)
Diffstat (limited to 'OpenSim/Region/Application/OpenSimMain.cs')
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 4031634..eb44dca 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -346,12 +346,11 @@ namespace OpenSim | |||
346 | } | 346 | } |
347 | 347 | ||
348 | /// <summary> | 348 | /// <summary> |
349 | /// Update the version string with extra information if it's available. | 349 | /// Enhance the version string with extra information if it's available. |
350 | /// This currently means adding a subversion number if the root .svn/entries file is present. | ||
351 | /// </summary> | 350 | /// </summary> |
352 | protected void updateAvailableVersionInformation() | 351 | protected void enhanceVersionInformation() |
353 | { | 352 | { |
354 | // Set BuildVersion String for Show version command | 353 | // Add subversion revision information if available |
355 | string svnFileName = "../.svn/entries"; | 354 | string svnFileName = "../.svn/entries"; |
356 | string inputLine; | 355 | string inputLine; |
357 | int strcmp; | 356 | int strcmp; |
@@ -380,7 +379,25 @@ namespace OpenSim | |||
380 | if (!string.IsNullOrEmpty(buildVersion)) | 379 | if (!string.IsNullOrEmpty(buildVersion)) |
381 | { | 380 | { |
382 | VersionInfo.Version += ", SVN build r" + buildVersion; | 381 | VersionInfo.Version += ", SVN build r" + buildVersion; |
382 | } | ||
383 | |||
384 | // Add operating system information if available | ||
385 | string OSString = ""; | ||
386 | |||
387 | if (System.Environment.OSVersion.Platform != PlatformID.Unix) | ||
388 | { | ||
389 | OSString = System.Environment.OSVersion.ToString(); | ||
383 | } | 390 | } |
391 | else | ||
392 | { | ||
393 | OSString = Util.ReadEtcIssue(); | ||
394 | } | ||
395 | if (OSString.Length > 45) | ||
396 | { | ||
397 | OSString = OSString.Substring(0, 45); | ||
398 | } | ||
399 | |||
400 | VersionInfo.Version += " on " + OSString; | ||
384 | } | 401 | } |
385 | 402 | ||
386 | /// <summary> | 403 | /// <summary> |
@@ -388,7 +405,8 @@ namespace OpenSim | |||
388 | /// </summary> | 405 | /// </summary> |
389 | protected void InternalStartUp() | 406 | protected void InternalStartUp() |
390 | { | 407 | { |
391 | updateAvailableVersionInformation(); | 408 | enhanceVersionInformation(); |
409 | |||
392 | m_log.Info("[STARTUP]: OpenSim version: " + VersionInfo.Version + "\n"); | 410 | m_log.Info("[STARTUP]: OpenSim version: " + VersionInfo.Version + "\n"); |
393 | 411 | ||
394 | m_stats = StatsManager.StartCollectingSimExtraStats(); | 412 | m_stats = StatsManager.StartCollectingSimExtraStats(); |