Skip to content

Commit bcba884

Browse files
committed
- embed version information to EXE and print in log file
1 parent 05dcc49 commit bcba884

4 files changed

Lines changed: 15 additions & 7 deletions

File tree

src_rebuild/Game/version.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
#ifndef VERSION_H
2-
#define VERSION_H
3-
41
#ifndef GAME_VERSION_N
5-
#define GAME_VERSION_N "7.2"
6-
#endif // GAME_VERSION_N
2+
#define GAME_VERSION_N "7.3"
3+
#endif
4+
5+
#ifndef GAME_VERSION_RES
6+
#define GAME_VERSION_RES 7,3
7+
#endif
78

89
#define GAME_TITLE "REDRIVER2"
910
#define GAME_VERSION GAME_TITLE " " GAME_VERSION_N
10-
11-
#endif // VERSION_H
1.7 KB
Binary file not shown.

src_rebuild/premake5.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,12 @@ project "REDRIVER2"
153153
}
154154

155155
defines { GAME_REGION }
156+
defines { "BUILD_CONFIGURATION_STRING=\"%{cfg.buildcfg}\"" }
156157

157158
if GAME_VERSION ~= nil then
159+
local resVersion = string.gsub(GAME_VERSION, "%.", ",")
158160
defines{ "GAME_VERSION_N=\""..GAME_VERSION.."\"" }
161+
defines{ "GAME_VERSION_RES="..resVersion.."" }
159162
end
160163

161164
files {

src_rebuild/redriver2_psxpc.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "C/loadview.h"
1919
#include "C/overlay.h"
2020
#include "C/players.h"
21+
#include "C/time.h"
2122

2223
#include "utils/ini.h"
2324

@@ -27,6 +28,7 @@
2728

2829
#include "PsyX/PsyX_globals.h"
2930

31+
3032
int(*GPU_printf)(const char *fmt, ...);
3133

3234
bool CtrlModifier;
@@ -636,6 +638,10 @@ int main(int argc, char** argv)
636638

637639
PsyX_Initialise("REDRIVER2", windowWidth, windowHeight, fullScreen);
638640

641+
char version_info[32];
642+
GetTimeStamp(version_info);
643+
PsyX_Log_Info("%s %s (%s)\n", GAME_VERSION, version_info, BUILD_CONFIGURATION_STRING);
644+
639645
// configure Psy-X CD image reader
640646
if (cdImageFileName)
641647
PsyX_CDFS_Init(cdImageFileName, 0, 0);

0 commit comments

Comments
 (0)