update version handling and build process to match other external modules
This commit is contained in:
parent
25ef0225cc
commit
8391a0ff30
10 changed files with 989 additions and 1488 deletions
2
.gitattributes
vendored
2
.gitattributes
vendored
|
@ -6,11 +6,13 @@
|
|||
/Makefile.in -text
|
||||
/NEWS -text
|
||||
/README.WarServ -text
|
||||
/RELNOTES -text
|
||||
/configure -text
|
||||
/configure.in -text
|
||||
/events.c -text
|
||||
/install-sh -text
|
||||
/modconfig.h.in -text
|
||||
/modconfigwin32.h -text
|
||||
/play.c -text
|
||||
/warserv.c -text
|
||||
/warserv.h -text
|
||||
|
|
30
ChangeLog
30
ChangeLog
|
@ -1,23 +1,23 @@
|
|||
WarServ ChangeLog
|
||||
=============================================================================
|
||||
3.0 - Mark
|
||||
- Port to 3.0 API and Win32
|
||||
3.0.a1 - Mark (M)
|
||||
- Port to 3.0 API and Win32. (M)
|
||||
|
||||
1.2 - DeadNotBuried
|
||||
- fixed players being asked to play a war hand when they are not in the war
|
||||
- fixed error in calculating correct winner of a war
|
||||
- added Installation Instructions to Readme file
|
||||
- fixed version number displayed in !rules
|
||||
- added explanation of games to !rules
|
||||
- configure.in updated version number
|
||||
- updated license details in source files
|
||||
- !stop now calls correct procedure
|
||||
- channel setting now requires Oper user level to change channel
|
||||
- fixed players being asked to play a war hand when they are not in the war
|
||||
- fixed error in calculating correct winner of a war
|
||||
- added Installation Instructions to Readme file
|
||||
- fixed version number displayed in !rules
|
||||
- added explanation of games to !rules
|
||||
- configure.in updated version number
|
||||
- updated license details in source files
|
||||
- !stop now calls correct procedure
|
||||
- channel setting now requires Oper user level to change channel
|
||||
|
||||
1.1
|
||||
- added code to enable !stop command
|
||||
- added code to enable !stop command
|
||||
|
||||
1.0 - Fish
|
||||
- Initial Release. Code Contributed by DeadNotBurried (idontwantthisshit@hotmail.com)
|
||||
- Make game channel configurable.
|
||||
- Standardize on hostname.
|
||||
- Initial Release. Code Contributed by DeadNotBurried (idontwantthisshit@hotmail.com)
|
||||
- Make game channel configurable.
|
||||
- Standardize on hostname.
|
||||
|
|
39
Makefile.in
39
Makefile.in
|
@ -1,7 +1,7 @@
|
|||
#Neostats Module Makefile!
|
||||
CC = @CC@
|
||||
CFLAGS = @CFLAGS@ -g
|
||||
LDFLAGS = @LIBS@
|
||||
CFLAGS = @CFLAGS@
|
||||
LDFLAGS= @LDFLAGS@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
|
@ -12,32 +12,44 @@ SRCS= warserv.c warserv_help.c play.c events.c
|
|||
OBJS= ${SRCS:.c=.o}
|
||||
TARGET= warserv.so
|
||||
DOCS=README.WarServ
|
||||
SCRIPTS=
|
||||
DATA=
|
||||
DISTFILES=$(SRCS) $(DOCS) $(SCRIPTS) *.in configure install-sh ChangeLog *.h LICENSE
|
||||
SCRIPTS=
|
||||
DISTFILES=$(SRCS) $(DOCS) $(SCRIPTS) *.in configure install-sh ChangeLog *.h LICENSE RELNOTES warserv.vcproj modconfigwin32.h
|
||||
DISTDIR= @PACKAGE@-@VERSION@
|
||||
|
||||
all: module
|
||||
all: module
|
||||
@echo "Compilation complete."
|
||||
@echo "Run 'make install' (or 'gmake install' on some systems) to install."
|
||||
@echo "If you require support, see the README file."
|
||||
|
||||
# include dependency info
|
||||
@MAKEDEPENDENCIES@
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $<
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $<
|
||||
$(CC) -MM $(INCLUDES) -c $< > $*.d
|
||||
|
||||
module: $(OBJS)
|
||||
$(LD) -shared -o $(TARGET) $(LDFLAGS) $(OBJS)
|
||||
$(LD) -shared -o $(TARGET) $(OBJS) $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
/bin/rm -rf $(TARGET) *.o Makefile *.log modconfig.h
|
||||
/bin/rm -rf $(TARGET) *.o *.d Makefile *.log modconfig.h
|
||||
|
||||
distclean:
|
||||
/bin/rm -rf $(TARGET) *.o *.d Makefile *.log modconfig.h config.status configure.scan
|
||||
|
||||
install: module
|
||||
$(INSTALL) -m 644 $(TARGET) $(DIRECTORY)
|
||||
$(INSTALL) -m 644 $(DOCS) $(DIRECTORY)../doc/
|
||||
$(INSTALL) -m 644 $(TARGET) $(DIRECTORY)
|
||||
$(INSTALL) -m 644 $(DOCS) $(DIRECTORY)../doc/
|
||||
@echo "Installation complete."
|
||||
@echo "See the README file for instructions on loading this module."
|
||||
|
||||
dist:
|
||||
@echo -n "Creating Directories"
|
||||
@echo -n "Creating directories"
|
||||
@-rm -rf $(DISTDIR)
|
||||
@mkdir $(DISTDIR)
|
||||
@echo "Done"
|
||||
@echo -n "Copying Core Distribution Files"
|
||||
@echo -n "Copying distribution files"
|
||||
@for file in $(DISTFILES); do \
|
||||
echo -n "."; \
|
||||
cp -pr $$file $(DISTDIR)/$$file; \
|
||||
|
@ -46,7 +58,4 @@ dist:
|
|||
@tar -czf $(DISTDIR).tar.gz $(DISTDIR)/*
|
||||
@echo "Tar file $(DISTDIR).tar.gz created, Freshmeat Time"
|
||||
|
||||
|
||||
|
||||
$(OBJS): Makefile
|
||||
|
||||
|
|
18
RELNOTES
Executable file
18
RELNOTES
Executable file
|
@ -0,0 +1,18 @@
|
|||
==============================================================================
|
||||
Important information you should know: (READ THIS!)
|
||||
==============================================================================
|
||||
|
||||
This is an alpha release. Not all features will work and there may be major
|
||||
bugs in the software. This release is purely for us to get feedback on the new
|
||||
version of NeoStats and should not be run on production networks. This release
|
||||
is ideal for users with test networks or those that want an opportunity to
|
||||
help us develop the new version with feedback and suggestions.
|
||||
|
||||
No support is provided for this release so if you have problems and are unable
|
||||
to resolve them using the provided documentation, you should use the supported
|
||||
stable 2.5 series instead until NeoStats 3.0 is further along.
|
||||
|
||||
Bugs, requests and suggestions should be reported using the bug tracking
|
||||
system. You must provide all information required as listed in the README
|
||||
section on support or your entry will be removed.
|
||||
|
67
configure.in
67
configure.in
|
@ -1,29 +1,36 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(warserv.c)
|
||||
AC_CONFIG_HEADER(modconfig.h)
|
||||
|
||||
PACKAGE=WarServ
|
||||
MODULE_MAJOR=1
|
||||
MODULE_MINOR=2
|
||||
VERSION=$MODULE_MAJOR.$MODULE_MINOR
|
||||
MODULE_MAJOR=3
|
||||
MODULE_MINOR=0
|
||||
MODULE_REV=a1
|
||||
VERSION=$MODULE_MAJOR.$MODULE_MINOR.$MODULE_REV
|
||||
AC_DEFINE_UNQUOTED(MODULE_VERSION, "$VERSION")
|
||||
AC_DEFINE_UNQUOTED(MODULE_MAJOR, "$MODULE_MAJOR")
|
||||
AC_DEFINE_UNQUOTED(MODULE_MINOR, "$MODULE_MINOR")
|
||||
AC_DEFINE_UNQUOTED(MODULE_REV, "$MODULE_REV")
|
||||
DIRINST=~/NeoStats3.0/
|
||||
AC_PREFIX_DEFAULT(~/NeoStats3.0/)
|
||||
CFLAGS="$CFLAGS -O2"
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
case "$host_os" in
|
||||
*openbsd*)
|
||||
MAKEDEPENDENCIES="";;
|
||||
*freebsd*)
|
||||
MAKEDEPENDENCIES="";;
|
||||
*)
|
||||
MAKEDEPENDENCIES="-include \$(OBJS:.o=.d)";;
|
||||
esac
|
||||
|
||||
AC_MSG_CHECKING(Location of NeoStats...)
|
||||
AC_ARG_WITH(neostats,
|
||||
[ --with-neostats=DIR Location of NeoStats installation],
|
||||
[DIRINST=$withval])
|
||||
AC_MSG_RESULT($DIRINST)
|
||||
|
||||
|
||||
AC_CHECK_FILE($DIRINST/include/dl.h,
|
||||
AC_CHECK_FILE($DIRINST/include/neostats.h,
|
||||
[INCLUDEDIR="$DIRINST/include/"],
|
||||
[AC_MSG_ERROR(Can't find existing NeoStats Installation please supply with --with-neostats option)])
|
||||
|
||||
|
@ -35,11 +42,9 @@ AC_TRY_RUN(
|
|||
#include <config.h>
|
||||
#include <stdlib.h>
|
||||
int main(void) {
|
||||
if (MAJOR >= 2) {
|
||||
if (MINOR >= 5) {
|
||||
if (REV >= 15) {
|
||||
exit(0);
|
||||
}
|
||||
if (MAJOR >= 3) {
|
||||
if (MINOR >= 0) {
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
exit(1);
|
||||
|
@ -48,12 +53,11 @@ int main(void) {
|
|||
ns_version_ok='no',
|
||||
ns_version_ok='no')
|
||||
if test "$ns_version_ok" = "yes"; then
|
||||
AC_MSG_RESULT(Compatible Version);
|
||||
AC_MSG_RESULT(Compatible version);
|
||||
else
|
||||
AC_MSG_ERROR(This Module requires NeoStats 2.5.13 or Higher)
|
||||
AC_MSG_ERROR(This module requires NeoStats 3.0.a1 or higher)
|
||||
fi
|
||||
|
||||
|
||||
dnl check if we are running with Debug....
|
||||
AC_MSG_CHECKING(Whether to Enable Debuging...)
|
||||
AC_ARG_ENABLE(debug,
|
||||
|
@ -71,24 +75,21 @@ AC_ARG_ENABLE(debug,
|
|||
AC_MSG_RESULT(no)
|
||||
)
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
AC_SUBST(DIRINST)
|
||||
AC_SUBST(MAKEDEPENDENCIES)
|
||||
AC_SUBST(CFLAGS)
|
||||
AC_SUBST(PACKAGE)
|
||||
AC_SUBST(VERSION)
|
||||
AC_OUTPUT(Makefile)
|
||||
echo "(*----------------------------------------------------------*)"
|
||||
echo "(| Important Instructions |)"
|
||||
echo "(*----------------------------------------------------------*)"
|
||||
echo "(| Now that configure is complete, type 'make' to compile |)"
|
||||
echo "(| the module. When the compile has completed, type |)"
|
||||
echo "(| 'make install' to install the module. |)"
|
||||
echo "(| For BSD you might need to use 'gmake' and 'gmake install'|)"
|
||||
echo "(*----------------------------------------------------------*)"
|
||||
echo "(| For Support please visit: |)"
|
||||
echo "(| IRC: /server irc.irc-chat.org |)"
|
||||
echo "(| #neostats channel |)"
|
||||
echo "(| WWW: http://www.neostats.net/boards/ |)"
|
||||
echo "(*----------------------------------------------------------*)"
|
||||
echo "(|This Module was written by: |)"
|
||||
echo "(| DeadNotBurried (idontwantthisshit@hotmail.com) |)"
|
||||
echo "(*----------------------------------------------------------*)"
|
||||
echo "Configuration complete."
|
||||
read -p "Press Enter key to read the release notes"
|
||||
clear
|
||||
more RELNOTES
|
||||
echo "This Module was written by:"
|
||||
echo " DeadNotBurried (idontwantthisshit@hotmail.com)"
|
||||
echo "Run 'make' (or 'gmake' on some systems) to compile NeoStats."
|
||||
echo "If you require support, see the README file."
|
||||
|
|
|
@ -9,3 +9,6 @@
|
|||
|
||||
/* Minor Version */
|
||||
#undef MODULE_MINOR
|
||||
|
||||
/* Revision */
|
||||
#undef MODULE_REV
|
||||
|
|
15
modconfigwin32.h
Executable file
15
modconfigwin32.h
Executable file
|
@ -0,0 +1,15 @@
|
|||
/* modconfig.h. Generated by configure. */
|
||||
/* define this to enable debug code for this module */
|
||||
/* #undef DEBUG */
|
||||
|
||||
/* Version number of package */
|
||||
#define MODULE_VERSION "3.0.a1"
|
||||
|
||||
/* Major Version */
|
||||
#define MODULE_MAJOR "3"
|
||||
|
||||
/* Minor Version */
|
||||
#define MODULE_MINOR "0"
|
||||
|
||||
/* Revision */
|
||||
#define MODULE_REV "a1"
|
|
@ -21,6 +21,11 @@
|
|||
** $Id$
|
||||
*/
|
||||
|
||||
#ifdef WIN32
|
||||
#include "modconfigwin32.h"
|
||||
#else
|
||||
#include "modconfig.h"
|
||||
#endif
|
||||
#include "neostats.h" /* Required for bot support */
|
||||
#include "warserv.h"
|
||||
|
||||
|
@ -82,7 +87,7 @@ ModuleInfo module_info = {
|
|||
ws_copyright,
|
||||
ws_about,
|
||||
NEOSTATS_VERSION,
|
||||
"3.0",
|
||||
MODULE_VERSION,
|
||||
__DATE__,
|
||||
__TIME__,
|
||||
0,
|
||||
|
|
|
@ -138,6 +138,9 @@
|
|||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath=".\modconfigwin32.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\warserv.h">
|
||||
</File>
|
||||
|
@ -159,6 +162,9 @@
|
|||
<File
|
||||
RelativePath=".\modconfig.h.in">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Relnotes">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
|
|
Reference in a new issue