add git derived version info

This commit is contained in:
mq1n
2025-09-02 20:25:54 +03:00
parent dcc6675208
commit fd1df0b328
5 changed files with 42 additions and 2 deletions

View File

@@ -1,5 +1,9 @@
#include <stdio.h>
#ifndef GIT_DESCRIBE_VERSION
#define GIT_DESCRIBE_VERSION "unknown"
#endif
void WriteVersion()
{
#ifndef OS_WINDOWS
@@ -7,7 +11,7 @@ void WriteVersion()
if (fp)
{
fprintf(fp, "game revision: 40250");
fprintf(fp, "game revision: %s\n", GIT_DESCRIBE_VERSION);
//fprintf(fp, "game revision: %s\n", __SVN_VERSION__);
//fprintf(fp, "%s@%s:%s\n", __USER__, __HOSTNAME__, __PWD__);
fclose(fp);