1
0
forked from metin2/server
server/db/src/version.cpp
2022-03-05 12:44:06 +02:00

23 lines
362 B
C++

#include <stdio.h>
#include <stdlib.h>
void WriteVersion()
{
#ifndef __WIN32__
FILE* fp(fopen("VERSION.txt", "w"));
if (NULL != fp)
{
fprintf(fp, "game perforce revision: %s\n", __P4_VERSION__);
fprintf(fp, "%s@%s:%s\n", __USER__, __HOSTNAME__, __PWD__);
fclose(fp);
}
else
{
fprintf(stderr, "cannot open VERSION.txt\n");
exit(0);
}
#endif
}