From be8c9fc21758bcbc1d9f3d565b221310344231bd Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Wed, 27 Oct 2010 17:07:31 -0700 Subject: CHOP-122 Initializing Facade service in the viewer. Rev. by Brad. --- indra/newview/CMakeLists.txt | 2 ++ indra/newview/app_settings/settings.xml | 35 ++++++++++++++++++++++++++++++++- indra/newview/llappviewer.cpp | 25 ++++++++++++++++++++++- indra/newview/llappviewer.h | 11 +++++++++-- indra/newview/lltranslate.cpp | 12 +++++------ 5 files changed, 75 insertions(+), 10 deletions(-) (limited to 'indra/newview') 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 @@ Value 15 - UploadBakedTexOld + UpdaterServiceActive + + Comment + Enable or disable the updater service. + Persist + 1 + Type + Boolean + Value + 1 + + UpdaterServiceCheckPeriod + + Comment + Default period between update checking. + Persist + 1 + Type + U32 + Value + 3600 + + UpdaterServiceURL + + Comment + Default location for the updater service. + Persist + 0 + Type + String + Value + http://secondlife.com/app/update + + UploadBakedTexOld Comment Forces the baked texture pipeline to upload using the old method. 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(gSavedSettings,"Randomize Framerate", FALSE)), mPeriodicSlowFrame(LLCachedControl(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 mPlugins; + boost::scoped_ptr 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()) { -- cgit v1.2.3 From ca9594af28ce2e1cc8bb333a0fa7384dae718a9a Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Thu, 28 Oct 2010 16:47:05 -0700 Subject: shell of the update checker; it will just print a message to the log depending on the result of the check one time. --- indra/newview/llappviewer.cpp | 8 ++++---- indra/newview/lltranslate.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e6feaae504..06300141be 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -632,9 +632,6 @@ 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(); @@ -980,7 +977,10 @@ bool LLAppViewer::mainLoop() gServicePump = new LLPumpIO(gAPRPoolp); LLHTTPClient::setPump(*gServicePump); LLCurl::setCAFile(gDirUtilp->getCAFile()); - + + // Initialize updater service (now that we have an io pump) + initUpdater(); + // Note: this is where gLocalSpeakerMgr and gActiveSpeakerMgr used to be instantiated. LLVoiceChannel::initClass(); diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp index 21467a2ab8..8ccfdb071b 100644 --- a/indra/newview/lltranslate.cpp +++ b/indra/newview/lltranslate.cpp @@ -64,7 +64,7 @@ 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)", - LLVersionInfo::getChannel(), + LLVersionInfo::getChannel().c_str(), LLVersionInfo::getMajor(), LLVersionInfo::getMinor(), LLVersionInfo::getPatch(), -- cgit v1.2.3 From 609f5bd6810ca16a409f209610e6fac972348cba Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Fri, 29 Oct 2010 11:20:54 -0700 Subject: added periodic retry to look for updates --- indra/newview/app_settings/settings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 371326c0f5..5b9bfd0f9c 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11011,7 +11011,7 @@ Type U32 Value - 3600 + 10 UpdaterServiceURL @@ -11022,7 +11022,7 @@ Type String Value - http://secondlife.com/app/update + http://localhost/agni UploadBakedTexOld -- cgit v1.2.3 From 064a8d079917ecd91bd6b47f5f7f353989594593 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Fri, 29 Oct 2010 11:22:07 -0700 Subject: restore 1hr polling frequency --- indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 5b9bfd0f9c..274c7fbeb8 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11011,7 +11011,7 @@ Type U32 Value - 10 + 3600 UpdaterServiceURL -- cgit v1.2.3 From 6ab2e44e945ddc085a7b4b5f1524de924419a897 Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Mon, 1 Nov 2010 15:18:18 -0700 Subject: VWR-23666 Removed setting VersionChannelName. LLVersionInfo::resetChannel() and unit tests. Reviewed by brad. --- indra/newview/CMakeLists.txt | 1 + indra/newview/app_settings/cmd_line.xml | 3 +- indra/newview/app_settings/settings.xml | 11 --- indra/newview/llappviewer.cpp | 25 +++--- indra/newview/llcurrencyuimanager.cpp | 4 +- indra/newview/llfloaterabout.cpp | 4 +- indra/newview/lllogininstance.cpp | 5 +- indra/newview/llpanellogin.cpp | 4 +- indra/newview/llversioninfo.cpp | 37 ++++++++- indra/newview/llversioninfo.h | 7 ++ indra/newview/llviewercontrol.cpp | 1 - indra/newview/llviewercontrol.h | 2 - indra/newview/llviewermedia.cpp | 2 +- indra/newview/llviewerstats.cpp | 3 +- indra/newview/tests/lllogininstance_test.cpp | 9 ++- indra/newview/tests/llversioninfo_test.cpp | 114 +++++++++++++++++++++++++++ 16 files changed, 189 insertions(+), 43 deletions(-) create mode 100644 indra/newview/tests/llversioninfo_test.cpp (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 63982ba87b..a488fb1069 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1858,6 +1858,7 @@ if (LL_TESTS) llmediadataclient.cpp lllogininstance.cpp llviewerhelputil.cpp + llversioninfo.cpp ) ################################################## diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml index 00d69f805e..a17da8e344 100644 --- a/indra/newview/app_settings/cmd_line.xml +++ b/indra/newview/app_settings/cmd_line.xml @@ -361,8 +361,7 @@ count 1 - map-to - VersionChannelName + loginpage diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 371326c0f5..96d4fb1295 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11344,17 +11344,6 @@ Value 0 - VersionChannelName - - Comment - Versioning Channel Name. - Persist - 0 - Type - String - Value - Second Life Release - VertexShaderEnable Comment diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e6feaae504..b122209af8 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -662,11 +662,6 @@ bool LLAppViewer::init() initThreads(); writeSystemInfo(); - // Build a string representing the current version number. - gCurrentVersion = llformat("%s %s", - gSavedSettings.getString("VersionChannelName").c_str(), - LLVersionInfo::getVersion().c_str()); - ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// @@ -905,7 +900,8 @@ bool LLAppViewer::init() gDebugInfo["GraphicsCard"] = LLFeatureManager::getInstance()->getGPUString(); // Save the current version to the prefs file - gSavedSettings.setString("LastRunVersion", gCurrentVersion); + gSavedSettings.setString("LastRunVersion", + LLVersionInfo::getVersionAndChannel()); gSimLastTime = gRenderStartTime.getElapsedTimeF32(); gSimFrames = (F32)gFrameCount; @@ -1941,8 +1937,6 @@ bool LLAppViewer::initConfiguration() gSavedSettings.setString("ClientSettingsFile", gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Global"))); - gSavedSettings.setString("VersionChannelName", LLVersionInfo::getChannel()); - #ifndef LL_RELEASE_FOR_DOWNLOAD // provide developer build only overrides for these control variables that are not // persisted to settings.xml @@ -2074,6 +2068,11 @@ bool LLAppViewer::initConfiguration() } } + if(clp.hasOption("channel")) + { + LLVersionInfo::resetChannel(clp.getOption("channel")[0]); + } + // If we have specified crash on startup, set the global so we'll trigger the crash at the right time if(clp.hasOption("crashonstartup")) @@ -2336,7 +2335,7 @@ void LLAppViewer::initUpdater() // Get Channel // Get Version std::string url = gSavedSettings.getString("UpdaterServiceURL"); - std::string channel = gSavedSettings.getString("VersionChannelName"); + std::string channel = LLVersionInfo::getChannel(); std::string version = LLVersionInfo::getVersion(); U32 check_period = gSavedSettings.getU32("UpdaterServiceCheckPeriod"); @@ -2538,7 +2537,7 @@ void LLAppViewer::writeSystemInfo() { gDebugInfo["SLLog"] = LLError::logFileName(); - gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName"); + gDebugInfo["ClientInfo"]["Name"] = LLVersionInfo::getChannel(); gDebugInfo["ClientInfo"]["MajorVersion"] = LLVersionInfo::getMajor(); gDebugInfo["ClientInfo"]["MinorVersion"] = LLVersionInfo::getMinor(); gDebugInfo["ClientInfo"]["PatchVersion"] = LLVersionInfo::getPatch(); @@ -2636,7 +2635,7 @@ 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"] = gSavedSettings.getString("VersionChannelName"); + gDebugInfo["ClientInfo"]["Name"] = LLVersionInfo::getChannel(); gDebugInfo["ClientInfo"]["MajorVersion"] = LLVersionInfo::getMajor(); gDebugInfo["ClientInfo"]["MinorVersion"] = LLVersionInfo::getMinor(); @@ -4363,7 +4362,7 @@ void LLAppViewer::handleLoginComplete() initMainloopTimeout("Mainloop Init"); // Store some data to DebugInfo in case of a freeze. - gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName"); + gDebugInfo["ClientInfo"]["Name"] = LLVersionInfo::getChannel(); gDebugInfo["ClientInfo"]["MajorVersion"] = LLVersionInfo::getMajor(); gDebugInfo["ClientInfo"]["MinorVersion"] = LLVersionInfo::getMinor(); @@ -4469,7 +4468,7 @@ void LLAppViewer::launchUpdater() // *TODO change userserver to be grid on both viewer and sim, since // userserver no longer exists. query_map["userserver"] = LLGridManager::getInstance()->getGridLabel(); - query_map["channel"] = gSavedSettings.getString("VersionChannelName"); + 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); diff --git a/indra/newview/llcurrencyuimanager.cpp b/indra/newview/llcurrencyuimanager.cpp index 2b92b228b3..b4a1457f47 100644 --- a/indra/newview/llcurrencyuimanager.cpp +++ b/indra/newview/llcurrencyuimanager.cpp @@ -166,7 +166,7 @@ void LLCurrencyUIManager::Impl::updateCurrencyInfo() gAgent.getSecureSessionID().asString()); keywordArgs.appendString("language", LLUI::getLanguage()); keywordArgs.appendInt("currencyBuy", mUserCurrencyBuy); - keywordArgs.appendString("viewerChannel", gSavedSettings.getString("VersionChannelName")); + keywordArgs.appendString("viewerChannel", LLVersionInfo::getChannel()); keywordArgs.appendInt("viewerMajorVersion", LLVersionInfo::getMajor()); keywordArgs.appendInt("viewerMinorVersion", LLVersionInfo::getMinor()); keywordArgs.appendInt("viewerPatchVersion", LLVersionInfo::getPatch()); @@ -241,7 +241,7 @@ void LLCurrencyUIManager::Impl::startCurrencyBuy(const std::string& password) { keywordArgs.appendString("password", password); } - keywordArgs.appendString("viewerChannel", gSavedSettings.getString("VersionChannelName")); + keywordArgs.appendString("viewerChannel", LLVersionInfo::getChannel()); keywordArgs.appendInt("viewerMajorVersion", LLVersionInfo::getMajor()); keywordArgs.appendInt("viewerMinorVersion", LLVersionInfo::getMinor()); keywordArgs.appendInt("viewerPatchVersion", LLVersionInfo::getPatch()); diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 135137069c..8ae3ccbae3 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -213,7 +213,7 @@ LLSD LLFloaterAbout::getInfo() info["VIEWER_VERSION_STR"] = LLVersionInfo::getVersion(); info["BUILD_DATE"] = __DATE__; info["BUILD_TIME"] = __TIME__; - info["CHANNEL"] = gSavedSettings.getString("VersionChannelName"); + info["CHANNEL"] = LLVersionInfo::getChannel(); info["VIEWER_RELEASE_NOTES_URL"] = get_viewer_release_notes_url(); @@ -291,7 +291,7 @@ static std::string get_viewer_release_notes_url() std::string url = LLTrans::getString("RELEASE_NOTES_BASE_URL"); if (! LLStringUtil::endsWith(url, "/")) url += "/"; - url += gSavedSettings.getString("VersionChannelName") + "/"; + url += LLVersionInfo::getChannel() + "/"; url += LLVersionInfo::getShortVersion(); return LLWeb::escapeURL(url); } diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 029e700c4c..fe84aca147 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -42,6 +42,7 @@ // newview #include "llviewernetwork.h" #include "llviewercontrol.h" +#include "llversioninfo.h" #include "llslurl.h" #include "llstartup.h" #include "llfloaterreg.h" @@ -181,8 +182,8 @@ void LLLoginInstance::constructAuthParams(LLPointer user_credentia request_params["read_critical"] = false; // handleTOSResponse request_params["last_exec_event"] = mLastExecEvent; request_params["mac"] = hashed_unique_id_string; - request_params["version"] = gCurrentVersion; // Includes channel name - request_params["channel"] = gSavedSettings.getString("VersionChannelName"); + request_params["version"] = LLVersionInfo::getVersionAndChannel(); // Includes channel name + request_params["channel"] = LLVersionInfo::getChannel(); request_params["id0"] = mSerialNumber; mRequestData.clear(); diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 467aefc60f..cf567fb208 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -230,7 +230,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, getChild("login")->setDefaultBtn("connect_btn"); - std::string channel = gSavedSettings.getString("VersionChannelName"); + std::string channel = LLVersionInfo::getChannel(); std::string version = llformat("%s (%d)", LLVersionInfo::getShortVersion().c_str(), LLVersionInfo::getBuild()); @@ -817,7 +817,7 @@ void LLPanelLogin::loadLoginPage() LLVersionInfo::getShortVersion().c_str(), LLVersionInfo::getBuild()); - char* curl_channel = curl_escape(gSavedSettings.getString("VersionChannelName").c_str(), 0); + char* curl_channel = curl_escape(LLVersionInfo::getChannel().c_str(), 0); char* curl_version = curl_escape(version.c_str(), 0); oStr << "&channel=" << curl_channel; diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp index 733d05834a..53994c68f2 100644 --- a/indra/newview/llversioninfo.cpp +++ b/indra/newview/llversioninfo.cpp @@ -95,9 +95,42 @@ const std::string &LLVersionInfo::getShortVersion() return version; } +namespace +{ + /// 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_CHANNEL); + + // Storage for the "version and channel" string. + // This will get reset too. + std::string sVersionChannel(""); +} + +//static +const std::string &LLVersionInfo::getVersionAndChannel() +{ + if (sVersionChannel.empty()) + { + // cache the version string + std::ostringstream stream; + stream << LLVersionInfo::getVersion() + << " " + << LLVersionInfo::getChannel(); + sVersionChannel = stream.str(); + } + + return sVersionChannel; +} + //static const std::string &LLVersionInfo::getChannel() { - static std::string name(LL_CHANNEL); - return name; + return sWorkingChannelName; +} + +void LLVersionInfo::resetChannel(const std::string& channel) +{ + sWorkingChannelName = channel; + sVersionChannel.clear(); // Reset version and channel string til next use. } diff --git a/indra/newview/llversioninfo.h b/indra/newview/llversioninfo.h index e468b6ae4e..36defbcd68 100644 --- a/indra/newview/llversioninfo.h +++ b/indra/newview/llversioninfo.h @@ -58,8 +58,15 @@ public: /// return the viewer version as a string like "2.0.0" static const std::string &getShortVersion(); + /// return the viewer version and channel as a string + /// like "2.0.0.200030 Second Life Release" + static const std::string &getVersionAndChannel(); + /// return the channel name, e.g. "Second Life" static const std::string &getChannel(); + + /// reset the channel name used by the viewer. + static void resetChannel(const std::string& channel); }; #endif diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 522b5a7dfa..ebe9f7e275 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -82,7 +82,6 @@ LLControlGroup gCrashSettings("CrashSettings"); // saved at end of session LLControlGroup gWarningSettings("Warnings"); // persists ignored dialogs/warnings std::string gLastRunVersion; -std::string gCurrentVersion; extern BOOL gResizeScreenTexture; extern BOOL gDebugGL; diff --git a/indra/newview/llviewercontrol.h b/indra/newview/llviewercontrol.h index 22b48f8906..d7191f5c8d 100644 --- a/indra/newview/llviewercontrol.h +++ b/indra/newview/llviewercontrol.h @@ -57,7 +57,5 @@ extern LLControlGroup gCrashSettings; // Set after settings loaded extern std::string gLastRunVersion; -extern std::string gCurrentVersion; - #endif // LL_LLVIEWERCONTROL_H diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 48ab122edf..13fbce910b 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -492,7 +492,7 @@ std::string LLViewerMedia::getCurrentUserAgent() // Just in case we need to check browser differences in A/B test // builds. - std::string channel = gSavedSettings.getString("VersionChannelName"); + std::string channel = LLVersionInfo::getChannel(); // append our magic version number string to the browser user agent id // See the HTTP 1.0 and 1.1 specifications for allowed formats: diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 42266ad233..3b7e44668d 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -48,6 +48,7 @@ #include "llagent.h" #include "llagentcamera.h" #include "llviewercontrol.h" +#include "llversioninfo.h" #include "llfloatertools.h" #include "lldebugview.h" #include "llfasttimerview.h" @@ -749,7 +750,7 @@ void send_stats() // send fps only for time app spends in foreground agent["fps"] = (F32)gForegroundFrameCount / gForegroundTime.getElapsedTimeF32(); - agent["version"] = gCurrentVersion; + agent["version"] = LLVersionInfo::getVersionAndChannel(); std::string language = LLUI::getLanguage(); agent["language"] = language; diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index db50b89620..b902c7ab09 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -48,6 +48,9 @@ const std::string VIEWERLOGIN_GRIDLABEL("viewerlogin_grid"); const std::string APPVIEWER_SERIALNUMBER("appviewer_serialno"); +const std::string VIEWERLOGIN_CHANNEL("invalid_channel"); +const std::string VIEWERLOGIN_VERSION_CHANNEL("invalid_version"); + // Link seams. //----------------------------------------------------------------------------- @@ -160,7 +163,6 @@ std::string LLGridManager::getAppSLURLBase(const std::string& grid_name) //----------------------------------------------------------------------------- #include "../llviewercontrol.h" LLControlGroup gSavedSettings("Global"); -std::string gCurrentVersion = "invalid_version"; LLControlGroup::LLControlGroup(const std::string& name) : LLInstanceTracker(name){} @@ -177,6 +179,10 @@ BOOL LLControlGroup::declareString(const std::string& name, const std::string &i #include "lluicolortable.h" void LLUIColorTable::saveUserSettings(void)const {} +//----------------------------------------------------------------------------- +#include "../llversioninfo.h" +const std::string &LLVersionInfo::getVersionAndChannel() { return VIEWERLOGIN_VERSION_CHANNEL; } +const std::string &LLVersionInfo::getChannel() { return VIEWERLOGIN_CHANNEL; } //----------------------------------------------------------------------------- #include "llnotifications.h" @@ -290,7 +296,6 @@ namespace tut gSavedSettings.declareBOOL("UseDebugMenus", FALSE, "", FALSE); gSavedSettings.declareBOOL("ForceMandatoryUpdate", FALSE, "", FALSE); gSavedSettings.declareString("ClientSettingsFile", "test_settings.xml", "", FALSE); - gSavedSettings.declareString("VersionChannelName", "test_version_string", "", FALSE); gSavedSettings.declareString("NextLoginLocation", "", "", FALSE); gSavedSettings.declareBOOL("LoginLastLocation", FALSE, "", FALSE); diff --git a/indra/newview/tests/llversioninfo_test.cpp b/indra/newview/tests/llversioninfo_test.cpp new file mode 100644 index 0000000000..b4f1b0273f --- /dev/null +++ b/indra/newview/tests/llversioninfo_test.cpp @@ -0,0 +1,114 @@ +/** + * @file llversioninfo_test.cpp + * + * $LicenseInfo:firstyear=2010&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * 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; + * version 2.1 of the License only. + * + * 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 + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "linden_common.h" + +#include "../test/lltut.h" + +#include "../llversioninfo.h" +#include "llversionviewer.h" + +namespace tut +{ + struct versioninfo + { + versioninfo() + : mResetChannel("Reset Channel") + { + std::ostringstream stream; + stream << LL_VERSION_MAJOR << "." + << LL_VERSION_MINOR << "." + << LL_VERSION_PATCH << "." + << LL_VERSION_BUILD; + mVersion = stream.str(); + stream.str(""); + + stream << LL_VERSION_MAJOR << "." + << LL_VERSION_MINOR << "." + << LL_VERSION_PATCH; + mShortVersion = stream.str(); + stream.str(""); + + stream << mVersion + << " " + << LL_CHANNEL; + mVersionAndChannel = stream.str(); + stream.str(""); + + stream << mVersion + << " " + << mResetChannel; + mResetVersionAndChannel = stream.str(); + } + std::string mResetChannel; + std::string mVersion; + std::string mShortVersion; + std::string mVersionAndChannel; + std::string mResetVersionAndChannel; + }; + + typedef test_group versioninfo_t; + typedef versioninfo_t::object versioninfo_object_t; + tut::versioninfo_t tut_versioninfo("LLVersionInfo"); + + template<> template<> + void versioninfo_object_t::test<1>() + { + ensure_equals("Major version", + LLVersionInfo::getMajor(), + LL_VERSION_MAJOR); + ensure_equals("Minor version", + LLVersionInfo::getMinor(), + LL_VERSION_MINOR); + ensure_equals("Patch version", + LLVersionInfo::getPatch(), + LL_VERSION_PATCH); + ensure_equals("Build version", + LLVersionInfo::getBuild(), + LL_VERSION_BUILD); + ensure_equals("Channel version", + LLVersionInfo::getChannel(), + LL_CHANNEL); + + ensure_equals("Version String", + LLVersionInfo::getVersion(), + mVersion); + ensure_equals("Short Version String", + LLVersionInfo::getShortVersion(), + mShortVersion); + ensure_equals("Version and channel String", + LLVersionInfo::getVersionAndChannel(), + mVersionAndChannel); + + LLVersionInfo::resetChannel(mResetChannel); + ensure_equals("Reset channel version", + LLVersionInfo::getChannel(), + mResetChannel); + + ensure_equals("Reset Version and channel String", + LLVersionInfo::getVersionAndChannel(), + mResetVersionAndChannel); + } +} \ No newline at end of file -- cgit v1.2.3 From 9cc290ef8fccdc585027d84ac9cfb864ed933061 Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Mon, 1 Nov 2010 16:49:18 -0700 Subject: Added newline at EOF to satisfy linux gcc --- indra/newview/tests/llversioninfo_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/tests/llversioninfo_test.cpp b/indra/newview/tests/llversioninfo_test.cpp index b4f1b0273f..8855a24ead 100644 --- a/indra/newview/tests/llversioninfo_test.cpp +++ b/indra/newview/tests/llversioninfo_test.cpp @@ -111,4 +111,4 @@ namespace tut LLVersionInfo::getVersionAndChannel(), mResetVersionAndChannel); } -} \ No newline at end of file +} -- cgit v1.2.3 From a26386c53a09d47eff092ad89b5684503ee31b9d Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 3 Nov 2010 08:43:31 -0400 Subject: For non-Release Linux build, explain why we don't create tarball. --- indra/newview/viewer_manifest.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 6861f02bfb..4b98a11091 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -897,6 +897,9 @@ class LinuxManifest(ViewerManifest): 'dir': self.get_build_prefix(), 'inst_name': installer_name, 'inst_path':self.build_path_of(installer_name)}) + else: + print "Skipping %s.tar.bz2 for non-Release build (%s)" % \ + (installer_name, self.args['buildtype']) finally: self.run_command("mv %(inst)s %(dst)s" % { 'dst': self.get_dst_prefix(), -- cgit v1.2.3 From 2f6062e59793c8a5326c1dfac41334bac428faa9 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 3 Nov 2010 11:08:04 -0400 Subject: Remove erroneous 'inline' on LLPanelStandStopFlying::getInstance() This is ignored by every compiler except Linux g++ 4.4.3 in Release mode. In that case, it literally does cause getInstance() to be inlined, therefore llmoveview.o contains no such symbol, therefore the Linux viewer link fails in Release mode. But for a method implementation in a .cpp file of a method declared in a .h file, 'inline' is just wrong. Removing it fixes Release build. --- indra/newview/llmoveview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 6658e1d7e8..d38bb5aa4a 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -552,7 +552,7 @@ LLPanelStandStopFlying::LLPanelStandStopFlying() : } // static -inline LLPanelStandStopFlying* LLPanelStandStopFlying::getInstance() +LLPanelStandStopFlying* LLPanelStandStopFlying::getInstance() { static LLPanelStandStopFlying* panel = getStandStopFlyingPanel(); return panel; -- cgit v1.2.3 From 65997a1f5bb05dd263063606c00e0633af282784 Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Wed, 3 Nov 2010 14:39:24 -0700 Subject: Added some logging to viewer_manifest.py to attempt to narrow down the Mac packaging failures a bit. --- indra/newview/viewer_manifest.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 4b98a11091..4596938775 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -743,6 +743,11 @@ class DarwinManifest(ViewerManifest): devfile = re.search("/dev/disk([0-9]+)[^s]", hdi_output).group(0).strip() volpath = re.search('HFS\s+(.+)', hdi_output).group(1).strip() + if devfile != '/dev/disk1': + # adding more debugging info based upon nat's hunches to the + # logs to help track down 'SetFile -a V' failures -brad + print "WARNING: 'SetFile -a V' command below is probably gonna fail" + # Copy everything in to the mounted .dmg if self.default_channel() and not self.default_grid(): -- cgit v1.2.3 From d594744d49732fd235694bde41f09cf578fccaf1 Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Thu, 4 Nov 2010 10:52:21 -0700 Subject: Turned inlining on in windows builds (RelWithDebInfo and Release). This reduces the number of symbols in the viewer binary by about 30%. Also, fixed test errors revealed by inlining being enabled. --- indra/newview/tests/llviewerhelputil_test.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/tests/llviewerhelputil_test.cpp b/indra/newview/tests/llviewerhelputil_test.cpp index a0f1d1c3c3..b425b50c8b 100644 --- a/indra/newview/tests/llviewerhelputil_test.cpp +++ b/indra/newview/tests/llviewerhelputil_test.cpp @@ -72,16 +72,13 @@ static void substitute_string(std::string &input, const std::string &search, con } } -class LLAgent -{ -public: - LLAgent() {} - ~LLAgent() {} -#ifdef __GNUC__ - __attribute__ ((noinline)) -#endif - bool isGodlike() const { return FALSE; } -}; +#include "../llagent.h" +LLAgent::LLAgent() : mAgentAccess(gSavedSettings) { } +LLAgent::~LLAgent() { } +bool LLAgent::isGodlike() const { return FALSE; } +LLAgentAccess::LLAgentAccess(LLControlGroup& settings) : mSavedSettings(settings) { } +LLUIColor::LLUIColor() {} + LLAgent gAgent; std::string LLWeb::expandURLSubstitutions(const std::string &url, -- cgit v1.2.3 From e0c734a7105060740e5597d4439d882bb3f2bff4 Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Thu, 4 Nov 2010 10:53:11 -0700 Subject: Turned generate_breakpad_symbols target into a noop for non-Release builds. --- indra/newview/CMakeLists.txt | 10 +++++++++- indra/newview/generate_breakpad_symbols.py | 10 +++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index a488fb1069..f18107f673 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1831,10 +1831,18 @@ if (PACKAGE) set(VIEWER_COPY_MANIFEST copy_l_viewer_manifest) endif (LINUX) + if(CMAKE_CONFIGURATION_TYPES) + # set LLBUILD_CONFIG to be a shell variable evaluated at build time + # reflecting the configuration we are currently building. + set(LLBUILD_CONFIG ${CMAKE_CFG_INTDIR}) + else(CMAKE_CONFIGURATION_TYPES) + set(LLBUILD_CONFIG ${CMAKE_BUILD_TYPE}) + endif(CMAKE_CONFIGURATION_TYPES) add_custom_command(OUTPUT "${VIEWER_SYMBOL_FILE}" COMMAND "${PYTHON_EXECUTABLE}" ARGS "${CMAKE_CURRENT_SOURCE_DIR}/generate_breakpad_symbols.py" + "${LLBUILD_CONFIG}" "${VIEWER_DIST_DIR}" "${VIEWER_EXE_GLOBS}" "${VIEWER_LIB_GLOB}" @@ -1843,7 +1851,7 @@ if (PACKAGE) DEPENDS generate_breakpad_symbols.py VERBATIM ) - add_custom_target(generate_breakpad_symbols ALL DEPENDS "${VIEWER_SYMBOL_FILE}") + add_custom_target(generate_breakpad_symbols DEPENDS "${VIEWER_SYMBOL_FILE}") add_dependencies(generate_breakpad_symbols "${VIEWER_BINARY_NAME}" "${VIEWER_COPY_MANIFEST}") add_dependencies(package generate_breakpad_symbols) endif (PACKAGE) diff --git a/indra/newview/generate_breakpad_symbols.py b/indra/newview/generate_breakpad_symbols.py index 8f2dfd2348..0e61bee1ef 100644 --- a/indra/newview/generate_breakpad_symbols.py +++ b/indra/newview/generate_breakpad_symbols.py @@ -45,8 +45,12 @@ class MissingModuleError(Exception): Exception.__init__(self, "Failed to find required modules: %r" % modules) self.modules = modules -def main(viewer_dir, viewer_exes, libs_suffix, dump_syms_tool, viewer_symbol_file): - print "generate_breakpad_symbols run with args: %s" % str((viewer_dir, viewer_exes, libs_suffix, dump_syms_tool, viewer_symbol_file)) +def main(configuration, viewer_dir, viewer_exes, libs_suffix, dump_syms_tool, viewer_symbol_file): + print "generate_breakpad_symbols run with args: %s" % str((configuration, viewer_dir, viewer_exes, libs_suffix, dump_syms_tool, viewer_symbol_file)) + + if configuration != "Release": + print "skipping breakpad symbol generation for non-release build." + return 0 # split up list of viewer_exes # "'Second Life' SLPlugin" becomes ['Second Life', 'SLPlugin'] @@ -122,7 +126,7 @@ def main(viewer_dir, viewer_exes, libs_suffix, dump_syms_tool, viewer_symbol_fil return 0 if __name__ == "__main__": - if len(sys.argv) != 6: + if len(sys.argv) != 7: usage() sys.exit(1) sys.exit(main(*sys.argv[1:])) -- cgit v1.2.3 From dfeb7abe5f690bbd3a908c84c53bbea20a5adb7c Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Thu, 4 Nov 2010 14:08:14 -0700 Subject: checker working with v1.0 update protocol. --- indra/newview/app_settings/settings.xml | 24 +++++++++++++++++++++++- indra/newview/llappviewer.cpp | 4 +++- 2 files changed, 26 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 8f5cb7c709..cc0e0a78db 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11022,7 +11022,29 @@ Type String Value - http://localhost/agni + http://update.secondlife.com + + UpdaterServicePath + + Comment + Path on the update server host. + Persist + 0 + Type + String + Value + update + + UpdaterServiceProtocolVersion + + Comment + The update protocol version to use. + Persist + 0 + Type + String + Value + v1.0 UploadBakedTexOld diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 3a48bc25f1..6bb25969a6 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2337,9 +2337,11 @@ void LLAppViewer::initUpdater() std::string url = gSavedSettings.getString("UpdaterServiceURL"); std::string channel = LLVersionInfo::getChannel(); std::string version = LLVersionInfo::getVersion(); + std::string protocol_version = gSavedSettings.getString("UpdaterServiceProtocolVersion"); + std::string service_path = gSavedSettings.getString("UpdaterServicePath"); U32 check_period = gSavedSettings.getU32("UpdaterServiceCheckPeriod"); - mUpdater->setParams(url, channel, version); + mUpdater->setParams(protocol_version, url, service_path, channel, version); mUpdater->setCheckPeriod(check_period); if(gSavedSettings.getBOOL("UpdaterServiceActive")) { -- cgit v1.2.3 From 0836d1b1ae861ee7a226ba342166148a31cc5bdd Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Mon, 8 Nov 2010 15:51:39 -0800 Subject: Fix for linux link errors in teamcity. --- indra/newview/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index f18107f673..ff099710f1 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1643,7 +1643,14 @@ if (WINDOWS) endif (PACKAGE) endif (WINDOWS) +# *NOTE - this list is very sensitive to ordering, test carefully on all +# platforms if you change the releative order of the entries here. +# In particular, cmake 2.6.4 (when buidling with linux/makefile generators) +# appears to sometimes de-duplicate redundantly listed dependencies improperly. +# To work around this, higher level modules should be listed before the modules +# that they depend upon. -brad target_link_libraries(${VIEWER_BINARY_NAME} + ${UPDATER_LIBRARIES} ${LLAUDIO_LIBRARIES} ${LLCHARACTER_LIBRARIES} ${LLIMAGE_LIBRARIES} @@ -1680,7 +1687,6 @@ target_link_libraries(${VIEWER_BINARY_NAME} ${OPENSSL_LIBRARIES} ${CRYPTO_LIBRARIES} ${LLLOGIN_LIBRARIES} - ${UPDATER_LIBRARIES} ${GOOGLE_PERFTOOLS_LIBRARIES} ) -- cgit v1.2.3 From 8cce8827e01dab6bfcd3e94e56b6041f8f487c76 Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Mon, 8 Nov 2010 17:12:43 -0800 Subject: Fix for breakpad symbol files failing to be generated on linux. --- indra/newview/CMakeLists.txt | 8 ++++---- indra/newview/generate_breakpad_symbols.py | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index ff099710f1..a9d1fd9064 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1837,13 +1837,13 @@ if (PACKAGE) set(VIEWER_COPY_MANIFEST copy_l_viewer_manifest) endif (LINUX) - if(CMAKE_CONFIGURATION_TYPES) + if(CMAKE_CFG_INTDIR STREQUAL ".") + set(LLBUILD_CONFIG ${CMAKE_BUILD_TYPE}) + else(CMAKE_CFG_INTDIR STREQUAL ".") # set LLBUILD_CONFIG to be a shell variable evaluated at build time # reflecting the configuration we are currently building. set(LLBUILD_CONFIG ${CMAKE_CFG_INTDIR}) - else(CMAKE_CONFIGURATION_TYPES) - set(LLBUILD_CONFIG ${CMAKE_BUILD_TYPE}) - endif(CMAKE_CONFIGURATION_TYPES) + endif(CMAKE_CFG_INTDIR STREQUAL ".") add_custom_command(OUTPUT "${VIEWER_SYMBOL_FILE}" COMMAND "${PYTHON_EXECUTABLE}" ARGS diff --git a/indra/newview/generate_breakpad_symbols.py b/indra/newview/generate_breakpad_symbols.py index 0e61bee1ef..4fd04d780e 100644 --- a/indra/newview/generate_breakpad_symbols.py +++ b/indra/newview/generate_breakpad_symbols.py @@ -31,6 +31,7 @@ import fnmatch import itertools import operator import os +import re import sys import shlex import subprocess @@ -48,7 +49,7 @@ class MissingModuleError(Exception): def main(configuration, viewer_dir, viewer_exes, libs_suffix, dump_syms_tool, viewer_symbol_file): print "generate_breakpad_symbols run with args: %s" % str((configuration, viewer_dir, viewer_exes, libs_suffix, dump_syms_tool, viewer_symbol_file)) - if configuration != "Release": + if not re.match("release", configuration, re.IGNORECASE): print "skipping breakpad symbol generation for non-release build." return 0 -- cgit v1.2.3 From fdf616c59d87219e2d5ad6e12687cf2793cfba1e Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Tue, 9 Nov 2010 11:23:32 -0800 Subject: beginnings of the update installer (with simple install script for darwin). --- indra/newview/viewer_manifest.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 4596938775..f95697adb6 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -575,6 +575,10 @@ class DarwinManifest(ViewerManifest): # most everything goes in the Resources directory if self.prefix(src="", dst="Resources"): super(DarwinManifest, self).construct() + + if self.prefix(src="../viewer_components/updater", dst=""): + self.path("update_install") + self.end_prefix() if self.prefix("cursors_mac"): self.path("*.tif") -- cgit v1.2.3 From 9ae2891a3afefcbf0c72cadaef203426cb0e5954 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Tue, 9 Nov 2010 15:04:44 -0800 Subject: start of a thread safe queue --- indra/newview/CMakeLists.txt | 2 + indra/newview/llappviewer.cpp | 5 +++ indra/newview/llmainlooprepeater.cpp | 82 ++++++++++++++++++++++++++++++++++++ indra/newview/llmainlooprepeater.h | 65 ++++++++++++++++++++++++++++ 4 files changed, 154 insertions(+) create mode 100644 indra/newview/llmainlooprepeater.cpp create mode 100644 indra/newview/llmainlooprepeater.h (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index a9d1fd9064..36cfa615f0 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -283,6 +283,7 @@ set(viewer_SOURCE_FILES llloginhandler.cpp lllogininstance.cpp llmachineid.cpp + llmainlooprepeater.cpp llmanip.cpp llmaniprotate.cpp llmanipscale.cpp @@ -815,6 +816,7 @@ set(viewer_HEADER_FILES llloginhandler.h lllogininstance.h llmachineid.h + llmainlooprepeater.h llmanip.h llmaniprotate.h llmanipscale.h diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index c0ec15f436..438f8668ae 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -197,6 +197,8 @@ #include "llsecapi.h" #include "llmachineid.h" +#include "llmainlooprepeater.h" + // *FIX: These extern globals should be cleaned up. // The globals either represent state/config/resource-storage of either // this app, or another 'component' of the viewer. App globals should be @@ -801,6 +803,9 @@ bool LLAppViewer::init() return 1; } + // Initialize the repeater service. + LLMainLoopRepeater::getInstance()->start(); + // // Initialize the window // diff --git a/indra/newview/llmainlooprepeater.cpp b/indra/newview/llmainlooprepeater.cpp new file mode 100644 index 0000000000..c2eba97641 --- /dev/null +++ b/indra/newview/llmainlooprepeater.cpp @@ -0,0 +1,82 @@ +/** + * @file llmachineid.cpp + * @brief retrieves unique machine ids + * + * $LicenseInfo:firstyear=2009&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * 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; + * version 2.1 of the License only. + * + * 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 + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" +#include "llapr.h" +#include "llevents.h" +#include "llmainlooprepeater.h" + + + +// LLMainLoopRepeater +//----------------------------------------------------------------------------- + + +LLMainLoopRepeater::LLMainLoopRepeater(void): + mQueue(gAPRPoolp, 1024) +{ + ; // No op. +} + + +void LLMainLoopRepeater::start(void) +{ + mMainLoopConnection = LLEventPumps::instance(). + obtain("mainloop").listen("stupid name here", boost::bind(&LLMainLoopRepeater::onMainLoop, this, _1)); + mRepeaterConnection = LLEventPumps::instance(). + obtain("mainlooprepeater").listen("other stupid name here", boost::bind(&LLMainLoopRepeater::onMessage, this, _1)); +} + + +void LLMainLoopRepeater::stop(void) +{ + mMainLoopConnection.release(); + mRepeaterConnection.release(); +} + + +bool LLMainLoopRepeater::onMainLoop(LLSD const &) +{ + LLSD message; + while(mQueue.tryPopBack(message)) { + std::string pump = message["pump"].asString(); + if(pump.length() == 0 ) continue; // No pump. + LLEventPumps::instance().obtain(pump).post(message["payload"]); + } + return false; +} + + +bool LLMainLoopRepeater::onMessage(LLSD const & event) +{ + try { + mQueue.pushFront(event); + } catch(LLThreadSafeQueueError & e) { + llwarns << "could not repeat message (" << e.what() << ")" << + event.asString() << LL_ENDL; + } + return false; +} diff --git a/indra/newview/llmainlooprepeater.h b/indra/newview/llmainlooprepeater.h new file mode 100644 index 0000000000..96b83b4916 --- /dev/null +++ b/indra/newview/llmainlooprepeater.h @@ -0,0 +1,65 @@ +/** + * @file llmainlooprepeater.h + * @brief a service for repeating messages on the main loop. + * + * $LicenseInfo:firstyear=2010&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * 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; + * version 2.1 of the License only. + * + * 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 + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLMAINLOOPREPEATER_H +#define LL_LLMAINLOOPREPEATER_H + + +#include "llsd.h" +#include "llthreadsafequeue.h" + + +// +// A service which creates the pump 'mainlooprepeater' to which any thread can +// post a message that will be re-posted on the main loop. +// +// The posted message should contain two map elements: pump and payload. The +// pump value is a string naming the pump to which the message should be +// re-posted. The payload value is what will be posted to the designated pump. +// +class LLMainLoopRepeater: + public LLSingleton +{ +public: + LLMainLoopRepeater(void); + + // Start the repeater service. + void start(void); + + // Stop the repeater service. + void stop(void); + +private: + LLTempBoundListener mMainLoopConnection; + LLTempBoundListener mRepeaterConnection; + LLThreadSafeQueue mQueue; + + bool onMainLoop(LLSD const &); + bool onMessage(LLSD const & event); +}; + + +#endif -- cgit v1.2.3 From b2e84d739b4f5c00b497e57e892fc10d78af8b76 Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Wed, 10 Nov 2010 14:26:14 -0800 Subject: CHOP-151 Adding startup updater flow to drive update installation and resume. --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 6bb25969a6..335998767c 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2341,7 +2341,7 @@ void LLAppViewer::initUpdater() std::string service_path = gSavedSettings.getString("UpdaterServicePath"); U32 check_period = gSavedSettings.getU32("UpdaterServiceCheckPeriod"); - mUpdater->setParams(protocol_version, url, service_path, channel, version); + mUpdater->initialize(protocol_version, url, service_path, channel, version); mUpdater->setCheckPeriod(check_period); if(gSavedSettings.getBOOL("UpdaterServiceActive")) { -- cgit v1.2.3 From 41517715844c986aab169502c94f39a9f507eb55 Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Wed, 10 Nov 2010 19:21:03 -0800 Subject: CHOP-151 Hooked up app exit callback, cleaned up early exit. Rev. by Brad --- indra/newview/llappviewer.cpp | 66 +++++++++++++++++++++++++++++-------------- 1 file changed, 45 insertions(+), 21 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 10c03954bc..c06f0c18e8 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -661,6 +661,14 @@ bool LLAppViewer::init() initThreads(); 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; + } + ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// @@ -979,9 +987,6 @@ bool LLAppViewer::mainLoop() LLHTTPClient::setPump(*gServicePump); LLCurl::setCAFile(gDirUtilp->getCAFile()); - // Initialize updater service (now that we have an io pump) - initUpdater(); - // Note: this is where gLocalSpeakerMgr and gActiveSpeakerMgr used to be instantiated. LLVoiceChannel::initClass(); @@ -1364,11 +1369,14 @@ bool LLAppViewer::cleanup() llinfos << "Cleaning Up" << llendflush; // Must clean up texture references before viewer window is destroyed. - LLHUDManager::getInstance()->updateEffects(); - LLHUDObject::updateAll(); - LLHUDManager::getInstance()->cleanupEffects(); - LLHUDObject::cleanupHUDObjects(); - llinfos << "HUD Objects cleaned up" << llendflush; + if(LLHUDManager::instanceExists()) + { + LLHUDManager::getInstance()->updateEffects(); + LLHUDObject::updateAll(); + LLHUDManager::getInstance()->cleanupEffects(); + LLHUDObject::cleanupHUDObjects(); + llinfos << "HUD Objects cleaned up" << llendflush; + } LLKeyframeDataCache::clear(); @@ -1380,8 +1388,10 @@ bool LLAppViewer::cleanup() // Note: this is where gWorldMap used to be deleted. // Note: this is where gHUDManager used to be deleted. - LLHUDManager::getInstance()->shutdownClass(); - + if(LLHUDManager::instanceExists()) + { + LLHUDManager::getInstance()->shutdownClass(); + } delete gAssetStorage; gAssetStorage = NULL; @@ -1683,7 +1693,10 @@ bool LLAppViewer::cleanup() #ifndef LL_RELEASE_FOR_DOWNLOAD llinfos << "Auditing VFS" << llendl; - gVFS->audit(); + if(gVFS) + { + gVFS->audit(); + } #endif llinfos << "Misc Cleanup" << llendflush; @@ -2383,8 +2396,13 @@ void LLAppViewer::initUpdater() std::string service_path = gSavedSettings.getString("UpdaterServicePath"); U32 check_period = gSavedSettings.getU32("UpdaterServiceCheckPeriod"); - mUpdater->initialize(protocol_version, url, service_path, channel, version); - mUpdater->setCheckPeriod(check_period); + mUpdater->setAppExitCallback(boost::bind(&LLAppViewer::forceQuit, this)); + mUpdater->initialize(protocol_version, + url, + service_path, + channel, + version); + mUpdater->setCheckPeriod(check_period); if(gSavedSettings.getBOOL("UpdaterServiceActive")) { mUpdater->startChecking(); @@ -2550,15 +2568,18 @@ void LLAppViewer::cleanupSavedSettings() // save window position if not maximized // as we don't track it in callbacks - BOOL maximized = gViewerWindow->mWindow->getMaximized(); - if (!maximized) + if(NULL != gViewerWindow) { - LLCoordScreen window_pos; - - if (gViewerWindow->mWindow->getPosition(&window_pos)) + BOOL maximized = gViewerWindow->mWindow->getMaximized(); + if (!maximized) { - gSavedSettings.setS32("WindowX", window_pos.mX); - gSavedSettings.setS32("WindowY", window_pos.mY); + LLCoordScreen window_pos; + + if (gViewerWindow->mWindow->getPosition(&window_pos)) + { + gSavedSettings.setS32("WindowX", window_pos.mX); + gSavedSettings.setS32("WindowY", window_pos.mY); + } } } @@ -4297,7 +4318,10 @@ void LLAppViewer::disconnectViewer() // This is where we used to call gObjectList.destroy() and then delete gWorldp. // Now we just ask the LLWorld singleton to cleanly shut down. - LLWorld::getInstance()->destroyClass(); + if(LLWorld::instanceExists()) + { + LLWorld::getInstance()->destroyClass(); + } // call all self-registered classes LLDestroyClassList::instance().fireCallbacks(); -- cgit v1.2.3 From 6e15957d909787ba612004903f04335a593b5348 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Thu, 11 Nov 2010 09:40:30 -0800 Subject: run install script on successful download --- indra/newview/viewer_manifest.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index f95697adb6..0073641ed4 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -571,14 +571,16 @@ class DarwinManifest(ViewerManifest): # copy additional libs in /Contents/MacOS/ self.path("../../libraries/universal-darwin/lib_release/libndofdev.dylib", dst="MacOS/libndofdev.dylib") + + + if self.prefix(src="../viewer_components/updater", dst="MacOS"): + self.path("update_install") + self.end_prefix() + # most everything goes in the Resources directory if self.prefix(src="", dst="Resources"): super(DarwinManifest, self).construct() - - if self.prefix(src="../viewer_components/updater", dst=""): - self.path("update_install") - self.end_prefix() if self.prefix("cursors_mac"): self.path("*.tif") -- cgit v1.2.3 From 4e22d63352dd65085cfbba9c22070271ecdd4bcf Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Thu, 11 Nov 2010 11:05:46 -0800 Subject: Add very basic windows install script. --- indra/newview/viewer_manifest.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 0073641ed4..55d64fd3a6 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -251,6 +251,10 @@ class WindowsManifest(ViewerManifest): if self.prefix(src=os.path.join(os.pardir, 'sharedlibs', self.args['configuration']), dst=""): + if self.prefix(src="../../viewer_components/updater", dst=""): + self.path("update_install.bat") + self.end_prefix() + self.enable_crt_manifest_check() # Get kdu dll, continue if missing. -- cgit v1.2.3 From 7a7f89db6d9c5e6b2c6c89ea39c0302907a0442b Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Thu, 11 Nov 2010 11:46:24 -0800 Subject: fix termination issues with thread safe queue in main loop repeater service. --- indra/newview/llappviewer.cpp | 4 +++- indra/newview/llmainlooprepeater.cpp | 12 +++++++++--- indra/newview/llmainlooprepeater.h | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index c06f0c18e8..76d518b610 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -812,7 +812,7 @@ bool LLAppViewer::init() } // Initialize the repeater service. - LLMainLoopRepeater::getInstance()->start(); + LLMainLoopRepeater::instance().start(); // // Initialize the window @@ -1737,6 +1737,8 @@ bool LLAppViewer::cleanup() llinfos << "File launched." << llendflush; } + LLMainLoopRepeater::instance().stop(); + ll_close_fail_log(); llinfos << "Goodbye!" << llendflush; diff --git a/indra/newview/llmainlooprepeater.cpp b/indra/newview/llmainlooprepeater.cpp index c2eba97641..ddc925a73b 100644 --- a/indra/newview/llmainlooprepeater.cpp +++ b/indra/newview/llmainlooprepeater.cpp @@ -36,7 +36,7 @@ LLMainLoopRepeater::LLMainLoopRepeater(void): - mQueue(gAPRPoolp, 1024) + mQueue(0) { ; // No op. } @@ -44,6 +44,9 @@ LLMainLoopRepeater::LLMainLoopRepeater(void): void LLMainLoopRepeater::start(void) { + if(mQueue != 0) return; + + mQueue = new LLThreadSafeQueue(gAPRPoolp, 1024); mMainLoopConnection = LLEventPumps::instance(). obtain("mainloop").listen("stupid name here", boost::bind(&LLMainLoopRepeater::onMainLoop, this, _1)); mRepeaterConnection = LLEventPumps::instance(). @@ -55,13 +58,16 @@ void LLMainLoopRepeater::stop(void) { mMainLoopConnection.release(); mRepeaterConnection.release(); + + delete mQueue; + mQueue = 0; } bool LLMainLoopRepeater::onMainLoop(LLSD const &) { LLSD message; - while(mQueue.tryPopBack(message)) { + while(mQueue->tryPopBack(message)) { std::string pump = message["pump"].asString(); if(pump.length() == 0 ) continue; // No pump. LLEventPumps::instance().obtain(pump).post(message["payload"]); @@ -73,7 +79,7 @@ bool LLMainLoopRepeater::onMainLoop(LLSD const &) bool LLMainLoopRepeater::onMessage(LLSD const & event) { try { - mQueue.pushFront(event); + mQueue->pushFront(event); } catch(LLThreadSafeQueueError & e) { llwarns << "could not repeat message (" << e.what() << ")" << event.asString() << LL_ENDL; diff --git a/indra/newview/llmainlooprepeater.h b/indra/newview/llmainlooprepeater.h index 96b83b4916..f84c0ca94c 100644 --- a/indra/newview/llmainlooprepeater.h +++ b/indra/newview/llmainlooprepeater.h @@ -55,7 +55,7 @@ public: private: LLTempBoundListener mMainLoopConnection; LLTempBoundListener mRepeaterConnection; - LLThreadSafeQueue mQueue; + LLThreadSafeQueue * mQueue; bool onMainLoop(LLSD const &); bool onMessage(LLSD const & event); -- cgit v1.2.3 From bfa393f933ccf11105daf5258f373efc764b736f Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Thu, 11 Nov 2010 19:05:05 -0800 Subject: CHOP-178 Add a non-interactive moe to the windows installer. Rev by Brad --- .../installers/windows/installer_template.nsi | 55 +++++++++++++++------- 1 file changed, 39 insertions(+), 16 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index d5712f80cf..4e8ed807ee 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -85,6 +85,8 @@ AutoCloseWindow true ; after all files install, close window InstallDir "$PROGRAMFILES\${INSTNAME}" InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "" DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup) +Page directory dirPre +Page instfiles ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Variables @@ -95,6 +97,8 @@ Var INSTFLAGS Var INSTSHORTCUT Var COMMANDLINE ; command line passed to this installer, set in .onInit Var SHORTCUT_LANG_PARAM ; "--set InstallLanguage de", passes language to viewer +Var SKIP_DIALOGS ; set from command line in .onInit. autoinstall + ; GUI and the defaults. ;;; Function definitions should go before file includes, because calls to ;;; DLLs like LangDLL trigger an implicit file include, so if that call is at @@ -110,6 +114,9 @@ Var SHORTCUT_LANG_PARAM ; "--set InstallLanguage de", passes language to viewer ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function .onInstSuccess Push $R0 # Option value, unused + + StrCmp $SKIP_DIALOGS "true" label_launch + ${GetOptions} $COMMANDLINE "/AUTOSTART" $R0 # If parameter was there (no error) just launch # Otherwise ask @@ -128,6 +135,13 @@ label_no_launch: Pop $R0 FunctionEnd +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Pre-directory page callback +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +Function dirPre + StrCmp $SKIP_DIALOGS "true" 0 +2 + Abort +FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Make sure we're not on Windows 98 / ME @@ -145,7 +159,8 @@ Function CheckWindowsVersion StrCmp $R0 "NT" win_ver_bad Return win_ver_bad: - MessageBox MB_YESNO $(CheckWindowsVersionMB) IDNO win_ver_abort + StrCmp $SKIP_DIALOGS "true" +2 ; If skip_dialogs is set just install + MessageBox MB_YESNO $(CheckWindowsVersionMB) IDNO win_ver_abort Return win_ver_abort: Quit @@ -184,13 +199,13 @@ FunctionEnd ; If it has, allow user to bail out of install process. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function CheckIfAlreadyCurrent - Push $0 - ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" - StrCmp $0 ${VERSION_LONG} 0 DONE - MessageBox MB_OKCANCEL $(CheckIfCurrentMB) /SD IDOK IDOK DONE + Push $0 + ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" + StrCmp $0 ${VERSION_LONG} 0 continue_install + StrCmp $SKIP_DIALOGS "true" continue_install + MessageBox MB_OKCANCEL $(CheckIfCurrentMB) /SD IDOK IDOK continue_install Quit - - DONE: +continue_install: Pop $0 Return FunctionEnd @@ -203,7 +218,9 @@ Function CloseSecondLife Push $0 FindWindow $0 "Second Life" "" IntCmp $0 0 DONE - MessageBox MB_OKCANCEL $(CloseSecondLifeInstMB) IDOK CLOSE IDCANCEL CANCEL_INSTALL + + StrCmp $SKIP_DIALOGS "true" CLOSE + MessageBox MB_OKCANCEL $(CloseSecondLifeInstMB) IDOK CLOSE IDCANCEL CANCEL_INSTALL CANCEL_INSTALL: Quit @@ -659,23 +676,29 @@ FunctionEnd Function .onInit Push $0 ${GetParameters} $COMMANDLINE ; get our command line + + ${GetOptions} $COMMANDLINE "/SKIP_DIALOGS" $0 + IfErrors +2 0 ; If error jump past setting SKIP_DIALOGS + StrCpy $SKIP_DIALOGS "true" + ${GetOptions} $COMMANDLINE "/LANGID=" $0 ; /LANGID=1033 implies US English ; If no language (error), then proceed - IfErrors lbl_check_silent + IfErrors lbl_configure_default_lang ; No error means we got a language, so use it StrCpy $LANGUAGE $0 Goto lbl_return -lbl_check_silent: - ; For silent installs, no language prompt, use default - IfSilent lbl_return - - ; If we currently have a version of SL installed, default to the language of that install +lbl_configure_default_lang: + ; If we currently have a version of SL installed, default to the language of that install ; Otherwise don't change $LANGUAGE and it will default to the OS UI language. - ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" - IfErrors lbl_build_menu + ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" + IfErrors +2 0 ; If error skip the copy instruction StrCpy $LANGUAGE $0 + ; For silent installs, no language prompt, use default + IfSilent lbl_return + StrCmp $SKIP_DIALOGS "true" lbl_return + lbl_build_menu: Push "" # Use separate file so labels can be UTF-16 but we can still merge changes -- cgit v1.2.3 From 13b77e3622de18ac8d06fdfffceb08990eb908f9 Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Tue, 16 Nov 2010 16:21:17 -0800 Subject: CHOP-179 Linux install uses linux-updater. Rev. by Alain --- indra/newview/viewer_manifest.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 55d64fd3a6..5d35778e3e 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -247,13 +247,12 @@ class WindowsManifest(ViewerManifest): self.disable_manifest_check() + self.path("../viewer_components/updater/scripts/windows/update_install.bat") + # Get shared libs from the shared libs staging directory if self.prefix(src=os.path.join(os.pardir, 'sharedlibs', self.args['configuration']), dst=""): - if self.prefix(src="../../viewer_components/updater", dst=""): - self.path("update_install.bat") - self.end_prefix() self.enable_crt_manifest_check() @@ -575,12 +574,8 @@ class DarwinManifest(ViewerManifest): # copy additional libs in /Contents/MacOS/ self.path("../../libraries/universal-darwin/lib_release/libndofdev.dylib", dst="MacOS/libndofdev.dylib") - - - if self.prefix(src="../viewer_components/updater", dst="MacOS"): - self.path("update_install") - self.end_prefix() + self.path("../viewer_components/updater/scripts/darwin/update_install", "MacOS/update_install") # most everything goes in the Resources directory if self.prefix(src="", dst="Resources"): @@ -857,6 +852,8 @@ class LinuxManifest(ViewerManifest): # recurse self.end_prefix("res-sdl") + self.path("../viewer_components/updater/scripts/linux/update_install", "bin/update_install") + # plugins if self.prefix(src="", dst="bin/llplugin"): self.path("../media_plugins/webkit/libmedia_plugin_webkit.so", "libmedia_plugin_webkit.so") -- cgit v1.2.3 From c61d89f61d0b696e6e73105ed7be7580bf1b3437 Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Wed, 17 Nov 2010 12:24:37 -0800 Subject: CHOP-203 Fixed linux release bug - exclude update_install from symbol strippage --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 5d35778e3e..4e5d6271df 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -882,7 +882,7 @@ class LinuxManifest(ViewerManifest): if self.args['buildtype'].lower() == 'release' and self.is_packaging_viewer(): print "* Going strip-crazy on the packaged binaries, since this is a RELEASE build" - self.run_command("find %(d)r/bin %(d)r/lib -type f | xargs --no-run-if-empty strip -S" % {'d': self.get_dst_prefix()} ) # makes some small assumptions about our packaged dir structure + self.run_command("find %(d)r/bin %(d)r/lib -type f \\! -name update_install | xargs --no-run-if-empty strip -S" % {'d': self.get_dst_prefix()} ) # makes some small assumptions about our packaged dir structure # Fix access permissions self.run_command(""" -- cgit v1.2.3 From 5c35547ade48123cb571714de42ffe42b232480d Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Wed, 17 Nov 2010 16:50:38 -0800 Subject: CHOP-135 Added Pref UI to Setup panel. Rev. by Brad --- .../default/xui/en/panel_preferences_setup.xml | 26 +++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml index 140d16e37f..79013e7e27 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml @@ -29,7 +29,7 @@ layout="topleft" left_delta="50" name=" Mouse Sensitivity" - top_pad="10" + top_pad="5" width="150"> Mouse sensitivity @@ -76,7 +76,7 @@ left_delta="50" name="Maximum bandwidth" mouse_opaque="false" - top_pad="10" + top_pad="5" width="200"> Maximum bandwidth @@ -115,7 +115,7 @@ layout="topleft" left="77" name="connection_port_enabled" - top_pad="20" + top_pad="10" width="256"> Cache size @@ -239,7 +239,7 @@ layout="topleft" left="30" name="Web:" - top_pad="5" + top_pad="10" width="300"> Web: @@ -386,4 +386,20 @@ name="web_proxy_port" top_delta="0" width="145" /> + + + -- cgit v1.2.3 From 098fa21c4f812b94348c0631c29babff68968d3d Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Wed, 17 Nov 2010 17:06:21 -0800 Subject: Work on CHOP-135: Hooking up setting UpdaterServiceActive to functionality. Paired with Mani. Toggling the setting now calls LLUpdaterService::startChecking() and LLUpdaterService::stopChecking(), which enable and disable the service. --- indra/newview/llviewercontrol.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index f579c433e1..f65811598f 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -70,6 +70,7 @@ #include "llpaneloutfitsinventory.h" #include "llpanellogin.h" #include "llpaneltopinfobar.h" +#include "llupdaterservice.h" #ifdef TOGGLE_HACKED_GODLIKE_VIEWER BOOL gHackGodmode = FALSE; @@ -488,6 +489,18 @@ bool toggle_show_object_render_cost(const LLSD& newvalue) return true; } +void toggle_updater_service_active(LLControlVariable* control, const LLSD& new_value) +{ + if(new_value.asBoolean()) + { + LLUpdaterService().startChecking(); + } + else + { + LLUpdaterService().stopChecking(); + } +} + //////////////////////////////////////////////////////////////////////////// void settings_setup_listeners() @@ -635,6 +648,7 @@ void settings_setup_listeners() gSavedSettings.getControl("ShowNavbarFavoritesPanel")->getSignal()->connect(boost::bind(&toggle_show_favorites_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("UpdaterServiceActive")->getSignal()->connect(&toggle_updater_service_active); gSavedSettings.getControl("ForceShowGrid")->getSignal()->connect(boost::bind(&handleForceShowGrid, _2)); } -- cgit v1.2.3 From cf3ded4491751231056b220525970e125d813e6a Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Thu, 18 Nov 2010 12:15:49 -0800 Subject: First draft of CHOP-106 downloaded update ready notification. Reviewed by mani. --- indra/newview/llappviewer.cpp | 14 ++++++++++++++ indra/newview/llmainlooprepeater.cpp | 4 ++-- indra/newview/skins/default/xui/en/notifications.xml | 8 ++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 76d518b610..0c6c77566f 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2385,6 +2385,17 @@ bool LLAppViewer::initConfiguration() return true; // Config was successful. } +namespace { + // *TODO - decide if there's a better place for this function. + // do we need a file llupdaterui.cpp or something? -brad + bool notify_update(LLSD const & evt) + { + LLNotificationsUtil::add("DownloadBackground"); + // let others also handle this event by default + return false; + } +}; + void LLAppViewer::initUpdater() { // Initialize the updater service. @@ -2409,6 +2420,9 @@ void LLAppViewer::initUpdater() { mUpdater->startChecking(); } + + LLEventPump & updater_pump = LLEventPumps::instance().obtain(LLUpdaterService::pumpName()); + updater_pump.listen("notify_update", notify_update); } void LLAppViewer::checkForCrash(void) diff --git a/indra/newview/llmainlooprepeater.cpp b/indra/newview/llmainlooprepeater.cpp index ddc925a73b..5c020e6d98 100644 --- a/indra/newview/llmainlooprepeater.cpp +++ b/indra/newview/llmainlooprepeater.cpp @@ -48,9 +48,9 @@ void LLMainLoopRepeater::start(void) mQueue = new LLThreadSafeQueue(gAPRPoolp, 1024); mMainLoopConnection = LLEventPumps::instance(). - obtain("mainloop").listen("stupid name here", boost::bind(&LLMainLoopRepeater::onMainLoop, this, _1)); + obtain("mainloop").listen(LLEventPump::inventName(), boost::bind(&LLMainLoopRepeater::onMainLoop, this, _1)); mRepeaterConnection = LLEventPumps::instance(). - obtain("mainlooprepeater").listen("other stupid name here", boost::bind(&LLMainLoopRepeater::onMessage, this, _1)); + obtain("mainlooprepeater").listen(LLEventPump::inventName(), boost::bind(&LLMainLoopRepeater::onMessage, this, _1)); } diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 1f747ab997..40d5f75de2 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -2869,6 +2869,14 @@ Download to your Applications folder? yestext="Download"/> + +An updated version of [APP_NAME] has been downloaded. +It will be applied the next time you restart [APP_NAME] + + Date: Thu, 18 Nov 2010 13:25:44 -0800 Subject: inform user on failed install--needs proper user dialog ;-) --- indra/newview/llappviewer.cpp | 16 ++++++++++++++-- indra/newview/skins/default/xui/en/notifications.xml | 10 ++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 0c6c77566f..93fd75f74b 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2390,8 +2390,20 @@ namespace { // do we need a file llupdaterui.cpp or something? -brad bool notify_update(LLSD const & evt) { - LLNotificationsUtil::add("DownloadBackground"); - // let others also handle this event by default + switch (evt["type"].asInteger()) + { + case LLUpdaterService::DOWNLOAD_COMPLETE: + LLNotificationsUtil::add("DownloadBackground"); + break; + case LLUpdaterService::INSTALL_ERROR: + LLNotificationsUtil::add("FailedUpdateInstall"); + break; + default: + llinfos << "unhandled update event " << evt << llendl; + break; + } + + // let others also handle this event by default return false; } }; diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 40d5f75de2..a342db8442 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -2869,6 +2869,16 @@ Download to your Applications folder? yestext="Download"/> + +Gadzooks, I failed to install the latest update. +Get thee to the interwebs and install it thyself. + + Date: Thu, 18 Nov 2010 15:11:42 -0800 Subject: Fix for mac build error. --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 0c6c77566f..548bebcfa9 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2422,7 +2422,7 @@ void LLAppViewer::initUpdater() } LLEventPump & updater_pump = LLEventPumps::instance().obtain(LLUpdaterService::pumpName()); - updater_pump.listen("notify_update", notify_update); + updater_pump.listen("notify_update", ¬ify_update); } void LLAppViewer::checkForCrash(void) -- cgit v1.2.3 From c893c55d8a1328a134c956b70e6fef7fd7053d47 Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Thu, 18 Nov 2010 17:03:01 -0800 Subject: Fixing bugs discovered in merge with viewer development --- indra/newview/llspeakbutton.cpp | 7 +++++-- indra/newview/llspeakingindicatormanager.cpp | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llspeakbutton.cpp b/indra/newview/llspeakbutton.cpp index 3dce66f394..c76ecae4a2 100644 --- a/indra/newview/llspeakbutton.cpp +++ b/indra/newview/llspeakbutton.cpp @@ -134,8 +134,11 @@ LLSpeakButton::LLSpeakButton(const Params& p) LLSpeakButton::~LLSpeakButton() { - LLTransientFloaterMgr::getInstance()->removeControlView(mSpeakBtn); - LLTransientFloaterMgr::getInstance()->removeControlView(mShowBtn); + if(LLTransientFloaterMgr::instanceExists()) + { + LLTransientFloaterMgr::getInstance()->removeControlView(mSpeakBtn); + LLTransientFloaterMgr::getInstance()->removeControlView(mShowBtn); + } } void LLSpeakButton::setSpeakToolTip(const std::string& msg) diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp index ede1d6bebe..9b38bf22ff 100644 --- a/indra/newview/llspeakingindicatormanager.cpp +++ b/indra/newview/llspeakingindicatormanager.cpp @@ -308,7 +308,10 @@ void LLSpeakingIndicatorManager::registerSpeakingIndicator(const LLUUID& speaker void LLSpeakingIndicatorManager::unregisterSpeakingIndicator(const LLUUID& speaker_id, const LLSpeakingIndicator* const speaking_indicator) { - SpeakingIndicatorManager::instance().unregisterSpeakingIndicator(speaker_id, speaking_indicator); + if(SpeakingIndicatorManager::instanceExists()) + { + SpeakingIndicatorManager::instance().unregisterSpeakingIndicator(speaker_id, speaking_indicator); + } } // EOF -- cgit v1.2.3 From 8c2026d6b71f133deafa6b0e19baf69632a2510a Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Thu, 18 Nov 2010 21:57:27 -0800 Subject: CHOP-135 Bug fixes. --- indra/newview/llappviewer.cpp | 3 ++- indra/newview/llchiclet.cpp | 8 +++++--- indra/newview/lltransientfloatermgr.cpp | 5 ++++- 3 files changed, 11 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 1fd8b02530..b6f52e3e15 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2433,7 +2433,8 @@ void LLAppViewer::initUpdater() mUpdater->setCheckPeriod(check_period); if(gSavedSettings.getBOOL("UpdaterServiceActive")) { - mUpdater->startChecking(); + bool install_if_ready = true; + mUpdater->startChecking(install_if_ready); } LLEventPump & updater_pump = LLEventPumps::instance().obtain(LLUpdaterService::pumpName()); diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 8f385160e9..885d553524 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -1092,9 +1092,11 @@ LLChicletPanel::LLChicletPanel(const Params&p) LLChicletPanel::~LLChicletPanel() { - LLTransientFloaterMgr::getInstance()->removeControlView(mLeftScrollButton); - LLTransientFloaterMgr::getInstance()->removeControlView(mRightScrollButton); - + if(LLTransientFloaterMgr::instanceExists()) + { + LLTransientFloaterMgr::getInstance()->removeControlView(mLeftScrollButton); + LLTransientFloaterMgr::getInstance()->removeControlView(mRightScrollButton); + } } void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){ diff --git a/indra/newview/lltransientfloatermgr.cpp b/indra/newview/lltransientfloatermgr.cpp index 78dd602f39..6deab96b45 100644 --- a/indra/newview/lltransientfloatermgr.cpp +++ b/indra/newview/lltransientfloatermgr.cpp @@ -36,8 +36,11 @@ LLTransientFloaterMgr::LLTransientFloaterMgr() { - gViewerWindow->getRootView()->addMouseDownCallback(boost::bind( + if(gViewerWindow) + { + gViewerWindow->getRootView()->addMouseDownCallback(boost::bind( &LLTransientFloaterMgr::leftMouseClickCallback, this, _1, _2, _3)); + } mGroupControls.insert(std::pair >(GLOBAL, std::set())); mGroupControls.insert(std::pair >(DOCKED, std::set())); -- cgit v1.2.3 From 8d21105a8c2b6bff98b4f3b91a614a4710d4b7ea Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Fri, 19 Nov 2010 12:04:01 -0800 Subject: dull boring notification message. --- indra/newview/skins/default/xui/en/notifications.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 0663583543..9536bf2cf7 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -2873,8 +2873,9 @@ Download to your Applications folder? icon="alertmodal.tga" name="FailedUpdateInstall" type="alertmodal"> -Gadzooks, I failed to install the latest update. -Get thee to the interwebs and install it thyself. +An error occurred installing the viewer update. +Please download and install the latest viewer from +http://secondlife.com/download. -- cgit v1.2.3