|Anonymous | Login||2019-09-16 13:21 UTC|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000345||CEGUI||Core library (CEGUIBase)||public||2010-03-19 19:32||2010-03-26 14:12|
|Target Version||Fixed in Version||Mercurial: default branch|
|Summary||0000345: A zip-archive based ResourceProvider for CEGUI|
|Description||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.
|Tags||No tags attached.|
|Attached Files||CEGUIMinizipResourceProvider.zip [^] (3,378 bytes) 2010-03-19 19:32|
|I forgot to add the CEGUIEXPORT macro on the class definition. I was not building this into the cegui library, so the macro was not needed at the time. If the class is included within the cegui library, the macro should be added.|
I am working on this at the moment, so thought I would update on my progress.
I see this going into branches/v0-7 with some minor mods and 1 enhancement.
Aside from a minor style changes, I will be incorporating a copy of parts of the minizip code into the CEGUI tree to save adding a new external dependency.
I made small changes to remove the unzip.h dependency from the public header.
The enhancement is for a 0.7.x only thing for pattern matched file loading (where you can basically load all fonts by saying "*.font").
Should be done and committed in a couple of days :)
This is now in branches/v0-7 as of r2491.
Thanks again :)
|2010-03-19 19:32||Jamarr||New Issue|
|2010-03-19 19:32||Jamarr||File Added: CEGUIMinizipResourceProvider.zip|
|2010-03-19 19:36||Jamarr||Note Added: 0000436|
|2010-03-20 08:14||CrazyEddie||Status||new => assigned|
|2010-03-20 08:14||CrazyEddie||Assigned To||=> CrazyEddie|
|2010-03-24 14:36||CrazyEddie||Note Added: 0000437|
|2010-03-26 14:12||CrazyEddie||Note Added: 0000440|
|2010-03-26 14:12||CrazyEddie||Status||assigned => resolved|
|2010-03-26 14:12||CrazyEddie||Fixed in Version||0.8.3 => Mercurial: default branch|
|2010-03-26 14:12||CrazyEddie||Resolution||open => fixed|
|Copyright © 2000 - 2012 MantisBT Group|