Skip to content

Commit 5cb8710

Browse files
committed
Added md5sum function
1 parent 4e5ba1a commit 5cb8710

File tree

7 files changed

+517
-7
lines changed

7 files changed

+517
-7
lines changed

MTADiag/Common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
#include <vector>
2323
#include "Log.h"
2424

25-
#define VERSION "2.5"
25+
#define VERSION "2.5.1"

MTADiag/Diag.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ void Diag::Begin ( void )
9090
Log::WriteFileToLog ( MTAPath + "\\MTA\\logfile.txt", "logfile.txt" );
9191
Log::WriteFileToLog ( MTAPath + "\\MTA\\CEGUI.log", "CEGUI.log" );
9292
Log::WriteFileToLog ( MTAPath + "\\MTA\\timings.log", "timings.log" );
93-
if ( bIsVistaOrNewer ) { Log::WriteFileToLog ( programData + "\\MTA San Andreas All\\" + MTAShortVersion + "\\report.log", "report.log" ); }
93+
if ( IsVistaOrNewer() ) { Log::WriteFileToLog ( programData + "\\MTA San Andreas All\\" + MTAShortVersion + "\\report.log", "report.log" ); }
9494

9595
DoSystemCommandWithOutput ( "ipconfig /all >" ); // get network configuration
9696
DoSystemCommandWithOutput ( "wevtutil qe Application /q:\"Event [System [(Level=2)] ] [EventData [(Data='Multi Theft Auto.exe')] ]\" /c:1 /f:text /rd:true >" ); // might help resolve Visual C++ runtime issues
@@ -101,10 +101,15 @@ void Diag::Begin ( void )
101101
GetDir ( GTAPath );
102102
GetDir ( ( GTAPath + "\\models" ) );
103103

104+
Log::WriteStringToLog ( GetFileMD5 ( GTAPath + "\\gta_sa.exe" ) );
105+
Log::WriteStringToLog ( GetFileMD5 ( GTAPath + "\\models\\gta3.img" ) );
106+
Log::WriteStringToLog ( "" );
107+
104108
// font diagnostics
105109
Log::WriteStringToLog ( "Verdana (TrueType) registry value:", ReadRegKey ( "Verdana (TrueType)", "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts\\" ) );
110+
Log::WriteStringToLog ( GetFileMD5 ( systemRoot + "\\Fonts\\verdana.ttf" ) );
106111
Log::WriteStringToLog ( "" );
107-
GetDir ( systemRoot + "\\fonts\\verd*" );
112+
GetDir ( systemRoot + "\\Fonts\\verd*" );
108113

109114
// close the log file for writing
110115
Log::Close();
@@ -148,10 +153,9 @@ void Diag::Cleanup ( void )
148153
void Diag::GeneratePaths ( void )
149154
{
150155
// obtain Temp and WINDOWS environment variables, and store system time
151-
bIsVistaOrNewer = IsVistaOrNewer(); // is the user running Vista or newer?
152156
tempDir = getenv ( "Temp" ); // get the Temp directory
153157
systemRoot = getenv ( "SystemRoot" ); // get the WINDOWS directory
154-
if ( bIsVistaOrNewer ) { programData = getenv ( "ProgramData" ); } // get the ProgramData directory
158+
programData = getenv ( "AllUsersProfile" ); // get the ProgramData directory
155159
IsWow64Process ( GetCurrentProcess(), &bIsWOW64 ); // is MTADiag running under WOW64?
156160
GetLocalTime ( &sysTime ); // get the current system time
157161

MTADiag/Diag.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ namespace Diag {
7676
static std::string systemRoot;
7777
static std::string programData;
7878
static SYSTEMTIME sysTime;
79-
static bool bIsVistaOrNewer;
8079
static BOOL bIsWOW64;
8180

8281
extern std::vector<std::string> files;

0 commit comments

Comments
 (0)