Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Packages a mod's files into a distributable archive. More...
#include <ArchiveBuilder.h>
Public Member Functions | |
CArchiveBuilder (const OsPath &mod, const OsPath &tempdir) | |
Initialise the archive builder for processing the given mod. More... | |
~CArchiveBuilder () | |
void | AddBaseMod (const OsPath &mod) |
Add a mod which will be loaded but not archived, to provide files like textures.xml needed for the conversion. More... | |
void | Build (const OsPath &archive, bool compress) |
Do all the processing and packing of files into the archive. More... | |
Static Private Member Functions | |
static Status | CollectFileCB (const VfsPath &pathname, const CFileInfo &fileInfo, const uintptr_t cbData) |
Private Attributes | |
PIVFS | m_VFS |
std::vector< VfsPath > | m_Files |
OsPath | m_TempDir |
size_t | m_NumBaseMods |
Packages a mod's files into a distributable archive.
This includes various game-specific knowledge on how to convert and cache certain files into more efficient formats (PNG -> DDS, etc).
Initialise the archive builder for processing the given mod.
Assumes no graphics code (especially tex_codec) has been initialised yet.
mod | path to data/mods/foo directory, containing files for conversion |
tempdir | path to a writable directory for temporary files |
CArchiveBuilder::~CArchiveBuilder | ( | ) |
void CArchiveBuilder::AddBaseMod | ( | const OsPath & | mod | ) |
Add a mod which will be loaded but not archived, to provide files like textures.xml needed for the conversion.
Added mods will be mounted with increasing priority. Typically this will be called with 'public', when packaging a user's mod.
mod | path to data/mods/foo directory, containing files for loading |
void CArchiveBuilder::Build | ( | const OsPath & | archive, |
bool | compress | ||
) |
Do all the processing and packing of files into the archive.
archive | path of .zip file to generate (will be overwritten if it exists) |
compress | whether to compress the contents of the .zip file |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |