Auto-version system

This commit is contained in:
Siana Gearz
2012-02-09 13:34:39 +01:00
parent 2ef5673c18
commit acf378e9f2
22 changed files with 172 additions and 146 deletions

2
.gitignore vendored
View File

@@ -1,4 +1,5 @@
/installed.xml /installed.xml
/indra/llcommon/llversionviewer.h
/indra/build-* /indra/build-*
/indra/tools/vstool/obj/ /indra/tools/vstool/obj/
*.aps *.aps
@@ -11,6 +12,7 @@
/indra/viewer-* /indra/viewer-*
/indra/newview/vivox-runtime/ /indra/newview/vivox-runtime/
/libraries/ /libraries/
/lib/
*.pyc *.pyc
*.orig *.orig
*.rej *.rej

View File

@@ -26,7 +26,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
include(Variables) include(Variables)
# Load versions now. Install locations need them. # Load versions now. Install locations need them.
include(Versions) include(BuildVersion)
include(UnixInstall) include(UnixInstall)

View File

@@ -1,23 +1,41 @@
# -*- cmake -*- # -*- cmake -*-
function (build_version _target) # Read version components from the header file.
# Read version components from the header file. file(STRINGS ${LIBS_OPEN_DIR}/llcommon/llversionviewer.h.in lines
file(STRINGS ${LIBS_OPEN_DIR}/llcommon/llversion${_target}.h lines REGEX " LL_VERSION_")
REGEX " LL_VERSION_") foreach(line ${lines})
foreach(line ${lines}) string(REGEX REPLACE ".*LL_VERSION_([A-Z]+).*" "\\1" comp "${line}")
string(REGEX REPLACE ".*LL_VERSION_([A-Z]+).*" "\\1" comp "${line}") string(REGEX REPLACE ".* = ([0-9]+);.*" "\\1" value "${line}")
string(REGEX REPLACE ".* = ([0-9]+);.*" "\\1" value "${line}") set(v${comp} "${value}")
set(v${comp} "${value}") endforeach(line)
endforeach(line)
# Compose the version. execute_process(
set(${_target}_VERSION "${vMAJOR}.${vMINOR}.${vPATCH}.${vBUILD}") COMMAND git rev-list HEAD
if (${_target}_VERSION MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$") OUTPUT_VARIABLE GIT_REV_LIST_STR
message(STATUS "Version of ${_target} is ${${_target}_VERSION}") WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
else (${_target}_VERSION MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$") OUTPUT_STRIP_TRAILING_WHITESPACE
message(FATAL_ERROR "Could not determine ${_target} version (${${_target}_VERSION})") )
endif (${_target}_VERSION MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$")
# Report version to caller. string(REPLACE "\n" ";" GIT_REV_LIST ${GIT_REV_LIST_STR})
set(${_target}_VERSION "${${_target}_VERSION}" PARENT_SCOPE)
endfunction (build_version) if(GIT_REV_LIST)
list(LENGTH GIT_REV_LIST vBUILD)
else()
set(vBUILD 99)
endif()
configure_file(
${CMAKE_SOURCE_DIR}/llcommon/llversionviewer.h.in
${CMAKE_SOURCE_DIR}/llcommon/llversionviewer.h
)
# Compose the version.
set(viewer_VERSION "${vMAJOR}.${vMINOR}.${vPATCH}.${vBUILD}")
if (viewer_VERSION MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$")
message(STATUS "Version is ${viewer_VERSION}")
else (viewer_VERSION MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$")
message(FATAL_ERROR "Could not determine version (${viewer_VERSION})")
endif (viewer_VERSION MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$")
# Report version to caller.
#set(viewer_VERSION "${viewer_VERSION}" PARENT_SCOPE)

View File

@@ -79,7 +79,6 @@ set(cmake_SOURCE_FILES
UI.cmake UI.cmake
UnixInstall.cmake UnixInstall.cmake
Variables.cmake Variables.cmake
Versions.cmake
XmlRpcEpi.cmake XmlRpcEpi.cmake
ZLIB.cmake ZLIB.cmake
) )

View File

@@ -1,9 +0,0 @@
include(BuildVersion)
if(VIEWER)
build_version(viewer)
endif(VIEWER)
if(SERVER)
build_version(server)
endif(SERVER)

View File

@@ -213,8 +213,7 @@ set(llcommon_HEADER_FILES
lluri.h lluri.h
lluuid.h lluuid.h
lluuidhashmap.h lluuidhashmap.h
llversionserver.h llversionviewer.h.in
llversionviewer.h
llworkerthread.h llworkerthread.h
metaclass.h metaclass.h
metaclasst.h metaclasst.h

View File

@@ -1,44 +0,0 @@
/**
* @file llversionserver.h
* @brief
*
* $LicenseInfo:firstyear=2002&license=viewergpl$
*
* Copyright (c) 2002-2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
#ifndef LL_LLVERSIONSERVER_H
#define LL_LLVERSIONSERVER_H
const S32 LL_VERSION_MAJOR = 1;
const S32 LL_VERSION_MINOR = 27;
const S32 LL_VERSION_PATCH = 0;
const S32 LL_VERSION_BUILD = 132845;
const char * const LL_CHANNEL = "Second Life Server";
#endif

View File

@@ -36,12 +36,13 @@
const S32 LL_VERSION_MAJOR = 1; const S32 LL_VERSION_MAJOR = 1;
const S32 LL_VERSION_MINOR = 6; const S32 LL_VERSION_MINOR = 6;
const S32 LL_VERSION_PATCH = 0; const S32 LL_VERSION_PATCH = 0;
const S32 LL_VERSION_BUILD = 3; const S32 LL_VERSION_BUILD = ${vBUILD};
const char * const LL_CHANNEL = "Singularity"; const char * const LL_CHANNEL = "${VIEWER_CHANNEL}";
#if LL_DARWIN #if LL_DARWIN
const char * const LL_VERSION_BUNDLE_ID = "com.secondlife.singularity.viewer"; const char * const LL_VERSION_BUNDLE_ID = "org.singularityviewer.singularity";
#endif #endif
#endif #endif

View File

@@ -76,6 +76,7 @@ include_directories(
) )
set(viewer_SOURCE_FILES set(viewer_SOURCE_FILES
sgversion.cpp
llviewerobjectbackup.cpp llviewerobjectbackup.cpp
slfloatermediafilter.cpp slfloatermediafilter.cpp
floaterlocalassetbrowse.cpp floaterlocalassetbrowse.cpp
@@ -561,6 +562,7 @@ set(viewer_HEADER_FILES
CMakeLists.txt CMakeLists.txt
ViewerInstall.cmake ViewerInstall.cmake
sgversion.h
llviewerobjectbackup.h llviewerobjectbackup.h
slfloatermediafilter.h slfloatermediafilter.h
floaterlocalassetbrowse.h floaterlocalassetbrowse.h
@@ -943,7 +945,6 @@ set(viewer_HEADER_FILES
llviewerassetstorage.h llviewerassetstorage.h
llviewerassettype.h llviewerassettype.h
llvieweraudio.h llvieweraudio.h
llviewerbuild.h
llviewercamera.h llviewercamera.h
llviewercontrol.h llviewercontrol.h
llviewerdisplay.h llviewerdisplay.h

View File

@@ -37,7 +37,7 @@
#include "hippogridmanager.h" #include "hippogridmanager.h"
#include "hippolimits.h" #include "hippolimits.h"
#include "llversionviewer.h" #include "sgversion.h"
#include "llfeaturemanager.h" #include "llfeaturemanager.h"
#include "lluictrlfactory.h" #include "lluictrlfactory.h"
#include "lltexteditor.h" #include "lltexteditor.h"
@@ -643,11 +643,11 @@ bool LLAppViewer::init()
// Build a string representing the current version number. // Build a string representing the current version number.
gCurrentVersion = llformat("%s %d.%d.%d.%d", gCurrentVersion = llformat("%s %d.%d.%d.%d",
LL_CHANNEL, gVersionChannel,
LL_VERSION_MAJOR, gVersionMajor,
LL_VERSION_MINOR, gVersionMinor,
LL_VERSION_PATCH, gVersionPatch,
LL_VERSION_BUILD ); gVersionBuild );
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@@ -2045,7 +2045,7 @@ bool LLAppViewer::initConfiguration()
gSavedSettings.setString("ClientSettingsFile", gSavedSettings.setString("ClientSettingsFile",
gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Global"))); gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Global")));
gSavedSettings.setString("VersionChannelName", LL_CHANNEL); gSavedSettings.setString("VersionChannelName", gVersionChannel);
#ifndef LL_RELEASE_FOR_DOWNLOAD #ifndef LL_RELEASE_FOR_DOWNLOAD
// provide developer build only overrides for these control variables that are not // provide developer build only overrides for these control variables that are not
@@ -2654,12 +2654,12 @@ void LLAppViewer::writeSystemInfo()
{ {
gDebugInfo["SLLog"] = LLError::logFileName(); gDebugInfo["SLLog"] = LLError::logFileName();
gDebugInfo["ClientInfo"]["Name"] = LL_CHANNEL; gDebugInfo["ClientInfo"]["Name"] = gVersionChannel;
gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR; gDebugInfo["ClientInfo"]["MajorVersion"] = gVersionMajor;
gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR; gDebugInfo["ClientInfo"]["MinorVersion"] = gVersionMinor;
gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH; gDebugInfo["ClientInfo"]["PatchVersion"] = gVersionPatch;
gDebugInfo["ClientInfo"]["BuildVersion"] = LL_VERSION_BUILD; gDebugInfo["ClientInfo"]["BuildVersion"] = gVersionBuild;
gDebugInfo["CAFilename"] = gDirUtilp->getCAFile(); gDebugInfo["CAFilename"] = gDirUtilp->getCAFile();
@@ -2694,7 +2694,7 @@ void LLAppViewer::writeSystemInfo()
// Dump some debugging info // Dump some debugging info
LL_INFOS("SystemInfo") << LLTrans::getString("APP_NAME") LL_INFOS("SystemInfo") << LLTrans::getString("APP_NAME")
<< " version " << LL_VERSION_MAJOR << "." << LL_VERSION_MINOR << "." << LL_VERSION_PATCH << " version " << gVersionMajor << "." << gVersionMinor << "." << gVersionPatch
<< LL_ENDL; << LL_ENDL;
// Dump the local time and time zone // Dump the local time and time zone
@@ -2758,12 +2758,12 @@ void LLAppViewer::handleViewerCrash()
//We already do this in writeSystemInfo(), but we do it again here to make /sure/ we have a version //We already do this in writeSystemInfo(), but we do it again here to make /sure/ we have a version
//to check against no matter what //to check against no matter what
gDebugInfo["ClientInfo"]["Name"] = LL_CHANNEL; gDebugInfo["ClientInfo"]["Name"] = gVersionChannel;
gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR; gDebugInfo["ClientInfo"]["MajorVersion"] = gVersionMajor;
gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR; gDebugInfo["ClientInfo"]["MinorVersion"] = gVersionMinor;
gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH; gDebugInfo["ClientInfo"]["PatchVersion"] = gVersionPatch;
gDebugInfo["ClientInfo"]["BuildVersion"] = LL_VERSION_BUILD; gDebugInfo["ClientInfo"]["BuildVersion"] = gVersionBuild;
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if ( parcel && parcel->getMusicURL()[0]) if ( parcel && parcel->getMusicURL()[0])
@@ -4607,12 +4607,12 @@ void LLAppViewer::handleLoginComplete()
initMainloopTimeout("Mainloop Init"); initMainloopTimeout("Mainloop Init");
// Store some data to DebugInfo in case of a freeze. // Store some data to DebugInfo in case of a freeze.
gDebugInfo["ClientInfo"]["Name"] = LL_CHANNEL; gDebugInfo["ClientInfo"]["Name"] = gVersionChannel;
gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR; gDebugInfo["ClientInfo"]["MajorVersion"] = gVersionMajor;
gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR; gDebugInfo["ClientInfo"]["MinorVersion"] = gVersionMinor;
gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH; gDebugInfo["ClientInfo"]["PatchVersion"] = gVersionPatch;
gDebugInfo["ClientInfo"]["BuildVersion"] = LL_VERSION_BUILD; gDebugInfo["ClientInfo"]["BuildVersion"] = gVersionBuild;
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if ( parcel && parcel->getMusicURL()[0]) if ( parcel && parcel->getMusicURL()[0])

View File

@@ -49,7 +49,7 @@
#include "llagent.h" #include "llagent.h"
#include "llviewerstats.h" #include "llviewerstats.h"
#include "llviewerregion.h" #include "llviewerregion.h"
#include "llversionviewer.h" #include "sgversion.h"
#include "llviewerbuild.h" #include "llviewerbuild.h"
#include "lluictrlfactory.h" #include "lluictrlfactory.h"
#include "lluri.h" #include "lluri.h"
@@ -137,9 +137,9 @@ LLFloaterAbout::LLFloaterAbout()
// Version string // Version string
std::string version = std::string(LLAppViewer::instance()->getSecondLifeTitle() std::string version = std::string(LLAppViewer::instance()->getSecondLifeTitle()
+ llformat(" %d.%d.%d (%d) %s %s (%s)\n", + llformat(" %d.%d.%d (%d) %s %s (%s)\n",
LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VIEWER_BUILD, gVersionMajor, gVersionMinor, gVersionPatch, LL_VIEWER_BUILD,
__DATE__, __TIME__, __DATE__, __TIME__,
LL_CHANNEL)); gVersionChannel));
support_widget->appendColoredText(version, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor")); support_widget->appendColoredText(version, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor"));
support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, viewer_link_style); support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, viewer_link_style);
@@ -331,13 +331,13 @@ static std::string get_viewer_release_notes_url()
{ {
return "http://www.singularityviewer.org"; return "http://www.singularityviewer.org";
/*std::ostringstream version; /*std::ostringstream version;
version << LL_VERSION_MAJOR version << gVersionMajor
<< "." << LL_VERSION_MINOR << "." << gVersionMinor
<< "." << LL_VERSION_PATCH << "." << gVersionPatch
<< "." << LL_VERSION_BUILD; << "." << gVersionBuild;
LLSD query; LLSD query;
query["channel"] = LL_CHANNEL; query["channel"] = gVersionChannel;
query["version"] = version.str(); query["version"] = version.str();

View File

@@ -47,7 +47,7 @@
#include "llimagej2c.h" #include "llimagej2c.h"
#include "llstring.h" #include "llstring.h"
#include "llsys.h" #include "llsys.h"
#include "llversionviewer.h" #include "sgversion.h"
#include "message.h" #include "message.h"
#include "v3math.h" #include "v3math.h"
@@ -747,10 +747,10 @@ LLSD LLFloaterReporter::gatherReport()
if ( mReportType == BUG_REPORT) if ( mReportType == BUG_REPORT)
{ {
summary << short_platform << " V" << LL_VERSION_MAJOR << "." summary << short_platform << " V" << gVersionMajor << "."
<< LL_VERSION_MINOR << "." << gVersionMinor << "."
<< LL_VERSION_PATCH << "." << gVersionPatch << "."
<< LL_VERSION_BUILD << gVersionBuild
<< " (" << regionp->getName() << ")" << " (" << regionp->getName() << ")"
<< "[" << category_name << "] " << "[" << category_name << "] "
<< "\"" << childGetValue("summary_edit").asString() << "\""; << "\"" << childGetValue("summary_edit").asString() << "\"";
@@ -768,10 +768,10 @@ LLSD LLFloaterReporter::gatherReport()
std::ostringstream details; std::ostringstream details;
if (mReportType != BUG_REPORT) if (mReportType != BUG_REPORT)
{ {
details << "V" << LL_VERSION_MAJOR << "." // client version moved to body of email for abuse reports details << "V" << gVersionMajor << "." // client version moved to body of email for abuse reports
<< LL_VERSION_MINOR << "." << gVersionMinor << "."
<< LL_VERSION_PATCH << "." << gVersionPatch << "."
<< LL_VERSION_BUILD << std::endl << std::endl; << gVersionBuild << std::endl << std::endl;
} }
std::string object_name = childGetText("object_name"); std::string object_name = childGetText("object_name");
std::string owner_name = childGetText("owner_name"); std::string owner_name = childGetText("owner_name");
@@ -792,9 +792,9 @@ LLSD LLFloaterReporter::gatherReport()
std::string version_string; std::string version_string;
version_string = llformat( version_string = llformat(
"%d.%d.%d %s %s %s %s", "%d.%d.%d %s %s %s %s",
LL_VERSION_MAJOR, gVersionMajor,
LL_VERSION_MINOR, gVersionMinor,
LL_VERSION_PATCH, gVersionPatch,
platform, platform,
gSysCPU.getFamily().c_str(), gSysCPU.getFamily().c_str(),
gGLManager.mGLRenderer.c_str(), gGLManager.mGLRenderer.c_str(),

View File

@@ -42,7 +42,7 @@
#include "llfontgl.h" #include "llfontgl.h"
#include "llmd5.h" #include "llmd5.h"
#include "llsecondlifeurls.h" #include "llsecondlifeurls.h"
#include "llversionviewer.h" #include "sgversion.h"
#include "v4color.h" #include "v4color.h"
#include "llbutton.h" #include "llbutton.h"
@@ -347,12 +347,12 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
childSetAction("grids_btn", onClickGrids, this); childSetAction("grids_btn", onClickGrids, this);
childSetCommitCallback("grids_combo", onSelectGrid, this); childSetCommitCallback("grids_combo", onSelectGrid, this);
std::string channel = LL_CHANNEL; std::string channel = gVersionChannel;
std::string version = llformat("%d.%d.%d (%d)", std::string version = llformat("%d.%d.%d (%d)",
LL_VERSION_MAJOR, gVersionMajor,
LL_VERSION_MINOR, gVersionMinor,
LL_VERSION_PATCH, gVersionPatch,
LL_VIEWER_BUILD ); LL_VIEWER_BUILD );
LLTextBox* channel_text = getChild<LLTextBox>("channel_text"); LLTextBox* channel_text = getChild<LLTextBox>("channel_text");
channel_text->setTextArg("[CHANNEL]", channel); // though not displayed channel_text->setTextArg("[CHANNEL]", channel); // though not displayed
@@ -934,10 +934,10 @@ void LLPanelLogin::loadLoginPage()
} }
std::string version = llformat("%d.%d.%d (%d)", std::string version = llformat("%d.%d.%d (%d)",
LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VERSION_BUILD); gVersionMajor, gVersionMinor, gVersionPatch, gVersionBuild);
if(login_page.find("secondlife.com") == -1) { if(login_page.find("secondlife.com") == -1) {
oStr << "&channel=" << LLWeb::curlEscape(LL_CHANNEL); oStr << "&channel=" << LLWeb::curlEscape(gVersionChannel);
oStr << "&version=" << LLWeb::curlEscape(version); oStr << "&version=" << LLWeb::curlEscape(version);
} }

View File

@@ -85,7 +85,7 @@
#include "llsecondlifeurls.h" #include "llsecondlifeurls.h"
#include "llstring.h" #include "llstring.h"
#include "lluserrelations.h" #include "lluserrelations.h"
#include "llversionviewer.h" #include "sgversion.h"
#include "llvfs.h" #include "llvfs.h"
#include "llxorcipher.h" // saved password, MAC address #include "llxorcipher.h" // saved password, MAC address
#include "message.h" #include "message.h"
@@ -533,9 +533,9 @@ bool idle_startup()
if(!start_messaging_system( if(!start_messaging_system(
message_template_path, message_template_path,
port, port,
LL_VERSION_MAJOR, gVersionMajor,
LL_VERSION_MINOR, gVersionMinor,
LL_VERSION_PATCH, gVersionPatch,
FALSE, FALSE,
std::string(), std::string(),
responder, responder,
@@ -3417,7 +3417,7 @@ bool update_dialog_callback(const LLSD& notification, const LLSD& response)
// userserver no longer exists. // userserver no longer exists.
query_map["userserver"] = LLViewerLogin::getInstance()->getGridLabel(); query_map["userserver"] = LLViewerLogin::getInstance()->getGridLabel();
// <edit> // <edit>
query_map["channel"] = LL_CHANNEL; query_map["channel"] = gVersionChannel;
// *TODO constantize this guy // *TODO constantize this guy
// *NOTE: This URL is also used in win_setup/lldownloader.cpp // *NOTE: This URL is also used in win_setup/lldownloader.cpp

View File

@@ -35,7 +35,7 @@
#include "llbufferstream.h" #include "llbufferstream.h"
#include "lltranslate.h" #include "lltranslate.h"
#include "llui.h" #include "llui.h"
#include "llversionviewer.h" #include "sgversion.h"
#include "llweb.h" #include "llweb.h"
// <edit> // <edit>

View File

@@ -38,7 +38,7 @@
#include <iterator> #include <iterator>
#include "lldir.h" #include "lldir.h"
#include "llversionviewer.h" #include "sgversion.h"
#include "llappviewer.h" #include "llappviewer.h"
#include "llviewerbuild.h" #include "llviewerbuild.h"
#include "llviewercontrol.h" #include "llviewercontrol.h"
@@ -131,7 +131,7 @@ void LLUserAuth::authenticate(
XMLRPC_VectorAppendString(params, "web_login_key", web_login_key.getString().c_str(), 0); XMLRPC_VectorAppendString(params, "web_login_key", web_login_key.getString().c_str(), 0);
XMLRPC_VectorAppendString(params, "start", start.c_str(), 0); XMLRPC_VectorAppendString(params, "start", start.c_str(), 0);
XMLRPC_VectorAppendString(params, "version", gCurrentVersion.c_str(), 0); // Includes channel name XMLRPC_VectorAppendString(params, "version", gCurrentVersion.c_str(), 0); // Includes channel name
XMLRPC_VectorAppendString(params, "channel", LL_CHANNEL, 0); XMLRPC_VectorAppendString(params, "channel", gVersionChannel, 0);
XMLRPC_VectorAppendString(params, "platform", PLATFORM_STRING, 0); XMLRPC_VectorAppendString(params, "platform", PLATFORM_STRING, 0);
XMLRPC_VectorAppendString(params, "mac", hashed_mac.c_str(), 0); XMLRPC_VectorAppendString(params, "mac", hashed_mac.c_str(), 0);
@@ -219,7 +219,7 @@ void LLUserAuth::authenticate(
XMLRPC_VectorAppendString(params, "passwd", dpasswd.c_str(), 0); XMLRPC_VectorAppendString(params, "passwd", dpasswd.c_str(), 0);
XMLRPC_VectorAppendString(params, "start", start.c_str(), 0); XMLRPC_VectorAppendString(params, "start", start.c_str(), 0);
XMLRPC_VectorAppendString(params, "version", gCurrentVersion.c_str(), 0); // Includes channel name XMLRPC_VectorAppendString(params, "version", gCurrentVersion.c_str(), 0); // Includes channel name
XMLRPC_VectorAppendString(params, "channel", LL_CHANNEL, 0); XMLRPC_VectorAppendString(params, "channel", gVersionChannel, 0);
XMLRPC_VectorAppendString(params, "platform", PLATFORM_STRING, 0); XMLRPC_VectorAppendString(params, "platform", PLATFORM_STRING, 0);
XMLRPC_VectorAppendString(params, "mac", hashed_mac.c_str(), 0); XMLRPC_VectorAppendString(params, "mac", hashed_mac.c_str(), 0);

4
indra/newview/llviewerbuild.h Normal file → Executable file
View File

@@ -30,8 +30,8 @@
* $/LicenseInfo$ * $/LicenseInfo$
*/ */
#include "llversionviewer.h" #include "sgversion.h"
// Set the build number in indra/llcommon/llversionviewer.h! // Set the build number in indra/llcommon/llversionviewer.h!
const S32 LL_VIEWER_BUILD = LL_VERSION_BUILD; const S32 LL_VIEWER_BUILD = gVersionBuild;

View File

@@ -70,7 +70,7 @@
#include "llnotify.h" #include "llnotify.h"
#include "llkeyboard.h" #include "llkeyboard.h"
#include "llerrorcontrol.h" #include "llerrorcontrol.h"
#include "llversionviewer.h" #include "sgversion.h"
#include "llappviewer.h" #include "llappviewer.h"
#include "llvosurfacepatch.h" #include "llvosurfacepatch.h"
#include "llvowlsky.h" #include "llvowlsky.h"

View File

@@ -163,7 +163,7 @@
#include "hippolimits.h" #include "hippolimits.h"
#include "hipporestrequest.h" #include "hipporestrequest.h"
#include "hippofloaterxml.h" #include "hippofloaterxml.h"
#include "llversionviewer.h" #include "sgversion.h"
#include "m7wlinterface.h" #include "m7wlinterface.h"
#include "llwlparammanager.h" #include "llwlparammanager.h"
@@ -3218,7 +3218,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
// hello from object // hello from object
if (from_id.isNull()) return; if (from_id.isNull()) return;
char buf[200]; char buf[200];
snprintf(buf, 200, "%s v%d.%d.%d", LL_CHANNEL, LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH); snprintf(buf, 200, "%s v%d.%d.%d", gVersionChannel, gVersionMajor, gVersionMinor, gVersionPatch);
send_chat_from_viewer(buf, CHAT_TYPE_WHISPER, 427169570); send_chat_from_viewer(buf, CHAT_TYPE_WHISPER, 427169570);
gChatObjectAuth[from_id] = 1; gChatObjectAuth[from_id] = 1;
} else if (gChatObjectAuth.find(from_id) != gChatObjectAuth.end()) { } else if (gChatObjectAuth.find(from_id) != gChatObjectAuth.end()) {

View File

@@ -20,7 +20,7 @@
#include "llavatarnamecache.h" #include "llavatarnamecache.h"
#include "llnotificationsutil.h" #include "llnotificationsutil.h"
#include "lluictrlfactory.h" #include "lluictrlfactory.h"
#include "llversionviewer.h" #include "sgversion.h"
#include "llviewermenu.h" #include "llviewermenu.h"
#include "llviewerparcelmgr.h" #include "llviewerparcelmgr.h"
#include "llviewerregion.h" #include "llviewerregion.h"
@@ -305,7 +305,7 @@ std::string RlvStrings::getVersion(bool fLegacy /*=false*/)
return llformat("%s viewer v%d.%d.%d (%s %d.%d.%d.%d - RLVa %d.%d.%d)", return llformat("%s viewer v%d.%d.%d (%s %d.%d.%d.%d - RLVa %d.%d.%d)",
( (!fLegacy) ? "RestrainedLove" : "RestrainedLife" ), ( (!fLegacy) ? "RestrainedLove" : "RestrainedLife" ),
RLV_VERSION_MAJOR, RLV_VERSION_MINOR, RLV_VERSION_PATCH, RLV_VERSION_MAJOR, RLV_VERSION_MINOR, RLV_VERSION_PATCH,
LLAppViewer::instance()->getSecondLifeTitle().c_str(), LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VERSION_BUILD, LLAppViewer::instance()->getSecondLifeTitle().c_str(), gVersionMajor, gVersionMinor, gVersionPatch, gVersionBuild,
RLVa_VERSION_MAJOR, RLVa_VERSION_MINOR, RLVa_VERSION_PATCH); RLVa_VERSION_MAJOR, RLVa_VERSION_MINOR, RLVa_VERSION_PATCH);
} }

View File

@@ -0,0 +1,30 @@
/* Copyright (C) 2012 Siana Gearz
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA */
#include "llviewerprecompiledheaders.h"
#include "llversionviewer.h"
#include "sgversion.h"
extern const S32 gVersionMajor = LL_VERSION_MAJOR;
extern const S32 gVersionMinor = LL_VERSION_MINOR;
extern const S32 gVersionPatch = LL_VERSION_PATCH;
extern const S32 gVersionBuild = LL_VERSION_BUILD;
extern const char* gVersionChannel = LL_CHANNEL;

29
indra/newview/sgversion.h Normal file
View File

@@ -0,0 +1,29 @@
/* Copyright (C) 2012 Siana Gearz
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA */
#ifndef SGVERSION_H
#define SGVERSION_H
extern const S32 gVersionMajor;
extern const S32 gVersionMinor;
extern const S32 gVersionPatch;
extern const S32 gVersionBuild;
extern const char* gVersionChannel;
#endif