diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llcommon/CMakeLists.txt | 10 | ||||
-rw-r--r-- | indra/llcommon/llapp.cpp | 14 |
2 files changed, 20 insertions, 4 deletions
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 50e262ae7a..9c5481a977 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -14,6 +14,7 @@ include(Copy3rdPartyLibs) include(ZLIB) include(URIPARSER) include(BUGSPLAT) +include(BuildVersion) include_directories( ${EXPAT_INCLUDE_DIRS} @@ -255,7 +256,14 @@ set(llcommon_HEADER_FILES ) set_source_files_properties(${llcommon_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) + PROPERTIES HEADER_FILE_ONLY TRUE + ) + +# bring in version information for BugSplat crash reporting +set_source_files_properties(${llcommon_SOURCE_FILES} + PROPERTIES + COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}" # see BuildVersion.cmake + ) list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES}) diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp index 6ea1700ea8..3e652dbdb5 100644 --- a/indra/llcommon/llapp.cpp +++ b/indra/llcommon/llapp.cpp @@ -431,9 +431,17 @@ void LLApp::setupErrorHandling(bool second_instance) #if BUGSPLAT_ENABLED // TODOCP: populate these fields correctly static const wchar_t *bugdb_name = L"second_life_callum_test"; - static const wchar_t *app_name = L"SecondLifeViewer"; - static const wchar_t *app_version = L"1.0.0"; - gBugSplatSender = new MiniDmpSender((const __wchar_t *)bugdb_name, (const __wchar_t *)app_name, (const __wchar_t *)app_version, NULL); + + // build (painfully) the app/channel name + #define stringize_inner(x) L#x + #define stringize_outer(x) stringize_inner(x) + std::wstring app_name(stringize_outer(LL_VIEWER_CHANNEL)); + + // build in real app version now we leveraged CMake to build in BuildVersion.cmake into LLCommon + wchar_t version_string[MAX_STRING]; + wsprintf(version_string, L"%d.%d.%d.%d", LL_VIEWER_VERSION_MAJOR, LL_VIEWER_VERSION_MINOR, LL_VIEWER_VERSION_PATCH, LL_VIEWER_VERSION_BUILD); + + gBugSplatSender = new MiniDmpSender((const __wchar_t *)bugdb_name, (const __wchar_t *)app_name.c_str(), (const __wchar_t *)version_string, NULL); gBugSplatSender->setCallback(BugSplatExceptionCallback); #else |