- embed version information to EXE and print in log file

This commit is contained in:
Ilya Shurumov 2021-07-30 15:42:45 +06:00 committed by InspirationByte
parent 05dcc49b19
commit bcba884ef1
4 changed files with 15 additions and 7 deletions

View File

@ -1,11 +1,10 @@
#ifndef VERSION_H
#define VERSION_H
#ifndef GAME_VERSION_N
#define GAME_VERSION_N "7.2"
#endif // GAME_VERSION_N
#define GAME_VERSION_N "7.3"
#endif
#ifndef GAME_VERSION_RES
#define GAME_VERSION_RES 7,3
#endif
#define GAME_TITLE "REDRIVER2"
#define GAME_VERSION GAME_TITLE " " GAME_VERSION_N
#endif // VERSION_H

View File

@ -153,9 +153,12 @@ project "REDRIVER2"
}
defines { GAME_REGION }
defines { "BUILD_CONFIGURATION_STRING=\"%{cfg.buildcfg}\"" }
if GAME_VERSION ~= nil then
local resVersion = string.gsub(GAME_VERSION, "%.", ",")
defines{ "GAME_VERSION_N=\""..GAME_VERSION.."\"" }
defines{ "GAME_VERSION_RES="..resVersion.."" }
end
files {

View File

@ -18,6 +18,7 @@
#include "C/loadview.h"
#include "C/overlay.h"
#include "C/players.h"
#include "C/time.h"
#include "utils/ini.h"
@ -27,6 +28,7 @@
#include "PsyX/PsyX_globals.h"
int(*GPU_printf)(const char *fmt, ...);
bool CtrlModifier;
@ -636,6 +638,10 @@ int main(int argc, char** argv)
PsyX_Initialise("REDRIVER2", windowWidth, windowHeight, fullScreen);
char version_info[32];
GetTimeStamp(version_info);
PsyX_Log_Info("%s %s (%s)\n", GAME_VERSION, version_info, BUILD_CONFIGURATION_STRING);
// configure Psy-X CD image reader
if (cdImageFileName)
PsyX_CDFS_Init(cdImageFileName, 0, 0);