Pyrogenesis
13997
|
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 |
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).
Definition at line 29 of file ArchiveBuilder.h.
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 |
Definition at line 36 of file ArchiveBuilder.cpp.
CArchiveBuilder::~CArchiveBuilder | ( | ) |
Definition at line 53 of file ArchiveBuilder.cpp.
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.
Typically this will be called with 'public', when packaging a user's mod.
mod | path to data/mods/foo directory, containing files for loading |
Definition at line 62 of file ArchiveBuilder.cpp.
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 |
Definition at line 67 of file ArchiveBuilder.cpp.
|
staticprivate |
Definition at line 176 of file ArchiveBuilder.cpp.
|
private |
Definition at line 63 of file ArchiveBuilder.h.
|
private |
Definition at line 64 of file ArchiveBuilder.h.
|
private |
Definition at line 62 of file ArchiveBuilder.h.