Add wxUSE_ARCSTREAM so that other archive classes can be used without wxZip

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31891 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Michael Wetherell
2005-02-10 13:54:41 +00:00
parent 50bf89f702
commit 81f9033602
13 changed files with 234 additions and 77 deletions

122
configure vendored
View File

@@ -1,7 +1,7 @@
#! /bin/sh #! /bin/sh
# From configure.in Id: configure.in. # From configure.in Id: configure.in.
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for wxWidgets 2.5.3. # Generated by GNU Autoconf 2.59 for wxWidgets 2.5.4.
# #
# Report bugs to <wx-dev@lists.wxwidgets.org>. # Report bugs to <wx-dev@lists.wxwidgets.org>.
# #
@@ -270,8 +270,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package. # Identity of this package.
PACKAGE_NAME='wxWidgets' PACKAGE_NAME='wxWidgets'
PACKAGE_TARNAME='wxwidgets' PACKAGE_TARNAME='wxwidgets'
PACKAGE_VERSION='2.5.3' PACKAGE_VERSION='2.5.4'
PACKAGE_STRING='wxWidgets 2.5.3' PACKAGE_STRING='wxWidgets 2.5.4'
PACKAGE_BUGREPORT='wx-dev@lists.wxwidgets.org' PACKAGE_BUGREPORT='wx-dev@lists.wxwidgets.org'
ac_unique_file="wx-config.in" ac_unique_file="wx-config.in"
@@ -794,7 +794,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures wxWidgets 2.5.3 to adapt to many kinds of systems. \`configure' configures wxWidgets 2.5.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -860,7 +860,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of wxWidgets 2.5.3:";; short | recursive ) echo "Configuration of wxWidgets 2.5.4:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@@ -903,6 +903,7 @@ Optional Features:
--enable-dataobj use data object classes --enable-dataobj use data object classes
--enable-ipc use interprocess communication (wxSocket etc.) --enable-ipc use interprocess communication (wxSocket etc.)
--enable-apple_ieee use the Apple IEEE codec --enable-apple_ieee use the Apple IEEE codec
--enable-arcstream use wxArchive streams
--enable-catch_segvs catch signals in wxApp::OnFatalException (Unix only) --enable-catch_segvs catch signals in wxApp::OnFatalException (Unix only)
--enable-backtrace use wxStackWalker class for getting backtraces --enable-backtrace use wxStackWalker class for getting backtraces
--enable-cmdline use wxCmdLineParser class --enable-cmdline use wxCmdLineParser class
@@ -934,7 +935,7 @@ Optional Features:
--enable-sound use wxSound class --enable-sound use wxSound class
--enable-mediactrl use wxMediaCtrl class --enable-mediactrl use wxMediaCtrl class
--enable-wxprintfv use wxWidgets implementation of vprintf() --enable-wxprintfv use wxWidgets implementation of vprintf()
--enable-zipstream use wxZipInputStream --enable-zipstream use wxZip streams
--enable-url use wxURL class --enable-url use wxURL class
--enable-protocol use wxProtocol class --enable-protocol use wxProtocol class
--enable-protocol-http HTTP support in wxProtocol --enable-protocol-http HTTP support in wxProtocol
@@ -1192,7 +1193,7 @@ fi
test -n "$ac_init_help" && exit 0 test -n "$ac_init_help" && exit 0
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
wxWidgets configure 2.5.3 wxWidgets configure 2.5.4
generated by GNU Autoconf 2.59 generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc. Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1206,7 +1207,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by wxWidgets $as_me 2.5.3, which was It was created by wxWidgets $as_me 2.5.4, which was
generated by GNU Autoconf 2.59. Invocation command line was generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@ $ $0 $@
@@ -2154,6 +2155,7 @@ if test $DEBUG_CONFIGURE = 1; then
DEFAULT_wxUSE_FS_INET=no DEFAULT_wxUSE_FS_INET=no
DEFAULT_wxUSE_FS_ZIP=no DEFAULT_wxUSE_FS_ZIP=no
DEFAULT_wxUSE_BUSYINFO=no DEFAULT_wxUSE_BUSYINFO=no
DEFAULT_wxUSE_ARCSTREAM=no
DEFAULT_wxUSE_ZIPSTREAM=no DEFAULT_wxUSE_ZIPSTREAM=no
DEFAULT_wxUSE_VALIDATORS=no DEFAULT_wxUSE_VALIDATORS=no
@@ -2346,6 +2348,7 @@ else
DEFAULT_wxUSE_FS_INET=yes DEFAULT_wxUSE_FS_INET=yes
DEFAULT_wxUSE_FS_ZIP=yes DEFAULT_wxUSE_FS_ZIP=yes
DEFAULT_wxUSE_BUSYINFO=yes DEFAULT_wxUSE_BUSYINFO=yes
DEFAULT_wxUSE_ARCSTREAM=yes
DEFAULT_wxUSE_ZIPSTREAM=yes DEFAULT_wxUSE_ZIPSTREAM=yes
DEFAULT_wxUSE_VALIDATORS=yes DEFAULT_wxUSE_VALIDATORS=yes
@@ -4669,6 +4672,47 @@ echo "${ECHO_T}no" >&6
fi fi
enablestring=
echo "$as_me:$LINENO: checking for --${enablestring:-enable}-arcstream" >&5
echo $ECHO_N "checking for --${enablestring:-enable}-arcstream... $ECHO_C" >&6
no_cache=0
# Check whether --enable-arcstream or --disable-arcstream was given.
if test "${enable_arcstream+set}" = set; then
enableval="$enable_arcstream"
if test "$enableval" = yes; then
ac_cv_use_arcstream='wxUSE_ARCSTREAM=yes'
else
ac_cv_use_arcstream='wxUSE_ARCSTREAM=no'
fi
else
LINE=`grep "wxUSE_ARCSTREAM" ${wx_arg_cache_file}`
if test "x$LINE" != x ; then
eval "DEFAULT_$LINE"
else
no_cache=1
fi
ac_cv_use_arcstream='wxUSE_ARCSTREAM='$DEFAULT_wxUSE_ARCSTREAM
fi;
eval "$ac_cv_use_arcstream"
if test "$no_cache" != 1; then
echo $ac_cv_use_arcstream >> ${wx_arg_cache_file}.tmp
fi
if test "$wxUSE_ARCSTREAM" = yes; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
enablestring= enablestring=
echo "$as_me:$LINENO: checking for --${enablestring:-enable}-catch_segvs" >&5 echo "$as_me:$LINENO: checking for --${enablestring:-enable}-catch_segvs" >&5
echo $ECHO_N "checking for --${enablestring:-enable}-catch_segvs... $ECHO_C" >&6 echo $ECHO_N "checking for --${enablestring:-enable}-catch_segvs... $ECHO_C" >&6
@@ -28448,6 +28492,11 @@ EOF
TOOLCHAIN_DLL_DEFS="${TOOLCHAIN_DLL_DEFS} -DWXUSINGDLL=1" TOOLCHAIN_DLL_DEFS="${TOOLCHAIN_DLL_DEFS} -DWXUSINGDLL=1"
;; ;;
*-*-hpux* )
SAMPLES_RPATH_FLAG="-Wl,+b,\$(top_builddir)lib"
WXCONFIG_RPATH="-Wl,+b,\$libdir"
;;
esac esac
if test $wxUSE_RPATH = "no"; then if test $wxUSE_RPATH = "no"; then
@@ -29509,7 +29558,7 @@ _ACEOF
fi fi
if test "$USE_HPUX" = 1 -a "x$GCC" != "xyes"; then if test "$USE_HPUX" = 1; then
CPPFLAGS="$CPPFLAGS -D_INCLUDE__STDC_A1_SOURCE " CPPFLAGS="$CPPFLAGS -D_INCLUDE__STDC_A1_SOURCE "
fi fi
@@ -35511,11 +35560,26 @@ _ACEOF
fi fi
if test "$wxUSE_ZIPSTREAM" = "yes"; then if test "$wxUSE_ARCSTREAM" = "yes"; then
cat >>confdefs.h <<\_ACEOF cat >>confdefs.h <<\_ACEOF
#define wxUSE_ARCSTREAM 1
_ACEOF
fi
if test "$wxUSE_ZIPSTREAM" = "yes"; then
if test "$wxUSE_ARCSTREAM" != "yes"; then
{ echo "$as_me:$LINENO: WARNING: wxZip requires wxArchive... disabled" >&5
echo "$as_me: WARNING: wxZip requires wxArchive... disabled" >&2;}
elif test "$wxUSE_ZLIB" = "no"; then
{ echo "$as_me:$LINENO: WARNING: wxZip requires wxZlib... disabled" >&5
echo "$as_me: WARNING: wxZip requires wxZlib... disabled" >&2;}
else
cat >>confdefs.h <<\_ACEOF
#define wxUSE_ZIPSTREAM 1 #define wxUSE_ZIPSTREAM 1
_ACEOF _ACEOF
fi
fi fi
if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes"; then if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes"; then
@@ -40772,9 +40836,9 @@ echo $ECHO_N "checking for dependency tracking method... $ECHO_C" >&6
echo "$as_me:$LINENO: result: gcc" >&5 echo "$as_me:$LINENO: result: gcc" >&5
echo "${ECHO_T}gcc" >&6 echo "${ECHO_T}gcc" >&6
elif test "x$MWCC" = "xyes"; then elif test "x$MWCC" = "xyes"; then
DEPSMODE=gcc DEPSMODE=mwcc
DEPS_TRACKING=1 DEPS_TRACKING=1
DEPSFLAG_GCC="-MMD" DEPSFLAG_MWCC="-MM"
echo "$as_me:$LINENO: result: mwcc" >&5 echo "$as_me:$LINENO: result: mwcc" >&5
echo "${ECHO_T}mwcc" >&6 echo "${ECHO_T}mwcc" >&6
else else
@@ -40796,6 +40860,7 @@ cat <<EOF >bk-deps
DEPSMODE=${DEPSMODE} DEPSMODE=${DEPSMODE}
DEPSDIR=.deps DEPSDIR=.deps
DEPSFLAG_GCC="${DEPSFLAG_GCC}" DEPSFLAG_GCC="${DEPSFLAG_GCC}"
DEPSFLAG_MWCC="${DEPSFLAG_MWCC}"
mkdir -p ${D}DEPSDIR mkdir -p ${D}DEPSDIR
@@ -40833,6 +40898,31 @@ if test ${D}DEPSMODE = gcc ; then
fi fi
fi fi
exit 0 exit 0
elif test ${D}DEPSMODE = mwcc ; then
${D}*
status=${D}?
if test ${D}{status} != 0 ; then
exit ${D}{status}
fi
# Run mwcc again with -MM and redirect into the dep file we want
# NOTE: We can't use shift here because we need ${D}* to be valid
prevarg=
for arg in ${D}* ; do
if test "${D}prevarg" = "-o"; then
objfile=${D}arg
else
case "${D}arg" in
-* )
;;
* )
srcfile=${D}arg
;;
esac
fi
prevarg="${D}arg"
done
${D}* ${D}DEPSFLAG_MWCC >${D}{DEPSDIR}/${D}{objfile}.d
exit 0
else else
${D}* ${D}*
exit ${D}? exit ${D}?
@@ -40972,10 +41062,10 @@ fi
BAKEFILE_BAKEFILE_M4_VERSION="0.1.5" BAKEFILE_BAKEFILE_M4_VERSION="0.1.6"
BAKEFILE_AUTOCONF_INC_M4_VERSION="0.1.5" BAKEFILE_AUTOCONF_INC_M4_VERSION="0.1.6"
@@ -42526,7 +42616,7 @@ _ASBOX
} >&5 } >&5
cat >&5 <<_CSEOF cat >&5 <<_CSEOF
This file was extended by wxWidgets $as_me 2.5.3, which was This file was extended by wxWidgets $as_me 2.5.4, which was
generated by GNU Autoconf 2.59. Invocation command line was generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@@ -42589,7 +42679,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\ ac_cs_version="\\
wxWidgets config.status 2.5.3 wxWidgets config.status 2.5.4
configured by $0, generated by GNU Autoconf 2.59, configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"

View File

@@ -500,6 +500,7 @@ if test $DEBUG_CONFIGURE = 1; then
DEFAULT_wxUSE_FS_INET=no DEFAULT_wxUSE_FS_INET=no
DEFAULT_wxUSE_FS_ZIP=no DEFAULT_wxUSE_FS_ZIP=no
DEFAULT_wxUSE_BUSYINFO=no DEFAULT_wxUSE_BUSYINFO=no
DEFAULT_wxUSE_ARCSTREAM=no
DEFAULT_wxUSE_ZIPSTREAM=no DEFAULT_wxUSE_ZIPSTREAM=no
DEFAULT_wxUSE_VALIDATORS=no DEFAULT_wxUSE_VALIDATORS=no
@@ -692,6 +693,7 @@ else
DEFAULT_wxUSE_FS_INET=yes DEFAULT_wxUSE_FS_INET=yes
DEFAULT_wxUSE_FS_ZIP=yes DEFAULT_wxUSE_FS_ZIP=yes
DEFAULT_wxUSE_BUSYINFO=yes DEFAULT_wxUSE_BUSYINFO=yes
DEFAULT_wxUSE_ARCSTREAM=yes
DEFAULT_wxUSE_ZIPSTREAM=yes DEFAULT_wxUSE_ZIPSTREAM=yes
DEFAULT_wxUSE_VALIDATORS=yes DEFAULT_wxUSE_VALIDATORS=yes
@@ -884,6 +886,7 @@ WX_ARG_ENABLE(ipc, [ --enable-ipc use interprocess communi
dnl please keep the settings below in alphabetical order dnl please keep the settings below in alphabetical order
WX_ARG_ENABLE(apple_ieee, [ --enable-apple_ieee use the Apple IEEE codec], wxUSE_APPLE_IEEE) WX_ARG_ENABLE(apple_ieee, [ --enable-apple_ieee use the Apple IEEE codec], wxUSE_APPLE_IEEE)
WX_ARG_ENABLE(arcstream, [ --enable-arcstream use wxArchive streams], wxUSE_ARCSTREAM)
WX_ARG_ENABLE(catch_segvs, [ --enable-catch_segvs catch signals in wxApp::OnFatalException (Unix only)], wxUSE_ON_FATAL_EXCEPTION) WX_ARG_ENABLE(catch_segvs, [ --enable-catch_segvs catch signals in wxApp::OnFatalException (Unix only)], wxUSE_ON_FATAL_EXCEPTION)
WX_ARG_ENABLE(backtrace, [ --enable-backtrace use wxStackWalker class for getting backtraces], wxUSE_STACKWALKER) WX_ARG_ENABLE(backtrace, [ --enable-backtrace use wxStackWalker class for getting backtraces], wxUSE_STACKWALKER)
WX_ARG_ENABLE(cmdline, [ --enable-cmdline use wxCmdLineParser class], wxUSE_CMDLINE_PARSER) WX_ARG_ENABLE(cmdline, [ --enable-cmdline use wxCmdLineParser class], wxUSE_CMDLINE_PARSER)
@@ -915,7 +918,7 @@ WX_ARG_ENABLE(unicode, [ --enable-unicode compile wxString with Un
WX_ARG_ENABLE(sound, [ --enable-sound use wxSound class], wxUSE_SOUND) WX_ARG_ENABLE(sound, [ --enable-sound use wxSound class], wxUSE_SOUND)
WX_ARG_ENABLE(mediactrl, [ --enable-mediactrl use wxMediaCtrl class], wxUSE_MEDIACTRL) WX_ARG_ENABLE(mediactrl, [ --enable-mediactrl use wxMediaCtrl class], wxUSE_MEDIACTRL)
WX_ARG_ENABLE(wxprintfv, [ --enable-wxprintfv use wxWidgets implementation of vprintf()], wxUSE_EXPERIMENTAL_PRINTF) WX_ARG_ENABLE(wxprintfv, [ --enable-wxprintfv use wxWidgets implementation of vprintf()], wxUSE_EXPERIMENTAL_PRINTF)
WX_ARG_ENABLE(zipstream, [ --enable-zipstream use wxZipInputStream], wxUSE_ZIPSTREAM) WX_ARG_ENABLE(zipstream, [ --enable-zipstream use wxZip streams], wxUSE_ZIPSTREAM)
WX_ARG_ENABLE(url, [ --enable-url use wxURL class], wxUSE_URL) WX_ARG_ENABLE(url, [ --enable-url use wxURL class], wxUSE_URL)
WX_ARG_ENABLE(protocol, [ --enable-protocol use wxProtocol class], wxUSE_PROTOCOL) WX_ARG_ENABLE(protocol, [ --enable-protocol use wxProtocol class], wxUSE_PROTOCOL)
@@ -4792,8 +4795,18 @@ if test "$wxUSE_FS_ZIP" = "yes"; then
AC_DEFINE(wxUSE_FS_ZIP) AC_DEFINE(wxUSE_FS_ZIP)
fi fi
if test "$wxUSE_ARCSTREAM" = "yes"; then
AC_DEFINE(wxUSE_ARCSTREAM)
fi
if test "$wxUSE_ZIPSTREAM" = "yes"; then if test "$wxUSE_ZIPSTREAM" = "yes"; then
AC_DEFINE(wxUSE_ZIPSTREAM) if test "$wxUSE_ARCSTREAM" != "yes"; then
AC_MSG_WARN(wxZip requires wxArchive... disabled)
elif test "$wxUSE_ZLIB" = "no"; then
AC_MSG_WARN(wxZip requires wxZlib... disabled)
else
AC_DEFINE(wxUSE_ZIPSTREAM)
fi
fi fi
if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes"; then if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes"; then

View File

@@ -16,7 +16,7 @@
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_ZLIB && wxUSE_STREAMS && wxUSE_ZIPSTREAM #if wxUSE_STREAMS && wxUSE_ARCSTREAM
#include "wx/stream.h" #include "wx/stream.h"
#include "wx/filename.h" #include "wx/filename.h"
@@ -161,47 +161,6 @@ private:
}; };
/////////////////////////////////////////////////////////////////////////////
// wxArchiveClassFactory
//
// A wxArchiveClassFactory instance for a particular archive type allows
// the creation of the other classes that may be needed.
class WXDLLIMPEXP_BASE wxArchiveClassFactory : public wxObject
{
public:
virtual ~wxArchiveClassFactory() { }
wxArchiveEntry *NewEntry() const
{ return DoNewEntry(); }
wxArchiveInputStream *NewStream(wxInputStream& stream) const
{ return DoNewStream(stream); }
wxArchiveOutputStream *NewStream(wxOutputStream& stream) const
{ return DoNewStream(stream); }
virtual wxString GetInternalName(
const wxString& name,
wxPathFormat format = wxPATH_NATIVE) const = 0;
void SetConv(wxMBConv& conv) { m_pConv = &conv; }
wxMBConv& GetConv() const { return *m_pConv; }
protected:
virtual wxArchiveEntry *DoNewEntry() const = 0;
virtual wxArchiveInputStream *DoNewStream(wxInputStream& stream) const = 0;
virtual wxArchiveOutputStream *DoNewStream(wxOutputStream& stream) const = 0;
wxArchiveClassFactory() : m_pConv(&wxConvLocal) { }
wxArchiveClassFactory& operator=(const wxArchiveClassFactory& WXUNUSED(f))
{ return *this; }
private:
wxMBConv *m_pConv;
DECLARE_ABSTRACT_CLASS(wxArchiveClassFactory)
};
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// wxArchiveIterator // wxArchiveIterator
// //
@@ -346,6 +305,56 @@ typedef wxArchiveIterator<wxArchiveInputStream,
#endif // wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR #endif // wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
#endif // wxUSE_STREAMS
/////////////////////////////////////////////////////////////////////////////
// wxArchiveClassFactory
//
// A wxArchiveClassFactory instance for a particular archive type allows
// the creation of the other classes that may be needed.
class WXDLLIMPEXP_BASE wxArchiveClassFactory : public wxObject
{
public:
typedef wxArchiveEntry entry_type;
typedef wxArchiveInputStream instream_type;
typedef wxArchiveOutputStream outstream_type;
typedef wxArchiveNotifier notifier_type;
#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
typedef wxArchiveIter iter_type;
typedef wxArchivePairIter pairiter_type;
#endif
virtual ~wxArchiveClassFactory() { }
wxArchiveEntry *NewEntry() const
{ return DoNewEntry(); }
wxArchiveInputStream *NewStream(wxInputStream& stream) const
{ return DoNewStream(stream); }
wxArchiveOutputStream *NewStream(wxOutputStream& stream) const
{ return DoNewStream(stream); }
virtual wxString GetInternalName(
const wxString& name,
wxPathFormat format = wxPATH_NATIVE) const = 0;
void SetConv(wxMBConv& conv) { m_pConv = &conv; }
wxMBConv& GetConv() const { return *m_pConv; }
protected:
virtual wxArchiveEntry *DoNewEntry() const = 0;
virtual wxArchiveInputStream *DoNewStream(wxInputStream& stream) const = 0;
virtual wxArchiveOutputStream *DoNewStream(wxOutputStream& stream) const = 0;
wxArchiveClassFactory() : m_pConv(&wxConvLocal) { }
wxArchiveClassFactory& operator=(const wxArchiveClassFactory& WXUNUSED(f))
{ return *this; }
private:
wxMBConv *m_pConv;
DECLARE_ABSTRACT_CLASS(wxArchiveClassFactory)
};
#endif // wxUSE_STREAMS && wxUSE_ARCSTREAM
#endif // _WX_ARCHIVE_H__ #endif // _WX_ARCHIVE_H__

View File

@@ -924,6 +924,25 @@
# endif # endif
#endif /* wxUSE_DYNLIB_CLASS */ #endif /* wxUSE_DYNLIB_CLASS */
#if wxUSE_ZIPSTREAM
# if !wxUSE_ZLIB
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxZip requires wxZlib"
# else
# undef wxUSE_ZLIB
# define wxUSE_ZLIB 1
# endif
# endif
# if !wxUSE_ARCSTREAM
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxZip requires wxArchive"
# else
# undef wxUSE_ARCSTREAM
# define wxUSE_ARCSTREAM 1
# endif
# endif
#endif /* wxUSE_ZIPSTREAM */
/* the rest of the tests is for the GUI settings only */ /* the rest of the tests is for the GUI settings only */
#if wxUSE_GUI #if wxUSE_GUI

View File

@@ -391,6 +391,9 @@
// Set to 1 to enable virtual Internet filesystem (requires wxUSE_FILESYSTEM) // Set to 1 to enable virtual Internet filesystem (requires wxUSE_FILESYSTEM)
#define wxUSE_FS_INET 1 #define wxUSE_FS_INET 1
// wxArchive classes for accessing archives such as zip and tar
#define wxUSE_ARCSTREAM 1
// Set to 1 to compile wxZipInput/OutputStream classes. // Set to 1 to compile wxZipInput/OutputStream classes.
#define wxUSE_ZIPSTREAM 1 #define wxUSE_ZIPSTREAM 1
@@ -575,11 +578,7 @@
// Default is 1 for the platforms where native status bar is supported. // Default is 1 for the platforms where native status bar is supported.
// //
// Recommended setting: 1 (there is no advantage in using the generic one) // Recommended setting: 1 (there is no advantage in using the generic one)
#if defined(__WXMSW__) || defined(__WXMAC__)
#define wxUSE_NATIVE_STATUSBAR 1 #define wxUSE_NATIVE_STATUSBAR 1
#else
#define wxUSE_NATIVE_STATUSBAR 0
#endif
// wxToolBar related settings: if wxUSE_TOOLBAR is 0, don't compile any toolbar // wxToolBar related settings: if wxUSE_TOOLBAR is 0, don't compile any toolbar
// classes at all. Otherwise, use the native toolbar class unless // classes at all. Otherwise, use the native toolbar class unless

View File

@@ -385,6 +385,9 @@
// Set to 1 to enable virtual Internet filesystem (requires wxUSE_FILESYSTEM) // Set to 1 to enable virtual Internet filesystem (requires wxUSE_FILESYSTEM)
#define wxUSE_FS_INET 1 #define wxUSE_FS_INET 1
// wxArchive classes for accessing archives such as zip and tar
#define wxUSE_ARCSTREAM 1
// Set to 1 to compile wxZipInput/OutputStream classes. // Set to 1 to compile wxZipInput/OutputStream classes.
#define wxUSE_ZIPSTREAM 1 #define wxUSE_ZIPSTREAM 1

View File

@@ -384,6 +384,9 @@
// Set to 1 to enable virtual Internet filesystem (requires wxUSE_FILESYSTEM) // Set to 1 to enable virtual Internet filesystem (requires wxUSE_FILESYSTEM)
#define wxUSE_FS_INET 0 #define wxUSE_FS_INET 0
// wxArchive classes for accessing archives such as zip and tar
#define wxUSE_ARCSTREAM 0
// Set to 1 to compile wxZipInput/OutputStream classes. // Set to 1 to compile wxZipInput/OutputStream classes.
#define wxUSE_ZIPSTREAM 0 #define wxUSE_ZIPSTREAM 0

View File

@@ -375,6 +375,9 @@
// Set to 1 to enable virtual Internet filesystem (requires wxUSE_FILESYSTEM) // Set to 1 to enable virtual Internet filesystem (requires wxUSE_FILESYSTEM)
#define wxUSE_FS_INET 1 #define wxUSE_FS_INET 1
// wxArchive classes for accessing archives such as zip and tar
#define wxUSE_ARCSTREAM 1
// Set to 1 to compile wxZipInput/OutputStream classes. // Set to 1 to compile wxZipInput/OutputStream classes.
#define wxUSE_ZIPSTREAM 1 #define wxUSE_ZIPSTREAM 1

View File

@@ -412,6 +412,9 @@
// Set to 1 to enable virtual ZIP filesystem (requires wxUSE_FILESYSTEM) // Set to 1 to enable virtual ZIP filesystem (requires wxUSE_FILESYSTEM)
#define wxUSE_FS_ZIP 1 #define wxUSE_FS_ZIP 1
// wxArchive classes for accessing archives such as zip and tar
#define wxUSE_ARCSTREAM 1
// Set to 1 to compile wxZipInput/OutputStream classes. // Set to 1 to compile wxZipInput/OutputStream classes.
#define wxUSE_ZIPSTREAM 1 #define wxUSE_ZIPSTREAM 1

View File

@@ -419,12 +419,31 @@ private:
}; };
/////////////////////////////////////////////////////////////////////////////
// Iterators
#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
typedef wxArchiveIterator<wxZipInputStream> wxZipIter;
typedef wxArchiveIterator<wxZipInputStream,
std::pair<wxString, wxZipEntry*> > wxZipPairIter;
#endif
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// wxZipClassFactory // wxZipClassFactory
class WXDLLIMPEXP_BASE wxZipClassFactory : public wxArchiveClassFactory class WXDLLIMPEXP_BASE wxZipClassFactory : public wxArchiveClassFactory
{ {
public: public:
typedef wxZipEntry entry_type;
typedef wxZipInputStream instream_type;
typedef wxZipOutputStream outstream_type;
typedef wxZipNotifier notifier_type;
#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
typedef wxZipIter iter_type;
typedef wxZipPairIter pairiter_type;
#endif
wxZipEntry *NewEntry() const wxZipEntry *NewEntry() const
{ return new wxZipEntry; } { return new wxZipEntry; }
wxZipInputStream *NewStream(wxInputStream& stream) const wxZipInputStream *NewStream(wxInputStream& stream) const
@@ -449,16 +468,6 @@ private:
}; };
/////////////////////////////////////////////////////////////////////////////
// Iterators
#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
typedef wxArchiveIterator<wxZipInputStream> wxZipIter;
typedef wxArchiveIterator<wxZipInputStream,
std::pair<wxString, wxZipEntry*> > wxZipPairIter;
#endif
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// wxZipEntry inlines // wxZipEntry inlines

View File

@@ -240,6 +240,8 @@
#define wxUSE_FS_INET 0 #define wxUSE_FS_INET 0
#define wxUSE_ARCSTREAM 0
#define wxUSE_ZIPSTREAM 0 #define wxUSE_ZIPSTREAM 0
#define wxUSE_ZLIB 0 #define wxUSE_ZLIB 0

View File

@@ -249,6 +249,8 @@
#define wxUSE_FS_INET 1 #define wxUSE_FS_INET 1
#define wxUSE_ARCSTREAM 1
#define wxUSE_ZIPSTREAM 1 #define wxUSE_ZIPSTREAM 1
#define wxUSE_ZLIB 1 #define wxUSE_ZLIB 1

View File

@@ -22,7 +22,7 @@
#include "wx/defs.h" #include "wx/defs.h"
#endif #endif
#if wxUSE_ZLIB && wxUSE_STREAMS && wxUSE_ZIPSTREAM #if wxUSE_STREAMS && wxUSE_ARCSTREAM
#include "wx/archive.h" #include "wx/archive.h"
#include "wx/html/forcelnk.h" #include "wx/html/forcelnk.h"
@@ -30,7 +30,9 @@
IMPLEMENT_ABSTRACT_CLASS(wxArchiveEntry, wxObject) IMPLEMENT_ABSTRACT_CLASS(wxArchiveEntry, wxObject)
IMPLEMENT_ABSTRACT_CLASS(wxArchiveClassFactory, wxObject) IMPLEMENT_ABSTRACT_CLASS(wxArchiveClassFactory, wxObject)
#if wxUSE_ZIPSTREAM
FORCE_LINK(zipstrm) FORCE_LINK(zipstrm)
#endif
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -71,4 +73,4 @@ wxArchiveEntry& wxArchiveEntry::operator=(const wxArchiveEntry& WXUNUSED(e))
return *this; return *this;
} }
#endif #endif // wxUSE_STREAMS && wxUSE_ARCSTREAM