diff options
Diffstat (limited to 'linden/indra/win_crash_logger')
-rw-r--r-- | linden/indra/win_crash_logger/StdAfx.cpp | 2 | ||||
-rw-r--r-- | linden/indra/win_crash_logger/StdAfx.h | 2 | ||||
-rw-r--r-- | linden/indra/win_crash_logger/llcrashloggerwindows.cpp | 4 | ||||
-rw-r--r-- | linden/indra/win_crash_logger/llcrashloggerwindows.h | 2 | ||||
-rw-r--r-- | linden/indra/win_crash_logger/resource.h | 2 | ||||
-rw-r--r-- | linden/indra/win_crash_logger/win_crash_logger.cpp | 51 | ||||
-rw-r--r-- | linden/indra/win_crash_logger/win_crash_logger.h | 2 |
7 files changed, 9 insertions, 56 deletions
diff --git a/linden/indra/win_crash_logger/StdAfx.cpp b/linden/indra/win_crash_logger/StdAfx.cpp index 5c92418..f2f54bf 100644 --- a/linden/indra/win_crash_logger/StdAfx.cpp +++ b/linden/indra/win_crash_logger/StdAfx.cpp | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2003&license=viewergpl$ | 5 | * $LicenseInfo:firstyear=2003&license=viewergpl$ |
6 | * | 6 | * |
7 | * Copyright (c) 2003-2008, Linden Research, Inc. | 7 | * Copyright (c) 2003-2009, Linden Research, Inc. |
8 | * | 8 | * |
9 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
10 | * The source code in this file ("Source Code") is provided by Linden Lab | 10 | * The source code in this file ("Source Code") is provided by Linden Lab |
diff --git a/linden/indra/win_crash_logger/StdAfx.h b/linden/indra/win_crash_logger/StdAfx.h index a19e0e7..0aeef9f 100644 --- a/linden/indra/win_crash_logger/StdAfx.h +++ b/linden/indra/win_crash_logger/StdAfx.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2003&license=viewergpl$ | 5 | * $LicenseInfo:firstyear=2003&license=viewergpl$ |
6 | * | 6 | * |
7 | * Copyright (c) 2003-2008, Linden Research, Inc. | 7 | * Copyright (c) 2003-2009, Linden Research, Inc. |
8 | * | 8 | * |
9 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
10 | * The source code in this file ("Source Code") is provided by Linden Lab | 10 | * The source code in this file ("Source Code") is provided by Linden Lab |
diff --git a/linden/indra/win_crash_logger/llcrashloggerwindows.cpp b/linden/indra/win_crash_logger/llcrashloggerwindows.cpp index 03f2394..f63d309 100644 --- a/linden/indra/win_crash_logger/llcrashloggerwindows.cpp +++ b/linden/indra/win_crash_logger/llcrashloggerwindows.cpp | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2003&license=viewergpl$ | 5 | * $LicenseInfo:firstyear=2003&license=viewergpl$ |
6 | * | 6 | * |
7 | * Copyright (c) 2003-2008, Linden Research, Inc. | 7 | * Copyright (c) 2003-2009, Linden Research, Inc. |
8 | * | 8 | * |
9 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
10 | * The source code in this file ("Source Code") is provided by Linden Lab | 10 | * The source code in this file ("Source Code") is provided by Linden Lab |
@@ -322,7 +322,7 @@ bool LLCrashLoggerWindows::mainLoop() | |||
322 | { | 322 | { |
323 | gHwndReport = CreateDialog(hInst, MAKEINTRESOURCE(IDD_PREVREPORTBOX), 0, NULL); | 323 | gHwndReport = CreateDialog(hInst, MAKEINTRESOURCE(IDD_PREVREPORTBOX), 0, NULL); |
324 | // Ignore result | 324 | // Ignore result |
325 | (void) SendDlgItemMessage(gHwndReport, IDC_CHECK_AUTO, BM_SETCHECK, 1, 0); | 325 | (void) SendDlgItemMessage(gHwndReport, IDC_CHECK_AUTO, BM_SETCHECK, 0, 0); |
326 | // Include the product name in the caption and various dialog items. | 326 | // Include the product name in the caption and various dialog items. |
327 | ProcessCaption(gHwndReport); | 327 | ProcessCaption(gHwndReport); |
328 | ProcessDlgItemText(gHwndReport, IDC_STATIC_MSG); | 328 | ProcessDlgItemText(gHwndReport, IDC_STATIC_MSG); |
diff --git a/linden/indra/win_crash_logger/llcrashloggerwindows.h b/linden/indra/win_crash_logger/llcrashloggerwindows.h index d5a20b7..cf8a855 100644 --- a/linden/indra/win_crash_logger/llcrashloggerwindows.h +++ b/linden/indra/win_crash_logger/llcrashloggerwindows.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2003&license=viewergpl$ | 5 | * $LicenseInfo:firstyear=2003&license=viewergpl$ |
6 | * | 6 | * |
7 | * Copyright (c) 2003-2008, Linden Research, Inc. | 7 | * Copyright (c) 2003-2009, Linden Research, Inc. |
8 | * | 8 | * |
9 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
10 | * The source code in this file ("Source Code") is provided by Linden Lab | 10 | * The source code in this file ("Source Code") is provided by Linden Lab |
diff --git a/linden/indra/win_crash_logger/resource.h b/linden/indra/win_crash_logger/resource.h index e6adf37..715f284 100644 --- a/linden/indra/win_crash_logger/resource.h +++ b/linden/indra/win_crash_logger/resource.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2003&license=viewergpl$ | 5 | * $LicenseInfo:firstyear=2003&license=viewergpl$ |
6 | * | 6 | * |
7 | * Copyright (c) 2003-2008, Linden Research, Inc. | 7 | * Copyright (c) 2003-2009, Linden Research, Inc. |
8 | * | 8 | * |
9 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
10 | * The source code in this file ("Source Code") is provided by Linden Lab | 10 | * The source code in this file ("Source Code") is provided by Linden Lab |
diff --git a/linden/indra/win_crash_logger/win_crash_logger.cpp b/linden/indra/win_crash_logger/win_crash_logger.cpp index 773aa68..512a67d 100644 --- a/linden/indra/win_crash_logger/win_crash_logger.cpp +++ b/linden/indra/win_crash_logger/win_crash_logger.cpp | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2003&license=viewergpl$ | 5 | * $LicenseInfo:firstyear=2003&license=viewergpl$ |
6 | * | 6 | * |
7 | * Copyright (c) 2003-2008, Linden Research, Inc. | 7 | * Copyright (c) 2003-2009, Linden Research, Inc. |
8 | * | 8 | * |
9 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
10 | * The source code in this file ("Source Code") is provided by Linden Lab | 10 | * The source code in this file ("Source Code") is provided by Linden Lab |
@@ -54,56 +54,9 @@ int APIENTRY WinMain(HINSTANCE hInstance, | |||
54 | { | 54 | { |
55 | llinfos << "Starting crash reporter" << llendl; | 55 | llinfos << "Starting crash reporter" << llendl; |
56 | 56 | ||
57 | // In Win32, we need to generate argc and argv ourselves... | ||
58 | // Note: GetCommandLine() returns a potentially return a LPTSTR | ||
59 | // which can resolve to a LPWSTR (unicode string). | ||
60 | // (That's why it's different from lpCmdLine which is a LPSTR.) | ||
61 | // We don't currently do unicode, so call the non-unicode version | ||
62 | // directly. | ||
63 | llinfos << "Processing command line" << llendl; | ||
64 | LPSTR cmd_line_including_exe_name = GetCommandLineA(); | ||
65 | |||
66 | const S32 MAX_ARGS = 100; | ||
67 | int argc = 0; | ||
68 | char *argv[MAX_ARGS]; | ||
69 | |||
70 | char *token = NULL; | ||
71 | if( cmd_line_including_exe_name[0] == '\"' ) | ||
72 | { | ||
73 | // Exe name is enclosed in quotes | ||
74 | token = strtok( cmd_line_including_exe_name, "\"" ); | ||
75 | argv[argc++] = token; | ||
76 | token = strtok( NULL, " \t," ); | ||
77 | } | ||
78 | else | ||
79 | { | ||
80 | // Exe name is not enclosed in quotes | ||
81 | token = strtok( cmd_line_including_exe_name, " \t," ); | ||
82 | } | ||
83 | |||
84 | while( (token != NULL) && (argc < MAX_ARGS) ) | ||
85 | { | ||
86 | argv[argc++] = token; | ||
87 | /* Get next token: */ | ||
88 | if (*(token + strlen(token) + 1) == '\"') | ||
89 | { | ||
90 | token = strtok( NULL, "\""); | ||
91 | } | ||
92 | else | ||
93 | { | ||
94 | token = strtok( NULL, " \t," ); | ||
95 | } | ||
96 | } | ||
97 | |||
98 | LLCrashLoggerWindows app; | 57 | LLCrashLoggerWindows app; |
99 | bool ok = app.parseCommandOptions(argc, argv); | ||
100 | if(!ok) | ||
101 | { | ||
102 | llwarns << "Unable to parse command line." << llendl; | ||
103 | } | ||
104 | |||
105 | app.setHandle(hInstance); | 58 | app.setHandle(hInstance); |
106 | ok = app.init(); | 59 | bool ok = app.init(); |
107 | if(!ok) | 60 | if(!ok) |
108 | { | 61 | { |
109 | llwarns << "Unable to initialize application." << llendl; | 62 | llwarns << "Unable to initialize application." << llendl; |
diff --git a/linden/indra/win_crash_logger/win_crash_logger.h b/linden/indra/win_crash_logger/win_crash_logger.h index 7b31817..f537262 100644 --- a/linden/indra/win_crash_logger/win_crash_logger.h +++ b/linden/indra/win_crash_logger/win_crash_logger.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2003&license=viewergpl$ | 5 | * $LicenseInfo:firstyear=2003&license=viewergpl$ |
6 | * | 6 | * |
7 | * Copyright (c) 2003-2008, Linden Research, Inc. | 7 | * Copyright (c) 2003-2009, Linden Research, Inc. |
8 | * | 8 | * |
9 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
10 | * The source code in this file ("Source Code") is provided by Linden Lab | 10 | * The source code in this file ("Source Code") is provided by Linden Lab |