18#ifndef INCLUDED_MODINSTALLER
19#define INCLUDED_MODINSTALLER
29namespace Script {
class Context; }
66 const std::shared_ptr<Script::Context>& scriptContext,
79 return ext ==
".pyromod" || ext ==
".zip";
Install a mod into the mods directory.
Definition: ModInstaller.h:35
VfsPath m_CacheDir
Definition: ModInstaller.h:86
const std::vector< CStr > & GetInstalledMods() const
Definition: ModInstaller.cpp:145
PIVFS m_VFS
Definition: ModInstaller.h:83
~CModInstaller()
Definition: ModInstaller.cpp:55
OsPath m_TempDir
Definition: ModInstaller.h:85
std::vector< CStr > m_InstalledMods
Definition: ModInstaller.h:87
static bool IsDefaultModExtension(const Path &ext)
Definition: ModInstaller.h:77
ModInstallationResult Install(const OsPath &mod, const std::shared_ptr< Script::Context > &scriptContext, bool keepFile)
Process and unpack the mod.
Definition: ModInstaller.cpp:61
OsPath m_ModsDir
Definition: ModInstaller.h:84
CModInstaller(const OsPath &modsdir, const OsPath &tempdir)
Initialise the mod installer for processing the given mod.
Definition: ModInstaller.cpp:48
ModInstallationResult
Definition: ModInstaller.h:38
@ FAIL_ON_VFS_MOUNT
Definition: ModInstaller.h:40
@ FAIL_ON_MOD_LOAD
Definition: ModInstaller.h:41
@ FAIL_ON_PARSE_JSON
Definition: ModInstaller.h:42
@ FAIL_ON_MOD_COPY
Definition: ModInstaller.h:46
@ FAIL_ON_MOD_MOVE
Definition: ModInstaller.h:44
@ FAIL_ON_JSON_WRITE
Definition: ModInstaller.h:45
@ FAIL_ON_EXTRACT_NAME
Definition: ModInstaller.h:43
@ SUCCESS
Definition: ModInstaller.h:39
Abstraction around a SpiderMonkey JSContext.
Definition: DapInterface.h:32
std::shared_ptr< IVFS > PIVFS
Definition: vfs.h:240