(vers): Don't report KSU distribution (1.04 in all known versions),
Chainsaw version (4.00 since Empire 2, ca. 1995) and Wolfpack version (used to be the version number after the first dot). (KSU_DIST, CHAINSAW_DIST, WOLFPACK_DIST): Unused, remove. (version): New. (EMP_VERS_MAJOR, EMP_VERS_MINOR, EMP_VERS_PATCH): Remove. Users changed to use version[] instead. version[] is slightly easier to initialize from configure.ac. (check-version): No longer needed, remove. (legal): New. (vers, main): Show it.
This commit is contained in:
parent
3f0219a419
commit
5109a30910
5 changed files with 51 additions and 19 deletions
7
Make.mk
7
Make.mk
|
@ -293,7 +293,7 @@ endif
|
||||||
|
|
||||||
#
|
#
|
||||||
.PHONY: dist-source
|
.PHONY: dist-source
|
||||||
dist-source: check-version $(src_distgen) $(bld_distgen)
|
dist-source: $(src_distgen) $(bld_distgen)
|
||||||
$(tarball) $(TARNAME)-$(VERSION) $(bld_distgen) -C $(srcdir) $(src_distgen) $(src)
|
$(tarball) $(TARNAME)-$(VERSION) $(bld_distgen) -C $(srcdir) $(src_distgen) $(src)
|
||||||
|
|
||||||
.PHONY: dist-client
|
.PHONY: dist-client
|
||||||
|
@ -310,11 +310,6 @@ dist-info: info html
|
||||||
$(tarball) $(TARNAME)-info-text-$(VERSION) -C info.nr $(info)
|
$(tarball) $(TARNAME)-info-text-$(VERSION) -C info.nr $(info)
|
||||||
$(tarball) $(TARNAME)-info-html-$(VERSION) -C info.html $(addsuffix .html, $(info))
|
$(tarball) $(TARNAME)-info-html-$(VERSION) -C info.html $(addsuffix .html, $(info))
|
||||||
|
|
||||||
check-version:
|
|
||||||
if [ $(VERSION) != `sed -n '/EMP_VERS_/s/#define EMP_VERS_\([A-Z]*\)[ \t]*//p' <$(srcdir)/include/version.h | tr '\012' . | sed 's/\.$$//'` ]; \
|
|
||||||
then echo version.h does not match configure.ac >&2; false; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
ifneq ($(deps),)
|
ifneq ($(deps),)
|
||||||
-include $(deps)
|
-include $(deps)
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -25,23 +25,19 @@
|
||||||
*
|
*
|
||||||
* ---
|
* ---
|
||||||
*
|
*
|
||||||
* version.h: describes major, minor and release levels of the software
|
* version.h: Version information
|
||||||
*
|
*
|
||||||
* Known contributors to this file:
|
* Known contributors to this file:
|
||||||
* Thomas Ruschak, 1992
|
* Thomas Ruschak, 1992
|
||||||
* Ken Stevens, 1995
|
* Ken Stevens, 1995
|
||||||
* Steve McClure, 1998, 1999
|
* Steve McClure, 1998, 1999
|
||||||
|
* Markus Armbruster, 2006
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef VERSION_H
|
#ifndef VERSION_H
|
||||||
#define VERSION_H
|
#define VERSION_H
|
||||||
|
|
||||||
#define EMP_VERS_MAJOR 4
|
extern char version[];
|
||||||
#define EMP_VERS_MINOR 3
|
extern char legal[];
|
||||||
#define EMP_VERS_PATCH 0
|
|
||||||
|
|
||||||
#define KSU_DIST 1.04
|
|
||||||
#define CHAINSAW_DIST 4.00
|
|
||||||
#define WOLFPACK_DIST 3.00
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -55,7 +55,7 @@ vers(void)
|
||||||
time_t now;
|
time_t now;
|
||||||
|
|
||||||
(void)time(&now);
|
(void)time(&now);
|
||||||
pr("Empire %d.%d.%d\n(KSU distribution %2.2f, Chainsaw version %2.2f, Wolfpack version %2.2f)\n\n", EMP_VERS_MAJOR, EMP_VERS_MINOR, EMP_VERS_PATCH, (float)KSU_DIST, (float)CHAINSAW_DIST, (float)WOLFPACK_DIST);
|
pr("%s\n\n", version);
|
||||||
pr("The following parameters have been set for this game:\n");
|
pr("The following parameters have been set for this game:\n");
|
||||||
pr("World size is %d by %d.\n", WORLD_X, WORLD_Y);
|
pr("World size is %d by %d.\n", WORLD_X, WORLD_Y);
|
||||||
pr("There can be up to %d countries.\n", MAXNOC);
|
pr("There can be up to %d countries.\n", MAXNOC);
|
||||||
|
@ -166,10 +166,11 @@ vers(void)
|
||||||
show_opts(0);
|
show_opts(0);
|
||||||
pr("\n\nSee \"info Options\" for a detailed list of options and descriptions.");
|
pr("\n\nSee \"info Options\" for a detailed list of options and descriptions.");
|
||||||
pr("\n\n");
|
pr("\n\n");
|
||||||
pr("The person to annoy if something goes wrong is:\n\t%s\n\t(%s).\n",
|
pr("The person to annoy if something goes wrong is:\n\t%s\n\t(%s).\n\n",
|
||||||
privname, privlog);
|
privname, privlog);
|
||||||
pr("You can get your own copy of the source from "
|
pr("You can get your own copy of the source from "
|
||||||
"http://www.wolfpackempire.com/\n");
|
"http://www.wolfpackempire.com/\n\n");
|
||||||
|
pr("%s", legal);
|
||||||
return RET_OK;
|
return RET_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
41
src/lib/global/version.c
Normal file
41
src/lib/global/version.c
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
/*
|
||||||
|
* Empire - A multi-player, client/server Internet based war game.
|
||||||
|
* Copyright (C) 1986-2006, Dave Pare, Jeff Bailey, Thomas Ruschak,
|
||||||
|
* Ken Stevens, Steve McClure
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
* ---
|
||||||
|
*
|
||||||
|
* See files README, COPYING and CREDITS in the root of the source
|
||||||
|
* tree for related information and legal notices. It is expected
|
||||||
|
* that future projects/authors will amend these files as needed.
|
||||||
|
*
|
||||||
|
* ---
|
||||||
|
*
|
||||||
|
* version.c:
|
||||||
|
*
|
||||||
|
* Known contributors to this file:
|
||||||
|
* Markus Armbruster, 2006
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
|
char version[] = PACKAGE_STRING;
|
||||||
|
char legal[] =
|
||||||
|
"Copyright (C) 1986-2006, Dave Pare, Jeff Bailey, Thomas Ruschak,\n"
|
||||||
|
" Ken Stevens, Steve McClure\n"
|
||||||
|
"This is free software; see the source for copying conditions. There is NO\n"
|
||||||
|
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n";
|
|
@ -159,8 +159,7 @@ main(int argc, char **argv)
|
||||||
flags |= EMPTH_STACKCHECK;
|
flags |= EMPTH_STACKCHECK;
|
||||||
break;
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
printf("Wolfpack Empire %d.%d.%d\n",
|
printf("%s\n\n%s", version, legal);
|
||||||
EMP_VERS_MAJOR, EMP_VERS_MINOR, EMP_VERS_PATCH);
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
case 'h':
|
case 'h':
|
||||||
print_usage(argv[0]);
|
print_usage(argv[0]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue