![]() |
Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Install a mod into the mods directory. More...
#include <ModInstaller.h>

Public Types | |
| enum | ModInstallationResult { SUCCESS , FAIL_ON_VFS_MOUNT , FAIL_ON_MOD_LOAD , FAIL_ON_PARSE_JSON , FAIL_ON_EXTRACT_NAME , FAIL_ON_MOD_MOVE , FAIL_ON_JSON_WRITE , FAIL_ON_MOD_COPY } |
Public Member Functions | |
| CModInstaller (const OsPath &modsdir, const OsPath &tempdir) | |
| Initialise the mod installer for processing the given mod. More... | |
| ~CModInstaller () | |
| ModInstallationResult | Install (const OsPath &mod, const std::shared_ptr< ScriptContext > &scriptContext, bool keepFile) |
| Process and unpack the mod. More... | |
| const std::vector< CStr > & | GetInstalledMods () const |
Static Public Member Functions | |
| static bool | IsDefaultModExtension (const Path &ext) |
Private Attributes | |
| PIVFS | m_VFS |
| OsPath | m_ModsDir |
| OsPath | m_TempDir |
| VfsPath | m_CacheDir |
| std::vector< CStr > | m_InstalledMods |
Install a mod into the mods directory.
Initialise the mod installer for processing the given mod.
| modsdir | path to the data directory that contains mods |
| tempdir | path to a writable directory for temporary files |
| CModInstaller::~CModInstaller | ( | ) |
| const std::vector< CStr > & CModInstaller::GetInstalledMods | ( | ) | const |
| CModInstaller::ModInstallationResult CModInstaller::Install | ( | const OsPath & | mod, |
| const std::shared_ptr< ScriptContext > & | scriptContext, | ||
| bool | keepFile | ||
| ) |
Process and unpack the mod.
| mod | path of .pyromod/.zip file |
| keepFile | if true, copy the file, if false move it |
|
inlinestatic |
|
private |
|
private |
|
private |
|
private |
|
private |