forked from metin2/server
23 lines
362 B
C++
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
|
|
}
|
|
|