C# Class Nexus.Client.ModManagement.ModInstaller

This installs mods.
Inheritance: ModInstallerBase
Afficher le fichier Open project: NexusMods/NexusModManager-4.5 Class Usage Examples

Méthodes publiques

Méthode Description
Install ( ) : void

Installs the mod.

ModInstaller ( IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, FileUtil p_futFileUtility, SynchronizationContext p_scxUIContext, IInstallLog p_ilgModInstallLog, IPluginManager p_pmgPluginManager, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate, ReadOnlyObservableList p_rolActiveMods, ModManager p_mmModManager ) : System

A simple constructor that initializes the object with the given values.

Méthodes protégées

Méthode Description
CreateFileInstaller ( TxFileManager p_tfmFileManager, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate ) : IModFileInstaller

Creates the file installer to use to install the mod's files.

This returns the regular ModFileInstaller.

CreateGameSpecificValueInstaller ( TxFileManager p_tfmFileManager, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate ) : IGameSpecificValueInstaller

Creates the file installer to use to install the mod's game specific value edits.

This returns a regular IGameSpecificValueInstaller.

CreateIniInstaller ( TxFileManager p_tfmFileManager, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate ) : IIniInstaller

Creates the file installer to use to install the mod's ini edits.

This returns the regular IniInstaller.

RegisterMod ( ) : void

Registers the mod being installed with the install log.

RunBasicInstallScript ( IModFileInstaller p_mfiFileInstaller, ReadOnlyObservableList p_rolActiveMods ) : bool

Runs the basic install script.

A basic install installs all of the files in the mod to the installation directory, and activates all plugin files.

RunScript ( TxFileManager p_tfmFileManager ) : bool

This executes the install script.

RunTasks ( ) : void

Runs the install tasks.

Private Methods

Méthode Description
BeginModReadOnlyTransaction ( ) : bool

Puts the mod into read-only mode.

ScriptExecutor_TaskSetCompleted ( object sender, TaskSetCompletedEventArgs e ) : void

Handles the IBackgroundTaskSet.TaskSetCompleted event of script executors.

This unwires our listeners from the executor.

ScriptExecutor_TaskStarted ( object sender, EventArgs e ) : void

Handles the IBackgroundTaskSet.TaskStarted event of script executors.

This bubbles the started task to any listeners.

Method Details

CreateFileInstaller() protected méthode

Creates the file installer to use to install the mod's files.
This returns the regular ModFileInstaller.
protected CreateFileInstaller ( TxFileManager p_tfmFileManager, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate ) : IModFileInstaller
p_tfmFileManager ChinhDo.Transactions.TxFileManager The transactional file manager to use to interact with the file system.
p_dlgOverwriteConfirmationDelegate ConfirmItemOverwriteDelegate The method to call in order to confirm an overwrite.
Résultat IModFileInstaller

CreateGameSpecificValueInstaller() protected méthode

Creates the file installer to use to install the mod's game specific value edits.
This returns a regular IGameSpecificValueInstaller.
protected CreateGameSpecificValueInstaller ( TxFileManager p_tfmFileManager, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate ) : IGameSpecificValueInstaller
p_tfmFileManager ChinhDo.Transactions.TxFileManager The transactional file manager to use to interact with the file system.
p_dlgOverwriteConfirmationDelegate ConfirmItemOverwriteDelegate The method to call in order to confirm an overwrite.
Résultat IGameSpecificValueInstaller

CreateIniInstaller() protected méthode

Creates the file installer to use to install the mod's ini edits.
This returns the regular IniInstaller.
protected CreateIniInstaller ( TxFileManager p_tfmFileManager, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate ) : IIniInstaller
p_tfmFileManager ChinhDo.Transactions.TxFileManager The transactional file manager to use to interact with the file system.
p_dlgOverwriteConfirmationDelegate ConfirmItemOverwriteDelegate The method to call in order to confirm an overwrite.
Résultat IIniInstaller

Install() public méthode

Installs the mod.
public Install ( ) : void
Résultat void

ModInstaller() public méthode

A simple constructor that initializes the object with the given values.
public ModInstaller ( IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, FileUtil p_futFileUtility, SynchronizationContext p_scxUIContext, IInstallLog p_ilgModInstallLog, IPluginManager p_pmgPluginManager, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate, ReadOnlyObservableList p_rolActiveMods, ModManager p_mmModManager ) : System
p_modMod IMod The mod being installed.
p_gmdGameMode IGameMode The current game mode.
p_eifEnvironmentInfo IEnvironmentInfo The application's envrionment info.
p_futFileUtility Nexus.Client.Util.FileUtil The file utility class.
p_scxUIContext System.Threading.SynchronizationContext The to use to marshall UI interactions to the UI thread.
p_ilgModInstallLog IInstallLog The install log that tracks mod install info /// for the current game mode
p_pmgPluginManager IPluginManager The plugin manager.
p_dlgOverwriteConfirmationDelegate ConfirmItemOverwriteDelegate The method to call in order to confirm an overwrite.
p_rolActiveMods ReadOnlyObservableList The list of active mods.
p_mmModManager ModManager
Résultat System

RegisterMod() protected méthode

Registers the mod being installed with the install log.
protected RegisterMod ( ) : void
Résultat void

RunBasicInstallScript() protected méthode

Runs the basic install script.
A basic install installs all of the files in the mod to the installation directory, and activates all plugin files.
protected RunBasicInstallScript ( IModFileInstaller p_mfiFileInstaller, ReadOnlyObservableList p_rolActiveMods ) : bool
p_mfiFileInstaller IModFileInstaller The file installer to use.
p_rolActiveMods ReadOnlyObservableList The list of active mods.
Résultat bool

RunScript() protected méthode

This executes the install script.
protected RunScript ( TxFileManager p_tfmFileManager ) : bool
p_tfmFileManager ChinhDo.Transactions.TxFileManager The transactional file manager to use to interact with the file system.
Résultat bool

RunTasks() protected méthode

Runs the install tasks.
protected RunTasks ( ) : void
Résultat void