diff options
author | Jacek Antonelli | 2008-09-06 18:24:57 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-06 18:25:07 -0500 |
commit | 798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch) | |
tree | 1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/mac_crash_logger | |
parent | Second Life viewer sources 1.20.15 (diff) | |
download | meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2 meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz |
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/mac_crash_logger')
-rw-r--r-- | linden/indra/mac_crash_logger/CMakeLists.txt | 79 | ||||
-rw-r--r-- | linden/indra/mac_crash_logger/llcrashloggermac.cpp | 14 | ||||
-rw-r--r-- | linden/indra/mac_crash_logger/llcrashloggermac.h | 2 |
3 files changed, 87 insertions, 8 deletions
diff --git a/linden/indra/mac_crash_logger/CMakeLists.txt b/linden/indra/mac_crash_logger/CMakeLists.txt new file mode 100644 index 0000000..9cddb56 --- /dev/null +++ b/linden/indra/mac_crash_logger/CMakeLists.txt | |||
@@ -0,0 +1,79 @@ | |||
1 | # -*- cmake -*- | ||
2 | |||
3 | project(mac_crash_logger) | ||
4 | |||
5 | include(00-Common) | ||
6 | include(Boost) | ||
7 | include(LLCommon) | ||
8 | include(LLCrashLogger) | ||
9 | include(LLMath) | ||
10 | include(LLMessage) | ||
11 | include(LLVFS) | ||
12 | include(LLXML) | ||
13 | include(Linking) | ||
14 | |||
15 | include_directories( | ||
16 | ${LLCOMMON_INCLUDE_DIRS} | ||
17 | ${LLCRASHLOGGER_INCLUDE_DIRS} | ||
18 | ${LLMATH_INCLUDE_DIRS} | ||
19 | ${LLVFS_INCLUDE_DIRS} | ||
20 | ${LLXML_INCLUDE_DIRS} | ||
21 | ) | ||
22 | |||
23 | set(mac_crash_logger_SOURCE_FILES | ||
24 | mac_crash_logger.cpp | ||
25 | llcrashloggermac.cpp | ||
26 | ) | ||
27 | |||
28 | set(mac_crash_logger_HEADER_FILES | ||
29 | CMakeLists.txt | ||
30 | |||
31 | llcrashloggermac.h | ||
32 | ) | ||
33 | |||
34 | set_source_files_properties(${mac_crash_logger_HEADER_FILES} | ||
35 | PROPERTIES HEADER_FILE_ONLY TRUE) | ||
36 | list(APPEND mac_crash_logger_SOURCE_FILES ${mac_crash_logger_HEADER_FILES}) | ||
37 | |||
38 | set(mac_crash_logger_RESOURCE_FILES | ||
39 | Info.plist | ||
40 | CrashReporter.nib/ | ||
41 | ) | ||
42 | set_source_files_properties( | ||
43 | ${mac_crash_logger_RESOURCE_FILES} | ||
44 | PROPERTIES | ||
45 | HEADER_FILE_ONLY TRUE | ||
46 | ) | ||
47 | set_source_files_properties( | ||
48 | Info.plist | ||
49 | PROPERTIES | ||
50 | MACOSX_PACKAGE_LOCATION . # will it blend? + poppy | ||
51 | ) | ||
52 | SOURCE_GROUP("Resources" FILES ${mac_crash_logger_RESOURCE_FILES}) | ||
53 | list(APPEND mac_crash_logger_SOURCE_FILES ${mac_crash_logger_RESOURCE_FILES}) | ||
54 | |||
55 | add_executable(mac-crash-logger | ||
56 | MACOSX_BUNDLE | ||
57 | ${mac_crash_logger_SOURCE_FILES}) | ||
58 | |||
59 | target_link_libraries(mac-crash-logger | ||
60 | ${LLCRASHLOGGER_LIBRARIES} | ||
61 | ${LLVFS_LIBRARIES} | ||
62 | ${LLXML_LIBRARIES} | ||
63 | ${LLMESSAGE_LIBRARIES} | ||
64 | ${LLVFS_LIBRARIES} | ||
65 | ${LLMATH_LIBRARIES} | ||
66 | ${LLCOMMON_LIBRARIES} | ||
67 | ${BOOST_SIGNALS_LIBRARY} | ||
68 | ) | ||
69 | |||
70 | add_custom_command( | ||
71 | TARGET mac-crash-logger POST_BUILD | ||
72 | COMMAND ${CMAKE_COMMAND} | ||
73 | ARGS | ||
74 | -E | ||
75 | copy_directory | ||
76 | ${CMAKE_CURRENT_SOURCE_DIR}/CrashReporter.nib | ||
77 | ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/mac-crash-logger.app/Contents/Resources/CrashReporter.nib | ||
78 | ) | ||
79 | |||
diff --git a/linden/indra/mac_crash_logger/llcrashloggermac.cpp b/linden/indra/mac_crash_logger/llcrashloggermac.cpp index 36d8285..8ed2ec7 100644 --- a/linden/indra/mac_crash_logger/llcrashloggermac.cpp +++ b/linden/indra/mac_crash_logger/llcrashloggermac.cpp | |||
@@ -57,7 +57,7 @@ LLFILE *gDebugFile = NULL; | |||
57 | 57 | ||
58 | WindowRef gWindow = NULL; | 58 | WindowRef gWindow = NULL; |
59 | EventHandlerRef gEventHandler = NULL; | 59 | EventHandlerRef gEventHandler = NULL; |
60 | LLString gUserNotes = ""; | 60 | std::string gUserNotes = ""; |
61 | bool gSendReport = false; | 61 | bool gSendReport = false; |
62 | bool gRememberChoice = false; | 62 | bool gRememberChoice = false; |
63 | IBNibRef nib = NULL; | 63 | IBNibRef nib = NULL; |
@@ -217,16 +217,16 @@ void LLCrashLoggerMac::gatherPlatformSpecificFiles() | |||
217 | if(FSRefMakePath(&folder, (UInt8*)&path, sizeof(path)) == noErr) | 217 | if(FSRefMakePath(&folder, (UInt8*)&path, sizeof(path)) == noErr) |
218 | { | 218 | { |
219 | struct stat dw_stat; | 219 | struct stat dw_stat; |
220 | LLString mBuf; | 220 | std::string mBuf; |
221 | bool isLeopard = false; | 221 | bool isLeopard = false; |
222 | // Try the 10.3 path first... | 222 | // Try the 10.3 path first... |
223 | LLString dw_file_name = LLString(path) + LLString("/CrashReporter/Second Life.crash.log"); | 223 | std::string dw_file_name = std::string(path) + std::string("/CrashReporter/Second Life.crash.log"); |
224 | int res = stat(dw_file_name.c_str(), &dw_stat); | 224 | int res = stat(dw_file_name.c_str(), &dw_stat); |
225 | 225 | ||
226 | if (res) | 226 | if (res) |
227 | { | 227 | { |
228 | // Try the 10.2 one next... | 228 | // Try the 10.2 one next... |
229 | dw_file_name = LLString(path) + LLString("/Second Life.crash.log"); | 229 | dw_file_name = std::string(path) + std::string("/Second Life.crash.log"); |
230 | res = stat(dw_file_name.c_str(), &dw_stat); | 230 | res = stat(dw_file_name.c_str(), &dw_stat); |
231 | } | 231 | } |
232 | 232 | ||
@@ -235,8 +235,8 @@ void LLCrashLoggerMac::gatherPlatformSpecificFiles() | |||
235 | //10.5: Like 10.3+, except it puts the crash time in the file instead of dividing it up | 235 | //10.5: Like 10.3+, except it puts the crash time in the file instead of dividing it up |
236 | //using asterisks. Get a directory listing, search for files starting with second life, | 236 | //using asterisks. Get a directory listing, search for files starting with second life, |
237 | //use the last one found. | 237 | //use the last one found. |
238 | LLString old_file_name, current_file_name, pathname, mask; | 238 | std::string old_file_name, current_file_name, pathname, mask; |
239 | pathname = LLString(path) + LLString("/CrashReporter/"); | 239 | pathname = std::string(path) + std::string("/CrashReporter/"); |
240 | mask = "Second Life*"; | 240 | mask = "Second Life*"; |
241 | while(gDirUtilp->getNextFileInDir(pathname, mask, current_file_name, false)) | 241 | while(gDirUtilp->getNextFileInDir(pathname, mask, current_file_name, false)) |
242 | { | 242 | { |
@@ -331,7 +331,7 @@ bool LLCrashLoggerMac::mainLoop() | |||
331 | return true; | 331 | return true; |
332 | } | 332 | } |
333 | 333 | ||
334 | void LLCrashLoggerMac::updateApplication(LLString message) | 334 | void LLCrashLoggerMac::updateApplication(const std::string& message) |
335 | { | 335 | { |
336 | LLCrashLogger::updateApplication(); | 336 | LLCrashLogger::updateApplication(); |
337 | } | 337 | } |
diff --git a/linden/indra/mac_crash_logger/llcrashloggermac.h b/linden/indra/mac_crash_logger/llcrashloggermac.h index 5577b52..292579d 100644 --- a/linden/indra/mac_crash_logger/llcrashloggermac.h +++ b/linden/indra/mac_crash_logger/llcrashloggermac.h | |||
@@ -43,7 +43,7 @@ public: | |||
43 | ~LLCrashLoggerMac(void); | 43 | ~LLCrashLoggerMac(void); |
44 | virtual bool init(); | 44 | virtual bool init(); |
45 | virtual bool mainLoop(); | 45 | virtual bool mainLoop(); |
46 | virtual void updateApplication(LLString message = ""); | 46 | virtual void updateApplication(const std::string& message = LLStringUtil::null); |
47 | virtual bool cleanup(); | 47 | virtual bool cleanup(); |
48 | virtual void gatherPlatformSpecificFiles(); | 48 | virtual void gatherPlatformSpecificFiles(); |
49 | }; | 49 | }; |