Generate verstub.cpp through raw cmake.

There is no need for an extra program.

As a bonus, generate a consistent windows vdi file.

There is still an issue with actually *reading* the vdi, but that's for someone else to tackle.
This commit is contained in:
Jason Felds
2015-10-02 21:56:02 -04:00
parent 429d4dbce2
commit 99b79e5410
12 changed files with 24 additions and 178 deletions
+4 -4
View File
@@ -412,13 +412,13 @@ namespace
{
if( !g_debugInfo.Loaded() )
return ssprintf( "debug resource file '%s': %s.\n", g_debugInfo.sFilename, g_debugInfo.sError.c_str() );
/*
if( g_debugInfo.nBuildNumber != int(version_num) )
{
return ssprintf( "Incorrect %s file (build %d, expected %d) for this version of " PRODUCT_FAMILY " -- call stack unavailable.\n",
g_debugInfo.sFilename, g_debugInfo.nBuildNumber, int(version_num) );
}
*/
RString sRet;
for( int i = 0; Backtrace[i]; ++i )
{
@@ -444,9 +444,9 @@ struct CompleteCrashData
static void MakeCrashReport( const CompleteCrashData &Data, RString &sOut )
{
sOut += ssprintf(
"%s crash report (build %d, %s @ %s)\n"
"%s crash report (build %s, %s @ %s)\n"
"--------------------------------------\n\n",
(string(PRODUCT_FAMILY) + product_version).c_str(), version_num, version_date, version_time );
(string(PRODUCT_FAMILY) + product_version).c_str(), ::sm_version_git_hash, version_date, version_time );
sOut += ssprintf( "Crash reason: %s\n", Data.m_CrashInfo.m_CrashReason );
sOut += ssprintf( "\n" );
+2 -8
View File
@@ -106,7 +106,6 @@ struct RVASorter {
};
int main(int argc, char **argv) {
int ver=0;
int i;
long load_addr;
@@ -115,13 +114,8 @@ int main(int argc, char **argv) {
return 0;
}
if (f=fopen("version.bin", "rb")) {
fread(&ver,4,1,f);
fclose(f);
} else {
printf("can't read version file\n");
return 20;
}
// TODO: Choose a better default for the vdi file.
int ver = 20151002;
if (!(f=fopen(argv[1], "r"))) {
printf("can't open listing file \"%s\"\n", argv[1]);