From c8c143e7741d2b93b589d770b64c265228293564 Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Thu, 18 Aug 2016 13:05:30 -0700 Subject: SL-323: first pass at ripping out old updater --- indra/newview/tests/lllogininstance_test.cpp | 137 --------------------------- 1 file changed, 137 deletions(-) (limited to 'indra/newview/tests') 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 @@ -192,36 +192,6 @@ const std::string &LLVersionInfo::getChannel() { return VIEWERLOGIN_CHANNEL; } 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" @@ -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); - } } -- cgit v1.3 From 2699ef356aae4f31246ab6ccb6613676a2e2cc0f Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Mon, 22 Aug 2016 09:36:00 -0700 Subject: SL-323: ripping out old code completed --- indra/newview/CMakeLists.txt | 1 - indra/newview/tests/lllogininstance_test.cpp | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview/tests') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 7a0df8d207..999165528a 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2300,7 +2300,6 @@ if (LL_TESTS) set_source_files_properties( lllogininstance.cpp - llhasheduniqueid.cpp PROPERTIES LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_SYSTEM_LIBRARY}" ) diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index b43aaeaa33..aa05897c0b 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -186,6 +186,13 @@ void LLUIColorTable::saveUserSettings(void)const {} #include "../llversioninfo.h" const std::string &LLVersionInfo::getVersion() { return VIEWERLOGIN_VERSION; } const std::string &LLVersionInfo::getChannel() { return VIEWERLOGIN_CHANNEL; } +const int MD5HEX_STR_SIZE = 33; // char hex[MD5HEX_STR_SIZE]; with null + +bool llHashedUniqueID(unsigned char* id) +{ + memcpy( id, "66666666666666666666666666666666", MD5HEX_STR_SIZE ); + return true; +} //----------------------------------------------------------------------------- #include "../llappviewer.h" -- cgit v1.3 From 9ec3b1bb039bdb40fce6aee66ce68ce8cabfb785 Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Wed, 1 Mar 2017 13:19:34 -0800 Subject: SL-321: fix merge removal of llhasheduniqueid from from llloginstance_test's include path --- indra/newview/tests/lllogininstance_test.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/tests') diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index 55dcb83567..5397feeab8 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -31,6 +31,9 @@ #include "../llviewernetwork.h" #include "../lllogininstance.h" + // Needed for Auth Test + #include "../llhasheduniqueid.h" + // STL headers // std headers // external library headers -- cgit v1.3 From 49552a874c659a7e4864e276f4250d498676a559 Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Wed, 1 Mar 2017 23:28:11 -0800 Subject: SL-321: remove redundant const declaration of MD5HEX_STR_SIZE in llversioninfo, remove extraneous python variable assignment in CMakeLists, run tests with INFO --- indra/cmake/run_build_test.py | 2 +- indra/newview/CMakeLists.txt | 2 -- indra/newview/tests/lllogininstance_test.cpp | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) (limited to 'indra/newview/tests') diff --git a/indra/cmake/run_build_test.py b/indra/cmake/run_build_test.py index f02c5e98b4..210e43b232 100755 --- a/indra/cmake/run_build_test.py +++ b/indra/cmake/run_build_test.py @@ -312,7 +312,7 @@ if __name__ == "__main__": import argparse parser = argparse.ArgumentParser() parser.add_argument("-d", "--debug", dest="loglevel", action="store_const", - const=logging.DEBUG, default=logging.WARNING) + const=logging.DEBUG, default=logging.INFO) parser.add_argument("-D", "--define", dest="vars", default=[], action="append", metavar="VAR=value", help="Add VAR=value to the env variables defined") diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 9badc95a72..fe360171fb 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1756,8 +1756,6 @@ if (WINDOWS) ${SHARED_LIB_STAGING_DIR}/Debug/fmodexL.dll ) endif (FMODEX) - - get_filename_component(PYTHON_DIRECTORY ${PYTHON_EXECUTABLE} DIRECTORY) add_custom_command( OUTPUT ${CMAKE_CFG_INTDIR}/copy_touched.bat diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index 5397feeab8..3b7ec48d61 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -190,7 +190,6 @@ void LLUIColorTable::saveUserSettings(void)const {} #include "../llversioninfo.h" const std::string &LLVersionInfo::getVersion() { return VIEWERLOGIN_VERSION; } const std::string &LLVersionInfo::getChannel() { return VIEWERLOGIN_CHANNEL; } -const int MD5HEX_STR_SIZE = 33; // char hex[MD5HEX_STR_SIZE]; with null bool llHashedUniqueID(unsigned char* id) { -- cgit v1.3 From 9c5332b301c0e17cd0133944670f79fd485cf7fe Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Mon, 6 Mar 2017 14:43:57 -0800 Subject: SL-321: reintegration of autobuild as package, build changes for mac integration --- autobuild.xml | 46 ++++++++++++++++++++++++++++++ indra/newview/CMakeLists.txt | 1 + indra/newview/llversioninfo.cpp | 1 + indra/newview/tests/llversioninfo_test.cpp | 6 +++- indra/newview/viewer_manifest.py | 46 +++++++++++------------------- 5 files changed, 70 insertions(+), 30 deletions(-) (limited to 'indra/newview/tests') diff --git a/autobuild.xml b/autobuild.xml index a655c7cae2..2f7ad05ecd 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -3023,6 +3023,52 @@ version 0.8.0.1 + viewer-manager + + copyright + Copyright (c) 2000-2012, Linden Research, Inc. + description + Linden Lab Viewer Management Process suite. + license + Proprietary + license_file + LICENSE + name + viewer-manager + platforms + + darwin64 + + archive + + hash + b7a7d155a70413bce9a7a25ad54c37e7 + url + http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/3073/7235/viewer_manager-1.0-darwin64-503061.tar.bz2 + + name + darwin64 + + windows + + archive + + hash + 0c1a369a3e5ed6363a306e6135797851 + url + http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/3074/7241/viewer_manager-1.0-windows-503061.tar.bz2 + + name + windows + + + source + https://bitbucket.org/lindenlab/vmp-standalone + source_type + hg + version + 1.0 + vlc-bin copyright diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index fe360171fb..7a62d8baec 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -47,6 +47,7 @@ include(TemplateCheck) include(UI) include(UnixInstall) include(ViewerMiscLibs) +include(ViewerManager) include(VisualLeakDetector) include(ZLIB) include(URIPARSER) diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp index 375dce485d..bf9d98ee91 100644 --- a/indra/newview/llversioninfo.cpp +++ b/indra/newview/llversioninfo.cpp @@ -64,6 +64,7 @@ S32 LLVersionInfo::getPatch() //static S32 LLVersionInfo::getBuild() { + std::cout << "What we have IN llversioninfo: " << LL_VIEWER_VERSION_BUILD << std::endl; return LL_VIEWER_VERSION_BUILD; } diff --git a/indra/newview/tests/llversioninfo_test.cpp b/indra/newview/tests/llversioninfo_test.cpp index f1f69f33f1..2f7a4e9601 100644 --- a/indra/newview/tests/llversioninfo_test.cpp +++ b/indra/newview/tests/llversioninfo_test.cpp @@ -29,6 +29,8 @@ #include "../llversioninfo.h" + #include + // LL_VIEWER_CHANNEL is a macro defined on the compiler command line. The // macro expands to the string name of the channel, but without quotes. We // need to turn it into a quoted string. This macro trick does that. @@ -81,7 +83,9 @@ namespace tut template<> template<> void versioninfo_object_t::test<1>() - { + { + std::cout << "What we parsed from CMake: " << LL_VIEWER_VERSION_BUILD << std::endl; + std::cout << "What we get from llversioninfo: " << LLVersionInfo::getBuild() << std::endl; ensure_equals("Major version", LLVersionInfo::getMajor(), LL_VIEWER_VERSION_MAJOR); diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 35d63c33fc..1dc178dcf8 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -223,7 +223,7 @@ class ViewerManifest(LLManifest): return channel_type def channel_variant_app_suffix(self): - # get any part of the compiled channel name after the CHANNEL_VENDOR_BASE + # get any part of the channel name after the CHANNEL_VENDOR_BASE suffix=self.channel_variant() # by ancient convention, we don't use Release in the app name if self.channel_type() == 'release': @@ -346,15 +346,12 @@ class WindowsManifest(ViewerManifest): if self.is_packaging_viewer(): # Find secondlife-bin.exe in the 'configuration' dir, then rename it to the result of final_exe. self.path(src='%s/secondlife-bin.exe' % self.args['configuration'], dst=self.final_exe()) - # include the compiled launcher script so that it gets included in the file_list - self.path(src='%s/SL_Launcher.exe' % self.args['configuration'], dst="SL_Launcher.exe") # Plugin host application self.path2basename(os.path.join(os.pardir, 'llplugin', 'slplugin', self.args['configuration']), "slplugin.exe") - #note, launcher and friends do not need viewer_manifest in Windows as the scripts are compiled into executables # Get shared libs from the shared libs staging directory if self.prefix(src=os.path.join(os.pardir, 'sharedlibs', self.args['configuration']), dst=""): @@ -709,28 +706,29 @@ class DarwinManifest(ViewerManifest): pkgdir = os.path.join(self.args['build'], os.pardir, 'packages') relpkgdir = os.path.join(pkgdir, "lib", "release") debpkgdir = os.path.join(pkgdir, "lib", "debug") - llbasedir = os.path.join(pkgdir, os.pardir) + vmpdir = os.path.join(pkgdir, "VMP") + llbasedir = os.path.join(pkgdir, "VMP") if self.prefix(src="", dst="Contents"): # everything goes in Contents self.path("Info.plist", dst="Info.plist") # copy additional libs in /Contents/MacOS/ self.path(os.path.join(relpkgdir, "libndofdev.dylib"), dst="Resources/libndofdev.dylib") - self.path(os.path.join(relpkgdir, "libhunspell-1.3.0.dylib"), dst="Resources/libhunspell-1.3.0.dylib") + self.path(os.path.join(relpkgdir, "libhunspell-1.3.0.dylib"), dst="Resources/libhunspell-1.3.0.dylib") if self.prefix(dst="MacOS"): - self.path2basename("../viewer_components/updater/scripts/darwin", "*.py") #this copies over the python wrapper script, associated utilities and required libraries, see SL-321, SL-322 and SL-323 - self.path2basename("../viewer_components/manager","SL_Launcher") - self.path2basename("../viewer_components/manager","*.py") + self.path2basename(vmpdir,"SL_Launcher") + self.path2basename(vmpdir,"*.py") llbase_path = os.path.join(self.get_dst_prefix(),'llbase') if not os.path.exists(llbase_path): os.makedirs(llbase_path) + #before, we only needed llbase at build time. With VMP, we need it at run time. if self.prefix(dst="llbase"): - self.path2basename("../packages/llbase","*.py") - self.path2basename("../packages/llbase","_cllsd.so") + self.path2basename(llbasedir,"*.py") + self.path2basename(llbasedir,"_cllsd.so") self.end_prefix() - self.end_prefix() + self.end_prefix() # most everything goes in the Resources directory if self.prefix(src="", dst="Resources"): @@ -749,6 +747,12 @@ class DarwinManifest(ViewerManifest): self.path("secondlife.icns") self.end_prefix(icon_path) + #VMP Tkinter icons + if self.prefix("vmp_icons"): + self.path("*.png") + self.path("*.gif") + self.end_prefix("vmp_icons") + self.path("SecondLife.nib") # Translations @@ -773,12 +777,6 @@ class DarwinManifest(ViewerManifest): self.path("uk.lproj") self.path("zh-Hans.lproj") - #VMP icons - if self.prefix("vmp_icons"): - self.path("*.png") - self.path("*.gif") - self.end_prefix("vmp_icons") - def path_optional(src, dst): """ For a number of our self.path() calls, not only do we want @@ -1145,17 +1143,7 @@ class LinuxManifest(ViewerManifest): if self.prefix(src="", dst="bin"): self.path("secondlife-bin","do-not-directly-run-secondlife-bin") self.path("../linux_crash_logger/linux-crash-logger","linux-crash-logger.bin") - self.path2basename("../llplugin/slplugin", "SLPlugin") - #this copies over the python wrapper script, associated utilities and required libraries, see SL-321, SL-322 and SL-323 - self.path2basename("../viewer_components/manager","SL_Launcher") - self.path2basename("../viewer_components/manager","*.py") - llbase_path = os.path.join(self.get_dst_prefix(),'llbase') - if not os.path.exists(llbase_path): - os.makedirs(llbase_path) - if self.prefix(dst="llbase"): - self.path2basename("../packages/llbase","*.py") - self.path2basename("../packages/llbase","_cllsd.so") - self.end_prefix() + self.path2basename("../llplugin/slplugin", "SLPlugin") self.end_prefix("bin") if self.prefix("res-sdl"): -- cgit v1.3 From 222919be87386af66bba836fbb9495b64b4007f4 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 30 Nov 2016 20:10:28 -0500 Subject: DRTVWR-418: Adjust for LL_VIEWER_CHANNEL coming in unquoted. Evidently the LL_VIEWER_CHANNEL macro (defined on the compiler command line) used to contain enclosing double quotes. Something changed (newer CMake version?) so that the macro now expands as Second Life Release rather than as "Second Life Release". That leads to syntax errors when it's used. Add C++ preprocessor trickery to stringize the value of the macro. --- indra/newview/llversioninfo.cpp | 8 +++++++- indra/newview/tests/llversioninfo_test.cpp | 11 +++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) (limited to 'indra/newview/tests') diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp index a0ca91672a..375dce485d 100644 --- a/indra/newview/llversioninfo.cpp +++ b/indra/newview/llversioninfo.cpp @@ -99,10 +99,16 @@ const std::string &LLVersionInfo::getShortVersion() namespace { + // LL_VIEWER_CHANNEL is a macro defined on the compiler command line. The + // macro expands to the string name of the channel, but without quotes. We + // need to turn it into a quoted string. This macro trick does that. +#define stringize_inner(x) #x +#define stringize_outer(x) stringize_inner(x) + /// Storage of the channel name the viewer is using. // The channel name is set by hardcoded constant, // or by calling LLVersionInfo::resetChannel() - std::string sWorkingChannelName(LL_VIEWER_CHANNEL); + std::string sWorkingChannelName(stringize_outer(LL_VIEWER_CHANNEL)); // Storage for the "version and channel" string. // This will get reset too. diff --git a/indra/newview/tests/llversioninfo_test.cpp b/indra/newview/tests/llversioninfo_test.cpp index 6b0be29c2d..f1f69f33f1 100644 --- a/indra/newview/tests/llversioninfo_test.cpp +++ b/indra/newview/tests/llversioninfo_test.cpp @@ -29,6 +29,13 @@ #include "../llversioninfo.h" +// LL_VIEWER_CHANNEL is a macro defined on the compiler command line. The +// macro expands to the string name of the channel, but without quotes. We +// need to turn it into a quoted string. This macro trick does that. +#define stringize_inner(x) #x +#define stringize_outer(x) stringize_inner(x) +#define ll_viewer_channel stringize_outer(LL_VIEWER_CHANNEL) + namespace tut { struct versioninfo @@ -50,7 +57,7 @@ namespace tut mShortVersion = stream.str(); stream.str(""); - stream << LL_VIEWER_CHANNEL + stream << ll_viewer_channel << " " << mVersion; mVersionAndChannel = stream.str(); @@ -89,7 +96,7 @@ namespace tut LL_VIEWER_VERSION_BUILD); ensure_equals("Channel version", LLVersionInfo::getChannel(), - LL_VIEWER_CHANNEL); + ll_viewer_channel); ensure_equals("Version String", LLVersionInfo::getVersion(), mVersion); -- cgit v1.3 From 612ff7b6b3f3abb56ff6bf8331e2a1cd04c04066 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 14 Aug 2017 07:15:18 -0400 Subject: MAINT-7640: Notify the user if login is blocked for a required viewer update --- indra/newview/lllogininstance.cpp | 41 ++- indra/newview/lllogininstance.h | 1 + .../newview/skins/default/xui/en/notifications.xml | 333 +-------------------- indra/newview/tests/lllogininstance_test.cpp | 14 + 4 files changed, 56 insertions(+), 333 deletions(-) (limited to 'indra/newview/tests') diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 229703bb39..b953534e13 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -31,6 +31,7 @@ // llcommon #include "llevents.h" #include "stringize.h" +#include "llsdserialize.h" // llmessage (!) #include "llfiltersd2xmlrpc.h" // for xml_escape_string() @@ -47,12 +48,10 @@ #include "llstartup.h" #include "llfloaterreg.h" #include "llnotifications.h" +#include "llnotificationsutil.h" #include "llwindow.h" #include "llviewerwindow.h" #include "llprogressview.h" -#if LL_LINUX -#include "lltrans.h" -#endif #include "llsecapi.h" #include "llstartup.h" #include "llmachineid.h" @@ -250,8 +249,6 @@ bool LLLoginInstance::handleLoginEvent(const LLSD& event) void LLLoginInstance::handleLoginFailure(const LLSD& event) { - - // Login has failed. // Figure out why and respond... LLSD response = event["data"]; @@ -302,13 +299,42 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event) boost::bind(&LLLoginInstance::handleTOSResponse, this, _1, "read_critical")); } + else if(reason_response == "update") + { + // This shouldn't happen - the viewer manager should have forced an update; + // possibly the user ran the viewer directly and bypassed the update check + std::string required_version = response["message_args"]["VERSION"]; + LL_WARNS() << "Login failed because an update to version " << required_version << " is required." << LL_ENDL; + + if (gViewerWindow) + gViewerWindow->setShowProgress(FALSE); + + LLSD data(LLSD::emptyMap()); + data["VERSION"] = required_version; + LLNotificationsUtil::add("RequiredUpdate", data, LLSD::emptyMap(), boost::bind(&LLLoginInstance::handleLoginDisallowed, this, _1, _2)); + } + else if(reason_response == "key") + { + // this is a password problem or other restriction + // an appropriate message has already been displayed + attemptComplete(); + } else { - LL_INFOS() << "LLLoginInstance::handleLoginFailure attemptComplete" << LL_ENDL; - attemptComplete(); + LL_WARNS() << "Login failed for an unknown reason: " << LLSDOStreamer(response) << LL_ENDL; + + if (gViewerWindow) + gViewerWindow->setShowProgress(FALSE); + + LLNotificationsUtil::add("LoginFailedUnknown", LLSD::emptyMap(), LLSD::emptyMap(), boost::bind(&LLLoginInstance::handleLoginDisallowed, this, _1, _2)); } } +void LLLoginInstance::handleLoginDisallowed(const LLSD& notification, const LLSD& response) +{ + attemptComplete(); +} + void LLLoginInstance::handleLoginSuccess(const LLSD& event) { LL_INFOS() << "LLLoginInstance::handleLoginSuccess" << LL_ENDL; @@ -363,6 +389,7 @@ bool LLLoginInstance::handleTOSResponse(bool accepted, const std::string& key) return true; } + std::string construct_start_string() { std::string start; diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h index 67d0f01ba6..f53c02c6e1 100644 --- a/indra/newview/lllogininstance.h +++ b/indra/newview/lllogininstance.h @@ -77,6 +77,7 @@ private: void handleLoginSuccess(const LLSD& event); void handleDisconnect(const LLSD& event); void handleIndeterminate(const LLSD& event); + void handleLoginDisallowed(const LLSD& notification, const LLSD& response); bool handleTOSResponse(bool v, const std::string& key); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 1a7c9229a3..c1e82d7be3 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -3825,151 +3825,12 @@ Please set the object for sale and try again. -Finished download of raw terrain file to: -[DOWNLOAD_PATH]. - - - -A new version of [APP_NAME] is available. -[MESSAGE] -You must download this update to use [APP_NAME]. +Version [VERSION] is required for login. +This should have been updated for you but apparently was not. +Please download from https://secondlife.com/support/downloads/ confirm - - - - -An updated version of [APP_NAME] is available. -[MESSAGE] -This update is not required, but we suggest you install it to improve performance and stability. - confirm - - - - -An updated version of [APP_NAME] is available. -[MESSAGE] -This update is not required, but we suggest you install it to improve performance and stability. - confirm - - - - -A new version of [APP_NAME] is available. -[MESSAGE] -You must download this update to use [APP_NAME]. - confirm - - - - -An updated version of [APP_NAME] is available. -[MESSAGE] -This update is not required, but we suggest you install it to improve performance and stability. - confirm - - - - -An updated version of [APP_NAME] is available. -[MESSAGE] -This update is not required, but we suggest you install it to improve performance and stability. - confirm - - - - -A new version of [APP_NAME] is available. -[MESSAGE] -You must download this update to use [APP_NAME]. - -Download to your Applications folder? - confirm - - - - -An updated version of [APP_NAME] is available. -[MESSAGE] -This update is not required, but we suggest you install it to improve performance and stability. - -Download to your Applications folder? - confirm - - - - -An updated version of [APP_NAME] is available. -[MESSAGE] -This update is not required, but we suggest you install it to improve performance and stability. - -Download to your Applications folder? - confirm - - - - -An error occurred installing the viewer update. -Please download and install the latest viewer from -http://secondlife.com/download. @@ -3977,193 +3838,13 @@ http://secondlife.com/download. -We were unable to install a required update. -You will be unable to log in until [APP_NAME] has been updated. - -Please download and install the latest viewer from -http://secondlife.com/download. - fail - - - - -There is a required update for your Second Life Installation. - -You may download this update from http://www.secondlife.com/downloads -or you can install it now. - confirm - - - - -We have downloaded an update to your [APP_NAME] installation. -Version [VERSION] [[INFO_URL] Information about this update] - confirm - - - - -We have downloaded an update to your [APP_NAME] installation. - Version [VERSION] [[INFO_URL] Information about this update] - confirm - - - - -We have downloaded a required software update. -Version [VERSION] [[INFO_URL] Information about this update] - -We must restart [APP_NAME] to install the update. +Login failed for an unrecognized reason. confirm - - - -We must restart [APP_NAME] to install the update. -[[INFO_URL] Information about this update] - confirm - - - - -We have downloaded an update to your [APP_NAME] installation. -Version [VERSION] -This experimental viewer has been replaced by a [NEW_CHANNEL] viewer; -see [[INFO_URL] for details about this update] - confirm - - - - -We have downloaded an update to your [APP_NAME] installation. -Version [VERSION] -This experimental viewer has been replaced by a [NEW_CHANNEL] viewer; -see [[INFO_URL] Information about this update] - confirm - - - - -We have downloaded a required software update. -Version [VERSION] -This experimental viewer has been replaced by a [NEW_CHANNEL] viewer; -see [[INFO_URL] Information about this update] - -We must restart [APP_NAME] to install the update. - confirm - - - - -We must restart [APP_NAME] to install the update. -This experimental viewer has been replaced by a [NEW_CHANNEL] viewer; -see [[INFO_URL] Information about this update] - confirm - - - - -An update is available! -It's downloading in the background and we will prompt you to restart your viewer to finish installing it as soon as it's ready. - confirm - - - - -An update was downloaded. It will be installed during restart. - confirm - - - - -An update was downloaded that you previously chose to skip or defer to the next start up. - confirm - - - - -Your viewer is up to date! -If you can't wait to try out the latest features and fixes, check out the Alternate Viewers page. http://wiki.secondlife.com/wiki/Linden_Lab_Official:Alternate_Viewers. - confirm - + yestext="Sorry"/> functor) +{ + return LLNotificationPtr((LLNotification*)NULL); +} + +LLNotificationPtr LLNotificationsUtil::add(const std::string& name, const LLSD& args) +{ + return LLNotificationPtr((LLNotification*)NULL); +} + //----------------------------------------------------------------------------- #include "../llviewernetwork.h" LLGridManager::~LLGridManager() -- cgit v1.3