diff options
author | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
commit | 38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch) | |
tree | adca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/win_crash_logger | |
parent | README.txt (diff) | |
download | meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.zip meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.gz meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.bz2 meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.xz |
Second Life viewer sources 1.13.2.12
Diffstat (limited to 'linden/indra/win_crash_logger')
-rw-r--r-- | linden/indra/win_crash_logger/StdAfx.cpp | 35 | ||||
-rw-r--r-- | linden/indra/win_crash_logger/StdAfx.h | 59 | ||||
-rw-r--r-- | linden/indra/win_crash_logger/ll_icon.ico | bin | 0 -> 2238 bytes | |||
-rw-r--r-- | linden/indra/win_crash_logger/resource.h | 63 | ||||
-rw-r--r-- | linden/indra/win_crash_logger/win_crash_logger.cpp | 936 | ||||
-rw-r--r-- | linden/indra/win_crash_logger/win_crash_logger.h | 39 | ||||
-rw-r--r-- | linden/indra/win_crash_logger/win_crash_logger.ico | bin | 0 -> 1078 bytes | |||
-rw-r--r-- | linden/indra/win_crash_logger/win_crash_logger.rc | 207 | ||||
-rw-r--r-- | linden/indra/win_crash_logger/win_crash_logger.vcproj | 212 |
9 files changed, 1551 insertions, 0 deletions
diff --git a/linden/indra/win_crash_logger/StdAfx.cpp b/linden/indra/win_crash_logger/StdAfx.cpp new file mode 100644 index 0000000..0fe5bb4 --- /dev/null +++ b/linden/indra/win_crash_logger/StdAfx.cpp | |||
@@ -0,0 +1,35 @@ | |||
1 | /** | ||
2 | * @file StdAfx.cpp | ||
3 | * @brief windows crash logger source file for includes | ||
4 | * | ||
5 | * Copyright (c) 2003-2007, Linden Research, Inc. | ||
6 | * | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
8 | * to you under the terms of the GNU General Public License, version 2.0 | ||
9 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
10 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
11 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
12 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
13 | * | ||
14 | * There are special exceptions to the terms and conditions of the GPL as | ||
15 | * it is applied to this Source Code. View the full text of the exception | ||
16 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
17 | * online at http://secondlife.com/developers/opensource/flossexception | ||
18 | * | ||
19 | * By copying, modifying or distributing this software, you acknowledge | ||
20 | * that you have read and understood your obligations described above, | ||
21 | * and agree to abide by those obligations. | ||
22 | * | ||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
25 | * COMPLETENESS OR PERFORMANCE. | ||
26 | */ | ||
27 | |||
28 | // stdafx.cpp : source file that includes just the standard includes | ||
29 | // win_crash_logger.pch will be the pre-compiled header | ||
30 | // stdafx.obj will contain the pre-compiled type information | ||
31 | |||
32 | #include "stdafx.h" | ||
33 | |||
34 | // TODO: reference any additional headers you need in STDAFX.H | ||
35 | // and not in this file | ||
diff --git a/linden/indra/win_crash_logger/StdAfx.h b/linden/indra/win_crash_logger/StdAfx.h new file mode 100644 index 0000000..18b421f --- /dev/null +++ b/linden/indra/win_crash_logger/StdAfx.h | |||
@@ -0,0 +1,59 @@ | |||
1 | /** | ||
2 | * @file StdAfx.h | ||
3 | * @brief standard system includes | ||
4 | * | ||
5 | * Copyright (c) 2003-2007, Linden Research, Inc. | ||
6 | * | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
8 | * to you under the terms of the GNU General Public License, version 2.0 | ||
9 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
10 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
11 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
12 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
13 | * | ||
14 | * There are special exceptions to the terms and conditions of the GPL as | ||
15 | * it is applied to this Source Code. View the full text of the exception | ||
16 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
17 | * online at http://secondlife.com/developers/opensource/flossexception | ||
18 | * | ||
19 | * By copying, modifying or distributing this software, you acknowledge | ||
20 | * that you have read and understood your obligations described above, | ||
21 | * and agree to abide by those obligations. | ||
22 | * | ||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
25 | * COMPLETENESS OR PERFORMANCE. | ||
26 | */ | ||
27 | |||
28 | // stdafx.h : include file for standard system include files, | ||
29 | // or project specific include files that are used frequently, but | ||
30 | // are changed infrequently | ||
31 | // | ||
32 | |||
33 | #if !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_) | ||
34 | #define AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_ | ||
35 | |||
36 | #if _MSC_VER > 1000 | ||
37 | #pragma once | ||
38 | #endif // _MSC_VER > 1000 | ||
39 | |||
40 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers | ||
41 | |||
42 | |||
43 | // Windows Header Files: | ||
44 | #include <windows.h> | ||
45 | |||
46 | // C RunTime Header Files | ||
47 | #include <stdlib.h> | ||
48 | #include <malloc.h> | ||
49 | #include <memory.h> | ||
50 | #include <tchar.h> | ||
51 | |||
52 | // Local Header Files | ||
53 | |||
54 | // TODO: reference additional headers your program requires here | ||
55 | |||
56 | //{{AFX_INSERT_LOCATION}} | ||
57 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. | ||
58 | |||
59 | #endif // !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_) | ||
diff --git a/linden/indra/win_crash_logger/ll_icon.ico b/linden/indra/win_crash_logger/ll_icon.ico new file mode 100644 index 0000000..566346d --- /dev/null +++ b/linden/indra/win_crash_logger/ll_icon.ico | |||
Binary files differ | |||
diff --git a/linden/indra/win_crash_logger/resource.h b/linden/indra/win_crash_logger/resource.h new file mode 100644 index 0000000..9c8570d --- /dev/null +++ b/linden/indra/win_crash_logger/resource.h | |||
@@ -0,0 +1,63 @@ | |||
1 | /** | ||
2 | * @file resource.h | ||
3 | * @brief Resources for windows crash logger | ||
4 | * | ||
5 | * Copyright (c) 2003-2007, Linden Research, Inc. | ||
6 | * | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
8 | * to you under the terms of the GNU General Public License, version 2.0 | ||
9 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
10 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
11 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
12 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
13 | * | ||
14 | * There are special exceptions to the terms and conditions of the GPL as | ||
15 | * it is applied to this Source Code. View the full text of the exception | ||
16 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
17 | * online at http://secondlife.com/developers/opensource/flossexception | ||
18 | * | ||
19 | * By copying, modifying or distributing this software, you acknowledge | ||
20 | * that you have read and understood your obligations described above, | ||
21 | * and agree to abide by those obligations. | ||
22 | * | ||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
25 | * COMPLETENESS OR PERFORMANCE. | ||
26 | */ | ||
27 | |||
28 | //{{NO_DEPENDENCIES}} | ||
29 | // Microsoft Visual C++ generated include file. | ||
30 | // Used by win_crash_logger.rc | ||
31 | // | ||
32 | #define IDC_MYICON 2 | ||
33 | #define IDD_REPORT 9 | ||
34 | #define IDD_WIN_CRASH_LOGGER_DIALOG 102 | ||
35 | #define IDD_ABOUTBOX 103 | ||
36 | #define IDS_APP_TITLE 103 | ||
37 | #define IDM_ABOUT 104 | ||
38 | #define IDM_EXIT 105 | ||
39 | #define IDS_HELLO 106 | ||
40 | #define IDI_WIN_CRASH_LOGGER 107 | ||
41 | #define IDI_SMALL 108 | ||
42 | #define IDC_WIN_CRASH_LOGGER 109 | ||
43 | #define IDR_MAINFRAME 128 | ||
44 | #define IDD_PROGRESS 129 | ||
45 | #define IDD_PREVREPORTBOX 130 | ||
46 | #define IDC_EDIT1 1000 | ||
47 | #define IDC_LOG 1004 | ||
48 | #define IDC_CHECK_AUTO 1006 | ||
49 | #define IDC_STATIC_HEADER 1007 | ||
50 | #define IDC_STATIC_WHATINFO 1008 | ||
51 | #define IDC_STATIC_MOTIVATION 1009 | ||
52 | #define IDC_STATIC -1 | ||
53 | |||
54 | // Next default values for new objects | ||
55 | // | ||
56 | #ifdef APSTUDIO_INVOKED | ||
57 | #ifndef APSTUDIO_READONLY_SYMBOLS | ||
58 | #define _APS_NEXT_RESOURCE_VALUE 131 | ||
59 | #define _APS_NEXT_COMMAND_VALUE 32771 | ||
60 | #define _APS_NEXT_CONTROL_VALUE 1010 | ||
61 | #define _APS_NEXT_SYMED_VALUE 110 | ||
62 | #endif | ||
63 | #endif | ||
diff --git a/linden/indra/win_crash_logger/win_crash_logger.cpp b/linden/indra/win_crash_logger/win_crash_logger.cpp new file mode 100644 index 0000000..3aa41d0 --- /dev/null +++ b/linden/indra/win_crash_logger/win_crash_logger.cpp | |||
@@ -0,0 +1,936 @@ | |||
1 | /** | ||
2 | * @file win_crash_logger.cpp | ||
3 | * @brief Windows crash logger implementation | ||
4 | * | ||
5 | * Copyright (c) 2003-2007, Linden Research, Inc. | ||
6 | * | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
8 | * to you under the terms of the GNU General Public License, version 2.0 | ||
9 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
10 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
11 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
12 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
13 | * | ||
14 | * There are special exceptions to the terms and conditions of the GPL as | ||
15 | * it is applied to this Source Code. View the full text of the exception | ||
16 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
17 | * online at http://secondlife.com/developers/opensource/flossexception | ||
18 | * | ||
19 | * By copying, modifying or distributing this software, you acknowledge | ||
20 | * that you have read and understood your obligations described above, | ||
21 | * and agree to abide by those obligations. | ||
22 | * | ||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
25 | * COMPLETENESS OR PERFORMANCE. | ||
26 | */ | ||
27 | |||
28 | // win_crash_logger.cpp : Defines the entry point for the application. | ||
29 | // | ||
30 | |||
31 | // Must be first include, precompiled headers. | ||
32 | #include "stdafx.h" | ||
33 | |||
34 | #include "linden_common.h" | ||
35 | #include "llcontrol.h" | ||
36 | #include "resource.h" | ||
37 | |||
38 | #include <stdio.h> | ||
39 | #include <stdlib.h> | ||
40 | #include <direct.h> | ||
41 | #include <time.h> | ||
42 | #include <sys/types.h> | ||
43 | #include <sys/stat.h> | ||
44 | #include <wininet.h> | ||
45 | |||
46 | #include "indra_constants.h" // CRASH_BEHAVIOR_ASK, CRASH_SETTING_NAME | ||
47 | #include "llerror.h" | ||
48 | #include "lltimer.h" | ||
49 | #include "lldir.h" | ||
50 | |||
51 | #include "llstring.h" | ||
52 | #include "lldxhardware.h" | ||
53 | |||
54 | LLControlGroup gCrashSettings; // saved at end of session | ||
55 | |||
56 | // Constants | ||
57 | #define MAX_LOADSTRING 100 | ||
58 | const char* const SETTINGS_FILE_HEADER = "version"; | ||
59 | const S32 SETTINGS_FILE_VERSION = 101; | ||
60 | |||
61 | // Functions | ||
62 | LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); | ||
63 | bool handle_button_click(WORD button_id); | ||
64 | S32 load_crash_behavior_setting(); | ||
65 | bool save_crash_behavior_setting(S32 crash_behavior); | ||
66 | void send_crash_report(); | ||
67 | void write_debug(const char *str); | ||
68 | void write_debug(std::string& str); | ||
69 | |||
70 | // Global Variables: | ||
71 | HINSTANCE hInst= NULL; // current instance | ||
72 | TCHAR szTitle[MAX_LOADSTRING]; // The title bar text | ||
73 | TCHAR szWindowClass[MAX_LOADSTRING]; // The title bar text | ||
74 | |||
75 | LLString gUserText; // User's description of the problem | ||
76 | time_t gStartTime = 0; | ||
77 | HWND gHwndReport = NULL; // Send/Don't Send dialog | ||
78 | HWND gHwndProgress = NULL; // Progress window | ||
79 | HCURSOR gCursorArrow = NULL; | ||
80 | HCURSOR gCursorWait = NULL; | ||
81 | BOOL gFirstDialog = TRUE; // Are we currently handling the Send/Don't Send dialog? | ||
82 | BOOL gCrashInPreviousExec = FALSE; | ||
83 | FILE *gDebugFile = NULL; | ||
84 | LLString gUserserver; | ||
85 | WCHAR gProductName[512]; | ||
86 | |||
87 | // | ||
88 | // Implementation | ||
89 | // | ||
90 | |||
91 | // Include product name in the window caption. | ||
92 | void ProcessCaption(HWND hWnd) | ||
93 | { | ||
94 | TCHAR templateText[1024]; | ||
95 | TCHAR finalText[2048]; | ||
96 | GetWindowText(hWnd, templateText, sizeof(templateText)); | ||
97 | swprintf(finalText, templateText, gProductName); | ||
98 | SetWindowText(hWnd, finalText); | ||
99 | } | ||
100 | |||
101 | |||
102 | // Include product name in the diaog item text. | ||
103 | void ProcessDlgItemText(HWND hWnd, int nIDDlgItem) | ||
104 | { | ||
105 | TCHAR templateText[1024]; | ||
106 | TCHAR finalText[2048]; | ||
107 | GetDlgItemText(hWnd, nIDDlgItem, templateText, sizeof(templateText)); | ||
108 | swprintf(finalText, templateText, gProductName); | ||
109 | SetDlgItemText(hWnd, nIDDlgItem, finalText); | ||
110 | } | ||
111 | |||
112 | int APIENTRY WinMain(HINSTANCE hInstance, | ||
113 | HINSTANCE hPrevInstance, | ||
114 | LPSTR lpCmdLine, | ||
115 | int nCmdShow) | ||
116 | { | ||
117 | llinfos << "Starting crash reporter" << llendl; | ||
118 | // We assume that all the logs we're looking for reside on the current drive | ||
119 | gDirUtilp->initAppDirs("SecondLife"); | ||
120 | |||
121 | // Default to the product name "Second Life" (this is overridden by the -name argument) | ||
122 | swprintf(gProductName, L"Second Life"); | ||
123 | |||
124 | gCrashSettings.declareS32(CRASH_BEHAVIOR_SETTING, CRASH_BEHAVIOR_ASK, "Controls behavior when viewer crashes " | ||
125 | "(0 = ask before sending crash report, 1 = always send crash report, 2 = never send crash report)"); | ||
126 | |||
127 | llinfos << "Loading crash behavior setting" << llendl; | ||
128 | S32 crash_behavior = load_crash_behavior_setting(); | ||
129 | |||
130 | // In Win32, we need to generate argc and argv ourselves... | ||
131 | // Note: GetCommandLine() returns a potentially return a LPTSTR | ||
132 | // which can resolve to a LPWSTR (unicode string). | ||
133 | // (That's why it's different from lpCmdLine which is a LPSTR.) | ||
134 | // We don't currently do unicode, so call the non-unicode version | ||
135 | // directly. | ||
136 | llinfos << "Processing command line" << llendl; | ||
137 | LPSTR cmd_line_including_exe_name = GetCommandLineA(); | ||
138 | |||
139 | const S32 MAX_ARGS = 100; | ||
140 | int argc = 0; | ||
141 | char *argv[MAX_ARGS]; | ||
142 | |||
143 | char *token = NULL; | ||
144 | if( cmd_line_including_exe_name[0] == '\"' ) | ||
145 | { | ||
146 | // Exe name is enclosed in quotes | ||
147 | token = strtok( cmd_line_including_exe_name, "\"" ); | ||
148 | argv[argc++] = token; | ||
149 | token = strtok( NULL, " \t," ); | ||
150 | } | ||
151 | else | ||
152 | { | ||
153 | // Exe name is not enclosed in quotes | ||
154 | token = strtok( cmd_line_including_exe_name, " \t," ); | ||
155 | } | ||
156 | |||
157 | while( (token != NULL) && (argc < MAX_ARGS) ) | ||
158 | { | ||
159 | argv[argc++] = token; | ||
160 | /* Get next token: */ | ||
161 | if (*(token + strlen(token) + 1) == '\"') | ||
162 | { | ||
163 | token = strtok( NULL, "\""); | ||
164 | } | ||
165 | else | ||
166 | { | ||
167 | token = strtok( NULL, " \t," ); | ||
168 | } | ||
169 | } | ||
170 | |||
171 | S32 i; | ||
172 | for (i=0; i<argc; i++) | ||
173 | { | ||
174 | if(!strcmp(argv[i], "-previous")) | ||
175 | { | ||
176 | llinfos << "Previous execution did not remove SecondLife.exec_marker" << llendl; | ||
177 | gCrashInPreviousExec = TRUE; | ||
178 | } | ||
179 | |||
180 | if(!strcmp(argv[i], "-dialog")) | ||
181 | { | ||
182 | llinfos << "Show the user dialog" << llendl; | ||
183 | crash_behavior = CRASH_BEHAVIOR_ASK; | ||
184 | } | ||
185 | |||
186 | if(!strcmp(argv[i], "-user")) | ||
187 | { | ||
188 | if ((i + 1) < argc) | ||
189 | { | ||
190 | i++; | ||
191 | gUserserver = argv[i]; | ||
192 | llinfos << "Got userserver " << gUserserver << llendl; | ||
193 | } | ||
194 | } | ||
195 | |||
196 | if(!strcmp(argv[i], "-name")) | ||
197 | { | ||
198 | if ((i + 1) < argc) | ||
199 | { | ||
200 | i++; | ||
201 | |||
202 | mbstowcs(gProductName, argv[i], sizeof(gProductName)); | ||
203 | llinfos << "Got product name " << argv[i] << llendl; | ||
204 | } | ||
205 | } | ||
206 | } | ||
207 | |||
208 | // If user doesn't want to send, bail out | ||
209 | if (crash_behavior == CRASH_BEHAVIOR_NEVER_SEND) | ||
210 | { | ||
211 | llinfos << "Crash behavior is never_send, quitting" << llendl; | ||
212 | return 0; | ||
213 | } | ||
214 | |||
215 | // Get the current time | ||
216 | time(&gStartTime); | ||
217 | |||
218 | llinfos << "Loading dialogs" << llendl; | ||
219 | |||
220 | // Store instance handle in our global variable | ||
221 | hInst = hInstance; | ||
222 | |||
223 | // Initialize global strings | ||
224 | LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); | ||
225 | LoadString(hInstance, IDC_WIN_CRASH_LOGGER, szWindowClass, MAX_LOADSTRING); | ||
226 | |||
227 | gCursorArrow = LoadCursor(NULL, IDC_ARROW); | ||
228 | gCursorWait = LoadCursor(NULL, IDC_WAIT); | ||
229 | |||
230 | // Register a window class that will be used by our dialogs | ||
231 | WNDCLASS wndclass; | ||
232 | wndclass.style = CS_HREDRAW | CS_VREDRAW; | ||
233 | wndclass.lpfnWndProc = WndProc; | ||
234 | wndclass.cbClsExtra = 0; | ||
235 | wndclass.cbWndExtra = DLGWINDOWEXTRA; // Required, since this is used for dialogs! | ||
236 | wndclass.hInstance = hInst; | ||
237 | wndclass.hIcon = LoadIcon(hInst, MAKEINTRESOURCE( IDI_WIN_CRASH_LOGGER ) ); | ||
238 | wndclass.hCursor = gCursorArrow; | ||
239 | wndclass.hbrBackground = (HBRUSH) (COLOR_BTNFACE + 1); | ||
240 | wndclass.lpszMenuName = NULL; | ||
241 | wndclass.lpszClassName = szWindowClass; | ||
242 | RegisterClass( &wndclass ); | ||
243 | |||
244 | // Note: parent hwnd is 0 (the desktop). No dlg proc. See Petzold (5th ed) HexCalc example, Chapter 11, p529 | ||
245 | // win_crash_logger.rc has been edited by hand. | ||
246 | // Dialogs defined with CLASS "WIN_CRASH_LOGGER" (must be same as szWindowClass) | ||
247 | |||
248 | gHwndProgress = CreateDialog(hInst, MAKEINTRESOURCE(IDD_PROGRESS), 0, NULL); | ||
249 | ProcessCaption(gHwndProgress); | ||
250 | ShowWindow(gHwndProgress, SW_HIDE ); | ||
251 | |||
252 | if (crash_behavior == CRASH_BEHAVIOR_ALWAYS_SEND) | ||
253 | { | ||
254 | ShowWindow(gHwndProgress, SW_SHOW ); | ||
255 | send_crash_report(); | ||
256 | return 0; | ||
257 | } | ||
258 | |||
259 | if (crash_behavior == CRASH_BEHAVIOR_ASK) | ||
260 | { | ||
261 | gHwndReport = CreateDialog(hInst, MAKEINTRESOURCE(IDD_REPORT), 0, NULL); | ||
262 | |||
263 | // Include the product name in the caption and various dialog items. | ||
264 | ProcessCaption(gHwndReport); | ||
265 | ProcessDlgItemText(gHwndReport, IDC_STATIC_WHATINFO); | ||
266 | ProcessDlgItemText(gHwndReport, IDC_STATIC_MOTIVATION); | ||
267 | |||
268 | // Update the header to include whether or not we crashed on the last run. | ||
269 | WCHAR header[2048]; | ||
270 | if (gCrashInPreviousExec) | ||
271 | { | ||
272 | swprintf(header, L"%s appears to have crashed or frozen the last time it ran.", gProductName); | ||
273 | } | ||
274 | else | ||
275 | { | ||
276 | swprintf(header, L"%s appears to have crashed.", gProductName); | ||
277 | } | ||
278 | SetDlgItemText(gHwndReport, IDC_STATIC_HEADER, header); | ||
279 | ShowWindow(gHwndReport, SW_SHOW ); | ||
280 | |||
281 | MSG msg; | ||
282 | while (GetMessage(&msg, NULL, 0, 0)) | ||
283 | { | ||
284 | TranslateMessage(&msg); | ||
285 | DispatchMessage(&msg); | ||
286 | } | ||
287 | return msg.wParam; | ||
288 | } | ||
289 | else | ||
290 | { | ||
291 | llwarns << "Unknown crash behavior " << crash_behavior << llendl; | ||
292 | return 1; | ||
293 | } | ||
294 | } | ||
295 | |||
296 | |||
297 | LRESULT CALLBACK WndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) | ||
298 | { | ||
299 | switch( message ) | ||
300 | { | ||
301 | case WM_CREATE: | ||
302 | return 0; | ||
303 | |||
304 | case WM_COMMAND: | ||
305 | if( gFirstDialog ) | ||
306 | { | ||
307 | WORD button_id = LOWORD(wParam); | ||
308 | bool handled = handle_button_click(button_id); | ||
309 | if (handled) | ||
310 | { | ||
311 | return 0; | ||
312 | } | ||
313 | } | ||
314 | break; | ||
315 | |||
316 | case WM_DESTROY: | ||
317 | // Closing the window cancels | ||
318 | PostQuitMessage(0); | ||
319 | return 0; | ||
320 | } | ||
321 | |||
322 | return DefWindowProc(hwnd, message, wParam, lParam); | ||
323 | } | ||
324 | |||
325 | |||
326 | bool handle_button_click(WORD button_id) | ||
327 | { | ||
328 | // Is this something other than Send or Don't Send? | ||
329 | if (button_id != IDOK | ||
330 | && button_id != IDCANCEL) | ||
331 | { | ||
332 | return false; | ||
333 | } | ||
334 | |||
335 | // See if "do this next time" is checked and save state | ||
336 | S32 crash_behavior = CRASH_BEHAVIOR_ASK; | ||
337 | LRESULT result = SendDlgItemMessage(gHwndReport, IDC_CHECK_AUTO, BM_GETCHECK, 0, 0); | ||
338 | if (result == BST_CHECKED) | ||
339 | { | ||
340 | if (button_id == IDOK) | ||
341 | { | ||
342 | crash_behavior = CRASH_BEHAVIOR_ALWAYS_SEND; | ||
343 | } | ||
344 | else if (button_id == IDCANCEL) | ||
345 | { | ||
346 | crash_behavior = CRASH_BEHAVIOR_NEVER_SEND; | ||
347 | } | ||
348 | } | ||
349 | bool success = save_crash_behavior_setting(crash_behavior); | ||
350 | if (!success) | ||
351 | { | ||
352 | llwarns << "Failed to save crash settings" << llendl; | ||
353 | } | ||
354 | |||
355 | // We're done with this dialog. | ||
356 | gFirstDialog = FALSE; | ||
357 | |||
358 | // Send the crash report if requested | ||
359 | if (button_id == IDOK) | ||
360 | { | ||
361 | // Don't let users type anything. They believe the reports | ||
362 | // get read by humans, and get angry when we don't respond. JC | ||
363 | //WCHAR wbuffer[20000]; | ||
364 | //GetDlgItemText(gHwndReport, // handle to dialog box | ||
365 | // IDC_EDIT1, // control identifier | ||
366 | // wbuffer, // pointer to buffer for text | ||
367 | // 20000 // maximum size of string | ||
368 | // ); | ||
369 | //gUserText = wstring_to_utf8str(utf16str_to_wstring(wbuffer)).c_str(); | ||
370 | //llinfos << gUserText << llendl; | ||
371 | |||
372 | // Activate and show the window. | ||
373 | ShowWindow(gHwndProgress, SW_SHOW); | ||
374 | // Try doing this second to make the progress window go frontmost. | ||
375 | ShowWindow(gHwndReport, SW_HIDE); | ||
376 | |||
377 | send_crash_report(); | ||
378 | } | ||
379 | |||
380 | // Quit the app | ||
381 | PostQuitMessage(0); | ||
382 | |||
383 | return true; | ||
384 | } | ||
385 | |||
386 | |||
387 | class LLFileEncoder | ||
388 | { | ||
389 | public: | ||
390 | LLFileEncoder(const char *formname, const char *filename); | ||
391 | |||
392 | BOOL isValid() const { return mIsValid; } | ||
393 | LLString encodeURL(const S32 max_length = 0); | ||
394 | public: | ||
395 | BOOL mIsValid; | ||
396 | LLString mFilename; | ||
397 | LLString mFormname; | ||
398 | S32 mBufLength; | ||
399 | U8 *mBuf; | ||
400 | }; | ||
401 | |||
402 | LLString encode_string(const char *formname, const LLString &str); | ||
403 | |||
404 | void update_messages() | ||
405 | { | ||
406 | MSG msg; | ||
407 | while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) | ||
408 | { | ||
409 | if (msg.message == WM_QUIT) | ||
410 | { | ||
411 | exit(0); | ||
412 | } | ||
413 | TranslateMessage(&msg); | ||
414 | DispatchMessage(&msg); | ||
415 | } | ||
416 | } | ||
417 | |||
418 | void sleep_and_pump_messages( U32 seconds ) | ||
419 | { | ||
420 | const U32 CYCLES_PER_SECOND = 10; | ||
421 | U32 cycles = seconds * CYCLES_PER_SECOND; | ||
422 | while( cycles-- ) | ||
423 | { | ||
424 | update_messages(); | ||
425 | ms_sleep(1000 / CYCLES_PER_SECOND); | ||
426 | } | ||
427 | } | ||
428 | |||
429 | |||
430 | void show_progress(const char* message) | ||
431 | { | ||
432 | std::wstring msg = wstring_to_utf16str(utf8str_to_wstring(message)); | ||
433 | if (gHwndProgress) | ||
434 | { | ||
435 | SendDlgItemMessage(gHwndProgress, // handle to destination window | ||
436 | IDC_LOG, | ||
437 | WM_SETTEXT, // message to send | ||
438 | FALSE, // undo option | ||
439 | (LPARAM)msg.c_str()); | ||
440 | } | ||
441 | } | ||
442 | |||
443 | |||
444 | void send_crash_report() | ||
445 | { | ||
446 | update_messages(); | ||
447 | show_progress("Starting up..."); | ||
448 | update_messages(); | ||
449 | |||
450 | const S32 SL_MAX_SIZE = 100000; // Maximum size of the Second Life log file. | ||
451 | |||
452 | update_messages(); | ||
453 | |||
454 | // Lots of silly variable, replicated for each log file. | ||
455 | std::string db_file_name; // debug.log | ||
456 | std::string sl_file_name; // SecondLife.log | ||
457 | std::string md_file_name; // minidump (SecondLife.dmp) file name | ||
458 | std::string st_file_name; // stats.log file | ||
459 | std::string si_file_name; // settings.ini file | ||
460 | std::string ml_file_name; // message.log file | ||
461 | |||
462 | LLFileEncoder *db_filep = NULL; | ||
463 | LLFileEncoder *sl_filep = NULL; | ||
464 | LLFileEncoder *st_filep = NULL; | ||
465 | LLFileEncoder *md_filep = NULL; | ||
466 | LLFileEncoder *si_filep = NULL; | ||
467 | LLFileEncoder *ml_filep = NULL; | ||
468 | |||
469 | // DX hardware probe blocks, so we can't cancel during it | ||
470 | SetCursor(gCursorWait); | ||
471 | |||
472 | // Need to do hardware detection before we grab the files, otherwise we don't send the debug log updates | ||
473 | // to the server (including the list of hardware). | ||
474 | update_messages(); | ||
475 | show_progress("Detecting hardware, please wait..."); | ||
476 | update_messages(); | ||
477 | gDXHardware.setWriteDebugFunc(write_debug); | ||
478 | gDXHardware.getInfo(FALSE); | ||
479 | update_messages(); | ||
480 | gDXHardware.dumpDevices(); | ||
481 | update_messages(); | ||
482 | fclose(gDebugFile); | ||
483 | gDebugFile = NULL; | ||
484 | |||
485 | // At this point we're responsive enough the user could click the close button | ||
486 | SetCursor(gCursorArrow); | ||
487 | |||
488 | /////////////////////////////////// | ||
489 | // | ||
490 | // We do the parsing for the debug_info file first, as that will | ||
491 | // give us the location of the SecondLife.log file. | ||
492 | // | ||
493 | |||
494 | // Figure out the filename of the debug log | ||
495 | db_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"debug_info.log"); | ||
496 | db_filep = new LLFileEncoder("DB", db_file_name.c_str()); | ||
497 | |||
498 | // Get the filename of the SecondLife.log file | ||
499 | char tmp_sl_name[256]; | ||
500 | tmp_sl_name[0] = '\0'; | ||
501 | |||
502 | update_messages(); | ||
503 | show_progress("Looking for files..."); | ||
504 | update_messages(); | ||
505 | |||
506 | // Look for it in the debug_info.log file | ||
507 | if (db_filep->isValid()) | ||
508 | { | ||
509 | sscanf((const char *)db_filep->mBuf, "SL Log: %[^\r\n]", tmp_sl_name); | ||
510 | } | ||
511 | else | ||
512 | { | ||
513 | delete db_filep; | ||
514 | db_filep = NULL; | ||
515 | } | ||
516 | |||
517 | if (gCrashInPreviousExec) | ||
518 | { | ||
519 | // If we froze, the crash log this time around isn't useful. Use the | ||
520 | // old one. | ||
521 | sl_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"SecondLife.old"); | ||
522 | } | ||
523 | else if (tmp_sl_name[0]) | ||
524 | { | ||
525 | // If debug_info.log gives us a valid log filename, use that. | ||
526 | sl_file_name = tmp_sl_name; | ||
527 | llinfos << "Using log file from debug log " << sl_file_name << llendl; | ||
528 | } | ||
529 | else | ||
530 | { | ||
531 | // Figure out the filename of the default second life log | ||
532 | sl_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"SecondLife.log"); | ||
533 | } | ||
534 | |||
535 | // Now we get the SecondLife.log file if it's there | ||
536 | sl_filep = new LLFileEncoder("SL", sl_file_name.c_str()); | ||
537 | if (!sl_filep->isValid()) | ||
538 | { | ||
539 | delete sl_filep; | ||
540 | sl_filep = NULL; | ||
541 | } | ||
542 | |||
543 | update_messages(); | ||
544 | show_progress("Looking for stats file..."); | ||
545 | update_messages(); | ||
546 | |||
547 | st_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"stats.log"); | ||
548 | st_filep = new LLFileEncoder("ST", st_file_name.c_str()); | ||
549 | if (!st_filep->isValid()) | ||
550 | { | ||
551 | delete st_filep; | ||
552 | st_filep = NULL; | ||
553 | } | ||
554 | |||
555 | si_file_name = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS,"settings.ini"); | ||
556 | si_filep = new LLFileEncoder("SI", si_file_name.c_str()); | ||
557 | if (!si_filep->isValid()) | ||
558 | { | ||
559 | delete si_filep; | ||
560 | si_filep = NULL; | ||
561 | } | ||
562 | |||
563 | // Now we get the minidump | ||
564 | md_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"SecondLife.dmp"); | ||
565 | md_filep = new LLFileEncoder("MD", md_file_name.c_str()); | ||
566 | if (!md_filep->isValid()) | ||
567 | { | ||
568 | delete md_filep; | ||
569 | md_filep = NULL; | ||
570 | } | ||
571 | |||
572 | // Now we get the message log | ||
573 | ml_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"message.log"); | ||
574 | ml_filep = new LLFileEncoder("ML", ml_file_name.c_str()); | ||
575 | if (!ml_filep->isValid()) | ||
576 | { | ||
577 | delete ml_filep; | ||
578 | ml_filep = NULL; | ||
579 | } | ||
580 | |||
581 | LLString post_data; | ||
582 | LLString tmp_url_buf; | ||
583 | |||
584 | // Append the userserver | ||
585 | tmp_url_buf = encode_string("USER", gUserserver); | ||
586 | post_data += tmp_url_buf; | ||
587 | llinfos << "PostData:" << post_data << llendl; | ||
588 | |||
589 | if (gCrashInPreviousExec) | ||
590 | { | ||
591 | post_data.append(1, '&'); | ||
592 | tmp_url_buf = encode_string("EF", "Y"); | ||
593 | post_data += tmp_url_buf; | ||
594 | } | ||
595 | |||
596 | update_messages(); | ||
597 | show_progress("Encoding data"); | ||
598 | update_messages(); | ||
599 | if (db_filep) | ||
600 | { | ||
601 | post_data.append(1, '&'); | ||
602 | tmp_url_buf = db_filep->encodeURL(); | ||
603 | post_data += tmp_url_buf; | ||
604 | llinfos << "Sending DB log file" << llendl; | ||
605 | } | ||
606 | else | ||
607 | { | ||
608 | llinfos << "Not sending DB log file" << llendl; | ||
609 | } | ||
610 | show_progress("Encoding data."); | ||
611 | update_messages(); | ||
612 | |||
613 | if (sl_filep) | ||
614 | { | ||
615 | post_data.append(1, '&'); | ||
616 | tmp_url_buf = sl_filep->encodeURL(SL_MAX_SIZE); | ||
617 | post_data += tmp_url_buf; | ||
618 | llinfos << "Sending SL log file" << llendl; | ||
619 | } | ||
620 | else | ||
621 | { | ||
622 | llinfos << "Not sending SL log file" << llendl; | ||
623 | } | ||
624 | show_progress("Encoding data.."); | ||
625 | update_messages(); | ||
626 | |||
627 | if (st_filep) | ||
628 | { | ||
629 | post_data.append(1, '&'); | ||
630 | tmp_url_buf = st_filep->encodeURL(SL_MAX_SIZE); | ||
631 | post_data += tmp_url_buf; | ||
632 | llinfos << "Sending stats log file" << llendl; | ||
633 | } | ||
634 | else | ||
635 | { | ||
636 | llinfos << "Not sending stats log file" << llendl; | ||
637 | } | ||
638 | show_progress("Encoding data..."); | ||
639 | update_messages(); | ||
640 | |||
641 | if (md_filep) | ||
642 | { | ||
643 | post_data.append(1, '&'); | ||
644 | tmp_url_buf = md_filep->encodeURL(); | ||
645 | post_data += tmp_url_buf; | ||
646 | llinfos << "Sending minidump log file" << llendl; | ||
647 | } | ||
648 | else | ||
649 | { | ||
650 | llinfos << "Not sending minidump log file" << llendl; | ||
651 | } | ||
652 | show_progress("Encoding data...."); | ||
653 | update_messages(); | ||
654 | |||
655 | if (si_filep) | ||
656 | { | ||
657 | post_data.append(1, '&'); | ||
658 | tmp_url_buf = si_filep->encodeURL(); | ||
659 | post_data += tmp_url_buf; | ||
660 | llinfos << "Sending settings log file" << llendl; | ||
661 | } | ||
662 | else | ||
663 | { | ||
664 | llinfos << "Not sending settings.ini file" << llendl; | ||
665 | } | ||
666 | show_progress("Encoding data...."); | ||
667 | update_messages(); | ||
668 | |||
669 | if (ml_filep) | ||
670 | { | ||
671 | post_data.append(1, '&'); | ||
672 | tmp_url_buf = ml_filep->encodeURL(SL_MAX_SIZE); | ||
673 | post_data += tmp_url_buf; | ||
674 | llinfos << "Sending message log file" << llendl; | ||
675 | } | ||
676 | else | ||
677 | { | ||
678 | llinfos << "Not sending message.log file" << llendl; | ||
679 | } | ||
680 | show_progress("Encoding data...."); | ||
681 | update_messages(); | ||
682 | |||
683 | if (gUserText.size()) | ||
684 | { | ||
685 | post_data.append(1, '&'); | ||
686 | tmp_url_buf = encode_string("UN", gUserText); | ||
687 | post_data += tmp_url_buf; | ||
688 | } | ||
689 | |||
690 | delete db_filep; | ||
691 | db_filep = NULL; | ||
692 | delete sl_filep; | ||
693 | sl_filep = NULL; | ||
694 | delete md_filep; | ||
695 | md_filep = NULL; | ||
696 | |||
697 | // Post data to web server | ||
698 | const S32 BUFSIZE = 65536; | ||
699 | HINTERNET hinet, hsession, hrequest; | ||
700 | char data[BUFSIZE]; | ||
701 | unsigned long bytes_read; | ||
702 | |||
703 | llinfos << "Connecting to crash report server" << llendl; | ||
704 | update_messages(); | ||
705 | show_progress("Connecting to server..."); | ||
706 | update_messages(); | ||
707 | |||
708 | // Init wininet subsystem | ||
709 | hinet = InternetOpen(L"LindenCrashReporter", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0); | ||
710 | if (hinet == NULL) | ||
711 | { | ||
712 | llinfos << "Couldn't open connection" << llendl; | ||
713 | sleep_and_pump_messages( 5 ); | ||
714 | // return FALSE; | ||
715 | } | ||
716 | |||
717 | hsession = InternetConnect(hinet, | ||
718 | L"secondlife.com", | ||
719 | INTERNET_DEFAULT_HTTP_PORT, | ||
720 | NULL, | ||
721 | NULL, | ||
722 | INTERNET_SERVICE_HTTP, | ||
723 | NULL, | ||
724 | NULL); | ||
725 | |||
726 | if (!hsession) | ||
727 | { | ||
728 | llinfos << "Couldn't talk to crash report server" << llendl; | ||
729 | } | ||
730 | |||
731 | hrequest = HttpOpenRequest(hsession, L"POST", L"/cgi-bin/viewer_crash_reporter2", NULL, L"", NULL, 0, 0); | ||
732 | if (!hrequest) | ||
733 | { | ||
734 | llinfos << "Couldn't open crash report URL!" << llendl; | ||
735 | } | ||
736 | |||
737 | llinfos << "Transmitting data" << llendl; | ||
738 | llinfos << "Bytes: " << (post_data.size()) << llendl; | ||
739 | |||
740 | update_messages(); | ||
741 | show_progress("Transmitting data..."); | ||
742 | update_messages(); | ||
743 | |||
744 | BOOL ok = HttpSendRequest(hrequest, NULL, 0, (void *)(post_data.c_str()), post_data.size()); | ||
745 | if (!ok) | ||
746 | { | ||
747 | llinfos << "Error posting data!" << llendl; | ||
748 | sleep_and_pump_messages( 5 ); | ||
749 | } | ||
750 | |||
751 | llinfos << "Response from crash report server:" << llendl; | ||
752 | do | ||
753 | { | ||
754 | if (InternetReadFile(hrequest, data, BUFSIZE, &bytes_read)) | ||
755 | { | ||
756 | if (bytes_read == 0) | ||
757 | { | ||
758 | // If InternetFileRead returns TRUE AND bytes_read == 0 | ||
759 | // we've successfully downloaded the entire file | ||
760 | break; | ||
761 | } | ||
762 | else | ||
763 | { | ||
764 | data[bytes_read] = 0; | ||
765 | llinfos << data << llendl; | ||
766 | } | ||
767 | } | ||
768 | else | ||
769 | { | ||
770 | llinfos << "Couldn't read file!" << llendl; | ||
771 | sleep_and_pump_messages( 5 ); | ||
772 | // return FALSE; | ||
773 | } | ||
774 | } while(TRUE); | ||
775 | |||
776 | InternetCloseHandle(hrequest); | ||
777 | InternetCloseHandle(hsession); | ||
778 | InternetCloseHandle(hinet); | ||
779 | update_messages(); | ||
780 | show_progress("Done."); | ||
781 | sleep_and_pump_messages( 3 ); | ||
782 | // return TRUE; | ||
783 | } | ||
784 | |||
785 | LLFileEncoder::LLFileEncoder(const char *form_name, const char *filename) | ||
786 | { | ||
787 | mFormname = form_name; | ||
788 | mFilename = filename; | ||
789 | mIsValid = FALSE; | ||
790 | mBuf = NULL; | ||
791 | |||
792 | int res; | ||
793 | |||
794 | llstat stat_data; | ||
795 | res = LLFile::stat(mFilename.c_str(), &stat_data); | ||
796 | if (res) | ||
797 | { | ||
798 | llwarns << "File " << mFilename << " is missing!" << llendl; | ||
799 | return; | ||
800 | } | ||
801 | |||
802 | FILE *fp = NULL; | ||
803 | S32 buf_size = 0; | ||
804 | S32 count = 0; | ||
805 | while (count < 5) | ||
806 | { | ||
807 | buf_size = stat_data.st_size; | ||
808 | fp = LLFile::fopen(mFilename.c_str(), "rb"); | ||
809 | if (!fp) | ||
810 | { | ||
811 | llwarns << "Can't open file " << mFilename << ", wait for a second" << llendl; | ||
812 | // Couldn't open the file, wait a bit and try again | ||
813 | count++; | ||
814 | ms_sleep(1000); | ||
815 | } | ||
816 | else | ||
817 | { | ||
818 | break; | ||
819 | } | ||
820 | } | ||
821 | if (!fp) | ||
822 | { | ||
823 | return; | ||
824 | } | ||
825 | U8 *buf = new U8[buf_size + 1]; | ||
826 | fread(buf, 1, buf_size, fp); | ||
827 | fclose(fp); | ||
828 | |||
829 | mBuf = buf; | ||
830 | mBufLength = buf_size; | ||
831 | |||
832 | mIsValid = TRUE; | ||
833 | } | ||
834 | |||
835 | LLString LLFileEncoder::encodeURL(const S32 max_length) | ||
836 | { | ||
837 | LLString result = mFormname; | ||
838 | result.append(1, '='); | ||
839 | |||
840 | S32 i = 0; | ||
841 | |||
842 | if (max_length) | ||
843 | { | ||
844 | if (mBufLength > max_length) | ||
845 | { | ||
846 | i = mBufLength - max_length; | ||
847 | } | ||
848 | } | ||
849 | |||
850 | S32 url_buf_size = 3*mBufLength + 1; | ||
851 | char *url_buf = new char[url_buf_size]; | ||
852 | |||
853 | S32 cur_pos = 0; | ||
854 | for (; i < mBufLength; i++) | ||
855 | { | ||
856 | S32 byte_val = mBuf[i]; | ||
857 | sprintf(url_buf + cur_pos, "%%%02x", byte_val); | ||
858 | cur_pos += 3; | ||
859 | } | ||
860 | url_buf[i*3] = 0; | ||
861 | |||
862 | result.append(url_buf); | ||
863 | delete[] url_buf; | ||
864 | return result; | ||
865 | } | ||
866 | |||
867 | LLString encode_string(const char *formname, const LLString &str) | ||
868 | { | ||
869 | LLString result = formname; | ||
870 | result.append(1, '='); | ||
871 | // Not using LLString because of bad performance issues | ||
872 | S32 buf_size = str.size(); | ||
873 | S32 url_buf_size = 3*str.size() + 1; | ||
874 | char *url_buf = new char[url_buf_size]; | ||
875 | |||
876 | S32 cur_pos = 0; | ||
877 | S32 i; | ||
878 | for (i = 0; i < buf_size; i++) | ||
879 | { | ||
880 | sprintf(url_buf + cur_pos, "%%%02x", str[i]); | ||
881 | cur_pos += 3; | ||
882 | } | ||
883 | url_buf[i*3] = 0; | ||
884 | |||
885 | result.append(url_buf); | ||
886 | delete[] url_buf; | ||
887 | return result; | ||
888 | } | ||
889 | |||
890 | void write_debug(const char *str) | ||
891 | { | ||
892 | if (!gDebugFile) | ||
893 | { | ||
894 | std::string debug_filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"debug_info.log"); | ||
895 | llinfos << "Opening debug file " << debug_filename << llendl; | ||
896 | gDebugFile = LLFile::fopen(debug_filename.c_str(), "a+"); | ||
897 | if (!gDebugFile) | ||
898 | { | ||
899 | fprintf(stderr, "Couldn't open %s: debug log to stderr instead.\n", debug_filename.c_str()); | ||
900 | gDebugFile = stderr; | ||
901 | } | ||
902 | } | ||
903 | fprintf(gDebugFile, str); | ||
904 | fflush(gDebugFile); | ||
905 | } | ||
906 | |||
907 | void write_debug(std::string& str) | ||
908 | { | ||
909 | write_debug(str.c_str()); | ||
910 | } | ||
911 | |||
912 | S32 load_crash_behavior_setting() | ||
913 | { | ||
914 | std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE); | ||
915 | |||
916 | gCrashSettings.loadFromFile(filename); | ||
917 | |||
918 | S32 value = gCrashSettings.getS32(CRASH_BEHAVIOR_SETTING); | ||
919 | |||
920 | if (value < CRASH_BEHAVIOR_ASK || CRASH_BEHAVIOR_NEVER_SEND < value) return CRASH_BEHAVIOR_ASK; | ||
921 | |||
922 | return value; | ||
923 | } | ||
924 | |||
925 | bool save_crash_behavior_setting(S32 crash_behavior) | ||
926 | { | ||
927 | if (crash_behavior < CRASH_BEHAVIOR_ASK) return false; | ||
928 | if (crash_behavior > CRASH_BEHAVIOR_NEVER_SEND) return false; | ||
929 | |||
930 | gCrashSettings.setS32(CRASH_BEHAVIOR_SETTING, crash_behavior); | ||
931 | std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE); | ||
932 | |||
933 | gCrashSettings.saveToFile(filename, FALSE); | ||
934 | |||
935 | return true; | ||
936 | } | ||
diff --git a/linden/indra/win_crash_logger/win_crash_logger.h b/linden/indra/win_crash_logger/win_crash_logger.h new file mode 100644 index 0000000..6901358 --- /dev/null +++ b/linden/indra/win_crash_logger/win_crash_logger.h | |||
@@ -0,0 +1,39 @@ | |||
1 | /** | ||
2 | * @file win_crash_logger.h | ||
3 | * @brief Windows crash logger project includes | ||
4 | * | ||
5 | * Copyright (c) 2003-2007, Linden Research, Inc. | ||
6 | * | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
8 | * to you under the terms of the GNU General Public License, version 2.0 | ||
9 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
10 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
11 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
12 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
13 | * | ||
14 | * There are special exceptions to the terms and conditions of the GPL as | ||
15 | * it is applied to this Source Code. View the full text of the exception | ||
16 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
17 | * online at http://secondlife.com/developers/opensource/flossexception | ||
18 | * | ||
19 | * By copying, modifying or distributing this software, you acknowledge | ||
20 | * that you have read and understood your obligations described above, | ||
21 | * and agree to abide by those obligations. | ||
22 | * | ||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
25 | * COMPLETENESS OR PERFORMANCE. | ||
26 | */ | ||
27 | |||
28 | |||
29 | #if !defined(AFX_WIN_CRASH_LOGGER_H__79802F4B_7C37_4F63_A2BB_0768788C3A27__INCLUDED_) | ||
30 | #define AFX_WIN_CRASH_LOGGER_H__79802F4B_7C37_4F63_A2BB_0768788C3A27__INCLUDED_ | ||
31 | |||
32 | #if _MSC_VER > 1000 | ||
33 | #pragma once | ||
34 | #endif // _MSC_VER > 1000 | ||
35 | |||
36 | #include "resource.h" | ||
37 | |||
38 | |||
39 | #endif // !defined(AFX_WIN_CRASH_LOGGER_H__79802F4B_7C37_4F63_A2BB_0768788C3A27__INCLUDED_) | ||
diff --git a/linden/indra/win_crash_logger/win_crash_logger.ico b/linden/indra/win_crash_logger/win_crash_logger.ico new file mode 100644 index 0000000..3868835 --- /dev/null +++ b/linden/indra/win_crash_logger/win_crash_logger.ico | |||
Binary files differ | |||
diff --git a/linden/indra/win_crash_logger/win_crash_logger.rc b/linden/indra/win_crash_logger/win_crash_logger.rc new file mode 100644 index 0000000..f4c7eaa --- /dev/null +++ b/linden/indra/win_crash_logger/win_crash_logger.rc | |||
@@ -0,0 +1,207 @@ | |||
1 | // Microsoft Visual C++ generated resource script. | ||
2 | // | ||
3 | #include "resource.h" | ||
4 | |||
5 | #define APSTUDIO_READONLY_SYMBOLS | ||
6 | ///////////////////////////////////////////////////////////////////////////// | ||
7 | // | ||
8 | // Generated from the TEXTINCLUDE 2 resource. | ||
9 | // | ||
10 | #define APSTUDIO_HIDDEN_SYMBOLS | ||
11 | #include "windows.h" | ||
12 | #undef APSTUDIO_HIDDEN_SYMBOLS | ||
13 | #include "resource.h" | ||
14 | |||
15 | ///////////////////////////////////////////////////////////////////////////// | ||
16 | #undef APSTUDIO_READONLY_SYMBOLS | ||
17 | |||
18 | ///////////////////////////////////////////////////////////////////////////// | ||
19 | // English (U.S.) resources | ||
20 | |||
21 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) | ||
22 | #ifdef _WIN32 | ||
23 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US | ||
24 | #pragma code_page(1252) | ||
25 | #endif //_WIN32 | ||
26 | |||
27 | ///////////////////////////////////////////////////////////////////////////// | ||
28 | // | ||
29 | // Icon | ||
30 | // | ||
31 | |||
32 | // Icon with lowest ID value placed first to ensure application icon | ||
33 | // remains consistent on all systems. | ||
34 | IDI_WIN_CRASH_LOGGER ICON "ll_icon.ico" | ||
35 | |||
36 | ///////////////////////////////////////////////////////////////////////////// | ||
37 | // | ||
38 | // Menu | ||
39 | // | ||
40 | |||
41 | IDC_WIN_CRASH_LOGGER MENU | ||
42 | BEGIN | ||
43 | POPUP "&File" | ||
44 | BEGIN | ||
45 | MENUITEM "E&xit", IDM_EXIT | ||
46 | END | ||
47 | POPUP "&Help" | ||
48 | BEGIN | ||
49 | MENUITEM "&About ...", IDM_ABOUT | ||
50 | END | ||
51 | END | ||
52 | |||
53 | |||
54 | ///////////////////////////////////////////////////////////////////////////// | ||
55 | // | ||
56 | // Dialog | ||
57 | // | ||
58 | |||
59 | IDD_PROGRESS DIALOG 100, 100, 186, 33 | ||
60 | STYLE DS_SETFONT | DS_SETFOREGROUND | WS_CAPTION | WS_SYSMENU | ||
61 | CAPTION "%s Crash Logger" | ||
62 | CLASS "WIN_CRASH_LOGGER" | ||
63 | FONT 8, "MS Sans Serif" | ||
64 | BEGIN | ||
65 | LTEXT "Static",IDC_LOG,7,7,172,8 | ||
66 | END | ||
67 | |||
68 | IDD_REPORT DIALOGEX 100, 100, 297, 125 | ||
69 | STYLE DS_SETFONT | DS_SETFOREGROUND | WS_CAPTION | WS_SYSMENU | ||
70 | CAPTION "%s Crash Logger" | ||
71 | CLASS "WIN_CRASH_LOGGER" | ||
72 | FONT 8, "MS Sans Serif", 0, 0, 0x0 | ||
73 | BEGIN | ||
74 | DEFPUSHBUTTON "Send",IDOK,198,104,45,15,WS_GROUP | ||
75 | PUSHBUTTON "Don't Send",IDCANCEL,247,104,45,15,WS_GROUP | ||
76 | LTEXT "%s appears to have crashed.",IDC_STATIC_HEADER,4,4,288, | ||
77 | 14 | ||
78 | LTEXT "This crash reporter collects information about your computer's hardware, operating system, and some %s logs, which are used for debugging purposes only.", | ||
79 | IDC_STATIC_WHATINFO,4,23,288,19,NOT WS_GROUP | ||
80 | CONTROL "Remember this choice",IDC_CHECK_AUTO,"Button", | ||
81 | BS_AUTOCHECKBOX | WS_TABSTOP,4,106,89,13 | ||
82 | LTEXT "Sending crash reports is the best way to help us improve the quality of %s.", | ||
83 | IDC_STATIC_MOTIVATION,4,38,288,8 | ||
84 | LTEXT "If you continue to experience this problem, please try one of the following:", | ||
85 | IDC_STATIC,4,57,251,8 | ||
86 | LTEXT "- Contact support by email at support@lindenlab.com", | ||
87 | IDC_STATIC,4,67,179,8 | ||
88 | LTEXT "- If you can log-in, please contact Live Help by using menu Help > Live Help.", | ||
89 | IDC_STATIC,4,87,249,8 | ||
90 | LTEXT "- Search the Second Life Knowledge Base at http://secondlife.com/knowledgebase/", | ||
91 | IDC_STATIC,4,77,281,8,SS_NOTIFY | ||
92 | END | ||
93 | |||
94 | IDD_PREVREPORTBOX DIALOG 100, 100, 232, 213 | ||
95 | STYLE DS_SETFONT | DS_SETFOREGROUND | WS_CAPTION | WS_SYSMENU | ||
96 | CAPTION "%s Crash Logger" | ||
97 | CLASS "WIN_CRASH_LOGGER" | ||
98 | FONT 8, "MS Sans Serif" | ||
99 | BEGIN | ||
100 | DEFPUSHBUTTON "OK",IDOK,131,193,45,15,WS_GROUP | ||
101 | EDITTEXT IDC_EDIT1,4,102,223,89,ES_MULTILINE | ES_WANTRETURN | | ||
102 | WS_VSCROLL | ||
103 | PUSHBUTTON "Cancel",IDCANCEL,181,193,45,15,WS_GROUP | ||
104 | LTEXT "%s appears to have crashed or frozen the last time it ran.", | ||
105 | IDC_STATIC,4,4,214,8 | ||
106 | LTEXT "This crash reporter collects information about your computer's", | ||
107 | IDC_STATIC,4,17,201,8 | ||
108 | LTEXT "hardware configuration, operating system, and some %s", | ||
109 | IDC_STATIC,4,25,212,8 | ||
110 | LTEXT "logs, all of which are used for debugging purposes only.", | ||
111 | IDC_STATIC,4,33,210,8 | ||
112 | LTEXT "In the space below, please briefly describe what you were doing", | ||
113 | IDC_STATIC,3,48,208,8 | ||
114 | LTEXT "or trying to do just prior to the crash.",IDC_STATIC,3, | ||
115 | 56,204,8 | ||
116 | LTEXT "If you don't wish to send Linden Lab a crash report, press Cancel.", | ||
117 | IDC_STATIC,3,90,214,8 | ||
118 | LTEXT "This report is NOT read by customer support. If you have billing or", | ||
119 | IDC_STATIC,3,68,208,8 | ||
120 | LTEXT "other questions, please go to: www.secondlife.com/support", | ||
121 | IDC_STATIC,3,76,206,8 | ||
122 | END | ||
123 | |||
124 | |||
125 | #ifdef APSTUDIO_INVOKED | ||
126 | ///////////////////////////////////////////////////////////////////////////// | ||
127 | // | ||
128 | // TEXTINCLUDE | ||
129 | // | ||
130 | |||
131 | 2 TEXTINCLUDE | ||
132 | BEGIN | ||
133 | "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" | ||
134 | "#include ""windows.h""\r\n" | ||
135 | "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" | ||
136 | "#include ""resource.h""\r\n" | ||
137 | "\0" | ||
138 | END | ||
139 | |||
140 | 3 TEXTINCLUDE | ||
141 | BEGIN | ||
142 | "\r\n" | ||
143 | "\0" | ||
144 | END | ||
145 | |||
146 | 1 TEXTINCLUDE | ||
147 | BEGIN | ||
148 | "resource.h\0" | ||
149 | END | ||
150 | |||
151 | #endif // APSTUDIO_INVOKED | ||
152 | |||
153 | |||
154 | ///////////////////////////////////////////////////////////////////////////// | ||
155 | // | ||
156 | // DESIGNINFO | ||
157 | // | ||
158 | |||
159 | #ifdef APSTUDIO_INVOKED | ||
160 | GUIDELINES DESIGNINFO | ||
161 | BEGIN | ||
162 | IDD_PROGRESS, DIALOG | ||
163 | BEGIN | ||
164 | LEFTMARGIN, 7 | ||
165 | RIGHTMARGIN, 179 | ||
166 | TOPMARGIN, 7 | ||
167 | BOTTOMMARGIN, 26 | ||
168 | END | ||
169 | |||
170 | IDD_REPORT, DIALOG | ||
171 | BEGIN | ||
172 | RIGHTMARGIN, 292 | ||
173 | VERTGUIDE, 4 | ||
174 | BOTTOMMARGIN, 119 | ||
175 | HORZGUIDE, 4 | ||
176 | END | ||
177 | END | ||
178 | #endif // APSTUDIO_INVOKED | ||
179 | |||
180 | |||
181 | ///////////////////////////////////////////////////////////////////////////// | ||
182 | // | ||
183 | // String Table | ||
184 | // | ||
185 | |||
186 | STRINGTABLE | ||
187 | BEGIN | ||
188 | IDS_APP_TITLE "win_crash_logger" | ||
189 | IDS_HELLO "Hello World!" | ||
190 | IDC_WIN_CRASH_LOGGER "WIN_CRASH_LOGGER" | ||
191 | END | ||
192 | |||
193 | #endif // English (U.S.) resources | ||
194 | ///////////////////////////////////////////////////////////////////////////// | ||
195 | |||
196 | |||
197 | |||
198 | #ifndef APSTUDIO_INVOKED | ||
199 | ///////////////////////////////////////////////////////////////////////////// | ||
200 | // | ||
201 | // Generated from the TEXTINCLUDE 3 resource. | ||
202 | // | ||
203 | |||
204 | |||
205 | ///////////////////////////////////////////////////////////////////////////// | ||
206 | #endif // not APSTUDIO_INVOKED | ||
207 | |||
diff --git a/linden/indra/win_crash_logger/win_crash_logger.vcproj b/linden/indra/win_crash_logger/win_crash_logger.vcproj new file mode 100644 index 0000000..67afa26 --- /dev/null +++ b/linden/indra/win_crash_logger/win_crash_logger.vcproj | |||
@@ -0,0 +1,212 @@ | |||
1 | <?xml version="1.0" encoding="Windows-1252"?> | ||
2 | <VisualStudioProject | ||
3 | ProjectType="Visual C++" | ||
4 | Version="7.10" | ||
5 | Name="win_crash_logger" | ||
6 | ProjectGUID="{648685F3-8760-4CC5-BB2B-CAF9DECC25A4}" | ||
7 | RootNamespace="win_crash_logger" | ||
8 | Keyword="Win32Proj"> | ||
9 | <Platforms> | ||
10 | <Platform | ||
11 | Name="Win32"/> | ||
12 | </Platforms> | ||
13 | <Configurations> | ||
14 | <Configuration | ||
15 | Name="Debug|Win32" | ||
16 | OutputDirectory="Debug" | ||
17 | IntermediateDirectory="Debug" | ||
18 | ConfigurationType="1" | ||
19 | CharacterSet="1"> | ||
20 | <Tool | ||
21 | Name="VCCLCompilerTool" | ||
22 | Optimization="0" | ||
23 | AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llvfs;..\llaudio;..\llmedia;..\llimage;..\llscene;..\llxml;..\llmessage;..\llprimitive;..\llrender;..\llwindow;..\llcharacter;..\llinventory;..\llui;..\lscript;"..\..\libraries\i686-win32\include";..\..\libraries\include\;"..\..\libraries\i686-win32\include\quicktime"" | ||
24 | PreprocessorDefinitions="WIN32;_DEBUG;LL_WINDOWS;LL_DEBUG" | ||
25 | MinimalRebuild="TRUE" | ||
26 | BasicRuntimeChecks="3" | ||
27 | RuntimeLibrary="1" | ||
28 | StructMemberAlignment="4" | ||
29 | ForceConformanceInForLoopScope="TRUE" | ||
30 | UsePrecompiledHeader="0" | ||
31 | WarningLevel="3" | ||
32 | Detect64BitPortabilityProblems="FALSE" | ||
33 | DebugInformationFormat="4"/> | ||
34 | <Tool | ||
35 | Name="VCCustomBuildTool"/> | ||
36 | <Tool | ||
37 | Name="VCLinkerTool" | ||
38 | AdditionalDependencies="apr-1.lib aprutil-1.lib ws2_32.lib advapi32.lib comdlg32.lib dxguid.lib gdi32.lib kernel32.lib libexpatMT.lib llcommon.lib llmath.lib llwindow.lib llvfs.lib llmessage.lib llxml.lib netapi32.lib ole32.lib oleaut32.lib shell32.lib user32.lib wininet.lib winspool.lib" | ||
39 | OutputFile="win_crash_logger.exe" | ||
40 | LinkIncremental="1" | ||
41 | AdditionalLibraryDirectories="../lib_$(ConfigurationName)/i686-win32;../../libraries/i686-win32/lib_debug" | ||
42 | GenerateDebugInformation="TRUE" | ||
43 | ProgramDatabaseFile="$(OutDir)/win_crash_logger.pdb" | ||
44 | SubSystem="2" | ||
45 | TargetMachine="1"/> | ||
46 | <Tool | ||
47 | Name="VCMIDLTool"/> | ||
48 | <Tool | ||
49 | Name="VCPostBuildEventTool"/> | ||
50 | <Tool | ||
51 | Name="VCPreBuildEventTool"/> | ||
52 | <Tool | ||
53 | Name="VCPreLinkEventTool"/> | ||
54 | <Tool | ||
55 | Name="VCResourceCompilerTool"/> | ||
56 | <Tool | ||
57 | Name="VCWebServiceProxyGeneratorTool"/> | ||
58 | <Tool | ||
59 | Name="VCXMLDataGeneratorTool"/> | ||
60 | <Tool | ||
61 | Name="VCWebDeploymentTool"/> | ||
62 | <Tool | ||
63 | Name="VCManagedWrapperGeneratorTool"/> | ||
64 | <Tool | ||
65 | Name="VCAuxiliaryManagedWrapperGeneratorTool"/> | ||
66 | </Configuration> | ||
67 | <Configuration | ||
68 | Name="Release|Win32" | ||
69 | OutputDirectory="Release" | ||
70 | IntermediateDirectory="Release" | ||
71 | ConfigurationType="1" | ||
72 | CharacterSet="1"> | ||
73 | <Tool | ||
74 | Name="VCCLCompilerTool" | ||
75 | AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llvfs;..\llaudio;..\llmedia;..\llimage;..\llscene;..\llxml;..\llmessage;..\llprimitive;..\llrender;..\llwindow;..\llcharacter;..\llinventory;..\llui;..\lscript;"..\..\libraries\i686-win32\include";..\..\libraries\include\;"..\..\libraries\i686-win32\include\quicktime"" | ||
76 | PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;LL_WINDOWS;LL_RELEASE" | ||
77 | RuntimeLibrary="0" | ||
78 | StructMemberAlignment="0" | ||
79 | ForceConformanceInForLoopScope="TRUE" | ||
80 | UsePrecompiledHeader="0" | ||
81 | WarningLevel="3" | ||
82 | Detect64BitPortabilityProblems="FALSE" | ||
83 | DebugInformationFormat="3"/> | ||
84 | <Tool | ||
85 | Name="VCCustomBuildTool"/> | ||
86 | <Tool | ||
87 | Name="VCLinkerTool" | ||
88 | AdditionalDependencies="apr-1.lib aprutil-1.lib ws2_32.lib advapi32.lib comdlg32.lib dxguid.lib gdi32.lib kernel32.lib libexpatMT.lib llcommon.lib llmath.lib llwindow.lib llvfs.lib llmessage.lib llxml.lib netapi32.lib ole32.lib oleaut32.lib shell32.lib user32.lib wininet.lib winspool.lib" | ||
89 | OutputFile="win_crash_logger.exe" | ||
90 | LinkIncremental="1" | ||
91 | AdditionalLibraryDirectories="../lib_$(ConfigurationName)/i686-win32;../../libraries/i686-win32/lib_release" | ||
92 | GenerateDebugInformation="TRUE" | ||
93 | SubSystem="2" | ||
94 | OptimizeReferences="2" | ||
95 | EnableCOMDATFolding="2" | ||
96 | TargetMachine="1"/> | ||
97 | <Tool | ||
98 | Name="VCMIDLTool"/> | ||
99 | <Tool | ||
100 | Name="VCPostBuildEventTool"/> | ||
101 | <Tool | ||
102 | Name="VCPreBuildEventTool"/> | ||
103 | <Tool | ||
104 | Name="VCPreLinkEventTool"/> | ||
105 | <Tool | ||
106 | Name="VCResourceCompilerTool"/> | ||
107 | <Tool | ||
108 | Name="VCWebServiceProxyGeneratorTool"/> | ||
109 | <Tool | ||
110 | Name="VCXMLDataGeneratorTool"/> | ||
111 | <Tool | ||
112 | Name="VCWebDeploymentTool"/> | ||
113 | <Tool | ||
114 | Name="VCManagedWrapperGeneratorTool"/> | ||
115 | <Tool | ||
116 | Name="VCAuxiliaryManagedWrapperGeneratorTool"/> | ||
117 | </Configuration> | ||
118 | <Configuration | ||
119 | Name="ReleaseNoOpt|Win32" | ||
120 | OutputDirectory="$(ConfigurationName)" | ||
121 | IntermediateDirectory="$(ConfigurationName)" | ||
122 | ConfigurationType="1" | ||
123 | CharacterSet="1"> | ||
124 | <Tool | ||
125 | Name="VCCLCompilerTool" | ||
126 | AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llvfs;..\llaudio;..\llmedia;..\llimage;..\llscene;..\llxml;..\llmessage;..\llprimitive;..\llrender;..\llwindow;..\llcharacter;..\llinventory;..\llui;..\lscript;"..\..\libraries\i686-win32\include";..\..\libraries\include\;"..\..\libraries\i686-win32\include\quicktime"" | ||
127 | PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;LL_WINDOWS;LL_RELEASE" | ||
128 | RuntimeLibrary="0" | ||
129 | StructMemberAlignment="0" | ||
130 | ForceConformanceInForLoopScope="TRUE" | ||
131 | UsePrecompiledHeader="0" | ||
132 | WarningLevel="3" | ||
133 | Detect64BitPortabilityProblems="FALSE" | ||
134 | DebugInformationFormat="3"/> | ||
135 | <Tool | ||
136 | Name="VCCustomBuildTool"/> | ||
137 | <Tool | ||
138 | Name="VCLinkerTool" | ||
139 | AdditionalDependencies="apr-1.lib aprutil-1.lib ws2_32.lib advapi32.lib comdlg32.lib dxguid.lib gdi32.lib kernel32.lib libexpatMT.lib llcommon.lib llmath.lib llwindow.lib llvfs.lib llmessage.lib llxml.lib netapi32.lib ole32.lib oleaut32.lib shell32.lib user32.lib wininet.lib winspool.lib" | ||
140 | OutputFile="win_crash_logger.exe" | ||
141 | LinkIncremental="1" | ||
142 | AdditionalLibraryDirectories="../lib_$(ConfigurationName)/i686-win32;../../libraries/i686-win32/lib_release" | ||
143 | GenerateDebugInformation="TRUE" | ||
144 | SubSystem="2" | ||
145 | OptimizeReferences="2" | ||
146 | EnableCOMDATFolding="2" | ||
147 | TargetMachine="1"/> | ||
148 | <Tool | ||
149 | Name="VCMIDLTool"/> | ||
150 | <Tool | ||
151 | Name="VCPostBuildEventTool"/> | ||
152 | <Tool | ||
153 | Name="VCPreBuildEventTool"/> | ||
154 | <Tool | ||
155 | Name="VCPreLinkEventTool"/> | ||
156 | <Tool | ||
157 | Name="VCResourceCompilerTool"/> | ||
158 | <Tool | ||
159 | Name="VCWebServiceProxyGeneratorTool"/> | ||
160 | <Tool | ||
161 | Name="VCXMLDataGeneratorTool"/> | ||
162 | <Tool | ||
163 | Name="VCWebDeploymentTool"/> | ||
164 | <Tool | ||
165 | Name="VCManagedWrapperGeneratorTool"/> | ||
166 | <Tool | ||
167 | Name="VCAuxiliaryManagedWrapperGeneratorTool"/> | ||
168 | </Configuration> | ||
169 | </Configurations> | ||
170 | <References> | ||
171 | </References> | ||
172 | <Files> | ||
173 | <Filter | ||
174 | Name="Source Files" | ||
175 | Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" | ||
176 | UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> | ||
177 | <File | ||
178 | RelativePath=".\StdAfx.cpp"> | ||
179 | </File> | ||
180 | <File | ||
181 | RelativePath=".\win_crash_logger.cpp"> | ||
182 | </File> | ||
183 | </Filter> | ||
184 | <Filter | ||
185 | Name="Header Files" | ||
186 | Filter="h;hpp;hxx;hm;inl;inc;xsd" | ||
187 | UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> | ||
188 | <File | ||
189 | RelativePath=".\resource.h"> | ||
190 | </File> | ||
191 | <File | ||
192 | RelativePath=".\StdAfx.h"> | ||
193 | </File> | ||
194 | <File | ||
195 | RelativePath=".\win_crash_logger.h"> | ||
196 | </File> | ||
197 | </Filter> | ||
198 | <Filter | ||
199 | Name="Resource Files" | ||
200 | Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" | ||
201 | UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> | ||
202 | <File | ||
203 | RelativePath=".\ll_icon.ico"> | ||
204 | </File> | ||
205 | <File | ||
206 | RelativePath=".\win_crash_logger.rc"> | ||
207 | </File> | ||
208 | </Filter> | ||
209 | </Files> | ||
210 | <Globals> | ||
211 | </Globals> | ||
212 | </VisualStudioProject> | ||