Author: mordante
Date: Sat Jun  2 08:46:01 2007
New Revision: 18007

URL: http://svn.gna.org/viewcvs/wesnoth?rev=18007&view=rev
Log:
removes zipios support. Project files in the root haven't been updated since 
I'm unable to test them.

Removed:
    trunk/src/zipios++/
Modified:
    trunk/Doxyfile
    trunk/changelog
    trunk/configure.ac
    trunk/po/wesnoth/POTFILES.in
    trunk/src/Makefile.am
    trunk/src/editor/editor.cpp
    trunk/src/editor/editor_main.cpp
    trunk/src/filesystem.cpp
    trunk/src/filesystem.hpp
    trunk/src/game.cpp
    trunk/src/image.cpp
    trunk/src/serialization/preprocessor.cpp
    trunk/src/sound.cpp

Modified: trunk/Doxyfile
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/Doxyfile?rev=18007&r1=18006&r2=18007&view=diff
==============================================================================
--- trunk/Doxyfile (original)
+++ trunk/Doxyfile Sat Jun  2 08:46:01 2007
@@ -372,7 +372,7 @@
 # directories like "/usr/src/myproject". Separate the files or directories
 # with spaces.
 
-INPUT                  = src src/campaign_server src/editor src/serialization 
src/server src/sdl_ttf src/tools src/widgets src/zipios++ 
doc/doxygen/doxygen.cpp
+INPUT                  = src src/campaign_server src/editor src/serialization 
src/server src/sdl_ttf src/tools src/widgets doc/doxygen/doxygen.cpp
 
 # If the value of the INPUT tag contains directories, you can use the
 # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 

Modified: trunk/changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=18007&r1=18006&r2=18007&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Sat Jun  2 08:46:01 2007
@@ -25,6 +25,7 @@
  * Miscellaneous and bugfixes
    * fix bug #4299: word wrap for menus with very long option strings
    * various bugfixes and code cleanups
+   * removed zipios support
    
 Version 1.3.3:
  * campaigns:

Modified: trunk/configure.ac
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/configure.ac?rev=18007&r1=18006&r2=18007&view=diff
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Sat Jun  2 08:46:01 2007
@@ -660,35 +660,6 @@
 
 AC_SUBST([FREETYPE_LIBS])
 
-AC_ARG_WITH([zipios],
-       AS_HELP_STRING([--with-zipios], [Do use zipios++ if installed]),
-       [checkzipios="$withval"],
-       [checkzipios="no"])
-
-AC_LANG(C++)
-LIBZIPIOS=
-if test $checkzipios = yes; then
-       AC_MSG_CHECKING([for libzipios++])
-       OLD_LIBS="$LIBS"
-       LIBS="-lzipios -lz"
-       AC_LINK_IFELSE([AC_LANG_SOURCE([
-       #include <zipios++/dircoll.h>
-       int main(int argc, char **argv)
-       {
-               zipios::DirectoryCollection z("src");
-       }
-               ])],
-               [AC_MSG_RESULT(yes)
-               LIBZIPIOS="-lzipios -lz"
-               AC_DEFINE([USE_ZIPIOS],[1],[Make use of the zipios++ library to 
read data in zip files])],
-               [AC_MSG_RESULT(no)
-               AC_MSG_WARN([*** libzipios++ not found - support for ZIP files 
is disabled])])
-       LIBS="$OLD_LIBS"
-else
-       AC_MSG_NOTICE([skipping check for libzipios++ - use --with-zipios if 
you want it])
-fi
-AC_SUBST([LIBZIPIOS])
-
 #######################################################################
 # Checks for header files.                                            #
 #######################################################################

Modified: trunk/po/wesnoth/POTFILES.in
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/po/wesnoth/POTFILES.in?rev=18007&r1=18006&r2=18007&view=diff
==============================================================================
--- trunk/po/wesnoth/POTFILES.in (original)
+++ trunk/po/wesnoth/POTFILES.in Sat Jun  2 08:46:01 2007
@@ -122,4 +122,3 @@
 src/widgets/slider.cpp
 src/widgets/textbox.cpp
 src/widgets/widget.cpp
-src/zipios++/xcoll.cpp

Modified: trunk/src/Makefile.am
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/Makefile.am?rev=18007&r1=18006&r2=18007&view=diff
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Sat Jun  2 08:46:01 2007
@@ -34,7 +34,7 @@
 pkgdatadir=$(datadir)/@DATADIR@
 
 THELIBS = -L. -lwesnoth-core $(SDL_IMAGE_LIBS) $(SDL_MIXER_LIBS) 
$(SDL_NET_LIBS) \
-       $(SDL_TTF_LIBS) $(SDL_LIBS) $(PYTHON_LIBS) $(LIBZIPIOS) 
$(FREETYPE_LIBS) $(LIBINTL)
+       $(SDL_TTF_LIBS) $(SDL_LIBS) $(PYTHON_LIBS) $(FREETYPE_LIBS) $(LIBINTL)
 
 #############################################################################
 #    Wesnoth                                                                #
@@ -254,7 +254,7 @@
        loadscreen_empty.cpp \
        serialization/parser.cpp
 
-wesnothd_LDADD = -L. -lwesnoth-core @SDL_NET_LIBS@ @SDL_LIBS@ $(LIBZIPIOS) 
$(LIBINTL)
+wesnothd_LDADD = -L. -lwesnoth-core @SDL_NET_LIBS@ @SDL_LIBS@ $(LIBINTL)
 wesnothd_DEPENDENCIES=libwesnoth-core.a
 
 #############################################################################
@@ -269,7 +269,7 @@
        loadscreen_empty.cpp \
        serialization/parser.cpp
 
-campaignd_LDADD = -L. -lwesnoth-core @SDL_NET_LIBS@ @SDL_LIBS@ $(LIBZIPIOS) 
$(LIBINTL)
+campaignd_LDADD = -L. -lwesnoth-core @SDL_NET_LIBS@ @SDL_LIBS@ $(LIBINTL)
 campaignd_DEPENDENCIES=libwesnoth-core.a
 
 #############################################################################
@@ -295,9 +295,9 @@
        loadscreen_empty.cpp \
        serialization/parser.cpp
 
-exploder_LDADD = -L. -lwesnoth-core @SDL_IMAGE_LIBS@ @SDL_LIBS@ $(LIBZIPIOS) 
$(LIBINTL) $(PNG_LIBS)
+exploder_LDADD = -L. -lwesnoth-core @SDL_IMAGE_LIBS@ @SDL_LIBS@ $(LIBINTL) 
$(PNG_LIBS)
 exploder_DEPENDENCIES=libwesnoth-core.a
-cutter_LDADD = -L. -lwesnoth-core @SDL_IMAGE_LIBS@ @SDL_LIBS@ $(LIBZIPIOS) 
$(LIBINTL) $(PNG_LIBS)
+cutter_LDADD = -L. -lwesnoth-core @SDL_IMAGE_LIBS@ @SDL_LIBS@ $(LIBINTL) 
$(PNG_LIBS)
 cutter_DEPENDENCIES=libwesnoth-core.a
 
 #############################################################################
@@ -326,7 +326,6 @@
        widgets/scrollbar.hpp \
        widgets/widget.hpp \
        widgets/scrollarea.hpp \
-       zipios++/xcoll.hpp \
        server/player.hpp \
        server/game.hpp \
        server/input_stream.hpp \
@@ -472,8 +471,7 @@
        serialization/binary_wml.cpp \
        serialization/preprocessor.cpp \
        serialization/string_utils.cpp \
-       serialization/tokenizer.cpp \
-       zipios++/xcoll.cpp
+       serialization/tokenizer.cpp
 
 if USESVN
 # Until game_config.cpp is removed, this will be needed to ensure that the

Modified: trunk/src/editor/editor.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/editor/editor.cpp?rev=18007&r1=18006&r2=18007&view=diff
==============================================================================
--- trunk/src/editor/editor.cpp (original)
+++ trunk/src/editor/editor.cpp Sat Jun  2 08:46:01 2007
@@ -92,7 +92,6 @@
                newfilename.erase(newfilename.begin());
                newfilename.erase(newfilename.end() - 1);
 
-               #ifndef USE_ZIPIOS
                //if the filename begins with a '~', then look
                //in the user's data directory. If the filename begins with
                //a '@' then we look in the user's data directory,
@@ -109,7 +108,6 @@
                                nfname = "data/" + newfilename.substr(1);
                        }
                } else
-               #endif
                if(newfilename.size() >= 2 && newfilename[0] == '.' &&
                        newfilename[1] == '/' ) {
                        //if the filename begins with a "./", then look
@@ -120,14 +118,6 @@
                        nfname = directory_name(filename) + nfname;
 
                } else {
-#ifdef USE_ZIPIOS
-               if(newfilename != "" && newfilename[0] == '@') {
-                       nfname = newfilename;
-                       nfname.erase(nfname.begin(),nfname.begin()+1);
-                       nfname = "data/" + nfname;
-               } else
-#endif
-
                                nfname = "data/" + newfilename;
                }
 

Modified: trunk/src/editor/editor_main.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/editor/editor_main.cpp?rev=18007&r1=18006&r2=18007&view=diff
==============================================================================
--- trunk/src/editor/editor_main.cpp (original)
+++ trunk/src/editor/editor_main.cpp Sat Jun  2 08:46:01 2007
@@ -193,11 +193,6 @@
        bind_textdomain_codeset (PACKAGE "-lib", "UTF-8");
        textdomain (PACKAGE "-editor");
 
-        if (!filesystem_init()) {
-               std::cerr << "cannot init filesystem code\n";
-               return 1;
-       }
-
        // Blatant cut and paste from game.cpp
        image::set_wm_icon();
        int video_flags = preferences::fullscreen() ? FULL_SCREEN : 0;
@@ -352,7 +347,5 @@
                }
        }
 
-       filesystem_close();
-
        return 0;
 }

Modified: trunk/src/filesystem.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/filesystem.cpp?rev=18007&r1=18006&r2=18007&view=diff
==============================================================================
--- trunk/src/filesystem.cpp (original)
+++ trunk/src/filesystem.cpp Sat Jun  2 08:46:01 2007
@@ -289,75 +289,6 @@
 #define LOG_FS LOG_STREAM(info, filesystem)
 #define ERR_FS LOG_STREAM(err, filesystem)
 
-#ifdef USE_ZIPIOS
-#include <zipios++/collcoll.h>
-#include <zipios++/dircoll.h>
-#include <zipios++/zipfile.h>
-#include <zipios++/simplesmartptr.h>
-#include <zipios++/basicentry.h>
-#include "zipios++/xcoll.hpp"
-
-namespace {
-       xzipios::XCColl* the_collection = NULL;
-
-       void register_zipdir(const std::string directory) {
-               // look for zip files
-               zipios::DirectoryCollection dir(directory,false);
-               zipios::ConstEntries entries = dir.entries();
-               for (zipios::ConstEntries::iterator i = entries.begin(); i != 
entries.end(); ++i) {
-                       if ((**i).isValid()) {
-                               const std::string fname = (**i).getName();
-                               const std::string suffix = ".zip";
-                               if ((fname.size() > suffix.size()) &&
-                                   (0 == fname.compare(fname.size() - 
suffix.size(), suffix.size(), suffix))) {
-                                       zipios::ZipFile zip(game_config::path + 
"/" + fname);
-                                       the_collection->addCollection(zip);
-                                       LOG_FS << "zip collection " << fname
-                                              << " has " << zip.size() << " 
elements\n";
-                               }
-                       }
-                       else LOG_FS << "skipping invalid entry\n";
-               }
-
-       }
-}
-#endif
-
-bool filesystem_init()
-{
-#ifdef USE_ZIPIOS
-       if (the_collection != NULL) {
-               // this is a re-read, cleanup first !
-               delete the_collection;
-       }
-
-       the_collection = new xzipios::XCColl;
-
-       if (!get_user_data_dir().empty()) {
-               LOG_FS << "looking at user dir " << get_user_data_dir() << '\n';
-               zipios::DirectoryCollection dir(get_user_data_dir());
-               LOG_FS << "user collection has " << dir.size() << " elements\n";
-               the_collection->addCollection(dir);
-               register_zipdir(get_user_data_dir());
-       }
-       if (!game_config::path.empty()) {
-               LOG_FS << "looking at system dir " << game_config::path << '\n';
-               zipios::DirectoryCollection dir(game_config::path);
-               LOG_FS << "system collection has " << dir.size() << " 
elements\n";
-               the_collection->addCollection(dir);
-               register_zipdir(game_config::path);
-       }
-#endif
-       return true;
-}
-
-void filesystem_close()
-{
-#ifdef USE_ZIPIOS
-       delete the_collection;
-#endif
-}
-
 namespace {
        const mode_t AccessMode = 00770;
 }
@@ -383,13 +314,6 @@
                       FILE_NAME_MODE mode,
                       FILE_REORDER_OPTION reorder)
 {
-#ifdef USE_ZIPIOS
-       if (the_collection->hasSubdir(directory)) {
-               the_collection->childrenOf(directory, files, dirs);
-               return;
-       }
-#endif /* USE_ZIPIOS */
-
        // if we have a path to find directories in, then
        // convert relative pathnames to be rooted on the
        // wesnoth path
@@ -759,14 +683,6 @@
 std::istream *istream_file(std::string const &fname)
 {
        LOG_FS << "streaming " << fname << " for reading.\n";
-#ifdef USE_ZIPIOS
-       if (!fname.empty() && fname[0] != '/' && the_collection) {
-               zipios::ConstEntryPointer p = the_collection->getEntry(fname);
-               if (p != 0)
-                       if (std::istream *s = the_collection->getInputStream(p))
-                               return s;
-       }
-#else
        if (!fname.empty() && fname[0] != '/' && !game_config::path.empty()) {
                std::ifstream *s = new std::ifstream((game_config::path + "/" + 
fname).c_str(),std::ios_base::binary);
                if (s->is_open())
@@ -774,10 +690,10 @@
                LOG_FS << "could not open " << fname << " for reading.\n";
                delete s;
        }
-#endif
 
        // FIXME: why do we rely on this even with relative paths ?
        // still useful with zipios, for things like cache and prefs
+       // NOTE zipios has been removed not sure what to do with this code
        std::istream *s = new std::ifstream(fname.c_str(), 
std::ios_base::binary);
        if (s->fail())
                LOG_FS << "streaming " << fname << " failed.\n";
@@ -857,27 +773,16 @@
 
 bool is_directory(const std::string& fname)
 {
-#ifdef USE_ZIPIOS
-       if(!fname.empty() && fname[0] != '/') {
-               return the_collection->hasSubdir(fname);
-       }
-
-#else
        if(!fname.empty() && fname[0] != '/' && !game_config::path.empty()) {
                if(is_directory_internal(game_config::path + "/" + fname))
                        return true;
        }
-#endif
 
        return is_directory_internal(fname);
 }
 
 bool file_exists(const std::string& name)
 {
-#ifdef USE_ZIPIOS
-       if (the_collection->getEntry(name))
-               return true;
-#endif
        std::ifstream file(name.c_str(),std::ios_base::binary);
        if (file.rdstate() != 0)
                return false;

Modified: trunk/src/filesystem.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/filesystem.hpp?rev=18007&r1=18006&r2=18007&view=diff
==============================================================================
--- trunk/src/filesystem.hpp (original)
+++ trunk/src/filesystem.hpp Sat Jun  2 08:46:01 2007
@@ -62,8 +62,6 @@
 bool delete_directory(const std::string& dirname);
 
 //basic disk I/O
-bool filesystem_init();
-void filesystem_close();
 std::string read_file(const std::string& fname);
 std::istream *istream_file(std::string const &fname);
 std::ostream *ostream_file(std::string const &fname);

Modified: trunk/src/game.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game.cpp?rev=18007&r1=18006&r2=18007&view=diff
==============================================================================
--- trunk/src/game.cpp (original)
+++ trunk/src/game.cpp Sat Jun  2 08:46:01 2007
@@ -1091,12 +1091,6 @@
 
                //put a break at line below to see that it really works.
                unarchive_campaign(cfg);
-
-               // when using zipios, force a reread zip and directory indices
-               if (!filesystem_init()) {
-                       gui::show_error_message(disp(), _("Cannot rescan the 
filesystem"));
-                       return;
-               }
 
                //force a reload of configuration information
                const bool old_cache = use_caching_;
@@ -1772,11 +1766,6 @@
 
        game_controller game(argc,argv);
 
-       if (!filesystem_init()) {
-               std::cerr << "cannot init filesystem code\n";
-               return 1;
-       }
-
        // I would prefer to setup locale first so that early error
        // messages can get localized, but we need the game_controller
        // initialized to have get_intl_dir() to work.  Note: this
@@ -1970,7 +1959,5 @@
                std::cerr << "Ran out of memory. Aborted.\n";
        }
 
-       filesystem_close();
-
        return 0;
 }

Modified: trunk/src/image.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/image.cpp?rev=18007&r1=18006&r2=18007&view=diff
==============================================================================
--- trunk/src/image.cpp (original)
+++ trunk/src/image.cpp Sat Jun  2 08:46:01 2007
@@ -261,16 +261,7 @@
 
        do {
                if (!location.empty()) {
-#ifdef USE_ZIPIOS
-                       std::string const &s = read_file(location);
-                       if (!s.empty()) {
-                               SDL_RWops* ops = 
SDL_RWFromMem((void*)s.c_str(), s.size());
-                               res = IMG_Load_RW(ops, 0);
-                               SDL_FreeRW(ops);
-                       }
-#else
                        res = IMG_Load(location.c_str());
-#endif
                }
                if (res.null() && (!try_units)) {
                        try_units = true;

Modified: trunk/src/serialization/preprocessor.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/serialization/preprocessor.cpp?rev=18007&r1=18006&r2=18007&view=diff
==============================================================================
--- trunk/src/serialization/preprocessor.cpp (original)
+++ trunk/src/serialization/preprocessor.cpp Sat Jun  2 08:46:01 2007
@@ -684,15 +684,7 @@
                                std::string prefix;
                                std::string nfname;
                                std::string const &newfilename = symbol;
-#ifdef USE_ZIPIOS
-                               if(newfilename != "" && newfilename[0] == '~') {
-                                       // I do not know of any valid use of 
{~xxx} when {xxx} is
-                                       // not used, and zipios takes care of 
both
-                                       LOG_CF << "ignoring reference to '" << 
newfilename << "'\n";
-                               } else
-#endif
                                {
-#ifndef USE_ZIPIOS
                                        //if the filename begins with a '~', 
then look
                                        //in the user's data directory. If the 
filename begins with
                                        //a '@' then we look in the user's data 
directory,
@@ -709,7 +701,6 @@
                                                        nfname = "data/" + 
newfilename.substr(1);
                                                }
                                        } else
-#endif
                                        if(newfilename.size() >= 2 && 
newfilename[0] == '.' &&
                                                newfilename[1] == '/' ) {
                                                //if the filename begins with a 
"./", then look
@@ -720,13 +711,6 @@
                                                nfname = directory_ + nfname;
 
                                        } else {
-#ifdef USE_ZIPIOS
-                                               if(newfilename != "" && 
newfilename[0] == '@') {
-                                                       nfname = newfilename;
-                                                       
nfname.erase(nfname.begin(),nfname.begin()+1);
-                                                       nfname = "data/" + 
nfname;
-                                               } else
-#endif
 
                                                        nfname = "data/" + 
newfilename;
                                        }

Modified: trunk/src/sound.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/sound.cpp?rev=18007&r1=18006&r2=18007&view=diff
==============================================================================
--- trunk/src/sound.cpp (original)
+++ trunk/src/sound.cpp Sat Jun  2 08:46:01 2007
@@ -699,15 +699,7 @@
                temp_chunk.group = group;
                std::string const &filename = 
get_binary_file_location("sounds", file);
                if (!filename.empty()) {
-#ifdef USE_ZIPIOS
-                       std::string const &s = read_file(filename);
-                       if (!s.empty()) {
-                               SDL_RWops* ops = 
SDL_RWFromMem((void*)s.c_str(), s.size());
-                               temp_chunk.set_data(Mix_LoadWAV_RW(ops,0));
-                       }
-#else
                        temp_chunk.set_data(Mix_LoadWAV(filename.c_str()));
-#endif
                }
                if (temp_chunk.get_data() == NULL) {
                        ERR_AUDIO << "Could not load sound file '" << filename 
<< "': "


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to