From de2f8212f0c8a42d02e636ecd0744d3ddfd0dce9 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Mon, 7 Dec 2009 20:05:52 +0000 Subject: DEV-43439: Added calls to query the viewer version. Rather than copy/paste the same version string formatting pattern again, I added new string-based version routines: /// return the full viewer version as a string like "2.0.0.200030" const std::string &llGetViewerVersion(); /// return the viewer version as a string like "2.0.0" const std::string &llGetViewerShortVersion(); /// return the viewer build version as a string, e.g., "200130" const std::string &llGetViewerBuildVersion(); --- indra/newview/llappviewer.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index ddc818172d..e5be17dec6 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -36,6 +36,7 @@ // Viewer includes #include "llversionviewer.h" +#include "llviewerbuild.h" #include "llfeaturemanager.h" #include "lluictrlfactory.h" #include "lltexteditor.h" @@ -647,12 +648,9 @@ bool LLAppViewer::init() writeSystemInfo(); // Build a string representing the current version number. - gCurrentVersion = llformat("%s %d.%d.%d.%d", - gSavedSettings.getString("VersionChannelName").c_str(), - LL_VERSION_MAJOR, - LL_VERSION_MINOR, - LL_VERSION_PATCH, - LL_VERSION_BUILD ); + gCurrentVersion = llformat("%s %s", + gSavedSettings.getString("VersionChannelName").c_str(), + llGetViewerVersion().c_str()); ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// @@ -2521,8 +2519,7 @@ void LLAppViewer::writeSystemInfo() // Dump some debugging info LL_INFOS("SystemInfo") << LLTrans::getString("APP_NAME") - << " version " << LL_VERSION_MAJOR << "." << LL_VERSION_MINOR << "." << LL_VERSION_PATCH - << LL_ENDL; + << " version " << llGetViewerShortVersion() << LL_ENDL; // Dump the local time and time zone time_t now; -- cgit v1.2.3 From 24cba353a45f6c261169fcda03cb9ac860ef8d9f Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Mon, 7 Dec 2009 20:30:29 +0000 Subject: DEV-43439: Rename llviewerbuild.{cpp|h} -> llviewerversion.{cpp|h} This module now contains general viewer version routines, not just access to the viewer build number, so I've renamed it from llviewerbuild to llviewerversion. --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e5be17dec6..6bbc1eaa6a 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -36,7 +36,7 @@ // Viewer includes #include "llversionviewer.h" -#include "llviewerbuild.h" +#include "llviewerversion.h" #include "llfeaturemanager.h" #include "lluictrlfactory.h" #include "lltexteditor.h" -- cgit v1.2.3