Merge branch 'master' of git://github.com/siana/SingularityViewer

This commit is contained in:
Lirusaito
2012-02-09 11:49:54 -05:00
23 changed files with 182 additions and 151 deletions

View File

@@ -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

View File

@@ -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])

View File

@@ -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();

View File

@@ -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(),

View File

@@ -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<LLTextBox>("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);
}

View File

@@ -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();
// <edit>
query_map["channel"] = LL_CHANNEL;
query_map["channel"] = gVersionChannel;
// *TODO constantize this guy
// *NOTE: This URL is also used in win_setup/lldownloader.cpp

View File

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

View File

@@ -38,7 +38,7 @@
#include <iterator>
#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);

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

@@ -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;

View File

@@ -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"

View File

@@ -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()) {

View File

@@ -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);
}

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