summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/CMakeLists.txt2
-rw-r--r--indra/newview/app_settings/settings.xml35
-rw-r--r--indra/newview/llappviewer.cpp25
-rw-r--r--indra/newview/llappviewer.h11
-rw-r--r--indra/newview/lltranslate.cpp12
5 files changed, 75 insertions, 10 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index bf885e5934..63982ba87b 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -64,6 +64,7 @@ include_directories(
${LSCRIPT_INCLUDE_DIRS}
${LSCRIPT_INCLUDE_DIRS}/lscript_compile
${LLLOGIN_INCLUDE_DIRS}
+ ${UPDATER_INCLUDE_DIRS}
)
set(viewer_SOURCE_FILES
@@ -1679,6 +1680,7 @@ target_link_libraries(${VIEWER_BINARY_NAME}
${OPENSSL_LIBRARIES}
${CRYPTO_LIBRARIES}
${LLLOGIN_LIBRARIES}
+ ${UPDATER_LIBRARIES}
${GOOGLE_PERFTOOLS_LIBRARIES}
)
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 086d73bc00..371326c0f5 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -10991,7 +10991,40 @@
<key>Value</key>
<integer>15</integer>
</map>
- <key>UploadBakedTexOld</key>
+ <key>UpdaterServiceActive</key>
+ <map>
+ <key>Comment</key>
+ <string>Enable or disable the updater service.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
+ <key>UpdaterServiceCheckPeriod</key>
+ <map>
+ <key>Comment</key>
+ <string>Default period between update checking.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>3600</integer>
+ </map>
+ <key>UpdaterServiceURL</key>
+ <map>
+ <key>Comment</key>
+ <string>Default location for the updater service.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string>http://secondlife.com/app/update</string>
+ </map>
+ <key>UploadBakedTexOld</key>
<map>
<key>Comment</key>
<string>Forces the baked texture pipeline to upload using the old method.</string>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 931b9fd2f3..e6feaae504 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -83,6 +83,7 @@
#include "llweb.h"
#include "llsecondlifeurls.h"
+#include "llupdaterservice.h"
// Linden library includes
#include "llavatarnamecache.h"
@@ -581,7 +582,8 @@ LLAppViewer::LLAppViewer() :
mAgentRegionLastAlive(false),
mRandomizeFramerate(LLCachedControl<bool>(gSavedSettings,"Randomize Framerate", FALSE)),
mPeriodicSlowFrame(LLCachedControl<bool>(gSavedSettings,"Periodic Slow Frame", FALSE)),
- mFastTimerLogThread(NULL)
+ mFastTimerLogThread(NULL),
+ mUpdater(new LLUpdaterService())
{
if(NULL != sInstance)
{
@@ -630,6 +632,9 @@ bool LLAppViewer::init()
if (!initConfiguration())
return false;
+ // Initialize updater service
+ initUpdater();
+
// write Google Breakpad minidump files to our log directory
std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "");
logdir += gDirUtilp->getDirDelimiter();
@@ -2324,6 +2329,24 @@ bool LLAppViewer::initConfiguration()
return true; // Config was successful.
}
+void LLAppViewer::initUpdater()
+{
+ // Initialize the updater service.
+ // Generate URL to the udpater service
+ // Get Channel
+ // Get Version
+ std::string url = gSavedSettings.getString("UpdaterServiceURL");
+ std::string channel = gSavedSettings.getString("VersionChannelName");
+ std::string version = LLVersionInfo::getVersion();
+ U32 check_period = gSavedSettings.getU32("UpdaterServiceCheckPeriod");
+
+ mUpdater->setParams(url, channel, version);
+ mUpdater->setCheckPeriod(check_period);
+ if(gSavedSettings.getBOOL("UpdaterServiceActive"))
+ {
+ mUpdater->startChecking();
+ }
+}
void LLAppViewer::checkForCrash(void)
{
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index fdc3b9ef9e..ea44ade8c6 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -39,7 +39,7 @@ class LLTextureCache;
class LLImageDecodeThread;
class LLTextureFetch;
class LLWatchdogTimeout;
-class LLCommandLineParser;
+class LLUpdaterService;
struct apr_dso_handle_t;
@@ -186,7 +186,7 @@ private:
bool initThreads(); // Initialize viewer threads, return false on failure.
bool initConfiguration(); // Initialize settings from the command line/config file.
-
+ void initUpdater(); // Initialize the updater service.
bool initCache(); // Initialize local client cache.
@@ -260,7 +260,13 @@ private:
std::set<struct apr_dso_handle_t*> mPlugins;
+ boost::scoped_ptr<LLUpdaterService> mUpdater;
+
+ //---------------------------------------------
+ //*NOTE: Mani - legacy updater stuff
+ // Still useable?
public:
+
//some information for updater
typedef struct
{
@@ -270,6 +276,7 @@ public:
static LLUpdaterInfo *sUpdaterInfo ;
void launchUpdater();
+ //---------------------------------------------
};
// consts from viewer.h
diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp
index 050e34ade9..21467a2ab8 100644
--- a/indra/newview/lltranslate.cpp
+++ b/indra/newview/lltranslate.cpp
@@ -36,7 +36,7 @@
#include "llbufferstream.h"
#include "llui.h"
-#include "llversionviewer.h"
+#include "llversioninfo.h"
#include "llviewercontrol.h"
#include "jsoncpp/reader.h"
@@ -64,11 +64,11 @@ void LLTranslate::translateMessage(LLHTTPClient::ResponderPtr &result, const std
getTranslateUrl(url, from_lang, to_lang, mesg);
std::string user_agent = llformat("%s %d.%d.%d (%d)",
- LL_CHANNEL,
- LL_VERSION_MAJOR,
- LL_VERSION_MINOR,
- LL_VERSION_PATCH,
- LL_VERSION_BUILD );
+ LLVersionInfo::getChannel(),
+ LLVersionInfo::getMajor(),
+ LLVersionInfo::getMinor(),
+ LLVersionInfo::getPatch(),
+ LLVersionInfo::getBuild());
if (!m_Header.size())
{