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/llappviewer.cpp373
-rw-r--r--indra/newview/llappviewer.h19
-rw-r--r--indra/newview/llappviewerwin32.cpp11
-rw-r--r--indra/newview/llfloaterabout.cpp83
-rw-r--r--indra/newview/lllogininstance.cpp568
-rw-r--r--indra/newview/lllogininstance.h13
-rw-r--r--indra/newview/llstartup.cpp1
-rw-r--r--indra/newview/llviewercontrol.cpp15
-rw-r--r--indra/newview/llviewermenu.cpp17
-rw-r--r--indra/newview/tests/lllogininstance_test.cpp137
11 files changed, 3 insertions, 1236 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 31e3711569..999165528a 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -83,7 +83,6 @@ include_directories(
${LLWINDOW_INCLUDE_DIRS}
${LLXML_INCLUDE_DIRS}
${LLLOGIN_INCLUDE_DIRS}
- ${UPDATER_INCLUDE_DIRS}
${LIBS_PREBUILT_DIR}/include/collada
${LIBS_PREBUILD_DIR}/include/hunspell
${OPENAL_LIB_INCLUDE_DIRS}
@@ -1959,7 +1958,6 @@ target_link_libraries(${VIEWER_BINARY_NAME}
${PNG_PRELOAD_ARCHIVES}
${ZLIB_PRELOAD_ARCHIVES}
${URIPARSER_PRELOAD_ARCHIVES}
- ${UPDATER_LIBRARIES}
${GOOGLE_PERFTOOLS_LIBRARIES}
${LLAUDIO_LIBRARIES}
${LLCHARACTER_LIBRARIES}
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 6bc1f67e32..cf783b9f2f 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -93,7 +93,6 @@
#include "llvocache.h"
#include "llvopartgroup.h"
#include "llweb.h"
-#include "llupdaterservice.h"
#include "llfloatertexturefetchdebugger.h"
#include "llspellcheck.h"
#include "llscenemonitor.h"
@@ -263,7 +262,6 @@ static LLAppViewerListener sAppViewerListener(LLAppViewer::instance);
// viewer.cpp - these are only used in viewer, should be easily moved.
#if LL_DARWIN
-const char * const LL_VERSION_BUNDLE_ID = "com.secondlife.indra.viewer";
extern void init_apple_menu(const char* product);
#endif // LL_DARWIN
@@ -289,8 +287,6 @@ S32 gLastExecDuration = -1; // (<0 indicates unknown)
# define LL_PLATFORM_KEY "mac"
#elif LL_LINUX
# define LL_PLATFORM_KEY "lnx"
-#elif LL_SOLARIS
-# define LL_PLATFORM_KEY "sol"
#else
# error "Unknown Platform"
#endif
@@ -467,8 +463,6 @@ struct SettingsFiles : public LLInitParam::Block<SettingsFiles>
static std::string gWindowTitle;
-LLAppViewer::LLUpdaterInfo *LLAppViewer::sUpdaterInfo = NULL ;
-
//----------------------------------------------------------------------------
// Metrics logging control constants
//----------------------------------------------------------------------------
@@ -695,7 +689,6 @@ LLAppViewer::LLAppViewer()
mRandomizeFramerate(LLCachedControl<bool>(gSavedSettings,"Randomize Framerate", FALSE)),
mPeriodicSlowFrame(LLCachedControl<bool>(gSavedSettings,"Periodic Slow Frame", FALSE)),
mFastTimerLogThread(NULL),
- mUpdater(new LLUpdaterService()),
mSettingsLocationList(NULL)
{
if(NULL != sInstance)
@@ -724,7 +717,6 @@ LLAppViewer::LLAppViewer()
// OK to write stuff to logs now, we've now crash reported if necessary
//
- LLLoginInstance::instance().setUpdaterService(mUpdater.get());
LLLoginInstance::instance().setPlatformInfo(gPlatform, getOSInfo().getOSVersionString());
}
@@ -732,8 +724,6 @@ LLAppViewer::~LLAppViewer()
{
delete mSettingsLocationList;
LLViewerEventRecorder::instance().~LLViewerEventRecorder();
-
- LLLoginInstance::instance().setUpdaterService(0);
destroyMainloopTimeout();
@@ -881,14 +871,6 @@ bool LLAppViewer::init()
writeSystemInfo();
- // Initialize updater service (now that we have an io pump)
- initUpdater();
- if(isQuitting())
- {
- // Early out here because updater set the quitting flag.
- return true;
- }
-
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
@@ -2888,224 +2870,6 @@ void LLAppViewer::initStrings()
}
}
-namespace {
- // *TODO - decide if there's a better place for these functions.
- // do we need a file llupdaterui.cpp or something? -brad
-
- void apply_update_callback(LLSD const & notification, LLSD const & response)
- {
- LL_DEBUGS() << "LLUpdate user response: " << response << LL_ENDL;
- if(response["OK_okcancelbuttons"].asBoolean())
- {
- LL_INFOS() << "LLUpdate restarting viewer" << LL_ENDL;
- static const bool install_if_ready = true;
- // *HACK - this lets us launch the installer immediately for now
- LLUpdaterService().startChecking(install_if_ready);
- }
- }
-
- void apply_update_ok_callback(LLSD const & notification, LLSD const & response)
- {
- LL_INFOS() << "LLUpdate restarting viewer" << LL_ENDL;
- static const bool install_if_ready = true;
- // *HACK - this lets us launch the installer immediately for now
- LLUpdaterService().startChecking(install_if_ready);
- }
-
- void on_update_downloaded(LLSD const & data)
- {
- std::string notification_name;
- void (*apply_callback)(LLSD const &, LLSD const &) = NULL;
-
- /* Build up the notification name...
- * it can be any of these, which are included here for the sake of grep:
- * RequiredUpdateDownloadedDialog
- * RequiredUpdateDownloadedVerboseDialog
- * OtherChannelRequiredUpdateDownloadedDialog
- * OtherChannelRequiredUpdateDownloadedVerbose
- * DownloadBackgroundTip
- * DownloadBackgroundDialog
- * OtherChannelDownloadBackgroundTip
- * OtherChannelDownloadBackgroundDialog
- */
- {
- LL_DEBUGS("UpdaterService") << "data = ";
- std::ostringstream data_dump;
- LLSDSerialize::toNotation(data, data_dump);
- LL_CONT << data_dump.str() << LL_ENDL;
- }
- if(data["channel"].asString() != LLVersionInfo::getChannel())
- {
- notification_name.append("OtherChannel");
- }
- if(data["required"].asBoolean())
- {
- if(LLStartUp::getStartupState() <= STATE_LOGIN_WAIT)
- {
- // The user never saw the progress bar.
- apply_callback = &apply_update_ok_callback;
- notification_name += "RequiredUpdateDownloadedVerboseDialog";
- }
- else if(LLStartUp::getStartupState() < STATE_WORLD_INIT)
- {
- // The user is logging in but blocked.
- apply_callback = &apply_update_ok_callback;
- notification_name += "RequiredUpdateDownloadedDialog";
- }
- else
- {
- // The user is already logged in; treat like an optional update.
- apply_callback = &apply_update_callback;
- notification_name += "DownloadBackgroundTip";
- }
- }
- else
- {
- apply_callback = &apply_update_callback;
- if(LLStartUp::getStartupState() < STATE_STARTED)
- {
- // CHOP-262 we need to use a different notification
- // method prior to login.
- notification_name += "DownloadBackgroundDialog";
- }
- else
- {
- notification_name += "DownloadBackgroundTip";
- }
- }
-
- LLSD substitutions;
- substitutions["VERSION"] = data["version"];
- std::string new_channel = data["channel"].asString();
- substitutions["NEW_CHANNEL"] = new_channel;
- std::string info_url = data["info_url"].asString();
- if ( !info_url.empty() )
- {
- substitutions["INFO_URL"] = info_url;
- }
- else
- {
- LL_WARNS("UpdaterService") << "no info url supplied - defaulting to hard coded release notes pattern" << LL_ENDL;
-
- // truncate version at the rightmost '.'
- std::string version_short(data["version"]);
- size_t short_length = version_short.rfind('.');
- if (short_length != std::string::npos)
- {
- version_short.resize(short_length);
- }
-
- LLUIString relnotes_url("[RELEASE_NOTES_BASE_URL][CHANNEL_URL]/[VERSION_SHORT]");
- relnotes_url.setArg("[VERSION_SHORT]", version_short);
-
- // *TODO thread the update service's response through to this point
- std::string const & channel = LLVersionInfo::getChannel();
- boost::shared_ptr<char> channel_escaped(curl_escape(channel.c_str(), channel.size()), &curl_free);
-
- relnotes_url.setArg("[CHANNEL_URL]", channel_escaped.get());
- relnotes_url.setArg("[RELEASE_NOTES_BASE_URL]", LLTrans::getString("RELEASE_NOTES_BASE_URL"));
- substitutions["INFO_URL"] = relnotes_url.getString();
- }
-
- LLNotificationsUtil::add(notification_name, substitutions, LLSD(), apply_callback);
- }
-
- void install_error_callback(LLSD const & notification, LLSD const & response)
- {
- LLAppViewer::instance()->forceQuit();
- }
-
- bool notify_update(LLSD const & evt)
- {
- std::string notification_name;
- switch (evt["type"].asInteger())
- {
- case LLUpdaterService::DOWNLOAD_COMPLETE:
- on_update_downloaded(evt);
- break;
- case LLUpdaterService::INSTALL_ERROR:
- if(evt["required"].asBoolean()) {
- LLNotificationsUtil::add("FailedRequiredUpdateInstall", LLSD(), LLSD(), &install_error_callback);
- } else {
- LLNotificationsUtil::add("FailedUpdateInstall");
- }
- break;
- default:
- break;
- }
-
- // let others also handle this event by default
- return false;
- }
-
- bool on_bandwidth_throttle(LLUpdaterService * updater, LLSD const & evt)
- {
- updater->setBandwidthLimit(evt.asInteger() * (1024/8));
- return false; // Let others receive this event.
- };
-};
-
-void LLAppViewer::initUpdater()
-{
- // Initialize the updater service.
- // Get Channel
- // Get Version
-
- /*****************************************************************
- * Previously, the url was derived from the settings
- * UpdaterServiceURL
- * UpdaterServicePath
- * it is now obtained from the grid manager. The settings above
- * are no longer used.
- *****************************************************************/
- std::string channel = LLVersionInfo::getChannel();
- std::string version = LLVersionInfo::getVersion();
-
- U32 check_period = gSavedSettings.getU32("UpdaterServiceCheckPeriod");
- bool willing_to_test;
- LL_DEBUGS("UpdaterService") << "channel " << channel << LL_ENDL;
-
- if (LLVersionInfo::TEST_VIEWER == LLVersionInfo::getViewerMaturity())
- {
- LL_INFOS("UpdaterService") << "Test build: overriding willing_to_test by sending testno" << LL_ENDL;
- willing_to_test = false;
- }
- else
- {
- willing_to_test = gSavedSettings.getBOOL("UpdaterWillingToTest");
- }
- unsigned char unique_id[MD5HEX_STR_SIZE];
- if ( ! llHashedUniqueID(unique_id) )
- {
- if ( willing_to_test )
- {
- LL_WARNS("UpdaterService") << "Unable to provide a unique id; overriding willing_to_test by sending testno" << LL_ENDL;
- }
- willing_to_test = false;
- }
-
- mUpdater->setAppExitCallback(boost::bind(&LLAppViewer::forceQuit, this));
- mUpdater->initialize(channel,
- version,
- gPlatform,
- getOSInfo().getOSVersionString(),
- unique_id,
- willing_to_test
- );
- mUpdater->setCheckPeriod(check_period);
- mUpdater->setBandwidthLimit((int)gSavedSettings.getF32("UpdaterMaximumBandwidth") * (1024/8));
- gSavedSettings.getControl("UpdaterMaximumBandwidth")->getSignal()->
- connect(boost::bind(&on_bandwidth_throttle, mUpdater.get(), _2));
- if(gSavedSettings.getU32("UpdaterServiceSetting"))
- {
- bool install_if_ready = true;
- mUpdater->startChecking(install_if_ready);
- }
-
- LLEventPump & updater_pump = LLEventPumps::instance().obtain(LLUpdaterService::pumpName());
- updater_pump.listen("notify_update", &notify_update);
-}
-
//
// This function decides whether the client machine meets the minimum requirements to
// run in a maximized window, per the consensus of davep, boa and nyx on 3/30/2011.
@@ -5663,143 +5427,6 @@ void LLAppViewer::handleLoginComplete()
mSavePerAccountSettings=true;
}
-void LLAppViewer::launchUpdater()
-{
- LLSD query_map = LLSD::emptyMap();
- query_map["os"] = gPlatform;
-
- // *TODO change userserver to be grid on both viewer and sim, since
- // userserver no longer exists.
- query_map["userserver"] = LLGridManager::getInstance()->getGridId();
- query_map["channel"] = LLVersionInfo::getChannel();
- // *TODO constantize this guy
- // *NOTE: This URL is also used in win_setup/lldownloader.cpp
- LLURI update_url = LLURI::buildHTTP("secondlife.com", 80, "update.php", query_map);
-
- if(LLAppViewer::sUpdaterInfo)
- {
- delete LLAppViewer::sUpdaterInfo;
- }
- LLAppViewer::sUpdaterInfo = new LLAppViewer::LLUpdaterInfo() ;
-
- // if a sim name was passed in via command line parameter (typically through a SLURL)
- if ( LLStartUp::getStartSLURL().getType() == LLSLURL::LOCATION )
- {
- // record the location to start at next time
- gSavedSettings.setString( "NextLoginLocation", LLStartUp::getStartSLURL().getSLURLString());
- };
-
-#if LL_WINDOWS
- LLAppViewer::sUpdaterInfo->mUpdateExePath = gDirUtilp->getTempFilename();
- if (LLAppViewer::sUpdaterInfo->mUpdateExePath.empty())
- {
- delete LLAppViewer::sUpdaterInfo ;
- LLAppViewer::sUpdaterInfo = NULL ;
-
- // We're hosed, bail
- LL_WARNS("AppInit") << "LLDir::getTempFilename() failed" << LL_ENDL;
- return;
- }
-
- LLAppViewer::sUpdaterInfo->mUpdateExePath += ".exe";
-
- std::string updater_source = gDirUtilp->getAppRODataDir();
- updater_source += gDirUtilp->getDirDelimiter();
- updater_source += "updater.exe";
-
- LL_DEBUGS("AppInit") << "Calling CopyFile source: " << updater_source
- << " dest: " << LLAppViewer::sUpdaterInfo->mUpdateExePath
- << LL_ENDL;
-
-
- if (!CopyFileA(updater_source.c_str(), LLAppViewer::sUpdaterInfo->mUpdateExePath.c_str(), FALSE))
- {
- delete LLAppViewer::sUpdaterInfo ;
- LLAppViewer::sUpdaterInfo = NULL ;
-
- LL_WARNS("AppInit") << "Unable to copy the updater!" << LL_ENDL;
-
- return;
- }
-
- LLAppViewer::sUpdaterInfo->mParams << "-url \"" << update_url.asString() << "\"";
-
- LL_DEBUGS("AppInit") << "Calling updater: " << LLAppViewer::sUpdaterInfo->mUpdateExePath << " " << LLAppViewer::sUpdaterInfo->mParams.str() << LL_ENDL;
-
- //Explicitly remove the marker file, otherwise we pass the lock onto the child process and things get weird.
- LLAppViewer::instance()->removeMarkerFiles(); // In case updater fails
-
- // *NOTE:Mani The updater is spawned as the last thing before the WinMain exit.
- // see LLAppViewerWin32.cpp
-
-#elif LL_DARWIN
- LLAppViewer::sUpdaterInfo->mUpdateExePath = "'";
- LLAppViewer::sUpdaterInfo->mUpdateExePath += gDirUtilp->getAppRODataDir();
- LLAppViewer::sUpdaterInfo->mUpdateExePath += "/mac-updater.app/Contents/MacOS/mac-updater' -url \"";
- LLAppViewer::sUpdaterInfo->mUpdateExePath += update_url.asString();
- LLAppViewer::sUpdaterInfo->mUpdateExePath += "\" -name \"";
- LLAppViewer::sUpdaterInfo->mUpdateExePath += LLAppViewer::instance()->getSecondLifeTitle();
- LLAppViewer::sUpdaterInfo->mUpdateExePath += "\" -bundleid \"";
- LLAppViewer::sUpdaterInfo->mUpdateExePath += LL_VERSION_BUNDLE_ID;
- LLAppViewer::sUpdaterInfo->mUpdateExePath += "\" &";
-
- LL_DEBUGS("AppInit") << "Calling updater: " << LLAppViewer::sUpdaterInfo->mUpdateExePath << LL_ENDL;
-
- // Run the auto-updater.
- system(LLAppViewer::sUpdaterInfo->mUpdateExePath.c_str()); /* Flawfinder: ignore */
-
-#elif (LL_LINUX || LL_SOLARIS) && LL_GTK
- // we tell the updater where to find the xml containing string
- // translations which it can use for its own UI
- std::string xml_strings_file = "strings.xml";
- std::vector<std::string> xui_path_vec =
- gDirUtilp->findSkinnedFilenames(LLDir::XUI, xml_strings_file);
- std::string xml_search_paths;
- const char* delim = "";
- // build comma-delimited list of xml paths to pass to updater
- BOOST_FOREACH(std::string this_skin_path, xui_path_vec)
- {
- // Although we already have the full set of paths with the filename
- // appended, the linux-updater.bin command-line switches require us to
- // snip the filename OFF and pass it as a separate switch argument. :-P
- LL_INFOS() << "Got a XUI path: " << this_skin_path << LL_ENDL;
- xml_search_paths.append(delim);
- xml_search_paths.append(gDirUtilp->getDirName(this_skin_path));
- delim = ",";
- }
- // build the overall command-line to run the updater correctly
- LLAppViewer::sUpdaterInfo->mUpdateExePath =
- gDirUtilp->getExecutableDir() + "/" + "linux-updater.bin" +
- " --url \"" + update_url.asString() + "\"" +
- " --name \"" + LLAppViewer::instance()->getSecondLifeTitle() + "\"" +
- " --dest \"" + gDirUtilp->getAppRODataDir() + "\"" +
- " --stringsdir \"" + xml_search_paths + "\"" +
- " --stringsfile \"" + xml_strings_file + "\"";
-
- LL_INFOS("AppInit") << "Calling updater: "
- << LLAppViewer::sUpdaterInfo->mUpdateExePath << LL_ENDL;
-
- // *TODO: we could use the gdk equivalent to ensure the updater
- // gets started on the same screen.
- GError *error = NULL;
- if (!g_spawn_command_line_async(LLAppViewer::sUpdaterInfo->mUpdateExePath.c_str(), &error))
- {
- LL_ERRS() << "Failed to launch updater: "
- << error->message
- << LL_ENDL;
- }
- if (error) {
- g_error_free(error);
- }
-#else
- OSMessageBox(LLTrans::getString("MBNoAutoUpdate"), LLStringUtil::null, OSMB_OK);
-#endif
-
- // *REMOVE:Mani - Saving for reference...
- // LLAppViewer::instance()->forceQuit();
-}
-
-
//virtual
void LLAppViewer::setMasterSystemAudioMute(bool mute)
{
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index b5e674bd7b..35d85a9fb1 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -55,7 +55,6 @@ class LLTextureCache;
class LLImageDecodeThread;
class LLTextureFetch;
class LLWatchdogTimeout;
-class LLUpdaterService;
class LLViewerJoystick;
extern LLTrace::BlockTimerStatHandle FTM_FRAME;
@@ -228,7 +227,6 @@ private:
bool initThreads(); // Initialize viewer threads, return false on failure.
bool initConfiguration(); // Initialize settings from the command line/config file.
void initStrings(); // Initialize LLTrans machinery
- void initUpdater(); // Initialize the updater service.
bool initCache(); // Initialize local client cache.
void checkMemory() ;
@@ -310,27 +308,10 @@ private:
LLAllocator mAlloc;
LLFrameTimer mMemCheckTimer;
-
- boost::scoped_ptr<LLUpdaterService> mUpdater;
// llcorehttp library init/shutdown helper
LLAppCoreHttp mAppCoreHttp;
- //---------------------------------------------
- //*NOTE: Mani - legacy updater stuff
- // Still useable?
-public:
-
- //some information for updater
- typedef struct
- {
- std::string mUpdateExePath;
- std::ostringstream mParams;
- }LLUpdaterInfo ;
- static LLUpdaterInfo *sUpdaterInfo ;
-
- void launchUpdater();
- //---------------------------------------------
};
// consts from viewer.h
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index 4786f83bfd..6d879f6416 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -361,17 +361,6 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
delete viewer_app_ptr;
viewer_app_ptr = NULL;
- //start updater
- if(LLAppViewer::sUpdaterInfo)
- {
- _spawnl(_P_NOWAIT, LLAppViewer::sUpdaterInfo->mUpdateExePath.c_str(), LLAppViewer::sUpdaterInfo->mUpdateExePath.c_str(), LLAppViewer::sUpdaterInfo->mParams.str().c_str(), NULL);
-
- delete LLAppViewer::sUpdaterInfo ;
- LLAppViewer::sUpdaterInfo = NULL ;
- }
-
-
-
// (NVAPI) (6) We clean up. This is analogous to doing a free()
if (hSession)
{
diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp
index bababca652..0d262e73ef 100644
--- a/indra/newview/llfloaterabout.cpp
+++ b/indra/newview/llfloaterabout.cpp
@@ -39,7 +39,6 @@
#include "llslurl.h"
#include "llvoiceclient.h"
#include "lluictrlfactory.h"
-#include "llupdaterservice.h"
#include "llviewertexteditor.h"
#include "llviewercontrol.h"
#include "llviewerstats.h"
@@ -91,10 +90,6 @@ public:
void onClickCopyToClipboard();
void onClickUpdateCheck();
- // checks state of updater service and starts a check outside of schedule.
- // subscribes callback for closest state update
- static void setUpdateListener();
-
private:
void setSupportText(const std::string& server_release_notes_url);
@@ -103,9 +98,6 @@ private:
// callback method for manual checks
static bool callbackCheckUpdate(LLSD const & event);
-
- // listener name for update checks
- static const std::string sCheckUpdateListenerName;
static void startFetchServerReleaseNotes();
static void handleServerReleaseNotes(LLSD results);
@@ -139,9 +131,6 @@ BOOL LLFloaterAbout::postBuild()
getChild<LLUICtrl>("copy_btn")->setCommitCallback(
boost::bind(&LLFloaterAbout::onClickCopyToClipboard, this));
- getChild<LLUICtrl>("update_btn")->setCommitCallback(
- boost::bind(&LLFloaterAbout::onClickUpdateCheck, this));
-
static const LLUIColor about_color = LLUIColorTable::instance().getColor("TextFgReadOnlyColor");
if (gAgent.getRegion())
@@ -289,11 +278,6 @@ void LLFloaterAbout::onClickCopyToClipboard()
support_widget->deselect();
}
-void LLFloaterAbout::onClickUpdateCheck()
-{
- setUpdateListener();
-}
-
void LLFloaterAbout::setSupportText(const std::string& server_release_notes_url)
{
#if LL_WINDOWS
@@ -315,68 +299,6 @@ void LLFloaterAbout::setSupportText(const std::string& server_release_notes_url)
}
///----------------------------------------------------------------------------
-/// Floater About Update-check related functions
-///----------------------------------------------------------------------------
-
-const std::string LLFloaterAbout::sCheckUpdateListenerName = "LLUpdateNotificationListener";
-
-void LLFloaterAbout::showCheckUpdateNotification(S32 state)
-{
- switch (state)
- {
- case LLUpdaterService::UP_TO_DATE:
- LLNotificationsUtil::add("UpdateViewerUpToDate");
- break;
- case LLUpdaterService::DOWNLOADING:
- case LLUpdaterService::INSTALLING:
- LLNotificationsUtil::add("UpdateDownloadInProgress");
- break;
- case LLUpdaterService::TERMINAL:
- // download complete, user triggered check after download pop-up appeared
- LLNotificationsUtil::add("UpdateDownloadComplete");
- break;
- default:
- LLNotificationsUtil::add("UpdateCheckError");
- break;
- }
-}
-
-bool LLFloaterAbout::callbackCheckUpdate(LLSD const & event)
-{
- if (!event.has("payload"))
- {
- return false;
- }
-
- LLSD payload = event["payload"];
- if (payload.has("type") && payload["type"].asInteger() == LLUpdaterService::STATE_CHANGE)
- {
- LLEventPumps::instance().obtain("mainlooprepeater").stopListening(sCheckUpdateListenerName);
- showCheckUpdateNotification(payload["state"].asInteger());
- }
- return false;
-}
-
-void LLFloaterAbout::setUpdateListener()
-{
- LLUpdaterService update_service;
- S32 service_state = update_service.getState();
- // Note: Do not set state listener before forceCheck() since it set's new state
- if (update_service.forceCheck() || service_state == LLUpdaterService::CHECKING_FOR_UPDATE)
- {
- LLEventPump& mainloop(LLEventPumps::instance().obtain("mainlooprepeater"));
- if (mainloop.getListener(sCheckUpdateListenerName) == LLBoundListener()) // dummy listener
- {
- mainloop.listen(sCheckUpdateListenerName, boost::bind(&callbackCheckUpdate, _1));
- }
- }
- else
- {
- showCheckUpdateNotification(service_state);
- }
-}
-
-///----------------------------------------------------------------------------
/// LLFloaterAboutUtil
///----------------------------------------------------------------------------
void LLFloaterAboutUtil::registerFloater()
@@ -386,8 +308,3 @@ void LLFloaterAboutUtil::registerFloater()
}
-void LLFloaterAboutUtil::checkUpdatesAndNotify()
-{
- LLFloaterAbout::setUpdateListener();
-}
-
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index b4d0bb6823..b9e9c12aec 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -50,13 +50,12 @@
#include "llwindow.h"
#include "llviewerwindow.h"
#include "llprogressview.h"
-#if LL_LINUX || LL_SOLARIS
+#if LL_LINUX
#include "lltrans.h"
#endif
#include "llsecapi.h"
#include "llstartup.h"
#include "llmachineid.h"
-#include "llupdaterservice.h"
#include "llevents.h"
#include "llappviewer.h"
@@ -68,406 +67,11 @@ public:
virtual ~Disposable() {}
};
-namespace {
- class MandatoryUpdateMachine:
- public LLLoginInstance::Disposable
- {
- public:
- MandatoryUpdateMachine(LLLoginInstance & loginInstance, LLUpdaterService & updaterService);
-
- void start(void);
-
- LLNotificationsInterface& getNotificationsInterface() const
- {
- return mLoginInstance.getNotificationsInterface();
- }
-
- private:
- class State;
- class CheckingForUpdate;
- class Error;
- class ReadyToInstall;
- class StartingUpdaterService;
- class WaitingForDownload;
-
- boost::scoped_ptr<State> mState;
- LLLoginInstance & mLoginInstance;
- LLUpdaterService & mUpdaterService;
-
- void setCurrentState(State * newState);
- };
-
-
- class MandatoryUpdateMachine::State {
- public:
- virtual ~State() {}
- virtual void enter(void) {}
- virtual void exit(void) {}
- };
-
-
- class MandatoryUpdateMachine::CheckingForUpdate:
- public MandatoryUpdateMachine::State
- {
- public:
- CheckingForUpdate(MandatoryUpdateMachine & machine);
-
- virtual void enter(void);
- virtual void exit(void);
-
- private:
- LLTempBoundListener mConnection;
- MandatoryUpdateMachine & mMachine;
- LLProgressView * mProgressView;
-
- bool onEvent(LLSD const & event);
- };
-
-
- class MandatoryUpdateMachine::Error:
- public MandatoryUpdateMachine::State
- {
- public:
- Error(MandatoryUpdateMachine & machine);
-
- virtual void enter(void);
- virtual void exit(void);
- void onButtonClicked(const LLSD &, const LLSD &);
-
- private:
- MandatoryUpdateMachine & mMachine;
- };
-
-
- class MandatoryUpdateMachine::ReadyToInstall:
- public MandatoryUpdateMachine::State
- {
- public:
- ReadyToInstall(MandatoryUpdateMachine & machine);
-
- virtual void enter(void);
- virtual void exit(void);
-
- private:
- //MandatoryUpdateMachine & mMachine;
- };
-
-
- class MandatoryUpdateMachine::StartingUpdaterService:
- public MandatoryUpdateMachine::State
- {
- public:
- StartingUpdaterService(MandatoryUpdateMachine & machine);
-
- virtual void enter(void);
- virtual void exit(void);
- void onButtonClicked(const LLSD & uiform, const LLSD & result);
- private:
- MandatoryUpdateMachine & mMachine;
- };
-
-
- class MandatoryUpdateMachine::WaitingForDownload:
- public MandatoryUpdateMachine::State
- {
- public:
- WaitingForDownload(MandatoryUpdateMachine & machine);
-
- virtual void enter(void);
- virtual void exit(void);
-
- private:
- LLTempBoundListener mConnection;
- MandatoryUpdateMachine & mMachine;
- LLProgressView * mProgressView;
-
- bool onEvent(LLSD const & event);
- };
-}
-
static const char * const TOS_REPLY_PUMP = "lllogininstance_tos_callback";
static const char * const TOS_LISTENER_NAME = "lllogininstance_tos";
std::string construct_start_string();
-
-
-// MandatoryUpdateMachine
-//-----------------------------------------------------------------------------
-
-
-MandatoryUpdateMachine::MandatoryUpdateMachine(LLLoginInstance & loginInstance, LLUpdaterService & updaterService):
- mLoginInstance(loginInstance),
- mUpdaterService(updaterService)
-{
- ; // No op.
-}
-
-
-void MandatoryUpdateMachine::start(void)
-{
- LL_INFOS() << "starting mandatory update machine" << LL_ENDL;
-
- if(mUpdaterService.isChecking()) {
- switch(mUpdaterService.getState()) {
- case LLUpdaterService::UP_TO_DATE:
- mUpdaterService.stopChecking();
- mUpdaterService.startChecking();
- // Fall through.
- case LLUpdaterService::INITIAL:
- case LLUpdaterService::CHECKING_FOR_UPDATE:
- setCurrentState(new CheckingForUpdate(*this));
- break;
- case LLUpdaterService::TEMPORARY_ERROR:
- setCurrentState(new Error(*this));
- break;
- case LLUpdaterService::DOWNLOADING:
- setCurrentState(new WaitingForDownload(*this));
- break;
- case LLUpdaterService::TERMINAL:
- if(LLUpdaterService::updateReadyToInstall()) {
- setCurrentState(new ReadyToInstall(*this));
- } else {
- setCurrentState(new Error(*this));
- }
- break;
- case LLUpdaterService::FAILURE:
- setCurrentState(new Error(*this));
- break;
- default:
- llassert(!"unpossible case");
- break;
- }
- } else {
- setCurrentState(new StartingUpdaterService(*this));
- }
-}
-
-
-void MandatoryUpdateMachine::setCurrentState(State * newStatePointer)
-{
- {
- boost::scoped_ptr<State> newState(newStatePointer);
- if(mState != 0) mState->exit();
- mState.swap(newState);
-
- // Old state will be deleted on exit from this block before the new state
- // is entered.
- }
- if(mState != 0) mState->enter();
-}
-
-
-
-// MandatoryUpdateMachine::CheckingForUpdate
-//-----------------------------------------------------------------------------
-
-
-MandatoryUpdateMachine::CheckingForUpdate::CheckingForUpdate(MandatoryUpdateMachine & machine):
- mMachine(machine)
-{
- ; // No op.
-}
-
-
-void MandatoryUpdateMachine::CheckingForUpdate::enter(void)
-{
- LL_INFOS() << "entering checking for update" << LL_ENDL;
-
- mProgressView = gViewerWindow->getProgressView();
- mProgressView->setMessage("Looking for update...");
- mProgressView->setText("There is a required update for your Second Life installation.");
- mProgressView->setPercent(0);
- mProgressView->setVisible(true);
- mConnection = LLEventPumps::instance().obtain(LLUpdaterService::pumpName()).
- listen("MandatoryUpdateMachine::CheckingForUpdate", boost::bind(&MandatoryUpdateMachine::CheckingForUpdate::onEvent, this, _1));
-}
-
-
-void MandatoryUpdateMachine::CheckingForUpdate::exit(void)
-{
-}
-
-
-bool MandatoryUpdateMachine::CheckingForUpdate::onEvent(LLSD const & event)
-{
- if(event["type"].asInteger() == LLUpdaterService::STATE_CHANGE) {
- switch(event["state"].asInteger()) {
- case LLUpdaterService::DOWNLOADING:
- mMachine.setCurrentState(new WaitingForDownload(mMachine));
- break;
- case LLUpdaterService::TEMPORARY_ERROR:
- case LLUpdaterService::UP_TO_DATE:
- case LLUpdaterService::TERMINAL:
- case LLUpdaterService::FAILURE:
- mProgressView->setVisible(false);
- mMachine.setCurrentState(new Error(mMachine));
- break;
- case LLUpdaterService::INSTALLING:
- llassert(!"can't possibly be installing");
- break;
- default:
- break;
- }
- } else {
- ; // Ignore.
- }
-
- return false;
-}
-
-
-
-// MandatoryUpdateMachine::Error
-//-----------------------------------------------------------------------------
-
-
-MandatoryUpdateMachine::Error::Error(MandatoryUpdateMachine & machine):
- mMachine(machine)
-{
- ; // No op.
-}
-
-
-void MandatoryUpdateMachine::Error::enter(void)
-{
- LL_INFOS() << "entering error" << LL_ENDL;
- mMachine.getNotificationsInterface().add("FailedRequiredUpdateInstall", LLSD(), LLSD(), boost::bind(&MandatoryUpdateMachine::Error::onButtonClicked, this, _1, _2));
-}
-
-
-void MandatoryUpdateMachine::Error::exit(void)
-{
- LLAppViewer::instance()->forceQuit();
-}
-
-
-void MandatoryUpdateMachine::Error::onButtonClicked(const LLSD &, const LLSD &)
-{
- mMachine.setCurrentState(0);
-}
-
-
-
-// MandatoryUpdateMachine::ReadyToInstall
-//-----------------------------------------------------------------------------
-
-
-MandatoryUpdateMachine::ReadyToInstall::ReadyToInstall(MandatoryUpdateMachine & machine) //:
- //mMachine(machine)
-{
- ; // No op.
-}
-
-
-void MandatoryUpdateMachine::ReadyToInstall::enter(void)
-{
- LL_INFOS() << "entering ready to install" << LL_ENDL;
- // Open update ready dialog.
-}
-
-
-void MandatoryUpdateMachine::ReadyToInstall::exit(void)
-{
- // Restart viewer.
-}
-
-
-
-// MandatoryUpdateMachine::StartingUpdaterService
-//-----------------------------------------------------------------------------
-
-
-MandatoryUpdateMachine::StartingUpdaterService::StartingUpdaterService(MandatoryUpdateMachine & machine):
- mMachine(machine)
-{
- ; // No op.
-}
-
-
-void MandatoryUpdateMachine::StartingUpdaterService::enter(void)
-{
- LL_INFOS() << "entering start update service" << LL_ENDL;
- mMachine.getNotificationsInterface().add("UpdaterServiceNotRunning", LLSD(), LLSD(), boost::bind(&MandatoryUpdateMachine::StartingUpdaterService::onButtonClicked, this, _1, _2));
-}
-
-
-void MandatoryUpdateMachine::StartingUpdaterService::exit(void)
-{
- ; // No op.
-}
-
-
-void MandatoryUpdateMachine::StartingUpdaterService::onButtonClicked(const LLSD & uiform, const LLSD & result)
-{
- if(result["OK_okcancelbuttons"].asBoolean()) {
- mMachine.mUpdaterService.startChecking(false);
- mMachine.setCurrentState(new CheckingForUpdate(mMachine));
- } else {
- LLAppViewer::instance()->forceQuit();
- }
-}
-
-
-
-// MandatoryUpdateMachine::WaitingForDownload
-//-----------------------------------------------------------------------------
-
-
-MandatoryUpdateMachine::WaitingForDownload::WaitingForDownload(MandatoryUpdateMachine & machine):
- mMachine(machine),
- mProgressView(0)
-{
- ; // No op.
-}
-
-
-void MandatoryUpdateMachine::WaitingForDownload::enter(void)
-{
- LL_INFOS() << "entering waiting for download" << LL_ENDL;
- mProgressView = gViewerWindow->getProgressView();
- mProgressView->setMessage("Downloading update...");
- std::ostringstream stream;
- stream << "There is a required update for your Second Life installation." << std::endl <<
- "Version " << mMachine.mUpdaterService.updatedVersion();
- mProgressView->setText(stream.str());
- mProgressView->setPercent(0);
- mProgressView->setVisible(true);
- mConnection = LLEventPumps::instance().obtain(LLUpdaterService::pumpName()).
- listen("MandatoryUpdateMachine::CheckingForUpdate", boost::bind(&MandatoryUpdateMachine::WaitingForDownload::onEvent, this, _1));
-}
-
-
-void MandatoryUpdateMachine::WaitingForDownload::exit(void)
-{
- mProgressView->setVisible(false);
-}
-
-
-bool MandatoryUpdateMachine::WaitingForDownload::onEvent(LLSD const & event)
-{
- switch(event["type"].asInteger()) {
- case LLUpdaterService::DOWNLOAD_COMPLETE:
- mMachine.setCurrentState(new ReadyToInstall(mMachine));
- break;
- case LLUpdaterService::DOWNLOAD_ERROR:
- mMachine.setCurrentState(new Error(mMachine));
- break;
- case LLUpdaterService::PROGRESS: {
- double downloadSize = event["download_size"].asReal();
- double bytesDownloaded = event["bytes_downloaded"].asReal();
- mProgressView->setPercent(100. * bytesDownloaded / downloadSize);
- break;
- }
- default:
- break;
- }
-
- return false;
-}
-
-
-
// LLLoginInstance
//-----------------------------------------------------------------------------
@@ -476,11 +80,9 @@ LLLoginInstance::LLLoginInstance() :
mLoginModule(new LLLogin()),
mNotifications(NULL),
mLoginState("offline"),
- mSkipOptionalUpdate(false),
mAttemptComplete(false),
mTransferRate(0.0f),
- mDispatcher("LLLoginInstance", "change"),
- mUpdaterService(0)
+ mDispatcher("LLLoginInstance", "change")
{
mLoginModule->getEventPump().listen("lllogininstance",
boost::bind(&LLLoginInstance::handleLoginEvent, this, _1));
@@ -590,18 +192,11 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
// (re)initialize the request params with creds.
LLSD request_params = user_credential->getLoginParams();
- unsigned char hashed_unique_id_string[MD5HEX_STR_SIZE];
- if ( ! llHashedUniqueID(hashed_unique_id_string) )
- {
- LL_WARNS() << "Not providing a unique id in request params" << LL_ENDL;
- }
request_params["start"] = construct_start_string();
- request_params["skipoptional"] = mSkipOptionalUpdate;
request_params["agree_to_tos"] = false; // Always false here. Set true in
request_params["read_critical"] = false; // handleTOSResponse
request_params["last_exec_event"] = mLastExecEvent;
request_params["last_exec_duration"] = mLastExecDuration;
- request_params["mac"] = (char*)hashed_unique_id_string;
request_params["version"] = LLVersionInfo::getVersion();
request_params["channel"] = LLVersionInfo::getChannel();
request_params["platform"] = mPlatform;
@@ -698,19 +293,6 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
boost::bind(&LLLoginInstance::handleTOSResponse,
this, _1, "read_critical"));
}
- else if(reason_response == "update" || gSavedSettings.getBOOL("ForceMandatoryUpdate"))
- {
- LL_INFOS() << "LLLoginInstance::handleLoginFailure update" << LL_ENDL;
-
- gSavedSettings.setBOOL("ForceMandatoryUpdate", FALSE);
- updateApp(true, message_response);
- }
- else if(reason_response == "optional")
- {
- LL_INFOS() << "LLLoginInstance::handleLoginFailure optional" << LL_ENDL;
-
- updateApp(false, message_response);
- }
else
{
LL_INFOS() << "LLLoginInstance::handleLoginFailure attemptComplete" << LL_ENDL;
@@ -722,22 +304,7 @@ void LLLoginInstance::handleLoginSuccess(const LLSD& event)
{
LL_INFOS() << "LLLoginInstance::handleLoginSuccess" << LL_ENDL;
- if(gSavedSettings.getBOOL("ForceMandatoryUpdate"))
- {
- LLSD response = event["data"];
- std::string message_response = response["message"].asString();
-
- // Testing update...
- gSavedSettings.setBOOL("ForceMandatoryUpdate", FALSE);
-
- // Don't confuse startup by leaving login "online".
- mLoginModule->disconnect();
- updateApp(true, message_response);
- }
- else
- {
- attemptComplete();
- }
+ attemptComplete();
}
void LLLoginInstance::handleDisconnect(const LLSD& event)
@@ -787,135 +354,6 @@ bool LLLoginInstance::handleTOSResponse(bool accepted, const std::string& key)
return true;
}
-
-void LLLoginInstance::updateApp(bool mandatory, const std::string& auth_msg)
-{
- if(mandatory)
- {
- gViewerWindow->setShowProgress(false);
- MandatoryUpdateMachine * machine = new MandatoryUpdateMachine(*this, *mUpdaterService);
- mUpdateStateMachine.reset(machine);
- machine->start();
- return;
- }
-
- // store off config state, as we might quit soon
- gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE);
- LLUIColorTable::instance().saveUserSettings();
-
- std::ostringstream message;
- std::string msg;
- if (!auth_msg.empty())
- {
- msg = "(" + auth_msg + ") \n";
- }
-
- LLSD args;
- args["MESSAGE"] = msg;
-
- LLSD payload;
- payload["mandatory"] = mandatory;
-
- /*
- * We're constructing one of the following 9 strings here:
- * "DownloadWindowsMandatory"
- * "DownloadWindowsReleaseForDownload"
- * "DownloadWindows"
- * "DownloadMacMandatory"
- * "DownloadMacReleaseForDownload"
- * "DownloadMac"
- * "DownloadLinuxMandatory"
- * "DownloadLinuxReleaseForDownload"
- * "DownloadLinux"
- *
- * I've called them out explicitly in this comment so that they can be grepped for.
- */
- std::string notification_name = "Download";
-
-#if LL_WINDOWS
- notification_name += "Windows";
-#elif LL_DARWIN
- notification_name += "Mac";
-#else
- notification_name += "Linux";
-#endif
-
- if (mandatory)
- {
- notification_name += "Mandatory";
- }
- else
- {
-#if LL_RELEASE_FOR_DOWNLOAD
- notification_name += "ReleaseForDownload";
-#endif
- }
-
- if(mNotifications)
- {
- mNotifications->add(notification_name, args, payload,
- boost::bind(&LLLoginInstance::updateDialogCallback, this, _1, _2));
-
- gViewerWindow->setShowProgress(false);
- }
-}
-
-bool LLLoginInstance::updateDialogCallback(const LLSD& notification, const LLSD& response)
-{
- S32 option = LLNotification::getSelectedOption(notification, response);
- std::string update_exe_path;
- bool mandatory = notification["payload"]["mandatory"].asBoolean();
-
-#if !LL_RELEASE_FOR_DOWNLOAD
- if (option == 2)
- {
- // This condition attempts to skip the
- // update if using a dev build.
- // The relog probably won't work if the
- // update is mandatory. :)
-
- // *REMOVE:Mani - Saving for reference...
- //LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT );
- mSkipOptionalUpdate = true;
- reconnect();
- return false;
- }
-#endif
-
- if (option == 1)
- {
- // ...user doesn't want to do it
- if (mandatory)
- {
- // Mandatory update, user chose to not to update...
- // The login attemp is complete, startup should
- // quit when detecting this.
- attemptComplete();
-
- // *REMOVE:Mani - Saving for reference...
- //LLAppViewer::instance()->forceQuit();
- // // Bump them back to the login screen.
- // //reset_login();
- }
- else
- {
- // Optional update, user chose to skip
- mSkipOptionalUpdate = true;
- reconnect();
- }
- return false;
- }
-
- if(mUpdaterLauncher)
- {
- mUpdaterLauncher();
- }
-
- attemptComplete();
-
- return false;
-}
-
std::string construct_start_string()
{
std::string start;
diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h
index c6773bbf68..dfd39e4752 100644
--- a/indra/newview/lllogininstance.h
+++ b/indra/newview/lllogininstance.h
@@ -34,7 +34,6 @@
class LLLogin;
class LLEventStream;
class LLNotificationsInterface;
-class LLUpdaterService;
// This class hosts the login module and is used to
// negotiate user authentication attempts.
@@ -60,10 +59,6 @@ public:
// Only valid when authSuccess == true.
const F64 getLastTransferRateBPS() { return mTransferRate; }
-
- // Whether to tell login to skip optional update request.
- // False by default.
- void setSkipOptionalUpdate(bool state) { mSkipOptionalUpdate = state; }
void setSerialNumber(const std::string& sn) { mSerialNumber = sn; }
void setLastExecEvent(int lee) { mLastExecEvent = lee; }
void setLastExecDuration(S32 duration) { mLastExecDuration = duration; }
@@ -72,10 +67,6 @@ public:
void setNotificationsInterface(LLNotificationsInterface* ni) { mNotifications = ni; }
LLNotificationsInterface& getNotificationsInterface() const { return *mNotifications; }
- typedef boost::function<void()> UpdaterLauncherCallback;
- void setUpdaterLauncher(const UpdaterLauncherCallback& ulc) { mUpdaterLauncher = ulc; }
-
- void setUpdaterService(LLUpdaterService * updaterService) { mUpdaterService = updaterService; }
private:
void constructAuthParams(LLPointer<LLCredential> user_credentials);
void updateApp(bool mandatory, const std::string& message);
@@ -97,7 +88,6 @@ private:
std::string mLoginState;
LLSD mRequestData;
LLSD mResponseData;
- bool mSkipOptionalUpdate;
bool mAttemptComplete;
F64 mTransferRate;
std::string mSerialNumber;
@@ -105,10 +95,7 @@ private:
S32 mLastExecDuration;
std::string mPlatform;
std::string mPlatformVersion;
- UpdaterLauncherCallback mUpdaterLauncher;
LLEventDispatcher mDispatcher;
- LLUpdaterService * mUpdaterService;
- boost::scoped_ptr<Disposable> mUpdateStateMachine;
};
#endif
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index a2c8e7772e..62ca3434d7 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1009,7 +1009,6 @@ bool idle_startup()
login->setSerialNumber(LLAppViewer::instance()->getSerialNumber());
login->setLastExecEvent(gLastExecEvent);
login->setLastExecDuration(gLastExecDuration);
- login->setUpdaterLauncher(boost::bind(&LLAppViewer::launchUpdater, LLAppViewer::instance()));
// This call to LLLoginInstance::connect() starts the
// authentication process.
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 16f40fb747..2cf56582f5 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -74,7 +74,6 @@
#include "llspellcheck.h"
#include "llslurl.h"
#include "llstartup.h"
-#include "llupdaterservice.h"
// Third party library includes
#include <boost/algorithm/string.hpp>
@@ -575,19 +574,6 @@ bool toggle_show_object_render_cost(const LLSD& newvalue)
return true;
}
-void toggle_updater_service_active(const LLSD& new_value)
-{
- if(new_value.asInteger())
- {
- LLUpdaterService update_service;
- if(!update_service.isChecking()) update_service.startChecking();
- }
- else
- {
- LLUpdaterService().stopChecking();
- }
-}
-
////////////////////////////////////////////////////////////////////////////
void settings_setup_listeners()
@@ -735,7 +721,6 @@ void settings_setup_listeners()
gSavedSettings.getControl("ShowNavbarNavigationPanel")->getSignal()->connect(boost::bind(&toggle_show_navigation_panel, _2));
gSavedSettings.getControl("ShowMiniLocationPanel")->getSignal()->connect(boost::bind(&toggle_show_mini_location_panel, _2));
gSavedSettings.getControl("ShowObjectRenderingCost")->getSignal()->connect(boost::bind(&toggle_show_object_render_cost, _2));
- gSavedSettings.getControl("UpdaterServiceSetting")->getSignal()->connect(boost::bind(&toggle_updater_service_active, _2));
gSavedSettings.getControl("ForceShowGrid")->getSignal()->connect(boost::bind(&handleForceShowGrid, _2));
gSavedSettings.getControl("RenderTransparentWater")->getSignal()->connect(boost::bind(&handleRenderTransparentWaterChanged, _2));
gSavedSettings.getControl("SpellCheck")->getSignal()->connect(boost::bind(&handleSpellCheckChanged));
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 99a9ed1d75..1b1bbd5071 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -2119,22 +2119,6 @@ class LLAdvancedCheckShowObjectUpdates : public view_listener_t
-///////////////////////
-// CHECK FOR UPDATES //
-///////////////////////
-
-
-
-class LLAdvancedCheckViewerUpdates : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- LLFloaterAboutUtil::checkUpdatesAndNotify();
- return true;
- }
-};
-
-
////////////////////
// COMPRESS IMAGE //
////////////////////
@@ -8918,7 +8902,6 @@ void initialize_menus()
// Advanced (toplevel)
view_listener_t::addMenu(new LLAdvancedToggleShowObjectUpdates(), "Advanced.ToggleShowObjectUpdates");
view_listener_t::addMenu(new LLAdvancedCheckShowObjectUpdates(), "Advanced.CheckShowObjectUpdates");
- view_listener_t::addMenu(new LLAdvancedCheckViewerUpdates(), "Advanced.CheckViewerUpdates");
view_listener_t::addMenu(new LLAdvancedCompressImage(), "Advanced.CompressImage");
view_listener_t::addMenu(new LLAdvancedShowDebugSettings(), "Advanced.ShowDebugSettings");
view_listener_t::addMenu(new LLAdvancedEnableViewAdminOptions(), "Advanced.EnableViewAdminOptions");
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index 1b0334498e..b43aaeaa33 100644
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -193,36 +193,6 @@ void LLAppViewer::forceQuit(void) {}
LLAppViewer * LLAppViewer::sInstance = 0;
//-----------------------------------------------------------------------------
-#include "llupdaterservice.h"
-
-std::string const & LLUpdaterService::pumpName(void)
-{
- static std::string wakka = "wakka wakka wakka";
- return wakka;
-}
-bool LLUpdaterService::updateReadyToInstall(void) { return false; }
-void LLUpdaterService::initialize(const std::string& channel,
- const std::string& version,
- const std::string& platform,
- const std::string& platform_version,
- const unsigned char uniqueid[MD5HEX_STR_SIZE],
- const bool& willing_to_test
- ) {}
-
-void LLUpdaterService::setCheckPeriod(unsigned int seconds) {}
-void LLUpdaterService::startChecking(bool install_if_ready) {}
-void LLUpdaterService::stopChecking() {}
-bool LLUpdaterService::isChecking() { return false; }
-LLUpdaterService::eUpdaterState LLUpdaterService::getState() { return INITIAL; }
-std::string LLUpdaterService::updatedVersion() { return ""; }
-
-bool llHashedUniqueID(unsigned char* id)
-{
- memcpy( id, "66666666666666666666666666666666", MD5HEX_STR_SIZE );
- return true;
-}
-
-//-----------------------------------------------------------------------------
#include "llnotifications.h"
#include "llfloaterreg.h"
static std::string gTOSType;
@@ -338,7 +308,6 @@ namespace tut
gSavedSettings.declareBOOL("NoInventoryLibrary", FALSE, "", LLControlVariable::PERSIST_NO);
gSavedSettings.declareBOOL("ConnectAsGod", FALSE, "", LLControlVariable::PERSIST_NO);
gSavedSettings.declareBOOL("UseDebugMenus", FALSE, "", LLControlVariable::PERSIST_NO);
- gSavedSettings.declareBOOL("ForceMandatoryUpdate", FALSE, "", LLControlVariable::PERSIST_NO);
gSavedSettings.declareString("ClientSettingsFile", "test_settings.xml", "", LLControlVariable::PERSIST_NO);
gSavedSettings.declareString("NextLoginLocation", "", "", LLControlVariable::PERSIST_NO);
gSavedSettings.declareBOOL("LoginLastLocation", FALSE, "", LLControlVariable::PERSIST_NO);
@@ -476,110 +445,4 @@ namespace tut
logininstance->connect(test_uri, agentCredential);
ensure_equals("Default for agree to tos", gLoginCreds["params"]["read_critical"].asBoolean(), false);
}
-
- template<> template<>
- void lllogininstance_object::test<3>()
- {
- set_test_name("Test Mandatory Update User Accepts");
-
- // Part 1 - Mandatory Update, with User accepts response.
- // Test connect with update needed.
- logininstance->connect(agentCredential);
-
- ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI);
-
- // Update needed failure response.
- LLSD response;
- response["state"] = "offline";
- response["change"] = "fail.login";
- response["progress"] = 0.0;
- response["transfer_rate"] = 7;
- response["data"]["reason"] = "update";
- gTestPump.post(response);
-
- ensure_equals("Notification added", notifications.addedCount(), 1);
-
- notifications.sendYesResponse();
-
- ensure("Disconnected", !(logininstance->authSuccess()));
- }
-
- template<> template<>
- void lllogininstance_object::test<4>()
- {
- set_test_name("Test Mandatory Update User Decline");
-
- // Test connect with update needed.
- logininstance->connect(agentCredential);
-
- ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI);
-
- // Update needed failure response.
- LLSD response;
- response["state"] = "offline";
- response["change"] = "fail.login";
- response["progress"] = 0.0;
- response["transfer_rate"] = 7;
- response["data"]["reason"] = "update";
- gTestPump.post(response);
-
- ensure_equals("Notification added", notifications.addedCount(), 1);
- notifications.sendNoResponse();
-
- ensure("Disconnected", !(logininstance->authSuccess()));
- }
-
- template<> template<>
- void lllogininstance_object::test<6>()
- {
- set_test_name("Test Optional Update User Accept");
-
- // Part 3 - Mandatory Update, with bogus response.
- // Test connect with update needed.
- logininstance->connect(agentCredential);
-
- ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI);
-
- // Update needed failure response.
- LLSD response;
- response["state"] = "offline";
- response["change"] = "fail.login";
- response["progress"] = 0.0;
- response["transfer_rate"] = 7;
- response["data"]["reason"] = "optional";
- gTestPump.post(response);
-
- ensure_equals("Notification added", notifications.addedCount(), 1);
- notifications.sendYesResponse();
-
- ensure("Disconnected", !(logininstance->authSuccess()));
- }
-
- template<> template<>
- void lllogininstance_object::test<7>()
- {
- set_test_name("Test Optional Update User Denies");
-
- // Part 3 - Mandatory Update, with bogus response.
- // Test connect with update needed.
- logininstance->connect(agentCredential);
-
- ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI);
-
- // Update needed failure response.
- LLSD response;
- response["state"] = "offline";
- response["change"] = "fail.login";
- response["progress"] = 0.0;
- response["transfer_rate"] = 7;
- response["data"]["reason"] = "optional";
- gTestPump.post(response);
-
- ensure_equals("Notification added", notifications.addedCount(), 1);
- notifications.sendNoResponse();
-
- // User skips, should be reconnecting.
- ensure_equals("reconnect uri", gLoginURI, VIEWERLOGIN_URI);
- ensure_equals("skipping optional update", gLoginCreds["params"]["skipoptional"].asBoolean(), true);
- }
}