Breaking pad: more cmake fun

This commit is contained in:
Latif Khalifa
2013-10-03 06:09:49 +02:00
parent 9d4b978474
commit 60cd95b31f
9 changed files with 61 additions and 53 deletions

View File

@@ -1530,10 +1530,34 @@ if (WINDOWS)
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ${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) add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit basic_plugin_filepicker winmm_shim)
if (PACKAGE) if (PACKAGE)
add_custom_target(package ALL DEPENDS ${CMAKE_CFG_INTDIR}/touched.bat) 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 (PACKAGE)
endif (WINDOWS) endif (WINDOWS)

View File

@@ -2199,7 +2199,7 @@ This should be as low as possible, but too low may break functionality</string>
<key>Type</key> <key>Type</key>
<string>String</string> <string>String</string>
<key>Value</key> <key>Value</key>
<string>http://crash.singularityviewer.org/submit.php</string>> <string>http://crash.singularityviewer.org/report.php</string>>
</map> </map>
<key>AFKTimeout</key> <key>AFKTimeout</key>
<map> <map>
@@ -17709,6 +17709,17 @@ This should be as low as possible, but too low may break functionality</string>
<key>Value</key> <key>Value</key>
<integer>0</integer> <integer>0</integer>
</map> </map>
<key>CrashSubmitBehavior</key>
<map>
<key>Comment</key>
<string>Controls behavior when viewer crashes (0 = ask before sending crash report, 1 = always send crash report, 2 = never send crash report)</string>
<key>Persist</key>
<integer>2</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>1</integer>
</map>
</map> </map>
</llsd> </llsd>

View File

@@ -11,38 +11,5 @@
<key>Value</key> <key>Value</key>
<integer>1</integer> <integer>1</integer>
</map> </map>
<key>CurlMaxTotalConcurrentConnections</key>
<map>
<key>Comment</key>
<string>Maximum total number of simultaneous curl connections</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
<integer>64</integer>
</map>
<key>CurlConcurrentConnectionsPerService</key>
<map>
<key>Comment</key>
<string>Maximum number of simultaneous curl connections per host:port service</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
<integer>8</integer>
</map>
<key>NoVerifySSLCert</key>
<map>
<key>Comment</key>
<string>Do not verify SSL certificates.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
</map> </map>
</llsd> </llsd>

View File

@@ -640,18 +640,6 @@ bool LLAppViewer::init()
initMaxHeapSize() ; initMaxHeapSize() ;
LLPrivateMemoryPoolManager::initClass((BOOL)gSavedSettings.getBOOL("MemoryPrivatePoolEnabled"), (U32)gSavedSettings.getU32("MemoryPrivatePoolSize")) ; 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")); AIEngine::setMaxCount(gSavedSettings.getU32("StateMachineMaxTime"));
@@ -668,6 +656,19 @@ bool LLAppViewer::init()
); );
AIHTTPTimeoutPolicy::setDefaultCurlTimeout(policy_tmp); 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 // Viewer metrics initialization
//static LLCachedControl<bool> metrics_submode(gSavedSettings, //static LLCachedControl<bool> metrics_submode(gSavedSettings,

View File

@@ -59,7 +59,12 @@ public:
virtual void result(const LLSD& content) 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 virtual AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const
@@ -76,7 +81,6 @@ public:
LLCrashLogger::LLCrashLogger() : LLCrashLogger::LLCrashLogger() :
mCrashBehavior(CRASH_BEHAVIOR_ALWAYS_SEND), mCrashBehavior(CRASH_BEHAVIOR_ALWAYS_SEND),
mCrashInPreviousExec(false), mCrashInPreviousExec(false),
mCrashSettings("CrashSettings"),
mCrashHost("") mCrashHost("")
{ {
} }
@@ -355,7 +359,6 @@ void LLCrashLogger::checkCrashDump()
sendCrashLog(dumpDir); sendCrashLog(dumpDir);
} }
#endif #endif
gDirUtilp->deleteDirAndContents(dumpDir);
} }
else else
{ {

View File

@@ -58,7 +58,6 @@ protected:
BOOL mCrashInPreviousExec; BOOL mCrashInPreviousExec;
std::map<std::string, std::string> mFileMap; std::map<std::string, std::string> mFileMap;
std::string mGridName; std::string mGridName;
LLControlGroup mCrashSettings;
std::string mProductName; std::string mProductName;
LLSD mCrashInfo; LLSD mCrashInfo;
std::string mCrashHost; std::string mCrashHost;

View File

@@ -461,7 +461,8 @@ void LLFloaterPreference::onBtnOK( void* userdata )
std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE); std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE);
// save all settings, even if equals defaults // 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 else
{ {

View File

@@ -87,7 +87,7 @@ BOOL LLPanelGeneral::postBuild()
childSetValue("ui_auto_scale", gSavedSettings.getBOOL("UIAutoScale")); childSetValue("ui_auto_scale", gSavedSettings.getBOOL("UIAutoScale"));
LLComboBox* crash_behavior_combobox = getChild<LLComboBox>("crash_behavior_combobox"); LLComboBox* crash_behavior_combobox = getChild<LLComboBox>("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")); childSetValue("language_combobox", gSavedSettings.getString("Language"));
@@ -174,7 +174,7 @@ void LLPanelGeneral::apply()
gSavedSettings.setString("Language", childGetValue("language_combobox")); gSavedSettings.setString("Language", childGetValue("language_combobox"));
LLComboBox* crash_behavior_combobox = getChild<LLComboBox>("crash_behavior_combobox"); LLComboBox* crash_behavior_combobox = getChild<LLComboBox>("crash_behavior_combobox");
gCrashSettings.setS32(CRASH_BEHAVIOR_SETTING, crash_behavior_combobox->getCurrentIndex()); gSavedSettings.setS32(CRASH_BEHAVIOR_SETTING, crash_behavior_combobox->getCurrentIndex());
} }
void LLPanelGeneral::cancel() void LLPanelGeneral::cancel()

View File

@@ -339,6 +339,8 @@ class WindowsManifest(ViewerManifest):
self.path(path_pair[1]) self.path(path_pair[1])
self.end_prefix() self.end_prefix()
self.package_file = 'npne'
def nsi_file_commands(self, install=True): def nsi_file_commands(self, install=True):
def wpath(path): def wpath(path):