Added a new (not compiled by default) program called 'wesnoth_zip'.

It compresses/decompresses WML files using config::read_compressed and
config::write_compressed. The interface is similar to gzip (it's
intended to be a subset. This tool is for Wesnoth developers who are
working with Wesnoth's binary (compressed) WML format.
This commit is contained in:
John B. Messerly 2004-05-11 05:36:21 +00:00
parent 36adb05c55
commit 51abdb0d85
10 changed files with 874 additions and 57 deletions

View file

@ -7,4 +7,5 @@ touch icons/Makefile.in
touch src/Makefile.in
touch src/server/Makefile.in
touch src/tools/Makefile.in
touch src/zip/Makefile.in
touch configure

164
configure vendored
View file

@ -1,5 +1,5 @@
#! /bin/sh
# From configure.ac Revision: 1.42 .
# From configure.ac Revision: 1.43 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for Battle for Wesnoth 0.7.7-CVS.
#
@ -312,7 +312,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SDL_CONFIG GNOME_CONFIG GNOME1_DESKTOP KDE_CONFIG KDE_DESKTOP KDE_ICON SDL_LIBS SDL_IMAGE_LIBS SDL_MIXER_LIBS SDL_NET_LIBS SDL_TTF_LIBS CPP EGREP SDL_CFLAGS LIBOBJS DATADIR STATIC_TRUE STATIC_FALSE SERVER_TRUE SERVER_FALSE EDITOR_TRUE EDITOR_FALSE TOOLS_TRUE TOOLS_FALSE KDE_TRUE KDE_FALSE GNOME1_TRUE GNOME1_FALSE GNOME2_TRUE GNOME2_FALSE GCC_TRUE GCC_FALSE MANUAL_FILES DATA_FILES FONT_FILES IMAGE_FILES MUSIC_FILES SOUND_FILES UTIL_FILES LTLIBOBJS'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SDL_CONFIG GNOME_CONFIG GNOME1_DESKTOP KDE_CONFIG KDE_DESKTOP KDE_ICON SDL_LIBS SDL_IMAGE_LIBS SDL_MIXER_LIBS SDL_NET_LIBS SDL_TTF_LIBS CPP EGREP SDL_CFLAGS LIBOBJS DATADIR STATIC_TRUE STATIC_FALSE SERVER_TRUE SERVER_FALSE EDITOR_TRUE EDITOR_FALSE TOOLS_TRUE TOOLS_FALSE KDE_TRUE KDE_FALSE GNOME1_TRUE GNOME1_FALSE GNOME2_TRUE GNOME2_FALSE GCC_TRUE GCC_FALSE WZIP_TRUE WZIP_FALSE MANUAL_FILES DATA_FILES FONT_FILES IMAGE_FILES MUSIC_FILES SOUND_FILES UTIL_FILES LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@ -865,10 +865,11 @@ Optional Features:
--enable-lite Enable lite version of wesnoth (without music)
--datadir-name[=dir] Change name of data directory. Default with this option: wesnoth-data
--enable-server Enable compilation of server
--enable-editor Enable compilation editor
--enable-editor Enable compilation of map editor
--enable-tools Enable compilation of translation tools
--enable-kde Enable installation of icon and KDE menu entry
--enable-gnome Enable installation of icon and GNOME menu entry
--enable-wzip Enable compilation of wesnoth_zip program
Some influential environment variables:
CXX C++ compiler command
@ -973,7 +974,7 @@ esac
else
echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi
cd "$ac_popdir"
cd $ac_popdir
done
fi
@ -2089,7 +2090,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_cxx_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -2147,7 +2149,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_cxx_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -2218,7 +2221,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_cxx_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -2262,7 +2266,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_cxx_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -2829,7 +2834,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -2887,7 +2893,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -3003,7 +3010,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -3057,7 +3065,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -3102,7 +3111,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -3146,7 +3156,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -3536,7 +3547,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -3610,7 +3622,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -3684,7 +3697,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -3758,7 +3772,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -3847,7 +3862,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -3919,7 +3935,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -3973,7 +3990,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -4044,7 +4062,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -4098,7 +4117,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -4415,7 +4435,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -4595,7 +4616,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -4658,7 +4680,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -4806,7 +4829,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -4954,7 +4978,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -5102,7 +5127,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -5250,7 +5276,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -5408,7 +5435,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -5590,7 +5618,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -5645,7 +5674,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -5760,7 +5790,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -5820,7 +5851,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -5893,7 +5925,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -5958,7 +5991,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -6022,7 +6056,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -6084,7 +6119,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -6334,7 +6370,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -6403,7 +6440,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -6510,7 +6548,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -6628,6 +6667,14 @@ else
gnome=no
fi;
# Check whether --enable-wzip or --disable-wzip was given.
if test "${enable_wzip+set}" = set; then
enableval="$enable_wzip"
wzip=$enableval
else
wzip=no
fi;
if test x$static = xyes; then
@ -6709,6 +6756,16 @@ else
fi
if test x$wzip = xyes; then
WZIP_TRUE=
WZIP_FALSE='#'
else
WZIP_TRUE='#'
WZIP_FALSE=
fi
#######################################################################
# Check for PNG support in SDL_image #
#######################################################################
@ -6907,7 +6964,7 @@ UTIL_FILES=`echo $UTIL_FILES`
ac_config_files="$ac_config_files Makefile icons/Makefile src/Makefile src/server/Makefile src/tools/Makefile"
ac_config_files="$ac_config_files Makefile icons/Makefile src/Makefile src/server/Makefile src/tools/Makefile src/zip/Makefile"
cat >confcache <<\_ACEOF
@ -7078,6 +7135,13 @@ echo "$as_me: error: conditional \"GCC\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${WZIP_TRUE}" && test -z "${WZIP_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"WZIP\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"WZIP\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
@ -7527,6 +7591,7 @@ do
"src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"src/server/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/server/Makefile" ;;
"src/tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/tools/Makefile" ;;
"src/zip/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/zip/Makefile" ;;
"depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
@ -7687,6 +7752,8 @@ s,@GNOME2_TRUE@,$GNOME2_TRUE,;t t
s,@GNOME2_FALSE@,$GNOME2_FALSE,;t t
s,@GCC_TRUE@,$GCC_TRUE,;t t
s,@GCC_FALSE@,$GCC_FALSE,;t t
s,@WZIP_TRUE@,$WZIP_TRUE,;t t
s,@WZIP_FALSE@,$WZIP_FALSE,;t t
s,@MANUAL_FILES@,$MANUAL_FILES,;t t
s,@DATA_FILES@,$DATA_FILES,;t t
s,@FONT_FILES@,$FONT_FILES,;t t
@ -7861,6 +7928,11 @@ esac
*) ac_INSTALL=$ac_top_builddir$INSTALL ;;
esac
if test x"$ac_file" != x-; then
{ echo "$as_me:$LINENO: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
rm -f "$ac_file"
fi
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
@ -7899,12 +7971,6 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
fi;;
esac
done` || { (exit 1); exit 1; }
if test x"$ac_file" != x-; then
{ echo "$as_me:$LINENO: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
rm -f "$ac_file"
fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
sed "$ac_vpsub

View file

@ -234,7 +234,7 @@ AC_ARG_ENABLE([server],
[server=no])
AC_ARG_ENABLE([editor],
[ --enable-editor Enable compilation editor],
[ --enable-editor Enable compilation of map editor],
[editor=$enableval],
[editor=no])
@ -253,6 +253,11 @@ AC_ARG_ENABLE([gnome],
[gnome=$enableval],
[gnome=no])
AC_ARG_ENABLE([wzip],
[ --enable-wzip Enable compilation of wesnoth_zip program],
[wzip=$enableval],
[wzip=no])
AM_CONDITIONAL([STATIC], [test x$static = xyes])
AM_CONDITIONAL([SERVER], [test x$server = xyes])
AM_CONDITIONAL([EDITOR], [test x$editor = xyes])
@ -261,6 +266,7 @@ AM_CONDITIONAL([KDE], [test x$kde = xyes && test x$kdefound = xyes])
AM_CONDITIONAL([GNOME1], [test x$gnome = xyes && test x$gnome1found = xyes])
AM_CONDITIONAL([GNOME2], [test x$gnome = xyes && test x$gnome1found = xno])
AM_CONDITIONAL([GCC], [test x$GXX = xyes])
AM_CONDITIONAL([WZIP], [test x$wzip = xyes])
#######################################################################
# Check for PNG support in SDL_image #
@ -384,6 +390,7 @@ AC_CONFIG_FILES([Makefile
icons/Makefile
src/Makefile
src/server/Makefile
src/tools/Makefile])
src/tools/Makefile
src/zip/Makefile])
AC_OUTPUT

View file

@ -14,6 +14,10 @@ if EDITOR
bin_PROGRAMS += wesnoth_editor
endif
if WZIP
SUBDIRS += zip
endif
pkgdatadir=$(datadir)/@DATADIR@
#############################################################################

View file

@ -37,8 +37,9 @@ POST_UNINSTALL = :
@SERVER_TRUE@am__append_1 = server
@TOOLS_TRUE@am__append_2 = tools
@EDITOR_TRUE@am__append_3 = wesnoth_editor
@GCC_TRUE@am__append_4 = -fno-omit-frame-pointer
@STATIC_TRUE@am__append_5 = -static -L/usr/lib -Wl,-rpath,/usr/lib -L/usr/X11R6/lib -lSDL_image \
@WZIP_TRUE@am__append_4 = zip
@GCC_TRUE@am__append_5 = -fno-omit-frame-pointer
@STATIC_TRUE@am__append_6 = -static -L/usr/lib -Wl,-rpath,/usr/lib -L/usr/X11R6/lib -lSDL_image \
@STATIC_TRUE@-lSDL_mixer -lSDL_net -lSDL_ttf -lSDL -lpthread -ldl -laudio -lXt -lX11 -lXext \
@STATIC_TRUE@-lSDL_image -lSDL_mixer -lSDL_net -lSDL_ttf -lstdc++ -lm -lSM -lICE -ljpeg \
@STATIC_TRUE@-lpng -lz -lvorbisfile -lvorbis -logg -lsmpeg -lfreetype
@ -60,7 +61,7 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@ $(am__append_4)
CXXFLAGS = @CXXFLAGS@ $(am__append_5)
CYGPATH_W = @CYGPATH_W@
DATADIR = @DATADIR@
DATA_FILES = @DATA_FILES@
@ -94,7 +95,7 @@ KDE_ICON = @KDE_ICON@
KDE_TRUE = @KDE_TRUE@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ $(am__append_5)
LIBS = @LIBS@ $(am__append_6)
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANUAL_FILES = @MANUAL_FILES@
@ -126,6 +127,8 @@ TOOLS_FALSE = @TOOLS_FALSE@
TOOLS_TRUE = @TOOLS_TRUE@
UTIL_FILES = @UTIL_FILES@
VERSION = @VERSION@
WZIP_FALSE = @WZIP_FALSE@
WZIP_TRUE = @WZIP_TRUE@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_STRIP = @ac_ct_STRIP@
@ -155,7 +158,7 @@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
SUBDIRS = . $(am__append_1) $(am__append_2)
SUBDIRS = . $(am__append_1) $(am__append_2) $(am__append_4)
bin_PROGRAMS = wesnoth $(am__append_3)
@ -536,7 +539,7 @@ RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive
DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
DIST_SUBDIRS = . server tools
DIST_SUBDIRS = . server tools zip
SOURCES = $(wesnoth_SOURCES) $(wesnoth_editor_SOURCES)
all: all-recursive

View file

@ -102,6 +102,27 @@ void read_file_internal(const std::string& fname, std::string& res)
} //end anon namespace
std::string read_stdin()
{
std::vector<char> v;
const int block_size = 65536;
size_t nbytes = 1;
while(nbytes > 0) {
v.resize(v.size() + block_size);
nbytes = fread(&v[v.size() - block_size],1,block_size,stdin);
if(nbytes < block_size) {
v.resize(v.size() - (block_size - nbytes));
break;
}
}
std::string res;
res.resize(v.size());
std::copy(v.begin(),v.end(),res.begin());
return res;
}
const char* io_exception::what() const throw() {
return message.c_str();
}

View file

@ -62,6 +62,7 @@ private:
std::string read_file(const std::string& fname);
//throws io_exception if an error occurs
void write_file(const std::string& fname, const std::string& data);
std::string read_stdin();
struct preproc_define {
preproc_define() {}

22
src/zip/Makefile.am Normal file
View file

@ -0,0 +1,22 @@
bin_PROGRAMS = wesnoth_zip
#############################################################################
# Wesnoth Zip #
#############################################################################
wesnoth_zip_SOURCES = zip.cpp \
../config.cpp \
../filesystem.cpp \
../game_config.cpp \
../log.cpp \
../network.cpp \
../game_events.hpp \
../config.hpp \
../filesystem.hpp \
../game_config.hpp \
../log.hpp \
../network.hpp \
../server/variable.cpp
AM_CXXFLAGS = @SDL_CFLAGS@
AM_LDFLAGS = @SDL_LIBS@ @SDL_NET_LIBS@

590
src/zip/Makefile.in Normal file
View file

@ -0,0 +1,590 @@
# Makefile.in generated by automake 1.7.9 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DATADIR = @DATADIR@
DATA_FILES = @DATA_FILES@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITOR_FALSE = @EDITOR_FALSE@
EDITOR_TRUE = @EDITOR_TRUE@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FONT_FILES = @FONT_FILES@
GCC_FALSE = @GCC_FALSE@
GCC_TRUE = @GCC_TRUE@
GNOME1_DESKTOP = @GNOME1_DESKTOP@
GNOME1_FALSE = @GNOME1_FALSE@
GNOME1_TRUE = @GNOME1_TRUE@
GNOME2_FALSE = @GNOME2_FALSE@
GNOME2_TRUE = @GNOME2_TRUE@
GNOME_CONFIG = @GNOME_CONFIG@
IMAGE_FILES = @IMAGE_FILES@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
KDE_CONFIG = @KDE_CONFIG@
KDE_DESKTOP = @KDE_DESKTOP@
KDE_FALSE = @KDE_FALSE@
KDE_ICON = @KDE_ICON@
KDE_TRUE = @KDE_TRUE@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANUAL_FILES = @MANUAL_FILES@
MUSIC_FILES = @MUSIC_FILES@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
SDL_CFLAGS = @SDL_CFLAGS@
SDL_CONFIG = @SDL_CONFIG@
SDL_IMAGE_LIBS = @SDL_IMAGE_LIBS@
SDL_LIBS = @SDL_LIBS@
SDL_MIXER_LIBS = @SDL_MIXER_LIBS@
SDL_NET_LIBS = @SDL_NET_LIBS@
SDL_TTF_LIBS = @SDL_TTF_LIBS@
SERVER_FALSE = @SERVER_FALSE@
SERVER_TRUE = @SERVER_TRUE@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SOUND_FILES = @SOUND_FILES@
STATIC_FALSE = @STATIC_FALSE@
STATIC_TRUE = @STATIC_TRUE@
STRIP = @STRIP@
TOOLS_FALSE = @TOOLS_FALSE@
TOOLS_TRUE = @TOOLS_TRUE@
UTIL_FILES = @UTIL_FILES@
VERSION = @VERSION@
WZIP_FALSE = @WZIP_FALSE@
WZIP_TRUE = @WZIP_TRUE@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
bindir = @bindir@
build_alias = @build_alias@
datadir = @datadir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
bin_PROGRAMS = wesnoth_zip
#############################################################################
# Wesnoth Zip #
#############################################################################
wesnoth_zip_SOURCES = zip.cpp \
../config.cpp \
../filesystem.cpp \
../game_config.cpp \
../log.cpp \
../network.cpp \
../game_events.hpp \
../config.hpp \
../filesystem.hpp \
../game_config.hpp \
../log.hpp \
../network.hpp \
../server/variable.cpp
AM_CXXFLAGS = @SDL_CFLAGS@
AM_LDFLAGS = @SDL_LIBS@ @SDL_NET_LIBS@
subdir = src/zip
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
bin_PROGRAMS = wesnoth_zip$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS)
am_wesnoth_zip_OBJECTS = zip.$(OBJEXT) config.$(OBJEXT) \
filesystem.$(OBJEXT) game_config.$(OBJEXT) log.$(OBJEXT) \
network.$(OBJEXT) variable.$(OBJEXT)
wesnoth_zip_OBJECTS = $(am_wesnoth_zip_OBJECTS)
wesnoth_zip_LDADD = $(LDADD)
wesnoth_zip_DEPENDENCIES =
wesnoth_zip_LDFLAGS =
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/config.Po ./$(DEPDIR)/filesystem.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/game_config.Po ./$(DEPDIR)/log.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/network.Po ./$(DEPDIR)/variable.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/zip.Po
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
-o $@
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = $(wesnoth_zip_SOURCES)
DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
SOURCES = $(wesnoth_zip_SOURCES)
all: all-am
.SUFFIXES:
.SUFFIXES: .cpp .o .obj
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign src/zip/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
; then \
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
$(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$f; \
done
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
wesnoth_zip$(EXEEXT): $(wesnoth_zip_OBJECTS) $(wesnoth_zip_DEPENDENCIES)
@rm -f wesnoth_zip$(EXEEXT)
$(CXXLINK) $(wesnoth_zip_LDFLAGS) $(wesnoth_zip_OBJECTS) $(wesnoth_zip_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT) core *.core
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filesystem.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/game_config.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/variable.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zip.Po@am__quote@
.cpp.o:
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
@am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
@am__fastdepCXX_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
.cpp.obj:
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
@am__fastdepCXX_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
@am__fastdepCXX_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
config.o: ../config.cpp
@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT config.o -MD -MP -MF "$(DEPDIR)/config.Tpo" \
@am__fastdepCXX_TRUE@ -c -o config.o `test -f '../config.cpp' || echo '$(srcdir)/'`../config.cpp; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/config.Tpo" "$(DEPDIR)/config.Po"; \
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/config.Tpo"; exit 1; \
@am__fastdepCXX_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../config.cpp' object='config.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/config.Po' tmpdepfile='$(DEPDIR)/config.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o config.o `test -f '../config.cpp' || echo '$(srcdir)/'`../config.cpp
config.obj: ../config.cpp
@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT config.obj -MD -MP -MF "$(DEPDIR)/config.Tpo" \
@am__fastdepCXX_TRUE@ -c -o config.obj `if test -f '../config.cpp'; then $(CYGPATH_W) '../config.cpp'; else $(CYGPATH_W) '$(srcdir)/../config.cpp'; fi`; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/config.Tpo" "$(DEPDIR)/config.Po"; \
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/config.Tpo"; exit 1; \
@am__fastdepCXX_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../config.cpp' object='config.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/config.Po' tmpdepfile='$(DEPDIR)/config.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o config.obj `if test -f '../config.cpp'; then $(CYGPATH_W) '../config.cpp'; else $(CYGPATH_W) '$(srcdir)/../config.cpp'; fi`
filesystem.o: ../filesystem.cpp
@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT filesystem.o -MD -MP -MF "$(DEPDIR)/filesystem.Tpo" \
@am__fastdepCXX_TRUE@ -c -o filesystem.o `test -f '../filesystem.cpp' || echo '$(srcdir)/'`../filesystem.cpp; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/filesystem.Tpo" "$(DEPDIR)/filesystem.Po"; \
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/filesystem.Tpo"; exit 1; \
@am__fastdepCXX_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../filesystem.cpp' object='filesystem.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/filesystem.Po' tmpdepfile='$(DEPDIR)/filesystem.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o filesystem.o `test -f '../filesystem.cpp' || echo '$(srcdir)/'`../filesystem.cpp
filesystem.obj: ../filesystem.cpp
@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT filesystem.obj -MD -MP -MF "$(DEPDIR)/filesystem.Tpo" \
@am__fastdepCXX_TRUE@ -c -o filesystem.obj `if test -f '../filesystem.cpp'; then $(CYGPATH_W) '../filesystem.cpp'; else $(CYGPATH_W) '$(srcdir)/../filesystem.cpp'; fi`; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/filesystem.Tpo" "$(DEPDIR)/filesystem.Po"; \
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/filesystem.Tpo"; exit 1; \
@am__fastdepCXX_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../filesystem.cpp' object='filesystem.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/filesystem.Po' tmpdepfile='$(DEPDIR)/filesystem.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o filesystem.obj `if test -f '../filesystem.cpp'; then $(CYGPATH_W) '../filesystem.cpp'; else $(CYGPATH_W) '$(srcdir)/../filesystem.cpp'; fi`
game_config.o: ../game_config.cpp
@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT game_config.o -MD -MP -MF "$(DEPDIR)/game_config.Tpo" \
@am__fastdepCXX_TRUE@ -c -o game_config.o `test -f '../game_config.cpp' || echo '$(srcdir)/'`../game_config.cpp; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/game_config.Tpo" "$(DEPDIR)/game_config.Po"; \
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/game_config.Tpo"; exit 1; \
@am__fastdepCXX_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../game_config.cpp' object='game_config.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/game_config.Po' tmpdepfile='$(DEPDIR)/game_config.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o game_config.o `test -f '../game_config.cpp' || echo '$(srcdir)/'`../game_config.cpp
game_config.obj: ../game_config.cpp
@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT game_config.obj -MD -MP -MF "$(DEPDIR)/game_config.Tpo" \
@am__fastdepCXX_TRUE@ -c -o game_config.obj `if test -f '../game_config.cpp'; then $(CYGPATH_W) '../game_config.cpp'; else $(CYGPATH_W) '$(srcdir)/../game_config.cpp'; fi`; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/game_config.Tpo" "$(DEPDIR)/game_config.Po"; \
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/game_config.Tpo"; exit 1; \
@am__fastdepCXX_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../game_config.cpp' object='game_config.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/game_config.Po' tmpdepfile='$(DEPDIR)/game_config.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o game_config.obj `if test -f '../game_config.cpp'; then $(CYGPATH_W) '../game_config.cpp'; else $(CYGPATH_W) '$(srcdir)/../game_config.cpp'; fi`
log.o: ../log.cpp
@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT log.o -MD -MP -MF "$(DEPDIR)/log.Tpo" \
@am__fastdepCXX_TRUE@ -c -o log.o `test -f '../log.cpp' || echo '$(srcdir)/'`../log.cpp; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/log.Tpo" "$(DEPDIR)/log.Po"; \
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/log.Tpo"; exit 1; \
@am__fastdepCXX_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../log.cpp' object='log.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/log.Po' tmpdepfile='$(DEPDIR)/log.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o log.o `test -f '../log.cpp' || echo '$(srcdir)/'`../log.cpp
log.obj: ../log.cpp
@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT log.obj -MD -MP -MF "$(DEPDIR)/log.Tpo" \
@am__fastdepCXX_TRUE@ -c -o log.obj `if test -f '../log.cpp'; then $(CYGPATH_W) '../log.cpp'; else $(CYGPATH_W) '$(srcdir)/../log.cpp'; fi`; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/log.Tpo" "$(DEPDIR)/log.Po"; \
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/log.Tpo"; exit 1; \
@am__fastdepCXX_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../log.cpp' object='log.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/log.Po' tmpdepfile='$(DEPDIR)/log.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o log.obj `if test -f '../log.cpp'; then $(CYGPATH_W) '../log.cpp'; else $(CYGPATH_W) '$(srcdir)/../log.cpp'; fi`
network.o: ../network.cpp
@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT network.o -MD -MP -MF "$(DEPDIR)/network.Tpo" \
@am__fastdepCXX_TRUE@ -c -o network.o `test -f '../network.cpp' || echo '$(srcdir)/'`../network.cpp; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/network.Tpo" "$(DEPDIR)/network.Po"; \
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/network.Tpo"; exit 1; \
@am__fastdepCXX_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../network.cpp' object='network.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/network.Po' tmpdepfile='$(DEPDIR)/network.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o network.o `test -f '../network.cpp' || echo '$(srcdir)/'`../network.cpp
network.obj: ../network.cpp
@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT network.obj -MD -MP -MF "$(DEPDIR)/network.Tpo" \
@am__fastdepCXX_TRUE@ -c -o network.obj `if test -f '../network.cpp'; then $(CYGPATH_W) '../network.cpp'; else $(CYGPATH_W) '$(srcdir)/../network.cpp'; fi`; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/network.Tpo" "$(DEPDIR)/network.Po"; \
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/network.Tpo"; exit 1; \
@am__fastdepCXX_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../network.cpp' object='network.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/network.Po' tmpdepfile='$(DEPDIR)/network.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o network.obj `if test -f '../network.cpp'; then $(CYGPATH_W) '../network.cpp'; else $(CYGPATH_W) '$(srcdir)/../network.cpp'; fi`
variable.o: ../server/variable.cpp
@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT variable.o -MD -MP -MF "$(DEPDIR)/variable.Tpo" \
@am__fastdepCXX_TRUE@ -c -o variable.o `test -f '../server/variable.cpp' || echo '$(srcdir)/'`../server/variable.cpp; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/variable.Tpo" "$(DEPDIR)/variable.Po"; \
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/variable.Tpo"; exit 1; \
@am__fastdepCXX_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../server/variable.cpp' object='variable.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/variable.Po' tmpdepfile='$(DEPDIR)/variable.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o variable.o `test -f '../server/variable.cpp' || echo '$(srcdir)/'`../server/variable.cpp
variable.obj: ../server/variable.cpp
@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT variable.obj -MD -MP -MF "$(DEPDIR)/variable.Tpo" \
@am__fastdepCXX_TRUE@ -c -o variable.obj `if test -f '../server/variable.cpp'; then $(CYGPATH_W) '../server/variable.cpp'; else $(CYGPATH_W) '$(srcdir)/../server/variable.cpp'; fi`; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/variable.Tpo" "$(DEPDIR)/variable.Po"; \
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/variable.Tpo"; exit 1; \
@am__fastdepCXX_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../server/variable.cpp' object='variable.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/variable.Po' tmpdepfile='$(DEPDIR)/variable.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o variable.obj `if test -f '../server/variable.cpp'; then $(CYGPATH_W) '../server/variable.cpp'; else $(CYGPATH_W) '$(srcdir)/../server/variable.cpp'; fi`
uninstall-info-am:
ETAGS = etags
ETAGSFLAGS =
CTAGS = ctags
CTAGSFLAGS =
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ../..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
$(mkinstalldirs) $(DESTDIR)$(bindir)
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
info: info-am
info-am:
install-data-am:
install-exec-am: install-binPROGRAMS
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-info-am
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic ctags distclean distclean-compile \
distclean-generic distclean-tags distdir dvi dvi-am info \
info-am install install-am install-binPROGRAMS install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-man install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
uninstall-am uninstall-binPROGRAMS uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

102
src/zip/zip.cpp Normal file
View file

@ -0,0 +1,102 @@
#include "../config.hpp"
#include "../game_config.hpp"
#include <iostream>
#include <sstream>
#include <vector>
bool try_unzip(const std::string& data_in, std::string& data_out)
{
config cfg;
compression_schema schema;
try {
cfg.read_compressed(data_in,schema);
} catch(config::error&) {
return false;
}
data_out = cfg.write();
return true;
}
bool try_zip(const std::string& data_in, std::string& data_out)
{
config cfg;
compression_schema schema;
cfg.read(data_in);
try {
data_out = cfg.write_compressed(schema);
} catch(config::error&) {
return false;
}
return true;
}
int main(int argc, char** argv)
{
std::vector<std::string> args;
args.reserve(argc);
for(int arg = 0; arg != argc; ++arg)
args.push_back(std::string(argv[arg]));
bool to_stdout = false, from_stdin = true;
std::vector<std::string> files;
for(std::vector<std::string>::const_iterator i = args.begin()+1; i != args.end(); ++i) {
if(i->empty())
continue;
if(*i == "-h" || *i == "--help") {
std::cout
<< "usage: " << args[0]
<< " [-clhV] [files...]\n"
<< " -c, --std-out Write output on standard output; keep original files unchanged.\n"
<< " -h, --help Prints this message and exits\n"
<< " -V, --version Prints the game's version number and exits\n";
return 0;
} else if(*i == "-V" || *i == "--version") {
std::cout << "Battle for Wesnoth " << game_config::version << "\n";
std::cout << args[0] << " 0.1\n";
return 0;
} else if(*i == "-c" || *i == "--std-out") {
to_stdout = true;
continue;
}
// Any other options must be file names
files.push_back(*i);
from_stdin = false;
}
if(from_stdin) {
const std::string data = read_stdin();
std::string output;
if(!try_unzip(data,output) && !try_zip(data,output)) {
std::cerr << "Standard input data not compressed or uncompressed WML\n";
return 3;
}
std::cout << output;
return 0;
}
// Process input files
int error = 0;
for(std::vector<std::string>::const_iterator i = files.begin(); i != files.end(); ++i) {
const std::string data = read_file(*i);
if(data.empty()) {
std::cerr << "Could not read file: " << *i << '\n';
error = 1;
continue;
}
std::string output;
if(!try_unzip(data,output) && !try_zip(data,output)) {
std::cerr << "Input file not compressed or uncompressed WML: " << *i << '\n';
error = 3;
continue;
}
if(to_stdout) {
std::cout << output;
} else {
try {
write_file(*i,output);
} catch (io_exception& e) {
std::cerr << "Could not write file: " << *i << '\n';
error = 2;
}
}
}
return error;
}