From bcba884ef133523cb13090a9bec81f9af31349db Mon Sep 17 00:00:00 2001 From: Ilya Shurumov Date: Fri, 30 Jul 2021 15:42:45 +0600 Subject: [PATCH] - embed version information to EXE and print in log file --- src_rebuild/Game/version.h | 13 ++++++------- src_rebuild/platform/Windows/Resource.rc | Bin 3102 -> 4838 bytes src_rebuild/premake5.lua | 3 +++ src_rebuild/redriver2_psxpc.cpp | 6 ++++++ 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src_rebuild/Game/version.h b/src_rebuild/Game/version.h index a6cf015f..9c0eb850 100644 --- a/src_rebuild/Game/version.h +++ b/src_rebuild/Game/version.h @@ -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 \ No newline at end of file diff --git a/src_rebuild/platform/Windows/Resource.rc b/src_rebuild/platform/Windows/Resource.rc index 0f136604d2c3f880146a8e99d66058b5591e12df..106a873369d621015da4bbef12aa63d232d940f0 100644 GIT binary patch literal 4838 zcmd6qOK%%D5Xa}BQ-OX5R=zZ7;YX5#lS2X7R#YLfWJI#i0tSrKuL_W*K##Nm^4Z(| z{-nmc)WdC^90X!_xFqL2oSFUmuRYtdV5c^)E1THZraZScW3A8H)aLfyhI}2{4~$@U zc4H%+3F|Z9HER=~@aD{}mj_Q=2c;E!nEgjd*qowq*1eS(Jv$TPyb zWnXQdbzPzqNpmDt)ZJpEr^S(b$?0wvbm;<-FygKb@zN9z1^b@(cx%tr#KyFA(+1Hp z-(@%M8r+(_A=c7O>vF5kxpT+xxFqIU4AK3}2pchb(0E5=UxL*JK8svitm^9=*oe{V zD}Js;e0S|<`w`k*&KaLoivokP5w6MAlRiwbl4-rFM ziu#UJdjc?*D^SJtwddQRXkL=M0LnexAJMRdk;*tQW7`GR!#Dp`U>5s z$A+JK>`ZyDN-a-P?k=<_Iv%&|c149tYe@pWMaPBh8w^`$fFkZSaIsy{ilSEz)22FDJ5JjaKb@PK&8w)TO3dcg>Ot*2 zKA+;3qIM;(D}$tnR)2ed*L7RVo+zX(X4>D}gM`X)rN($&Ijp>@sPhk%pW@14rBm7b z2jKaA`=InKKPl5b_9wU6b#0$kE|E0T+~Jr0|Emjr{Quu==@M)ol!Tijd_?w97q|Kc Jzv_2U`UlvlJ5>Mx delta 58 zcmaE+I!|JQ0@G$6rVhr*Tr63vK@6b`!ILXllzG7{hF}Iy21f?J%_~{nvP|B^&okMG LdC}%o0yazl-GUHX diff --git a/src_rebuild/premake5.lua b/src_rebuild/premake5.lua index 07271ab6..93409e21 100644 --- a/src_rebuild/premake5.lua +++ b/src_rebuild/premake5.lua @@ -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 { diff --git a/src_rebuild/redriver2_psxpc.cpp b/src_rebuild/redriver2_psxpc.cpp index 769f286d..c2f5d575 100644 --- a/src_rebuild/redriver2_psxpc.cpp +++ b/src_rebuild/redriver2_psxpc.cpp @@ -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);