C# Class Nexus.Client.ModManagement.Scripting.XmlScript.XmlScriptInstaller

Performs the mod installation based on the XML script.
Inheritance: BackgroundTask
Show file Open project: NexusMods/NexusModManager-4.5 Class Usage Examples

Public Methods

Method Description
Install ( string p_strModName, XmlScript p_xscScript, ConditionStateManager p_csmStateManager, ICollection p_colFilesToInstall, ICollection p_colPluginsToActivate ) : bool

Performs the mod installation based on the XML script.

XmlScriptInstaller ( IMod p_modMod, IGameMode p_gmdGameMode, InstallerGroup p_igpInstallers ) : System

A simple constructor that initializes the object with the required dependencies.

Protected Methods

Method Description
InstallFile ( InstallableFile p_ilfFile, bool p_booActivate ) : bool

Installs the given InstallableFile, and activates any plugins it encompasses as requested.

InstallFiles ( XmlScript p_xscScript, ConditionStateManager p_csmStateManager, ICollection p_colFilesToInstall, ICollection p_colPluginsToActivate ) : bool

Installs and activates files are required. This method is used by the background worker.

InstallFolderFromMod ( InstallableFile p_ilfFile ) : bool

Recursively copies all files and folders from one location to another.

Private Methods

Method Description
SaveXMLInstalledFiles ( string p_strFrom, string p_strTo ) : void

Create the XML file with the Install Files list (From the rar to the folder).

Method Details

Install() public method

Performs the mod installation based on the XML script.
public Install ( string p_strModName, XmlScript p_xscScript, ConditionStateManager p_csmStateManager, ICollection p_colFilesToInstall, ICollection p_colPluginsToActivate ) : bool
p_strModName string The name of the mod whose script in executing.
p_xscScript XmlScript The script that is executing.
p_csmStateManager ConditionStateManager The state manager managing the install state.
p_colFilesToInstall ICollection The list of files to install.
p_colPluginsToActivate ICollection The list of plugins to activate.
return bool

InstallFile() protected method

Installs the given InstallableFile, and activates any plugins it encompasses as requested.
protected InstallFile ( InstallableFile p_ilfFile, bool p_booActivate ) : bool
p_ilfFile InstallableFile The file to install.
p_booActivate bool Whether or not to activate the given file, if it is a plugin.
return bool

InstallFiles() protected method

Installs and activates files are required. This method is used by the background worker.
protected InstallFiles ( XmlScript p_xscScript, ConditionStateManager p_csmStateManager, ICollection p_colFilesToInstall, ICollection p_colPluginsToActivate ) : bool
p_xscScript XmlScript
p_csmStateManager ConditionStateManager
p_colFilesToInstall ICollection
p_colPluginsToActivate ICollection
return bool

InstallFolderFromMod() protected method

Recursively copies all files and folders from one location to another.
protected InstallFolderFromMod ( InstallableFile p_ilfFile ) : bool
p_ilfFile InstallableFile The folder to install.
return bool

XmlScriptInstaller() public method

A simple constructor that initializes the object with the required dependencies.
public XmlScriptInstaller ( IMod p_modMod, IGameMode p_gmdGameMode, InstallerGroup p_igpInstallers ) : System
p_modMod IMod The mod for which the script is running.
p_gmdGameMode IGameMode The game mode currently being managed.
p_igpInstallers InstallerGroup The utility class to use to install the mod items.
return System