Switched to internal zipping/unzipping routines.

This commit is contained in:
gunnar_g 2010-11-26 12:16:10 +00:00
parent 3e447a0b31
commit e7f38d6064
10 changed files with 17234 additions and 985 deletions

View File

@ -31,11 +31,14 @@ POST_INSTALL = :
NORMAL_UNINSTALL = : NORMAL_UNINSTALL = :
PRE_UNINSTALL = : PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = . subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
TODO acconfig.h depcomp install-sh missing mkinstalldirs TODO acconfig.h config.guess config.sub depcomp install-sh \
ltmain.sh missing mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@ -102,6 +105,7 @@ distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@ ALL_LINGUAS = @ALL_LINGUAS@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
@ -117,11 +121,14 @@ CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@ DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
FGREP = @FGREP@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@ GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@ GMSGFMT = @GMSGFMT@
@ -140,9 +147,13 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@
INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PERL = @INTLTOOL_PERL@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
LD = @LD@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LOCALEDIR = @LOCALEDIR@ LOCALEDIR = @LOCALEDIR@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
@ -152,7 +163,12 @@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@ MSGFMT_OPTS = @MSGFMT_OPTS@
MSGMERGE = @MSGMERGE@ MSGMERGE = @MSGMERGE@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@
@ -164,10 +180,14 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POFILES = @POFILES@ POFILES = @POFILES@
POSUB = @POSUB@ POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
STRIP = @STRIP@ STRIP = @STRIP@
@ -179,20 +199,29 @@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@
am__tar = @am__tar@ am__tar = @am__tar@
am__untar = @am__untar@ am__untar = @am__untar@
bindir = @bindir@ bindir = @bindir@
build = @build@
build_alias = @build_alias@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@ builddir = @builddir@
datadir = @datadir@ datadir = @datadir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
docdir = @docdir@ docdir = @docdir@
dvidir = @dvidir@ dvidir = @dvidir@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@ host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@ htmldir = @htmldir@
includedir = @includedir@ includedir = @includedir@
infodir = @infodir@ infodir = @infodir@
@ -201,6 +230,7 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
@ -1605,6 +1635,15 @@ $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(top_srcdir
distclean-hdr: distclean-hdr:
-rm -f config.h stamp-h1 -rm -f config.h stamp-h1
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool config.lt
# This directory's subdirectories are mostly independent; you can cd # This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile. # into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles, # To change the values of `make' variables: instead of editing Makefiles,
@ -1950,12 +1989,13 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild." @echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive clean: clean-recursive
clean-am: clean-generic mostlyclean-am clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile -rm -f Makefile
distclean-am: clean-am distclean-generic distclean-hdr distclean-tags distclean-am: clean-am distclean-generic distclean-hdr \
distclean-libtool distclean-tags
dvi: dvi-recursive dvi: dvi-recursive
@ -2005,7 +2045,7 @@ maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-recursive pdf: pdf-recursive
@ -2022,19 +2062,20 @@ uninstall-am:
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \ all all-am am--refresh check check-am clean clean-generic \
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
dist-hook dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \
distcheck distclean distclean-generic distclean-hdr \ dist-zip distcheck distclean distclean-generic distclean-hdr \
distclean-tags distcleancheck distdir distuninstallcheck dvi \ distclean-libtool distclean-tags distcleancheck distdir \
dvi-am html html-am info info-am install install-am \ distuninstallcheck dvi dvi-am html html-am info info-am \
install-data install-data-am install-data-local install-dvi \ install install-am install-data install-data-am \
install-dvi-am install-exec install-exec-am install-html \ install-data-local install-dvi install-dvi-am install-exec \
install-html-am install-info install-info-am install-man \ install-exec-am install-html install-html-am install-info \
install-pdf install-pdf-am install-ps install-ps-am \ install-info-am install-man install-pdf install-pdf-am \
install-strip installcheck installcheck-am installdirs \ install-ps install-ps-am install-strip installcheck \
installdirs-am maintainer-clean maintainer-clean-generic \ installcheck-am installdirs installdirs-am maintainer-clean \
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ maintainer-clean-generic mostlyclean mostlyclean-generic \
tags-recursive uninstall uninstall-am mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
uninstall uninstall-am
generate-xml: generate-xml:

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# Run this to generate all the initial makefiles, etc. # Run this to generate all the initial makefiles, etc.
autoreconf
srcdir=`dirname $0` srcdir=`dirname $0`
test -z "$srcdir" && srcdir=. test -z "$srcdir" && srcdir=.

View File

@ -19,6 +19,9 @@
/* Define to 1 if you have the `dcgettext' function. */ /* Define to 1 if you have the `dcgettext' function. */
#undef HAVE_DCGETTEXT #undef HAVE_DCGETTEXT
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define if the GNU gettext() function is already present or preinstalled. */ /* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT #undef HAVE_GETTEXT
@ -58,6 +61,10 @@
/* Define to 1 if you have the <unistd.h> header file. */ /* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H #undef HAVE_UNISTD_H
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Name of package */ /* Name of package */
#undef PACKAGE #undef PACKAGE

7824
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -11,6 +11,7 @@ AM_PROG_CC_STDC
AC_HEADER_STDC AC_HEADER_STDC
AM_CONDITIONAL(HAVE_WINDRES, which windres > /dev/null) AM_CONDITIONAL(HAVE_WINDRES, which windres > /dev/null)
IT_PROG_INTLTOOL(0.35.0,1) IT_PROG_INTLTOOL(0.35.0,1)
AC_PROG_LIBTOOL
pkg_modules="gtk+-2.0 >= 2.16 glib-2.0 >= 2.12 gmodule-export-2.0" pkg_modules="gtk+-2.0 >= 2.16 glib-2.0 >= 2.12 gmodule-export-2.0"
dnl echo -n "checking for gthread-2.0 ... " dnl echo -n "checking for gthread-2.0 ... "
@ -81,5 +82,6 @@ ifdef(`__unix__', `AC_MSG_RESULT([OK]'')')
AC_OUTPUT([ AC_OUTPUT([
Makefile Makefile
src/Makefile src/Makefile
src/zip/Makefile
po/Makefile.in po/Makefile.in
]) ])

8413
ltmain.sh Executable file

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +1,14 @@
## Process this file with automake to produce Makefile.in ## Process this file with automake to produce Makefile.in
AM_CFLAGS = -Wall #-fprofile-arcs -ftest-coverage -pg AM_CFLAGS = -Wall #-fprofile-arcs -ftest-coverage -pg
INCLUDES = \ SUBDIRS = zip
INCLUDES = -I$(srcdir)/zip \
-DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
@PACKAGE_CFLAGS@ @GST_CFLAGS@ @PACKAGE_CFLAGS@ @GST_CFLAGS@
bin_PROGRAMS = bygfoot bin_PROGRAMS = bygfoot
bygfoot_SOURCES = \ bygfoot_SOURCES = \
@ -88,5 +91,8 @@ bygfoot_SOURCES = \
xml_team.c file.h free.h main.h misc.h option.h player.h team.h variables.h xml_team.h \ xml_team.c file.h free.h main.h misc.h option.h player.h team.h variables.h xml_team.h \
youth_academy.c free.h maths.h name.h option.h player.h team.h user.h youth_academy.h youth_academy.c free.h maths.h name.h option.h player.h team.h user.h youth_academy.h
bygfoot_LDADD = @PACKAGE_LIBS@ @GST_LIBS@ $(INTLLIBS) BYGFOOTLIBS = \
zip/libminizip.la
bygfoot_LDADD = @PACKAGE_LIBS@ @GST_LIBS@ $(INTLLIBS) $(BYGFOOTLIBS)

View File

@ -32,6 +32,8 @@ POST_INSTALL = :
NORMAL_UNINSTALL = : NORMAL_UNINSTALL = :
PRE_UNINSTALL = : PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
bin_PROGRAMS = bygfoot$(EXEEXT) bin_PROGRAMS = bygfoot$(EXEEXT)
subdir = src subdir = src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
@ -82,23 +84,67 @@ am_bygfoot_OBJECTS = bet.$(OBJEXT) callback_func.$(OBJEXT) \
xml_team.$(OBJEXT) youth_academy.$(OBJEXT) xml_team.$(OBJEXT) youth_academy.$(OBJEXT)
bygfoot_OBJECTS = $(am_bygfoot_OBJECTS) bygfoot_OBJECTS = $(am_bygfoot_OBJECTS)
am__DEPENDENCIES_1 = am__DEPENDENCIES_1 =
bygfoot_DEPENDENCIES = $(am__DEPENDENCIES_1) bygfoot_DEPENDENCIES = $(am__DEPENDENCIES_1) $(BYGFOOTLIBS)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles am__depfiles_maybe = depfiles
am__mv = mv -f am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC) CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(bygfoot_SOURCES) SOURCES = $(bygfoot_SOURCES)
DIST_SOURCES = $(bygfoot_SOURCES) DIST_SOURCES = $(bygfoot_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
distdir
ETAGS = etags ETAGS = etags
CTAGS = ctags CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@ ALL_LINGUAS = @ALL_LINGUAS@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
@ -114,11 +160,14 @@ CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@ DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
FGREP = @FGREP@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@ GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@ GMSGFMT = @GMSGFMT@
@ -137,9 +186,13 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@
INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PERL = @INTLTOOL_PERL@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
LD = @LD@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LOCALEDIR = @LOCALEDIR@ LOCALEDIR = @LOCALEDIR@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
@ -149,7 +202,12 @@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@ MSGFMT_OPTS = @MSGFMT_OPTS@
MSGMERGE = @MSGMERGE@ MSGMERGE = @MSGMERGE@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@
@ -161,10 +219,14 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POFILES = @POFILES@ POFILES = @POFILES@
POSUB = @POSUB@ POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
STRIP = @STRIP@ STRIP = @STRIP@
@ -176,20 +238,29 @@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@
am__tar = @am__tar@ am__tar = @am__tar@
am__untar = @am__untar@ am__untar = @am__untar@
bindir = @bindir@ bindir = @bindir@
build = @build@
build_alias = @build_alias@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@ builddir = @builddir@
datadir = @datadir@ datadir = @datadir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
docdir = @docdir@ docdir = @docdir@
dvidir = @dvidir@ dvidir = @dvidir@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@ host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@ htmldir = @htmldir@
includedir = @includedir@ includedir = @includedir@
infodir = @infodir@ infodir = @infodir@
@ -198,6 +269,7 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
@ -214,7 +286,8 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
AM_CFLAGS = -Wall #-fprofile-arcs -ftest-coverage -pg AM_CFLAGS = -Wall #-fprofile-arcs -ftest-coverage -pg
INCLUDES = \ SUBDIRS = zip
INCLUDES = -I$(srcdir)/zip \
-DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
@PACKAGE_CFLAGS@ @GST_CFLAGS@ @PACKAGE_CFLAGS@ @GST_CFLAGS@
@ -299,11 +372,14 @@ bygfoot_SOURCES = \
xml_team.c file.h free.h main.h misc.h option.h player.h team.h variables.h xml_team.h \ xml_team.c file.h free.h main.h misc.h option.h player.h team.h variables.h xml_team.h \
youth_academy.c free.h maths.h name.h option.h player.h team.h user.h youth_academy.h youth_academy.c free.h maths.h name.h option.h player.h team.h user.h youth_academy.h
bygfoot_LDADD = @PACKAGE_LIBS@ @GST_LIBS@ $(INTLLIBS) BYGFOOTLIBS = \
all: all-am zip/libminizip.la
bygfoot_LDADD = @PACKAGE_LIBS@ @GST_LIBS@ $(INTLLIBS) $(BYGFOOTLIBS)
all: all-recursive
.SUFFIXES: .SUFFIXES:
.SUFFIXES: .c .o .obj .SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \ @for dep in $?; do \
case '$(am__configure_deps)' in \ case '$(am__configure_deps)' in \
@ -340,7 +416,7 @@ install-binPROGRAMS: $(bin_PROGRAMS)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
for p in $$list; do echo "$$p $$p"; done | \ for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \ sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p; \ while read p p1; do if test -f $$p || test -f $$p1; \
then echo "$$p"; echo "$$p"; else :; fi; \ then echo "$$p"; echo "$$p"; else :; fi; \
done | \ done | \
sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
@ -354,8 +430,8 @@ install-binPROGRAMS: $(bin_PROGRAMS)
while read type dir files; do \ while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \ test -z "$$files" || { \
echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
} \ } \
; done ; done
@ -370,7 +446,13 @@ uninstall-binPROGRAMS:
cd "$(DESTDIR)$(bindir)" && rm -f $$files cd "$(DESTDIR)$(bindir)" && rm -f $$files
clean-binPROGRAMS: clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
echo " rm -f" $$list; \
rm -f $$list || exit $$?; \
test -n "$(EXEEXT)" || exit 0; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
bygfoot$(EXEEXT): $(bygfoot_OBJECTS) $(bygfoot_DEPENDENCIES) bygfoot$(EXEEXT): $(bygfoot_OBJECTS) $(bygfoot_DEPENDENCIES)
@rm -f bygfoot$(EXEEXT) @rm -f bygfoot$(EXEEXT)
$(LINK) $(bygfoot_OBJECTS) $(bygfoot_LDADD) $(LIBS) $(LINK) $(bygfoot_OBJECTS) $(bygfoot_LDADD) $(LIBS)
@ -474,6 +556,89 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
@ -484,10 +649,23 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
mkid -fID $$unique mkid -fID $$unique
tags: TAGS tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP) $(TAGS_FILES) $(LISP)
set x; \ set x; \
here=`pwd`; \ here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
@ -506,7 +684,7 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
fi; \ fi; \
fi fi
ctags: CTAGS ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP) $(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
@ -556,22 +734,51 @@ distdir: $(DISTFILES)
|| exit 1; \ || exit 1; \
fi; \ fi; \
done done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am check-am: all-am
check: check-am check: check-recursive
all-am: Makefile $(PROGRAMS) all-am: Makefile $(PROGRAMS)
installdirs: installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(bindir)"; do \ for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done done
install: install-am install: install-recursive
install-exec: install-exec-am install-exec: install-exec-recursive
install-data: install-data-am install-data: install-data-recursive
uninstall: uninstall-am uninstall: uninstall-recursive
install-am: all-am install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am installcheck: installcheck-recursive
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
@ -588,89 +795,94 @@ distclean-generic:
maintainer-clean-generic: maintainer-clean-generic:
@echo "This command is intended for maintainers to use" @echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild." @echo "it deletes files that may require special tools to rebuild."
clean: clean-am clean: clean-recursive
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am distclean: distclean-recursive
-rm -rf ./$(DEPDIR) -rm -rf ./$(DEPDIR)
-rm -f Makefile -rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \ distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags distclean-tags
dvi: dvi-am dvi: dvi-recursive
dvi-am: dvi-am:
html: html-am html: html-recursive
html-am: html-am:
info: info-am info: info-recursive
info-am: info-am:
install-data-am: install-data-am:
install-dvi: install-dvi-am install-dvi: install-dvi-recursive
install-dvi-am: install-dvi-am:
install-exec-am: install-binPROGRAMS install-exec-am: install-binPROGRAMS
install-html: install-html-am install-html: install-html-recursive
install-html-am: install-html-am:
install-info: install-info-am install-info: install-info-recursive
install-info-am: install-info-am:
install-man: install-man:
install-pdf: install-pdf-am install-pdf: install-pdf-recursive
install-pdf-am: install-pdf-am:
install-ps: install-ps-am install-ps: install-ps-recursive
install-ps-am: install-ps-am:
installcheck-am: installcheck-am:
maintainer-clean: maintainer-clean-am maintainer-clean: maintainer-clean-recursive
-rm -rf ./$(DEPDIR) -rm -rf ./$(DEPDIR)
-rm -f Makefile -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am pdf: pdf-recursive
pdf-am: pdf-am:
ps: ps-am ps: ps-recursive
ps-am: ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-am: uninstall-binPROGRAMS
.MAKE: install-am install-strip .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
install-am install-strip tags-recursive
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
clean-generic ctags distclean distclean-compile \ all all-am check check-am clean clean-binPROGRAMS \
distclean-generic distclean-tags distdir dvi dvi-am html \ clean-generic clean-libtool ctags ctags-recursive distclean \
html-am info info-am install install-am install-binPROGRAMS \ distclean-compile distclean-generic distclean-libtool \
install-data install-data-am install-dvi install-dvi-am \ distclean-tags distdir dvi dvi-am html html-am info info-am \
install-exec install-exec-am install-html install-html-am \ install install-am install-binPROGRAMS install-data \
install-info install-info-am install-man install-pdf \ install-data-am install-dvi install-dvi-am install-exec \
install-pdf-am install-ps install-ps-am install-strip \ install-exec-am install-html install-html-am install-info \
installcheck installcheck-am installdirs maintainer-clean \ install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \ maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
uninstall-am uninstall-binPROGRAMS tags tags-recursive uninstall uninstall-am \
uninstall-binPROGRAMS
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.

View File

@ -21,11 +21,13 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
#include <zlib.h>
#include <glib/gstdio.h>
#include "file.h" #include "file.h"
#include "free.h" #include "free.h"
@ -35,10 +37,15 @@
#include "option.h" #include "option.h"
#include "support.h" #include "support.h"
#include "variables.h" #include "variables.h"
#include "zip/unzip.h"
#include "zip/zip.h"
#define WRITEBUFFERSIZE (8192)
#define MAXFILENAME (256)
/** /**
* Adds a definition directory * Adds a definition directory
*/ */
void add_definitions_directory(const gchar *directory) void add_definitions_directory(const gchar *directory)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -67,8 +74,8 @@ void add_definitions_directory(const gchar *directory)
@param directory The full path of the directory to be added. @param directory The full path of the directory to be added.
@see file_find_support_file() @see file_find_support_file()
@see #support_directories @see #support_directories
*/ */
void void
file_add_support_directory_recursive (const gchar *directory) file_add_support_directory_recursive (const gchar *directory)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -123,8 +130,8 @@ file_add_support_directory_recursive (const gchar *directo
we didn't find the file. The gchar* must be freed. we didn't find the file. The gchar* must be freed.
@see #support_directories @see #support_directories
@see file_add_support_directory_recursive() @see file_add_support_directory_recursive()
*/ */
gchar* gchar*
file_find_support_file (const gchar *filename, gboolean warning) file_find_support_file (const gchar *filename, gboolean warning)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -153,7 +160,7 @@ file_find_support_file (const gchar *filename, gboolea
/** Execute command with 'system' and give a warning if return value is -1. /** Execute command with 'system' and give a warning if return value is -1.
@return TRUE on success, FALSE, otherwise. */ @return TRUE on success, FALSE, otherwise. */
gboolean gboolean
file_my_system(const GString *command) file_my_system(const GString *command)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -182,7 +189,7 @@ file_my_system(const GString *command)
@param fil The file pointer that will point to the opened stream. @param fil The file pointer that will point to the opened stream.
@param abort_program Whether to abort the program if we encounter an error. @param abort_program Whether to abort the program if we encounter an error.
@return TRUE on success, FALSE otherwise. */ @return TRUE on success, FALSE otherwise. */
gboolean gboolean
file_my_fopen(const gchar *filename, gchar *bits, FILE **fil, gboolean abort_program) file_my_fopen(const gchar *filename, gchar *bits, FILE **fil, gboolean abort_program)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -214,7 +221,7 @@ file_my_fopen(const gchar *filename, gchar *bits, FILE **fil, gboolean abort_pro
} }
/** Create a $HOME/.bygfoot dir and other stuff if necessary. */ /** Create a $HOME/.bygfoot dir and other stuff if necessary. */
void void
file_check_home_dir_create_dirs(void) file_check_home_dir_create_dirs(void)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -239,7 +246,7 @@ file_check_home_dir_create_dirs(void)
/** Add the basic config files to the list of file to copy /** Add the basic config files to the list of file to copy
into the user home dir. */ into the user home dir. */
void void
file_check_home_dir_get_conf_files(GPtrArray **files_to_copy) file_check_home_dir_get_conf_files(GPtrArray **files_to_copy)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -269,7 +276,7 @@ file_check_home_dir_get_conf_files(GPtrArray **files_to_copy)
/** Add the xml definition files to the list of files to copy /** Add the xml definition files to the list of files to copy
into the home dir. */ into the home dir. */
void void
file_check_home_dir_get_definition_dir(const gchar *dirname, const gchar *basename, file_check_home_dir_get_definition_dir(const gchar *dirname, const gchar *basename,
GPtrArray **files_to_copy) GPtrArray **files_to_copy)
{ {
@ -325,7 +332,7 @@ file_check_home_dir_get_definition_dir(const gchar *dirname, const gchar *basena
/** Step through the support dirs to find xml definition files /** Step through the support dirs to find xml definition files
that get copied into the home dir. */ that get copied into the home dir. */
void void
file_check_home_dir_get_definition_files(GPtrArray **files_to_copy) file_check_home_dir_get_definition_files(GPtrArray **files_to_copy)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -346,7 +353,7 @@ file_check_home_dir_get_definition_files(GPtrArray **files_to_copy)
} }
/** Execute the copy commands on the files assembled earlier. */ /** Execute the copy commands on the files assembled earlier. */
void void
file_check_home_dir_copy_files(GPtrArray **files_to_copy) file_check_home_dir_copy_files(GPtrArray **files_to_copy)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -407,7 +414,7 @@ file_check_home_dir_copy_files(GPtrArray **files_to_copy)
} }
/** Copy some files into the user's home directory. */ /** Copy some files into the user's home directory. */
gboolean gboolean
file_check_home_dir(void) file_check_home_dir(void)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -437,8 +444,8 @@ file_check_home_dir(void)
@param suffix The suffix that files must have to be included. @param suffix The suffix that files must have to be included.
@return A GPtrArray with pointers to the strings of the file @return A GPtrArray with pointers to the strings of the file
names. The array must be freed with free_gchar_array(). names. The array must be freed with free_gchar_array().
*/ */
GPtrArray* GPtrArray*
file_dir_get_contents(const gchar *dir_name, const gchar *prefix, const gchar *suffix) file_dir_get_contents(const gchar *dir_name, const gchar *prefix, const gchar *suffix)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -476,7 +483,7 @@ file_dir_get_contents(const gchar *dir_name, const gchar *prefix, const gchar *s
/** Return the country definition files found in the support dirs. /** Return the country definition files found in the support dirs.
* The files are appended with the directories*/ * The files are appended with the directories*/
GPtrArray* GPtrArray*
file_get_country_files(void) file_get_country_files(void)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -533,7 +540,7 @@ file_get_country_files(void)
@param opt_name The first char array (an option name, mostly). @param opt_name The first char array (an option name, mostly).
@param opt_value The second array (an option value, mostly). @param opt_value The second array (an option value, mostly).
@return TRUE if the file still contains lines to read, FALSE otherwise. */ @return TRUE if the file still contains lines to read, FALSE otherwise. */
gboolean gboolean
file_get_next_opt_line(FILE *fil, gchar *opt_name, gchar *opt_value) file_get_next_opt_line(FILE *fil, gchar *opt_name, gchar *opt_value)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -580,7 +587,7 @@ file_get_next_opt_line(FILE *fil, gchar *opt_name, gchar *opt_value)
} }
/** Save an optionlist to a file. */ /** Save an optionlist to a file. */
void void
file_save_opt_file(const gchar *filename, OptionList *optionlist) file_save_opt_file(const gchar *filename, OptionList *optionlist)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -605,7 +612,7 @@ file_save_opt_file(const gchar *filename, OptionList *optionlist)
/** Load a file containing name - value pairs into /** Load a file containing name - value pairs into
the specified array. */ the specified array. */
void void
file_load_opt_file(const gchar *filename, OptionList *optionlist, gboolean sort) file_load_opt_file(const gchar *filename, OptionList *optionlist, gboolean sort)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -658,7 +665,7 @@ file_load_opt_file(const gchar *filename, OptionList *optionlist, gboolean sort)
} }
/** Load the appropriate hints file. */ /** Load the appropriate hints file. */
void void
file_load_hints_file(void) file_load_hints_file(void)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -683,7 +690,7 @@ file_load_hints_file(void)
/** Load the options at the beginning of a new game from /** Load the options at the beginning of a new game from
the configuration files. */ the configuration files. */
void void
file_load_conf_files(void) file_load_conf_files(void)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -707,7 +714,7 @@ file_load_conf_files(void)
/** Load a user-specific conf file. /** Load a user-specific conf file.
@param user The user we load the file for. */ @param user The user we load the file for. */
void void
file_load_user_conf_file(User *user) file_load_user_conf_file(User *user)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -734,7 +741,7 @@ file_load_user_conf_file(User *user)
/** Return the primary support dir (probably './support_files' or /** Return the primary support dir (probably './support_files' or
the Bygfoot dir in $HOME). */ the Bygfoot dir in $HOME). */
const gchar* const gchar*
file_get_first_support_dir(void) file_get_first_support_dir(void)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -760,7 +767,7 @@ file_get_first_support_dir(void)
} }
/** Return the first support directory which has the given suffix.*/ /** Return the first support directory which has the given suffix.*/
const gchar* const gchar*
file_get_first_support_dir_suffix(const gchar *suffix) file_get_first_support_dir_suffix(const gchar *suffix)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -785,7 +792,7 @@ file_get_first_support_dir_suffix(const gchar *suffix)
/** Compress the files starting with the prefix. /** Compress the files starting with the prefix.
@param destfile The name of the file to create. */ @param destfile The name of the file to create. */
void void
file_compress_files(const gchar *destfile, const gchar *prefix) file_compress_files(const gchar *destfile, const gchar *prefix)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -799,27 +806,21 @@ file_compress_files(const gchar *destfile, const gchar *prefix)
*zipbasename = g_path_get_basename(destfile), *zipbasename = g_path_get_basename(destfile),
*pwd = g_get_current_dir(); *pwd = g_get_current_dir();
GPtrArray *files = file_dir_get_contents(dirname, basename, ""); GPtrArray *files = file_dir_get_contents(dirname, basename, "");
int err=0;
chdir(dirname); chdir(dirname);
zipFile zf = zipOpen(zipbasename, 1);
if (os_is_unix) if (zf == NULL)
g_string_sprintf(buf, "%s %s %s", {
const_str("string_fs_compress_command"), printf("error opening %s\n",zipbasename);
const_str("string_fs_compress_switches"), err= ZIP_ERRNO;
zipbasename); }
else
g_string_sprintf(buf, "\"%s%s%s\" %s %s", pwd, G_DIR_SEPARATOR_S,
const_str("string_fs_compress_command"),
const_str("string_fs_compress_switches"),
zipbasename);
for(i=0;i<files->len;i++) for(i=0;i<files->len;i++)
{ {
g_string_append(buf, " "); do_compress_currentfile(zf, (gchar*)g_ptr_array_index(files, i));
g_string_append(buf, (gchar*)g_ptr_array_index(files, i));
} }
file_my_system(buf); zipClose(zf, NULL);
chdir(pwd); chdir(pwd);
@ -836,7 +837,7 @@ file_compress_files(const gchar *destfile, const gchar *prefix)
} }
/** Decompress the specified file. */ /** Decompress the specified file. */
void void
file_decompress(const gchar *filename) file_decompress(const gchar *filename)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -850,18 +851,31 @@ file_decompress(const gchar *filename)
chdir(dirname); chdir(dirname);
if (os_is_unix) uLong i;
g_string_sprintf(buf, "%s %s %s", unz_global_info gi;
const_str("string_fs_uncompress_command"), int err;
const_str("string_fs_uncompress_switches"), unzFile uf;
basename);
else
g_string_sprintf(buf, "\"%s%s%s\" %s %s", pwd, G_DIR_SEPARATOR_S,
const_str("string_fs_uncompress_command"),
const_str("string_fs_uncompress_switches"),
basename);
file_my_system(buf); uf = unzOpen(filename);
err = unzGetGlobalInfo(uf,&gi);
if (err!=UNZ_OK)
printf("error %d with zipfile in unzGetGlobalInfo \n",err);
for (i=0;i<gi.number_entry;i++)
{
if (do_extract_currentfile(uf) != UNZ_OK)
break;
if ((i+1)<gi.number_entry)
{
err = unzGoToNextFile(uf);
if (err!=UNZ_OK)
{
printf("error %d with zipfile in unzGoToNextFile\n",err);
break;
}
}
}
g_string_free(buf, TRUE); g_string_free(buf, TRUE);
@ -874,7 +888,7 @@ file_decompress(const gchar *filename)
/** Execute the appropriate remove command with 'files' /** Execute the appropriate remove command with 'files'
as argument (can be directories or a regexp, too). */ as argument (can be directories or a regexp, too). */
void void
file_remove_files(const GString *files) file_remove_files(const GString *files)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -894,7 +908,7 @@ file_remove_files(const GString *files)
} }
/** Execute the appropriate copy command. */ /** Execute the appropriate copy command. */
void void
file_copy_file(const gchar *source_file, const gchar *dest_file) file_copy_file(const gchar *source_file, const gchar *dest_file)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -917,7 +931,7 @@ file_copy_file(const gchar *source_file, const gchar *dest_file)
/** Find out where the Bygfoot directory we can write to resides /** Find out where the Bygfoot directory we can write to resides
and write the location into the string. */ and write the location into the string. */
void void
file_get_bygfoot_dir(gchar *dir) file_get_bygfoot_dir(gchar *dir)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -937,10 +951,10 @@ file_get_bygfoot_dir(gchar *dir)
/** Store text information in a text file in the saves directory. /** Store text information in a text file in the saves directory.
*/ */
void void
file_store_text_in_saves(const gchar *filename, const gchar *text) file_store_text_in_saves(const gchar *filename, const gchar *text)
{ {
#ifdef DEBUG #ifdef DEBUG
printf("file_store_text_in_saves\n"); printf("file_store_text_in_saves\n");
#endif #endif
@ -972,10 +986,10 @@ file_store_text_in_saves(const gchar *filename, const gchar *text)
} }
/** Load the text stored in the file in the saves directory. */ /** Load the text stored in the file in the saves directory. */
gchar* gchar*
file_load_text_from_saves(const gchar *filename) file_load_text_from_saves(const gchar *filename)
{ {
#ifdef DEBUG #ifdef DEBUG
printf("file_load_text_from_saves\n"); printf("file_load_text_from_saves\n");
#endif #endif
@ -1009,8 +1023,169 @@ file_load_text_from_saves(const gchar *filename)
return g_strdup(buf); return g_strdup(buf);
} }
int do_extract_currentfile(unzFile uf)
{
char filename_inzip[256];
int err=UNZ_OK;
FILE *fout=NULL;
void* buf;
uInt size_buf;
unz_file_info file_info;
err = unzGetCurrentFileInfo(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0);
if (err!=UNZ_OK)
{
printf("error %d with zipfile in unzGetCurrentFileInfo\n",err);
return err;
}
size_buf = WRITEBUFFERSIZE;
buf = (void*)malloc(size_buf);
if (buf==NULL)
{
printf("Error allocating memory\n");
return UNZ_INTERNALERROR;
}
err = unzOpenCurrentFile(uf);
if (err!=UNZ_OK)
{
printf("error %d with zipfile in unzOpenCurrentFile\n",err);
}
fout=fopen(filename_inzip,"wb");
if (fout==NULL)
{
printf("error opening %s\n",filename_inzip);
}
if (fout!=NULL)
{
printf(" extracting: %s\n",filename_inzip);
do
{
err = unzReadCurrentFile(uf,buf,size_buf);
if (err<0)
{
printf("error %d with zipfile in unzReadCurrentFile\n",err);
break;
}
if (err>0)
if (fwrite(buf,err,1,fout)!=1)
{
printf("error in writing extracted file\n");
err=UNZ_ERRNO;
break;
}
}
while (err>0);
if (fout)
fclose(fout);
}
if (err==UNZ_OK)
{
err = unzCloseCurrentFile (uf);
if (err!=UNZ_OK)
{
printf("error %d with zipfile in unzCloseCurrentFile\n",err);
}
}
else
unzCloseCurrentFile(uf); /* don't lose the error */
return err;
}
int do_compress_currentfile(zipFile zf, char* fileToZip)
{
int err=0;
int size_buf=0;
void* buf=NULL;
size_buf = WRITEBUFFERSIZE;
buf = (void*)malloc(size_buf);
if (buf==NULL)
{
printf("Error allocating memory\n");
return ZIP_INTERNALERROR;
}
if (zf == NULL)
{
printf("error zip file not open");
err= ZIP_ERRNO;
}
else
printf("creating %s\n",fileToZip);
FILE * fin;
int size_read;
zip_fileinfo zi;
zi.tmz_date.tm_sec = zi.tmz_date.tm_min = zi.tmz_date.tm_hour =
zi.tmz_date.tm_mday = zi.tmz_date.tm_mon = zi.tmz_date.tm_year = 0;
zi.dosDate = 0;
zi.internal_fa = 0;
zi.external_fa = 0;
file_time(fileToZip,&zi.tmz_date,&zi.dosDate);
int opt_compress_level=Z_DEFAULT_COMPRESSION;
/**/
err = zipOpenNewFileInZip(zf,fileToZip,&zi,
NULL,0,NULL,0,NULL /* comment*/,
(opt_compress_level != 0) ? Z_DEFLATED : 0,
opt_compress_level);
if (err != ZIP_OK)
printf("error in opening %s in zipfile\n",fileToZip);
else
{
fin = fopen(fileToZip,"rb");
if (fin==NULL)
{
err=ZIP_ERRNO;
printf("error in opening %s for reading\n",fileToZip);
}
}
if (err == ZIP_OK)
do
{
err = ZIP_OK;
size_read = (int)fread(buf,1,size_buf,fin);
if (size_read < size_buf)
if (feof(fin)==0)
{
printf("error in reading %s\n",fileToZip);
err = ZIP_ERRNO;
}
if (size_read>0)
{
err = zipWriteInFileInZip (zf,buf,size_read);
if (err<0)
{
printf("error in writing %s in the zipfile\n",
fileToZip);
}
}
} while ((err == ZIP_OK) && (size_read>0));
if (fin)
fclose(fin);
if (err<0)
err=ZIP_ERRNO;
else
{
err = zipCloseFileInZip(zf);
if (err!=ZIP_OK)
printf("error in closing %s in the zipfile\n",
fileToZip);
}
return 0;
}
/** Return the path to a resource in the Mac OS X bundle. */ /** Return the path to a resource in the Mac OS X bundle. */
gchar* gchar*
file_get_mac_resource_path(const gchar *resource) file_get_mac_resource_path(const gchar *resource)
{ {
#ifndef MAC_BUILD #ifndef MAC_BUILD
@ -1030,3 +1205,47 @@ file_get_mac_resource_path(const gchar *resource)
return g_strdup(buf); return g_strdup(buf);
#endif #endif
} }
/**
* char *f; name of file to get info on
* tm_zip *tmzip; return value: access, modific. and creation times
* uLong *dt; dostime
*/
uLong file_time(char *f, tm_zip *tmzip, uLong *dt)
{
int ret=0;
struct stat s; /* results of stat() */
struct tm* filedate;
time_t tm_t=0;
if (strcmp(f,"-")!=0)
{
char name[MAXFILENAME+1];
int len = strlen(f);
if (len > MAXFILENAME)
len = MAXFILENAME;
strncpy(name, f,MAXFILENAME-1);
/* strncpy doesnt append the trailing NULL, of the string is too long. */
name[ MAXFILENAME ] = '\0';
if (name[len - 1] == '/')
name[len - 1] = '\0';
/* not all systems allow stat'ing a file with / appended */
if (g_stat(name,&s)==0)
{
tm_t = s.st_mtime;
ret = 1;
}
}
filedate = localtime(&tm_t);
tmzip->tm_sec = filedate->tm_sec;
tmzip->tm_min = filedate->tm_min;
tmzip->tm_hour = filedate->tm_hour;
tmzip->tm_mday = filedate->tm_mday;
tmzip->tm_mon = filedate->tm_mon ;
tmzip->tm_year = filedate->tm_year;
return ret;
}

View File

@ -29,6 +29,8 @@
#include "bygfoot.h" #include "bygfoot.h"
#include "player_struct.h" #include "player_struct.h"
#include "user_struct.h" #include "user_struct.h"
#include "zip/unzip.h"
#include "zip/zip.h"
#ifdef G_OS_UNIX #ifdef G_OS_UNIX
#define file_mkdir(dirname) mkdir(dirname, (S_IRUSR | S_IWUSR | S_IXUSR)) #define file_mkdir(dirname) mkdir(dirname, (S_IRUSR | S_IWUSR | S_IXUSR))
@ -115,7 +117,16 @@ file_load_text_from_saves(const gchar *filename);
void void
file_store_text_in_saves(const gchar *filename, const gchar *text); file_store_text_in_saves(const gchar *filename, const gchar *text);
int
do_extract_currentfile(unzFile uf);
int
do_compress_currentfile(zipFile zf, char* fileToZip);
gchar* gchar*
file_get_mac_resource_path(const gchar *resource); file_get_mac_resource_path(const gchar *resource);
uLong
file_time(char *f, tm_zip *tmzip, uLong *dt);
#endif #endif