diff --git a/.gitignore b/.gitignore index 7273210c5..bfe820c87 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /installed.xml +/indra/llcommon/llversionviewer.h /indra/build-* /indra/tools/vstool/obj/ *.aps @@ -11,6 +12,7 @@ /indra/viewer-* /indra/newview/vivox-runtime/ /libraries/ +/lib/ *.pyc *.orig *.rej diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 11d3f7ab7..09eade34f 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -26,7 +26,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") include(Variables) # Load versions now. Install locations need them. -include(Versions) +include(BuildVersion) include(UnixInstall) diff --git a/indra/cmake/BuildVersion.cmake b/indra/cmake/BuildVersion.cmake index 30817b950..81854e563 100644 --- a/indra/cmake/BuildVersion.cmake +++ b/indra/cmake/BuildVersion.cmake @@ -1,23 +1,41 @@ # -*- cmake -*- -function (build_version _target) - # Read version components from the header file. - file(STRINGS ${LIBS_OPEN_DIR}/llcommon/llversion${_target}.h lines - REGEX " LL_VERSION_") - foreach(line ${lines}) - string(REGEX REPLACE ".*LL_VERSION_([A-Z]+).*" "\\1" comp "${line}") - string(REGEX REPLACE ".* = ([0-9]+);.*" "\\1" value "${line}") - set(v${comp} "${value}") - endforeach(line) +# Read version components from the header file. +file(STRINGS ${LIBS_OPEN_DIR}/llcommon/llversionviewer.h.in lines + REGEX " LL_VERSION_") +foreach(line ${lines}) + string(REGEX REPLACE ".*LL_VERSION_([A-Z]+).*" "\\1" comp "${line}") + string(REGEX REPLACE ".* = ([0-9]+);.*" "\\1" value "${line}") + set(v${comp} "${value}") +endforeach(line) - # Compose the version. - set(${_target}_VERSION "${vMAJOR}.${vMINOR}.${vPATCH}.${vBUILD}") - if (${_target}_VERSION MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$") - message(STATUS "Version of ${_target} is ${${_target}_VERSION}") - else (${_target}_VERSION MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$") - message(FATAL_ERROR "Could not determine ${_target} version (${${_target}_VERSION})") - endif (${_target}_VERSION MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$") +execute_process( + COMMAND git rev-list HEAD + OUTPUT_VARIABLE GIT_REV_LIST_STR + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_STRIP_TRAILING_WHITESPACE +) - # Report version to caller. - set(${_target}_VERSION "${${_target}_VERSION}" PARENT_SCOPE) -endfunction (build_version) +string(REPLACE "\n" ";" GIT_REV_LIST ${GIT_REV_LIST_STR}) + +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) diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 2f30f29b6..28a3d5e4f 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -79,7 +79,6 @@ set(cmake_SOURCE_FILES UI.cmake UnixInstall.cmake Variables.cmake - Versions.cmake XmlRpcEpi.cmake ZLIB.cmake ) diff --git a/indra/cmake/Versions.cmake b/indra/cmake/Versions.cmake deleted file mode 100644 index c5d925e98..000000000 --- a/indra/cmake/Versions.cmake +++ /dev/null @@ -1,9 +0,0 @@ -include(BuildVersion) - -if(VIEWER) - build_version(viewer) -endif(VIEWER) - -if(SERVER) - build_version(server) -endif(SERVER) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 5450cc386..e5801f6cb 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -213,8 +213,7 @@ set(llcommon_HEADER_FILES lluri.h lluuid.h lluuidhashmap.h - llversionserver.h - llversionviewer.h + llversionviewer.h.in llworkerthread.h metaclass.h metaclasst.h diff --git a/indra/llcommon/llversionserver.h b/indra/llcommon/llversionserver.h deleted file mode 100644 index bc5a6dbb8..000000000 --- a/indra/llcommon/llversionserver.h +++ /dev/null @@ -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 diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h.in similarity index 89% rename from indra/llcommon/llversionviewer.h rename to indra/llcommon/llversionviewer.h.in index f8dd67fb9..fe3f1012a 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h.in @@ -36,12 +36,13 @@ const S32 LL_VERSION_MAJOR = 1; const S32 LL_VERSION_MINOR = 6; 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 -const char * const LL_VERSION_BUNDLE_ID = "com.secondlife.singularity.viewer"; +const char * const LL_VERSION_BUNDLE_ID = "org.singularityviewer.singularity"; #endif #endif + diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 2df854365..1a757099b 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -76,6 +76,7 @@ include_directories( ) set(viewer_SOURCE_FILES + sgversion.cpp llviewerobjectbackup.cpp slfloatermediafilter.cpp floaterlocalassetbrowse.cpp @@ -561,6 +562,7 @@ set(viewer_HEADER_FILES CMakeLists.txt ViewerInstall.cmake + sgversion.h llviewerobjectbackup.h slfloatermediafilter.h floaterlocalassetbrowse.h @@ -943,7 +945,6 @@ set(viewer_HEADER_FILES llviewerassetstorage.h llviewerassettype.h llvieweraudio.h - llviewerbuild.h llviewercamera.h llviewercontrol.h llviewerdisplay.h diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index b42ead885..dc6747594 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -37,7 +37,7 @@ #include "hippogridmanager.h" #include "hippolimits.h" -#include "llversionviewer.h" +#include "sgversion.h" #include "llfeaturemanager.h" #include "lluictrlfactory.h" #include "lltexteditor.h" @@ -643,11 +643,11 @@ bool LLAppViewer::init() // Build a string representing the current version number. gCurrentVersion = llformat("%s %d.%d.%d.%d", - LL_CHANNEL, - LL_VERSION_MAJOR, - LL_VERSION_MINOR, - LL_VERSION_PATCH, - LL_VERSION_BUILD ); + gVersionChannel, + gVersionMajor, + gVersionMinor, + gVersionPatch, + gVersionBuild ); ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// @@ -2045,7 +2045,7 @@ bool LLAppViewer::initConfiguration() gSavedSettings.setString("ClientSettingsFile", gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Global"))); - gSavedSettings.setString("VersionChannelName", LL_CHANNEL); + gSavedSettings.setString("VersionChannelName", gVersionChannel); #ifndef LL_RELEASE_FOR_DOWNLOAD // provide developer build only overrides for these control variables that are not @@ -2654,12 +2654,12 @@ void LLAppViewer::writeSystemInfo() { gDebugInfo["SLLog"] = LLError::logFileName(); - gDebugInfo["ClientInfo"]["Name"] = LL_CHANNEL; + gDebugInfo["ClientInfo"]["Name"] = gVersionChannel; - gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR; - gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR; - gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH; - gDebugInfo["ClientInfo"]["BuildVersion"] = LL_VERSION_BUILD; + gDebugInfo["ClientInfo"]["MajorVersion"] = gVersionMajor; + gDebugInfo["ClientInfo"]["MinorVersion"] = gVersionMinor; + gDebugInfo["ClientInfo"]["PatchVersion"] = gVersionPatch; + gDebugInfo["ClientInfo"]["BuildVersion"] = gVersionBuild; gDebugInfo["CAFilename"] = gDirUtilp->getCAFile(); @@ -2694,7 +2694,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 + << " version " << gVersionMajor << "." << gVersionMinor << "." << gVersionPatch << LL_ENDL; // 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 //to check against no matter what - gDebugInfo["ClientInfo"]["Name"] = LL_CHANNEL; + gDebugInfo["ClientInfo"]["Name"] = gVersionChannel; - gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR; - gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR; - gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH; - gDebugInfo["ClientInfo"]["BuildVersion"] = LL_VERSION_BUILD; + gDebugInfo["ClientInfo"]["MajorVersion"] = gVersionMajor; + gDebugInfo["ClientInfo"]["MinorVersion"] = gVersionMinor; + gDebugInfo["ClientInfo"]["PatchVersion"] = gVersionPatch; + gDebugInfo["ClientInfo"]["BuildVersion"] = gVersionBuild; LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if ( parcel && parcel->getMusicURL()[0]) @@ -4607,12 +4607,12 @@ void LLAppViewer::handleLoginComplete() initMainloopTimeout("Mainloop Init"); // 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"]["MinorVersion"] = LL_VERSION_MINOR; - gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH; - gDebugInfo["ClientInfo"]["BuildVersion"] = LL_VERSION_BUILD; + gDebugInfo["ClientInfo"]["MajorVersion"] = gVersionMajor; + gDebugInfo["ClientInfo"]["MinorVersion"] = gVersionMinor; + gDebugInfo["ClientInfo"]["PatchVersion"] = gVersionPatch; + gDebugInfo["ClientInfo"]["BuildVersion"] = gVersionBuild; LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if ( parcel && parcel->getMusicURL()[0]) diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 0bd2ba83d..8516035d3 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -49,7 +49,7 @@ #include "llagent.h" #include "llviewerstats.h" #include "llviewerregion.h" -#include "llversionviewer.h" +#include "sgversion.h" #include "llviewerbuild.h" #include "lluictrlfactory.h" #include "lluri.h" @@ -137,9 +137,9 @@ LLFloaterAbout::LLFloaterAbout() // Version string std::string version = std::string(LLAppViewer::instance()->getSecondLifeTitle() + 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__, - LL_CHANNEL)); + gVersionChannel)); support_widget->appendColoredText(version, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor")); 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"; /*std::ostringstream version; - version << LL_VERSION_MAJOR - << "." << LL_VERSION_MINOR - << "." << LL_VERSION_PATCH - << "." << LL_VERSION_BUILD; + version << gVersionMajor + << "." << gVersionMinor + << "." << gVersionPatch + << "." << gVersionBuild; LLSD query; - query["channel"] = LL_CHANNEL; + query["channel"] = gVersionChannel; query["version"] = version.str(); diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index dccb8ab89..b2925b181 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -47,7 +47,7 @@ #include "llimagej2c.h" #include "llstring.h" #include "llsys.h" -#include "llversionviewer.h" +#include "sgversion.h" #include "message.h" #include "v3math.h" @@ -747,10 +747,10 @@ LLSD LLFloaterReporter::gatherReport() if ( mReportType == BUG_REPORT) { - summary << short_platform << " V" << LL_VERSION_MAJOR << "." - << LL_VERSION_MINOR << "." - << LL_VERSION_PATCH << "." - << LL_VERSION_BUILD + summary << short_platform << " V" << gVersionMajor << "." + << gVersionMinor << "." + << gVersionPatch << "." + << gVersionBuild << " (" << regionp->getName() << ")" << "[" << category_name << "] " << "\"" << childGetValue("summary_edit").asString() << "\""; @@ -768,10 +768,10 @@ LLSD LLFloaterReporter::gatherReport() std::ostringstream details; if (mReportType != BUG_REPORT) { - details << "V" << LL_VERSION_MAJOR << "." // client version moved to body of email for abuse reports - << LL_VERSION_MINOR << "." - << LL_VERSION_PATCH << "." - << LL_VERSION_BUILD << std::endl << std::endl; + details << "V" << gVersionMajor << "." // client version moved to body of email for abuse reports + << gVersionMinor << "." + << gVersionPatch << "." + << gVersionBuild << std::endl << std::endl; } std::string object_name = childGetText("object_name"); std::string owner_name = childGetText("owner_name"); @@ -792,9 +792,9 @@ LLSD LLFloaterReporter::gatherReport() std::string version_string; version_string = llformat( "%d.%d.%d %s %s %s %s", - LL_VERSION_MAJOR, - LL_VERSION_MINOR, - LL_VERSION_PATCH, + gVersionMajor, + gVersionMinor, + gVersionPatch, platform, gSysCPU.getFamily().c_str(), gGLManager.mGLRenderer.c_str(), diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 9c698b1b7..23442aa63 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -42,7 +42,7 @@ #include "llfontgl.h" #include "llmd5.h" #include "llsecondlifeurls.h" -#include "llversionviewer.h" +#include "sgversion.h" #include "v4color.h" #include "llbutton.h" @@ -347,12 +347,12 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, childSetAction("grids_btn", onClickGrids, this); childSetCommitCallback("grids_combo", onSelectGrid, this); - std::string channel = LL_CHANNEL; + std::string channel = gVersionChannel; std::string version = llformat("%d.%d.%d (%d)", - LL_VERSION_MAJOR, - LL_VERSION_MINOR, - LL_VERSION_PATCH, + gVersionMajor, + gVersionMinor, + gVersionPatch, LL_VIEWER_BUILD ); LLTextBox* channel_text = getChild("channel_text"); channel_text->setTextArg("[CHANNEL]", channel); // though not displayed @@ -934,10 +934,10 @@ void LLPanelLogin::loadLoginPage() } 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) { - oStr << "&channel=" << LLWeb::curlEscape(LL_CHANNEL); + oStr << "&channel=" << LLWeb::curlEscape(gVersionChannel); oStr << "&version=" << LLWeb::curlEscape(version); } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 2b29ac839..52eac1037 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -85,7 +85,7 @@ #include "llsecondlifeurls.h" #include "llstring.h" #include "lluserrelations.h" -#include "llversionviewer.h" +#include "sgversion.h" #include "llvfs.h" #include "llxorcipher.h" // saved password, MAC address #include "message.h" @@ -533,9 +533,9 @@ bool idle_startup() if(!start_messaging_system( message_template_path, port, - LL_VERSION_MAJOR, - LL_VERSION_MINOR, - LL_VERSION_PATCH, + gVersionMajor, + gVersionMinor, + gVersionPatch, FALSE, std::string(), responder, @@ -3417,7 +3417,7 @@ bool update_dialog_callback(const LLSD& notification, const LLSD& response) // userserver no longer exists. query_map["userserver"] = LLViewerLogin::getInstance()->getGridLabel(); // - query_map["channel"] = LL_CHANNEL; + query_map["channel"] = gVersionChannel; // *TODO constantize this guy // *NOTE: This URL is also used in win_setup/lldownloader.cpp diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp index 501dfe29b..5a537ae95 100644 --- a/indra/newview/lltranslate.cpp +++ b/indra/newview/lltranslate.cpp @@ -35,7 +35,7 @@ #include "llbufferstream.h" #include "lltranslate.h" #include "llui.h" -#include "llversionviewer.h" +#include "sgversion.h" #include "llweb.h" // diff --git a/indra/newview/lluserauth.cpp b/indra/newview/lluserauth.cpp index 308c9f652..cd9716a7f 100644 --- a/indra/newview/lluserauth.cpp +++ b/indra/newview/lluserauth.cpp @@ -38,7 +38,7 @@ #include #include "lldir.h" -#include "llversionviewer.h" +#include "sgversion.h" #include "llappviewer.h" #include "llviewerbuild.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, "start", start.c_str(), 0); 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, "mac", hashed_mac.c_str(), 0); @@ -219,7 +219,7 @@ void LLUserAuth::authenticate( XMLRPC_VectorAppendString(params, "passwd", dpasswd.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, "channel", LL_CHANNEL, 0); + XMLRPC_VectorAppendString(params, "channel", gVersionChannel, 0); XMLRPC_VectorAppendString(params, "platform", PLATFORM_STRING, 0); XMLRPC_VectorAppendString(params, "mac", hashed_mac.c_str(), 0); diff --git a/indra/newview/llviewerbuild.h b/indra/newview/llviewerbuild.h old mode 100644 new mode 100755 index b93c45c30..b02bdece5 --- a/indra/newview/llviewerbuild.h +++ b/indra/newview/llviewerbuild.h @@ -30,8 +30,8 @@ * $/LicenseInfo$ */ -#include "llversionviewer.h" +#include "sgversion.h" // Set the build number in indra/llcommon/llversionviewer.h! -const S32 LL_VIEWER_BUILD = LL_VERSION_BUILD; +const S32 LL_VIEWER_BUILD = gVersionBuild; diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 3bd981cd1..f2bc0abc5 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -70,7 +70,7 @@ #include "llnotify.h" #include "llkeyboard.h" #include "llerrorcontrol.h" -#include "llversionviewer.h" +#include "sgversion.h" #include "llappviewer.h" #include "llvosurfacepatch.h" #include "llvowlsky.h" diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 5fa5bbf40..97ac3eb05 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -163,7 +163,7 @@ #include "hippolimits.h" #include "hipporestrequest.h" #include "hippofloaterxml.h" -#include "llversionviewer.h" +#include "sgversion.h" #include "m7wlinterface.h" #include "llwlparammanager.h" @@ -3218,7 +3218,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) // hello from object if (from_id.isNull()) return; 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); gChatObjectAuth[from_id] = 1; } else if (gChatObjectAuth.find(from_id) != gChatObjectAuth.end()) { diff --git a/indra/newview/rlvcommon.cpp b/indra/newview/rlvcommon.cpp index efb70cd71..976ea26fb 100644 --- a/indra/newview/rlvcommon.cpp +++ b/indra/newview/rlvcommon.cpp @@ -20,7 +20,7 @@ #include "llavatarnamecache.h" #include "llnotificationsutil.h" #include "lluictrlfactory.h" -#include "llversionviewer.h" +#include "sgversion.h" #include "llviewermenu.h" #include "llviewerparcelmgr.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)", ( (!fLegacy) ? "RestrainedLove" : "RestrainedLife" ), 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); } diff --git a/indra/newview/sgversion.cpp b/indra/newview/sgversion.cpp new file mode 100644 index 000000000..699bd1521 --- /dev/null +++ b/indra/newview/sgversion.cpp @@ -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; + diff --git a/indra/newview/sgversion.h b/indra/newview/sgversion.h new file mode 100644 index 000000000..42231fc07 --- /dev/null +++ b/indra/newview/sgversion.h @@ -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