From 60cd95b31f2a8bdf5b10ceee1b2def67b37ecf11 Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Thu, 3 Oct 2013 06:09:49 +0200 Subject: [PATCH] Breaking pad: more cmake fun --- indra/newview/CMakeLists.txt | 24 ++++++++++++++ indra/newview/app_settings/settings.xml | 13 +++++++- .../app_settings/settings_crash_behavior.xml | 33 ------------------- indra/newview/llappviewer.cpp | 25 +++++++------- indra/newview/llcrashlogger.cpp | 9 +++-- indra/newview/llcrashlogger.h | 1 - indra/newview/llfloaterpreference.cpp | 3 +- indra/newview/llpanelgeneral.cpp | 4 +-- indra/newview/viewer_manifest.py | 2 ++ 9 files changed, 61 insertions(+), 53 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 568113070..19f85ed23 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1530,10 +1530,34 @@ if (WINDOWS) ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ) + add_custom_command( + OUTPUT ${CMAKE_CFG_INTDIR}/copy_touched.bat + COMMAND ${PYTHON_EXECUTABLE} + ARGS + ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py + --artwork=${ARTWORK_DIR} + --actions=copy + --branding_id=${VIEWER_BRANDING_ID} + --build=${CMAKE_CURRENT_BINARY_DIR} + --channel=${VIEWER_CHANNEL} + --configuration=${CMAKE_CFG_INTDIR} + --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR} + --grid=${GRID} + --login_channel=${VIEWER_LOGIN_CHANNEL} + --source=${CMAKE_CURRENT_SOURCE_DIR} + --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/copy_touched.bat + ${MANIFEST_LIBRARIES} + DEPENDS + ${VIEWER_BINARY_NAME} + ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py + COMMENT "Performing viewer_manifest copy" + ) + add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit basic_plugin_filepicker winmm_shim) if (PACKAGE) add_custom_target(package ALL DEPENDS ${CMAKE_CFG_INTDIR}/touched.bat) + add_custom_target(copy_w_viewer_manifest ALL DEPENDS ${CMAKE_CFG_INTDIR}/copy_touched.bat) endif (PACKAGE) endif (WINDOWS) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 9748e07a8..2de3bd7a4 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2199,7 +2199,7 @@ This should be as low as possible, but too low may break functionality Type String Value - http://crash.singularityviewer.org/submit.php> + http://crash.singularityviewer.org/report.php> AFKTimeout @@ -17709,6 +17709,17 @@ This should be as low as possible, but too low may break functionality Value 0 + CrashSubmitBehavior + + Comment + Controls behavior when viewer crashes (0 = ask before sending crash report, 1 = always send crash report, 2 = never send crash report) + Persist + 2 + Type + S32 + Value + 1 + diff --git a/indra/newview/app_settings/settings_crash_behavior.xml b/indra/newview/app_settings/settings_crash_behavior.xml index d259b4381..74704f8ad 100644 --- a/indra/newview/app_settings/settings_crash_behavior.xml +++ b/indra/newview/app_settings/settings_crash_behavior.xml @@ -11,38 +11,5 @@ Value 1 - CurlMaxTotalConcurrentConnections - - Comment - Maximum total number of simultaneous curl connections - Persist - 1 - Type - U32 - Value - 64 - - CurlConcurrentConnectionsPerService - - Comment - Maximum number of simultaneous curl connections per host:port service - Persist - 0 - Type - U32 - Value - 8 - - NoVerifySSLCert - - Comment - Do not verify SSL certificates. - Persist - 1 - Type - Boolean - Value - 1 - diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index df48dc69a..88307e49b 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -640,18 +640,6 @@ bool LLAppViewer::init() initMaxHeapSize() ; LLPrivateMemoryPoolManager::initClass((BOOL)gSavedSettings.getBOOL("MemoryPrivatePoolEnabled"), (U32)gSavedSettings.getU32("MemoryPrivatePoolSize")) ; - // Check if we have a crash report to send - LLCrashLogger crashLogger; - crashLogger.checkCrashDump(); - - // write Google Breakpad minidump files to a per-run dump directory to avoid multiple viewer issues. - std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_DUMP, ""); - mDumpPath = logdir; - setMiniDumpDir(logdir); - logdir += gDirUtilp->getDirDelimiter(); - setDebugFileNames(logdir); - - mAlloc.setProfilingEnabled(gSavedSettings.getBOOL("MemProfiling")); AIEngine::setMaxCount(gSavedSettings.getU32("StateMachineMaxTime")); @@ -668,6 +656,19 @@ bool LLAppViewer::init() ); AIHTTPTimeoutPolicy::setDefaultCurlTimeout(policy_tmp); } + + // Check if we have a crash report to send + LLCrashLogger crashLogger; + crashLogger.checkCrashDump(); + + // write Google Breakpad minidump files to a per-run dump directory to avoid multiple viewer issues. + std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_DUMP, ""); + mDumpPath = logdir; + setMiniDumpDir(logdir); + logdir += gDirUtilp->getDirDelimiter(); + setDebugFileNames(logdir); + + mAlloc.setProfilingEnabled(gSavedSettings.getBOOL("MemProfiling")); { // Viewer metrics initialization //static LLCachedControl metrics_submode(gSavedSettings, diff --git a/indra/newview/llcrashlogger.cpp b/indra/newview/llcrashlogger.cpp index bd5d5234a..96abf21a3 100644 --- a/indra/newview/llcrashlogger.cpp +++ b/indra/newview/llcrashlogger.cpp @@ -59,7 +59,12 @@ public: virtual void result(const LLSD& content) { - llinfos << "Crash report successfully sent" << llendl; + std::string msg = "Crash report successfully sent"; + if (content.has("message")) + { + msg += ": " + content["message"].asString(); + } + llinfos << msg << llendl; } virtual AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const @@ -76,7 +81,6 @@ public: LLCrashLogger::LLCrashLogger() : mCrashBehavior(CRASH_BEHAVIOR_ALWAYS_SEND), mCrashInPreviousExec(false), - mCrashSettings("CrashSettings"), mCrashHost("") { } @@ -355,7 +359,6 @@ void LLCrashLogger::checkCrashDump() sendCrashLog(dumpDir); } #endif - gDirUtilp->deleteDirAndContents(dumpDir); } else { diff --git a/indra/newview/llcrashlogger.h b/indra/newview/llcrashlogger.h index 4a83e5527..c510acb98 100644 --- a/indra/newview/llcrashlogger.h +++ b/indra/newview/llcrashlogger.h @@ -58,7 +58,6 @@ protected: BOOL mCrashInPreviousExec; std::map mFileMap; std::string mGridName; - LLControlGroup mCrashSettings; std::string mProductName; LLSD mCrashInfo; std::string mCrashHost; diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index dbbd06f76..b6d3d5e81 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -461,7 +461,8 @@ void LLFloaterPreference::onBtnOK( void* userdata ) std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE); // save all settings, even if equals defaults - gCrashSettings.saveToFile(crash_settings_filename, FALSE); + // Singu Note: crash settings no longer separate + // gCrashSettings.saveToFile(crash_settings_filename, FALSE); } else { diff --git a/indra/newview/llpanelgeneral.cpp b/indra/newview/llpanelgeneral.cpp index 812cbc80f..cf339762a 100644 --- a/indra/newview/llpanelgeneral.cpp +++ b/indra/newview/llpanelgeneral.cpp @@ -87,7 +87,7 @@ BOOL LLPanelGeneral::postBuild() childSetValue("ui_auto_scale", gSavedSettings.getBOOL("UIAutoScale")); LLComboBox* crash_behavior_combobox = getChild("crash_behavior_combobox"); - crash_behavior_combobox->setCurrentByIndex(gCrashSettings.getS32(CRASH_BEHAVIOR_SETTING)); + crash_behavior_combobox->setCurrentByIndex(gSavedSettings.getS32(CRASH_BEHAVIOR_SETTING)); childSetValue("language_combobox", gSavedSettings.getString("Language")); @@ -174,7 +174,7 @@ void LLPanelGeneral::apply() gSavedSettings.setString("Language", childGetValue("language_combobox")); LLComboBox* crash_behavior_combobox = getChild("crash_behavior_combobox"); - gCrashSettings.setS32(CRASH_BEHAVIOR_SETTING, crash_behavior_combobox->getCurrentIndex()); + gSavedSettings.setS32(CRASH_BEHAVIOR_SETTING, crash_behavior_combobox->getCurrentIndex()); } void LLPanelGeneral::cancel() diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 50e0a2f30..2cdf9a4a5 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -339,6 +339,8 @@ class WindowsManifest(ViewerManifest): self.path(path_pair[1]) self.end_prefix() + self.package_file = 'npne' + def nsi_file_commands(self, install=True): def wpath(path):