forked from github/server
move version string into a single object file
This commit is contained in:
parent
42bfc43e4f
commit
d8d3cd4cc4
|
@ -1509,7 +1509,7 @@ report_computer(const char *filename, report_context * ctx, const char *charset)
|
||||||
fprintf(F, "%d;Basis\n", 36);
|
fprintf(F, "%d;Basis\n", 36);
|
||||||
fprintf(F, "%d;Runde\n", turn);
|
fprintf(F, "%d;Runde\n", turn);
|
||||||
fprintf(F, "%d;Zeitalter\n", era);
|
fprintf(F, "%d;Zeitalter\n", era);
|
||||||
fprintf(F, "\"%s\";Build\n", ERESSEA_VERSION);
|
fprintf(F, "\"%s\";Build\n", eressea_version());
|
||||||
if (mailto != NULL) {
|
if (mailto != NULL) {
|
||||||
fprintf(F, "\"%s\";mailto\n", mailto);
|
fprintf(F, "\"%s\";mailto\n", mailto);
|
||||||
fprintf(F, "\"%s\";mailcmd\n", LOC(f->locale, "mailcmd"));
|
fprintf(F, "\"%s\";mailcmd\n", LOC(f->locale, "mailcmd"));
|
||||||
|
|
|
@ -1898,7 +1898,7 @@ int writegame(const char *filename)
|
||||||
fstream_init(&strm, F);
|
fstream_init(&strm, F);
|
||||||
binstore_init(&store, &strm);
|
binstore_init(&store, &strm);
|
||||||
|
|
||||||
WRITE_INT(&store, version_no(ERESSEA_VERSION));
|
WRITE_INT(&store, version_no(eressea_version()));
|
||||||
n = write_game(&gdata);
|
n = write_game(&gdata);
|
||||||
binstore_done(&store);
|
binstore_done(&store);
|
||||||
fstream_done(&strm);
|
fstream_done(&strm);
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
|
#ifndef ERESSEA_VERSION
|
||||||
|
// the version number, if it was not passed to make with -D
|
||||||
|
#define ERESSEA_VERSION "3.10.0-devel"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const char *eressea_version(void) {
|
||||||
|
return ERESSEA_VERSION;
|
||||||
|
}
|
|
@ -10,7 +10,4 @@
|
||||||
without prior permission by the authors of Eressea.
|
without prior permission by the authors of Eressea.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef ERESSEA_VERSION
|
const char *eressea_version(void);
|
||||||
// the version number, if it was not passed to make with -D
|
|
||||||
#define ERESSEA_VERSION "3.10.0-devel"
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -166,7 +166,7 @@ static int parse_args(int argc, char **argv, int *exitcode)
|
||||||
printf("\n%s PBEM host\n"
|
printf("\n%s PBEM host\n"
|
||||||
"Copyright (C) 1996-2005 C. Schlittchen, K. Zedel, E. Rehling, H. Peters.\n\n"
|
"Copyright (C) 1996-2005 C. Schlittchen, K. Zedel, E. Rehling, H. Peters.\n\n"
|
||||||
"Compilation: " __DATE__ " at " __TIME__ "\nVersion: %s\n\n",
|
"Compilation: " __DATE__ " at " __TIME__ "\nVersion: %s\n\n",
|
||||||
game_name(), ERESSEA_VERSION);
|
game_name(), eressea_version());
|
||||||
#ifdef USE_CURSES
|
#ifdef USE_CURSES
|
||||||
}
|
}
|
||||||
else if (strcmp(argi + 2, "color") == 0) {
|
else if (strcmp(argi + 2, "color") == 0) {
|
||||||
|
|
Loading…
Reference in New Issue