Automatic migration. Original reporter: "Jamarr"
I eventually got around to writing a zip-archive based resource provider for CEGUI. I originally mentioned this in 'The Development of CEGUI 0.7.x' thread and there seemed to be a little interest in this, so I figured I would add this to mantis to see if it can be added into the library. As initially hinted at I decided to use zlib, along with the minizip contribution accompanying zlib, since these use MIT style licenses.
I wanted a resource provider that could provide the same functionality as the default resource provider, with the additional capability to load resources from an archive. By providing backwards compatability with the default resource provider, users can easily test new resources without having to recompile the archive. In addition, the new resource provider can be dropped into an existing project (that uses the default resource provider) without any noticable difference in functionality. The user can also turn off loading of local resources, so that only resources from the archive can be loaded.
I only tested this class with v0.6.2. But looking at the default resource provider for v0.7, I see no reason why it would not also work with v0.7.
Additional information: This actually only required a very small portion of code. Probably less than 15 or so lines of glue code. The remaining 200 lines in the header/source being mostly fluff.
It appears that zlib is already included in the CEGUI v0.7 dependency package. The minzip dependencies would need to be added to the project. Minizip is included in the zlib distribution and can be located at zlib/contrib/minizip. Creating a minizip.lib from the source for distribution should be trivial; just create a library-project with all files in the minizip directory excluding minizip.c and miniunz.c and link to zlib.
I have only tested this on windows, as that is the only development platform I am currently familiar with, but minizip includes file-io routines for both win32 and linux (and so I presume will run on mac).
It should be noted that I inherited CEGUI::MinizipResourceProvider from CEGUI::DefaultResourceProvider since the MRP is ment as a drop-in replacement for the DRP, with the added capability to load resources from an archive. An issue with this is that the DRP does not have a virtual destructor, so the DRP needs to be updated or the user should know not to delete an MRP casted to a DRP.