- win_tray: Add logging support to trap crashes.

clienttray/
        tray_win.cpp
    win_build/
        boinctray.vcproj

svn path=/trunk/boinc/; revision=22709
This commit is contained in:
Rom Walton 2010-11-18 15:35:43 +00:00
parent a3d151d3c8
commit f855ab81f6
3 changed files with 37 additions and 12 deletions

View File

@ -8163,3 +8163,11 @@ Charlie 18 Nov 2010
mac_installer/ mac_installer/
release_boinc.sh release_boinc.sh
Rom 18 Nov 2010
- win_tray: Add logging support to trap crashes.
clienttray/
tray_win.cpp
win_build/
boinctray.vcproj

View File

@ -18,6 +18,8 @@
#include "boinc_win.h" #include "boinc_win.h"
#include "diagnostics.h"
#include "win_util.h"
#include "boinc_tray.h" #include "boinc_tray.h"
#include "tray_win.h" #include "tray_win.h"
#include "idlemon.h" #include "idlemon.h"
@ -46,6 +48,21 @@ CBOINCTray::CBOINCTray() {
// //
INT CBOINCTray::Run( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR /* lpCmdLine */ , int /* nCmdShow */ ) { INT CBOINCTray::Run( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR /* lpCmdLine */ , int /* nCmdShow */ ) {
// Initialize the BOINC Diagnostics Framework
int flags =
#ifdef _DEBUG
BOINC_DIAG_MEMORYLEAKCHECKENABLED |
#endif
BOINC_DIAG_DUMPCALLSTACKENABLED |
BOINC_DIAG_HEAPCHECKENABLED |
BOINC_DIAG_TRACETOSTDOUT |
BOINC_DIAG_REDIRECTSTDERR |
BOINC_DIAG_REDIRECTSTDOUT;
chdir_to_data_dir();
diagnostics_init(flags, "stdouttray", "stderrtray");
// Create application window class
if (!hPrevInstance) { if (!hPrevInstance) {
// Register an appropriate window class for the primary window // Register an appropriate window class for the primary window
WNDCLASS cls; WNDCLASS cls;

View File

@ -23,7 +23,7 @@
IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj" IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="1" UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false" ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2" CharacterSet="2"
> >
@ -55,7 +55,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_MT;_WINDOWS;_CONSOLE" PreprocessorDefinitions="WIN32;_DEBUG;_MT;_WINDOWS;_CONSOLE"
ExceptionHandling="2" ExceptionHandling="2"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="1" RuntimeLibrary="3"
BufferSecurityCheck="true" BufferSecurityCheck="true"
FloatingPointModel="2" FloatingPointModel="2"
UsePrecompiledHeader="2" UsePrecompiledHeader="2"
@ -86,7 +86,7 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib advapi32.lib" AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib gdi32.lib advapi32.lib"
OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe" OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
LinkIncremental="0" LinkIncremental="0"
SuppressStartupBanner="true" SuppressStartupBanner="true"
@ -133,7 +133,7 @@
IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj" IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="1" UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false" ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2" CharacterSet="2"
> >
@ -165,7 +165,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_MT;_WINDOWS;_CONSOLE" PreprocessorDefinitions="WIN32;_DEBUG;_MT;_WINDOWS;_CONSOLE"
ExceptionHandling="2" ExceptionHandling="2"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="1" RuntimeLibrary="3"
BufferSecurityCheck="true" BufferSecurityCheck="true"
FloatingPointModel="2" FloatingPointModel="2"
UsePrecompiledHeader="2" UsePrecompiledHeader="2"
@ -197,7 +197,7 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib advapi32.lib" AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib gdi32.lib advapi32.lib"
OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe" OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
LinkIncremental="0" LinkIncremental="0"
SuppressStartupBanner="true" SuppressStartupBanner="true"
@ -244,7 +244,7 @@
IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj" IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="1" UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false" ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2" CharacterSet="2"
> >
@ -276,7 +276,7 @@
PreprocessorDefinitions="WIN32;NDEBUG;_MT;_WINDOWS;_CONSOLE" PreprocessorDefinitions="WIN32;NDEBUG;_MT;_WINDOWS;_CONSOLE"
StringPooling="false" StringPooling="false"
ExceptionHandling="2" ExceptionHandling="2"
RuntimeLibrary="0" RuntimeLibrary="2"
EnableFunctionLevelLinking="false" EnableFunctionLevelLinking="false"
FloatingPointModel="2" FloatingPointModel="2"
UsePrecompiledHeader="2" UsePrecompiledHeader="2"
@ -307,7 +307,7 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="libcmt.lib libcpmt.lib kernel32.lib user32.lib gdi32.lib advapi32.lib" AdditionalDependencies="MSVCRT.LIB MSVCPRT.LIB kernel32.lib user32.lib gdi32.lib advapi32.lib"
ShowProgress="0" ShowProgress="0"
OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe" OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
LinkIncremental="1" LinkIncremental="1"
@ -353,7 +353,7 @@
IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj" IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="1" UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false" ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2" CharacterSet="2"
> >
@ -385,7 +385,7 @@
PreprocessorDefinitions="WIN32;NDEBUG;_MT;_WINDOWS;_CONSOLE" PreprocessorDefinitions="WIN32;NDEBUG;_MT;_WINDOWS;_CONSOLE"
StringPooling="false" StringPooling="false"
ExceptionHandling="2" ExceptionHandling="2"
RuntimeLibrary="0" RuntimeLibrary="2"
EnableFunctionLevelLinking="false" EnableFunctionLevelLinking="false"
FloatingPointModel="2" FloatingPointModel="2"
UsePrecompiledHeader="2" UsePrecompiledHeader="2"
@ -417,7 +417,7 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="libcmt.lib libcpmt.lib kernel32.lib user32.lib gdi32.lib advapi32.lib" AdditionalDependencies="MSVCRT.LIB MSVCPRT.LIB kernel32.lib user32.lib gdi32.lib advapi32.lib"
ShowProgress="0" ShowProgress="0"
OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe" OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
LinkIncremental="1" LinkIncremental="1"