/// <summary> /// Initializes the singleton intances of the mod manager. /// </summary> /// <param name="p_gmdGameMode">The current game mode.</param> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_mrpModRepository">The mod repository from which to get mods and mod metadata.</param> /// <param name="p_dmrMonitor">The download monitor to use to track task progress.</param> /// <param name="p_frgFormatRegistry">The <see cref="IModFormatRegistry"/> that contains the list /// of supported <see cref="IModFormat"/>s.</param> /// <param name="p_mrgModRegistry">The <see cref="ModRegistry"/> that contains the list /// of managed <see cref="IMod"/>s.</param> /// <param name="p_futFileUtility">The file utility class.</param> /// <param name="p_scxUIContext">The <see cref="SynchronizationContext"/> to use to marshall UI interactions to the UI thread.</param> /// <param name="p_ilgInstallLog">The install log tracking mod activations for the current game mode.</param> /// <param name="p_pmgPluginManager">The plugin manager to use to work with plugins.</param> /// <returns>The initialized mod manager.</returns> /// <exception cref="InvalidOperationException">Thrown if the mod manager has already /// been initialized.</exception> public static ModManager Initialize(IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, IModRepository p_mrpModRepository, DownloadMonitor p_dmrMonitor, ActivateModsMonitor p_ammMonitor, IModFormatRegistry p_frgFormatRegistry, ModRegistry p_mrgModRegistry, FileUtil p_futFileUtility, SynchronizationContext p_scxUIContext, IInstallLog p_ilgInstallLog, IPluginManager p_pmgPluginManager) { if (m_mmgCurrent != null) throw new InvalidOperationException("The Mod Manager has already been initialized."); m_mmgCurrent = new ModManager(p_gmdGameMode, p_eifEnvironmentInfo, p_mrpModRepository, p_dmrMonitor, p_ammMonitor, p_frgFormatRegistry, p_mrgModRegistry, p_futFileUtility, p_scxUIContext, p_ilgInstallLog, p_pmgPluginManager); return m_mmgCurrent; }
/// <summary> /// A simple constructor that initializes the object with its dependencies. /// </summary> /// <param name="p_ilgInstallLog">The install log to use to log file installations.</param> /// <param name="p_mmgModManager">The mod manager to use to upgrade any replaced mods.</param> /// <param name="p_dlgConfirmUpgrade">The delegate to call to confirm that a mismatched version mod should be upgraded.</param> /// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param> public UpgradeMismatchedVersionScanner(IInstallLog p_ilgInstallLog, ModManager p_mmgModManager, ConfirmMismatchedVersionModUpgradeDelegate p_dlgConfirmUpgrade, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate) { InstallLog = p_ilgInstallLog; ModManager = p_mmgModManager; m_dlgConfirmUpgrade = p_dlgConfirmUpgrade; m_dlgOverwriteConfirmation = p_dlgOverwriteConfirmationDelegate; }
/// <summary> /// A simple constructor that initializes the object with its dependencies. /// </summary> /// <param name="p_gmiGameModeInfo">The environment info of the current game mode.</param> /// <param name="p_modMod">The mod being installed.</param> /// <param name="p_ilgInstallLog">The install log to use to log file installations.</param> /// <param name="p_pmgPluginManager">The plugin manager.</param> /// <param name="p_dfuDataFileUtility">The utility class to use to work with data files.</param> /// <param name="p_tfmFileManager">The transactional file manager to use to interact with the file system.</param> /// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param> /// <param name="p_UsesPlugins">Game using plugin or mods (True for plugins).</param> public ModFileUpgradeInstaller(IGameModeEnvironmentInfo p_gmiGameModeInfo, IMod p_modMod, IInstallLog p_ilgInstallLog, IPluginManager p_pmgPluginManager, IDataFileUtil p_dfuDataFileUtility, TxFileManager p_tfmFileManager, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate, bool p_UsesPlugins) : base(p_gmiGameModeInfo, p_modMod, p_ilgInstallLog, p_pmgPluginManager, p_dfuDataFileUtility, p_tfmFileManager, p_dlgOverwriteConfirmationDelegate, p_UsesPlugins, null) { OriginallyInstalledFiles = new Set<string>(StringComparer.OrdinalIgnoreCase); foreach (string strFile in InstallLog.GetInstalledModFiles(Mod)) OriginallyInstalledFiles.Add(strFile.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar)); }
/// <summary> /// A simple constructor that initializes the object with its dependencies. /// </summary> /// <param name="p_modMod">The mod being installed.</param> /// <param name="p_ilgInstallLog">The install log to use to log file installations.</param> /// <param name="p_tfmFileManager">The transactional file manager to use to interact with the file system.</param> /// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param> public IniInstaller(IMod p_modMod, IInstallLog p_ilgInstallLog, TxFileManager p_tfmFileManager, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate) { TouchedFiles = new Set<string>(StringComparer.OrdinalIgnoreCase); Mod = p_modMod; InstallLog = p_ilgInstallLog; TransactionalFileManager = p_tfmFileManager; m_dlgOverwriteConfirmationDelegate = p_dlgOverwriteConfirmationDelegate ?? ((s, b, m) => OverwriteResult.No); }
/// <summary> /// A simple constructor that initializes the object with its dependencies. /// </summary> /// <param name="p_modMod">The mod being installed.</param> /// <param name="p_ilgInstallLog">The install log to use to log file installations.</param> /// <param name="p_tfmFileManager">The transactional file manager to use to interact with the file system.</param> /// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param> public IniInstaller(IMod p_modMod, IInstallLog p_ilgInstallLog, TxFileManager p_tfmFileManager, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate) { TouchedFiles = new Set <string>(StringComparer.OrdinalIgnoreCase); Mod = p_modMod; InstallLog = p_ilgInstallLog; TransactionalFileManager = p_tfmFileManager; m_dlgOverwriteConfirmationDelegate = p_dlgOverwriteConfirmationDelegate ?? ((s, b, m) => OverwriteResult.No); }
/// <summary> /// A simple constructor that initializes the object with its dependencies. /// </summary> public ActivateMultipleModsTask(List <IMod> p_lstModList, bool p_booAllowCancel, IInstallLog p_iilInstallLog, ModInstallerFactory p_mifModInstallerFactory, ConfirmActionMethod p_camConfirm, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate) { m_iilInstallLog = p_iilInstallLog; m_mifModInstallerFactory = p_mifModInstallerFactory; m_lstModList = p_lstModList; m_camConfirm = p_camConfirm; m_dlgOverwriteConfirmationDelegate = p_dlgOverwriteConfirmationDelegate; }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_modMod">The mod being installed.</param> /// <param name="p_igpInstallers">The utility class to use to install the mod items.</param> /// <param name="p_ilgModInstallLog">The install log that tracks mod install info /// for the current game mode</param> /// <param name="p_gmdGameMode">The the current game mode.</param> /// <param name="p_rolActiveMods">The list of active mods.</param> public BasicUninstallTask(IMod p_modMod, InstallerGroup p_igpInstallers, IInstallLog p_ilgModInstallLog, IGameMode p_gmdGameMode, ReadOnlyObservableList<IMod> p_rolActiveMods) { Mod = p_modMod; Installers = p_igpInstallers; ModInstallLog = p_ilgModInstallLog; GameMode = p_gmdGameMode; ActiveMods = p_rolActiveMods; }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_modMod">The mod being installed.</param> /// <param name="p_igpInstallers">The utility class to use to install the mod items.</param> /// <param name="p_ilgModInstallLog">The install log that tracks mod install info /// for the current game mode</param> /// <param name="p_gmdGameMode">The the current game mode.</param> /// <param name="p_rolActiveMods">The list of active mods.</param> public BasicUninstallTask(IMod p_modMod, InstallerGroup p_igpInstallers, IInstallLog p_ilgModInstallLog, IGameMode p_gmdGameMode, ReadOnlyObservableList <IMod> p_rolActiveMods) { Mod = p_modMod; Installers = p_igpInstallers; ModInstallLog = p_ilgModInstallLog; GameMode = p_gmdGameMode; ActiveMods = p_rolActiveMods; }
/// <summary> /// Initializes the install log. /// </summary> /// <param name="p_mdrManagedModRegistry">The <see cref="ModRegistry"/> that contains the list /// of managed <see cref="IMod"/>s.</param> /// <param name="p_strModInstallDirectory">The path of the directory where all of the mods are installed.</param> /// <param name="p_strLogPath">The path from which to load the install log information.</param> /// <returns>The initialized install log.</returns> /// <exception cref="InvalidOperationException">Thrown if the install log has already /// been initialized.</exception> public static IInstallLog Initialize(ModRegistry p_mdrManagedModRegistry, string p_strModInstallDirectory, string p_strLogPath) { if (m_ilgCurrent != null) { throw new InvalidOperationException("The Install Log has already been initialized."); } m_ilgCurrent = new InstallLog(p_mdrManagedModRegistry, p_strModInstallDirectory, p_strLogPath); return(m_ilgCurrent); }
/// <summary> /// A simple constructor that initializes the object with its dependencies. /// </summary> public DeactivateMultipleModsTask(ReadOnlyObservableList <IMod> p_rolModList, IInstallLog p_iilInstallLog, ModInstallerFactory p_mifModInstallerFactory, VirtualModActivator p_vmaVirtualModActivator, string p_strScriptedLogPath, bool p_booFilesOnly) { m_iilInstallLog = p_iilInstallLog; m_mifModInstallerFactory = p_mifModInstallerFactory; m_rolModList = p_rolModList; VirtualModActivator = p_vmaVirtualModActivator; m_strLogPath = p_strScriptedLogPath; m_booFilesOnly = p_booFilesOnly; }
/// <summary> /// A simple constructor that initializes the object with its dependencies. /// </summary> /// <param name="p_gmiGameModeInfo">The environment info of the current game mode.</param> /// <param name="p_modMod">The mod being installed.</param> /// <param name="p_ilgInstallLog">The install log to use to log file installations.</param> /// <param name="p_tfmFileManager">The transactional file manager to use to interact with the file system.</param> /// <param name="p_futFileUtility">The file utility class.</param> /// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param> public GamebryoGameSpecificValueInstaller(IMod p_modMod, IGameModeEnvironmentInfo p_gmiGameModeInfo, IInstallLog p_ilgInstallLog, TxFileManager p_tfmFileManager, FileUtil p_futFileUtility, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate) { TouchedFiles = new Set <string>(StringComparer.OrdinalIgnoreCase); Mod = p_modMod; GameModeInfo = p_gmiGameModeInfo; InstallLog = p_ilgInstallLog; TransactionalFileManager = p_tfmFileManager; FileUtility = p_futFileUtility; m_dlgOverwriteConfirmationDelegate = p_dlgOverwriteConfirmationDelegate; }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_modMod">The mod being installed.</param> /// <param name="p_gmdGameMode">The current game mode.</param> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_ilgModInstallLog">The install log that tracks mod install info /// for the current game mode</param> /// <param name="p_pmgPluginManager">The plugin manager.</param> /// <param name="p_rolActiveMods">The list of active mods.</param> public ModUninstaller(IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, IInstallLog p_ilgModInstallLog, IPluginManager p_pmgPluginManager, ReadOnlyObservableList <IMod> p_rolActiveMods, ModManager p_mmModManager) { Mod = p_modMod; GameMode = p_gmdGameMode; EnvironmentInfo = p_eifEnvironmentInfo; ModInstallLog = p_ilgModInstallLog; PluginManager = p_pmgPluginManager; ActiveMods = p_rolActiveMods; m_mmModManager = p_mmModManager; }
/// <summary> /// A simple constructor that initializes the factory with the required dependencies. /// </summary> /// <param name="p_gmdGameMode">The game mode for which the created installer will be installing mods.</param> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_futFileUtility">The file utility class.</param> /// <param name="p_scxUIContext">The <see cref="SynchronizationContext"/> to use to marshall UI interactions to the UI thread.</param> /// <param name="p_ilgInstallLog">The install log that tracks mod install info /// for the current game mode.</param> /// <param name="p_pmgPluginManager">The plugin manager to use to work with plugins.</param> public ModInstallerFactory(IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, FileUtil p_futFileUtility, SynchronizationContext p_scxUIContext, IInstallLog p_ilgInstallLog, IPluginManager p_pmgPluginManager, ModManager p_mmModManager) { m_gmdGameMode = p_gmdGameMode; m_eifEnvironmentInfo = p_eifEnvironmentInfo; m_futFileUtility = p_futFileUtility; m_scxUIContext = p_scxUIContext; m_ilgInstallLog = p_ilgInstallLog; m_pmgPluginManager = p_pmgPluginManager; m_mmModManager = p_mmModManager; }
/// <summary> /// A simple constructor that initializes the factory with the required dependencies. /// </summary> /// <param name="p_gmdGameMode">The game mode for which the created installer will be installing mods.</param> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_futFileUtility">The file utility class.</param> /// <param name="p_scxUIContext">The <see cref="SynchronizationContext"/> to use to marshall UI interactions to the UI thread.</param> /// <param name="p_ilgInstallLog">The install log that tracks mod install info /// for the current game mode.</param> /// <param name="p_pmgPluginManager">The plugin manager to use to work with plugins.</param> public ModInstallerFactory(IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, FileUtil p_futFileUtility, SynchronizationContext p_scxUIContext, IInstallLog p_ilgInstallLog, IPluginManager p_pmgPluginManager, IVirtualModActivator p_ivaVirtualModActivator) { m_gmdGameMode = p_gmdGameMode; m_eifEnvironmentInfo = p_eifEnvironmentInfo; m_futFileUtility = p_futFileUtility; m_scxUIContext = p_scxUIContext; m_ilgInstallLog = p_ilgInstallLog; m_pmgPluginManager = p_pmgPluginManager; m_ivaVirtualModActivator = p_ivaVirtualModActivator; }
/// <summary> /// A simple constructor that initializes the object with its dependencies. /// </summary> /// <param name="p_gmiGameModeInfo">The environment info of the current game mode.</param> /// <param name="p_modMod">The mod being installed.</param> /// <param name="p_ilgInstallLog">The install log to use to log file installations.</param> /// <param name="p_pmgPluginManager">The plugin manager.</param> /// <param name="p_dfuDataFileUtility">The utility class to use to work with data files.</param> /// <param name="p_tfmFileManager">The transactional file manager to use to interact with the file system.</param> /// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param> /// <param name="p_UsesPlugins">Whether the file is a mod or a plugin.</param> public ModFileInstaller(IGameModeEnvironmentInfo p_gmiGameModeInfo, IMod p_modMod, IInstallLog p_ilgInstallLog, IPluginManager p_pmgPluginManager, IDataFileUtil p_dfuDataFileUtility, TxFileManager p_tfmFileManager, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate, bool p_UsesPlugins) { GameModeInfo = p_gmiGameModeInfo; Mod = p_modMod; InstallLog = p_ilgInstallLog; PluginManager = p_pmgPluginManager; DataFileUtility = p_dfuDataFileUtility; TransactionalFileManager = p_tfmFileManager; m_dlgOverwriteConfirmationDelegate = p_dlgOverwriteConfirmationDelegate ?? ((s, b, m) => OverwriteResult.No); IsPlugin = p_UsesPlugins; }
/// <summary> /// Initializes the install log. /// </summary> /// <param name="managedModRegistry">The <see cref="ModRegistry"/> that contains the list of managed <see cref="IMod"/>s.</param> /// <param name="gameMode">The current game mode.</param> /// <param name="modInstallDirectory">The path of the directory where all of the mods are installed.</param> /// <param name="logPath">The path from which to load the install log information.</param> /// <returns>The initialized install log.</returns> /// <exception cref="InvalidOperationException">Thrown if the install log has already /// been initialized.</exception> public static IInstallLog Initialize(ModRegistry managedModRegistry, IGameMode gameMode, string modInstallDirectory, string logPath) { if (_instance != null) { throw new InvalidOperationException("The Install Log has already been initialized."); } _instance = new InstallLog(managedModRegistry, gameMode, modInstallDirectory, logPath); return(_instance); }
/// <summary> /// A simpell constructor that initializes the object with the given services. /// </summary> /// <param name="p_ilgModInstallLog">The install log that tracks mod install info for the current game mode.</param> /// <param name="p_aplActivePluginLog">The <see cref="ActivePluginLog"/> tracking plugin activations for the current game mode.</param> /// <param name="p_polPluginOrderLog">The <see cref="IPluginOrderLog"/> tracking plugin order for the current game mode.</param> /// <param name="p_mrpModRepository">The repository we are logging in to.</param> /// <param name="p_mmgModManager">The mod manager to use to manage mods.</param> /// <param name="p_pmgPluginManager">The manager to use to manage plugins.</param> /// <param name="p_amtMonitor">The download monitor to use to manage the monitored activities.</param> /// <param name="p_mamMonitor">The mod activation monitor to use to manage the monitored activities.</param> /// <param name="p_umgUpdateManager">The update manager to use to perform updates.</param> public ServiceManager(IInstallLog p_ilgModInstallLog, ActivePluginLog p_aplActivePluginLog, IPluginOrderLog p_polPluginOrderLog, IModRepository p_mrpModRepository, ModManager p_mmgModManager, IPluginManager p_pmgPluginManager, DownloadMonitor p_amtMonitor, ModActivationMonitor p_mamMonitor) { ModInstallLog = p_ilgModInstallLog; ActivePluginLog = p_aplActivePluginLog; PluginOrderLog = p_polPluginOrderLog; ModRepository = p_mrpModRepository; ModManager = p_mmgModManager; PluginManager = p_pmgPluginManager; DownloadMonitor = p_amtMonitor; ModActivationMonitor = p_mamMonitor; }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_modMod">The mod being installed.</param> /// <param name="p_gmdGameMode">The current game mode.</param> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_futFileUtility">The file utility class.</param> /// <param name="p_scxUIContext">The <see cref="SynchronizationContext"/> to use to marshall UI interactions to the UI thread.</param> /// <param name="p_ilgModInstallLog">The install log that tracks mod install info /// for the current game mode</param> /// <param name="p_pmgPluginManager">The plugin manager.</param> /// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param> /// <param name="p_rolActiveMods">The list of active mods.</param> 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 <IMod> p_rolActiveMods, ModManager p_mmModManager) { Mod = p_modMod; GameMode = p_gmdGameMode; EnvironmentInfo = p_eifEnvironmentInfo; FileUtility = p_futFileUtility; UIContext = p_scxUIContext; ModInstallLog = p_ilgModInstallLog; PluginManager = p_pmgPluginManager; m_dlgOverwriteConfirmationDelegate = p_dlgOverwriteConfirmationDelegate; ActiveMods = p_rolActiveMods; m_mmModManager = p_mmModManager; }
/// <summary> /// A simple constructor that initializes the object with its dependencies. /// </summary> /// <param name="p_gmdGameMode">The current game mode.</param> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_mrpModRepository">The mod repository from which to get mods and mod metadata.</param> /// <param name="p_dmrMonitor">The download monitor to use to track task progress.</param> /// <param name="p_frgFormatRegistry">The <see cref="IModFormatRegistry"/> that contains the list /// of supported <see cref="IModFormat"/>s.</param> /// <param name="p_mdrManagedModRegistry">The <see cref="ModRegistry"/> that contains the list /// of managed <see cref="IMod"/>s.</param> /// <param name="p_futFileUtility">The file utility class.</param> /// <param name="p_scxUIContext">The <see cref="SynchronizationContext"/> to use to marshall UI interactions to the UI thread.</param> /// <param name="p_ilgInstallLog">The install log tracking mod activations for the current game mode.</param> /// <param name="p_pmgPluginManager">The plugin manager to use to work with plugins.</param> private ModManager(IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, IModRepository p_mrpModRepository, DownloadMonitor p_dmrMonitor, ActivateModsMonitor p_ammMonitor, IModFormatRegistry p_frgFormatRegistry, ModRegistry p_mdrManagedModRegistry, FileUtil p_futFileUtility, SynchronizationContext p_scxUIContext, IInstallLog p_ilgInstallLog, IPluginManager p_pmgPluginManager) { GameMode = p_gmdGameMode; EnvironmentInfo = p_eifEnvironmentInfo; m_rmmReadMeManager = new ReadMeManager(EnvironmentInfo.Settings.ModFolder[GameMode.ModeId]); ModRepository = p_mrpModRepository; FormatRegistry = p_frgFormatRegistry; ManagedModRegistry = p_mdrManagedModRegistry; InstallationLog = p_ilgInstallLog; InstallerFactory = new ModInstallerFactory(p_gmdGameMode, p_eifEnvironmentInfo, p_futFileUtility, p_scxUIContext, p_ilgInstallLog, p_pmgPluginManager, this); DownloadMonitor = p_dmrMonitor; ActivateModsMonitor = p_ammMonitor; ModAdditionQueue = new AddModQueue(p_eifEnvironmentInfo, this); AutoUpdater = new AutoUpdater(p_mrpModRepository, p_mdrManagedModRegistry, p_eifEnvironmentInfo); LoginTask = new LoginFormTask(this); }
/// <summary> /// A simple constructor that initializes the object with its dependencies. /// </summary> public ProfileSwitchSetupTask(ReadOnlyObservableList <IMod> modsToDeactivate, List <IMod> modsToInstall, IProfileManager profileManager, IModProfile profileToInstall, IModProfile profileToSwitch, IInstallLog installLog, ModInstallerFactory modInstallerFactory, VirtualModActivator virtualModActivator, string scriptedLogPath, bool filesOnly, ConfirmActionMethod confirmActionMethod, ConfirmItemOverwriteDelegate overwriteConfirmationDelegate) { _installLog = installLog; _modInstallerFactory = modInstallerFactory; _modsToDeactivate = modsToDeactivate; VirtualModActivator = virtualModActivator; _logPath = scriptedLogPath; _filesOnly = filesOnly; _profileToInstall = profileToInstall; _profileToSwitch = profileToSwitch; _profileManager = profileManager; _modsToInstall = modsToInstall; _confirmMethod = confirmActionMethod; _overwriteConfirmationDelegate = overwriteConfirmationDelegate; }
/// <summary> /// A simple constructor that initializes the object with its dependencies. /// </summary> /// <param name="p_gmiGameModeInfo">The environment info of the current game mode.</param> /// <param name="p_modMod">The mod being installed.</param> /// <param name="p_ilgInstallLog">The install log to use to log file installations.</param> /// <param name="p_pmgPluginManager">The plugin manager.</param> /// <param name="p_dfuDataFileUtility">The utility class to use to work with data files.</param> /// <param name="p_tfmFileManager">The transactional file manager to use to interact with the file system.</param> /// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param> /// <param name="p_UsesPlugins">Whether the file is a mod or a plugin.</param> public ModFileInstaller(IGameModeEnvironmentInfo p_gmiGameModeInfo, IMod p_modMod, IInstallLog p_ilgInstallLog, IPluginManager p_pmgPluginManager, IDataFileUtil p_dfuDataFileUtility, TxFileManager p_tfmFileManager, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate, bool p_UsesPlugins, string p_extractPath, IEnumerable <string> p_stopFolders) { GameModeInfo = p_gmiGameModeInfo; Mod = p_modMod; InstallLog = p_ilgInstallLog; PluginManager = p_pmgPluginManager; DataFileUtility = p_dfuDataFileUtility; TransactionalFileManager = p_tfmFileManager; TargetFiles = new Dictionary <string, ArchiveFileInfo>(); m_dlgOverwriteConfirmationDelegate = p_dlgOverwriteConfirmationDelegate ?? ((s, b, m) => OverwriteResult.No); IsPlugin = p_UsesPlugins; ExtractPath = p_extractPath; StopFolders = new List <string>(p_stopFolders); if (!StopFolders.Contains("fomod", StringComparer.OrdinalIgnoreCase)) { StopFolders.Add("fomod"); } Archive archive = new Archive(Mod.ModArchivePath); Prefix = FindPathPrefix(archive); m_dicFileInfo = new Dictionary <string, ArchiveFileInfo>(StringComparer.OrdinalIgnoreCase); m_strFiles = new List <string>(); LoadFileIndices(); }
/// <summary> /// A simple constructor that initializes the object with its dependencies. /// </summary> /// <param name="p_gmiGameModeInfo">The environment info of the current game mode.</param> /// <param name="p_modMod">The mod being installed.</param> /// <param name="p_ilgInstallLog">The install log to use to log file installations.</param> /// <param name="p_tfmFileManager">The transactional file manager to use to interact with the file system.</param> /// <param name="p_futFileUtility">The file utility class.</param> /// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param> public GamebryoGameSpecificValueUpgradeInstaller(IMod p_modMod, IGameModeEnvironmentInfo p_gmiGameModeInfo, IInstallLog p_ilgInstallLog, TxFileManager p_tfmFileManager, FileUtil p_futFileUtility, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate) : base(p_modMod, p_gmiGameModeInfo, p_ilgInstallLog, p_tfmFileManager, p_futFileUtility, p_dlgOverwriteConfirmationDelegate) { OriginallyInstalledEdits = new Set <string>(); OriginallyInstalledEdits.AddRange(InstallLog.GetInstalledGameSpecificValueEdits(Mod)); }
/// <inheritdoc /> public IInstallLog ReInitialize(string logPath) { _instance = new InstallLog(ManagedModRegistry, GameMode, ModInstallDirectory, logPath); return(_instance); }
/// <summary> /// A simple constructor that initializes the object with its dependencies. /// </summary> public DeactivateMultipleModsTask(ReadOnlyObservableList <IMod> p_rolModList, IInstallLog p_iilInstallLog, ModInstallerFactory p_mifModInstallerFactory) { m_iilInstallLog = p_iilInstallLog; m_mifModInstallerFactory = p_mifModInstallerFactory; m_rolModList = p_rolModList; }
/// <summary> /// A simple constructor that initializes the object with its dependencies. /// </summary> public DeactivateMultipleModsTask(ReadOnlyObservableList<IMod> p_rolModList, IInstallLog p_iilInstallLog, ModInstallerFactory p_mifModInstallerFactory) { m_iilInstallLog = p_iilInstallLog; m_mifModInstallerFactory = p_mifModInstallerFactory; m_rolModList = p_rolModList; }
/// <summary> /// Initializes the install log. /// </summary> /// <param name="p_mdrManagedModRegistry">The <see cref="ModRegistry"/> that contains the list /// of managed <see cref="IMod"/>s.</param> /// <param name="p_strModInstallDirectory">The path of the directory where all of the mods are installed.</param> /// <param name="p_strLogPath">The path from which to load the install log information.</param> /// <returns>The initialized install log.</returns> /// <exception cref="InvalidOperationException">Thrown if the install log has already /// been initialized.</exception> public static IInstallLog Initialize(ModRegistry p_mdrManagedModRegistry, string p_strModInstallDirectory, string p_strLogPath) { if (m_ilgCurrent != null) throw new InvalidOperationException("The Install Log has already been initialized."); m_ilgCurrent = new InstallLog(p_mdrManagedModRegistry, p_strModInstallDirectory, p_strLogPath); return m_ilgCurrent; }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_modMod">The mod being installed.</param> /// <param name="p_gmdGameMode">The current game mode.</param> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_ilgModInstallLog">The install log that tracks mod install info /// for the current game mode</param> /// <param name="p_pmgPluginManager">The plugin manager.</param> /// <param name="p_rolActiveMods">The list of active mods.</param> public ModDeleter(IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, IInstallLog p_ilgModInstallLog, IPluginManager p_pmgPluginManager, ReadOnlyObservableList<IMod> p_rolActiveMods) : base(p_modMod, p_gmdGameMode, p_eifEnvironmentInfo, p_ilgModInstallLog, p_pmgPluginManager, p_rolActiveMods, null) { }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_ilgInstallLog">The install log to use to log file installations.</param> /// <param name="p_mifInstallerFactory">The factory to use to create mod installers.</param> public ModActivator(IInstallLog p_ilgInstallLog, ModInstallerFactory p_mifInstallerFactory) { InstallationLog = p_ilgInstallLog; InstallerFactory = p_mifInstallerFactory; }
/// <summary> /// A simpell constructor that initializes the object with the given services. /// </summary> /// <param name="p_ilgModInstallLog">The install log that tracks mod install info for the current game mode.</param> /// <param name="p_aplActivePluginLog">The <see cref="ActivePluginLog"/> tracking plugin activations for the current game mode.</param> /// <param name="p_polPluginOrderLog">The <see cref="IPluginOrderLog"/> tracking plugin order for the current game mode.</param> /// <param name="p_mrpModRepository">The repository we are logging in to.</param> /// <param name="p_mmgModManager">The mod manager to use to manage mods.</param> /// <param name="p_pmgPluginManager">The manager to use to manage plugins.</param> /// <param name="p_amtMonitor">The download monitor to use to manage the monitored activities.</param> /// <param name="p_umgUpdateManager">The update manager to use to perform updates.</param> public ServiceManager(IInstallLog p_ilgModInstallLog, ActivePluginLog p_aplActivePluginLog, IPluginOrderLog p_polPluginOrderLog, IModRepository p_mrpModRepository, ModManager p_mmgModManager, IPluginManager p_pmgPluginManager, DownloadMonitor p_amtMonitor, ActivateModsMonitor p_ammMonitor, UpdateManager p_umgUpdateManager) { ModInstallLog = p_ilgModInstallLog; ActivePluginLog = p_aplActivePluginLog; PluginOrderLog = p_polPluginOrderLog; ModRepository = p_mrpModRepository; ModManager = p_mmgModManager; PluginManager = p_pmgPluginManager; DownloadMonitor = p_amtMonitor; UpdateManager = p_umgUpdateManager; ActivateModsMonitor = p_ammMonitor; }
/// <inheritdoc /> public void Release() { _instance = null; }
/// <summary> /// This disposes of the install log, allowing it to be re-initialized. /// </summary> public void Release() { m_ilgCurrent = null; }
/// <summary> /// A simple constructor that initializes the object with its dependencies. /// </summary> /// <param name="p_modMod">The mod being installed.</param> /// <param name="p_ilgInstallLog">The install log to use to log file installations.</param> /// <param name="p_tfmFileManager">The transactional file manager to use to interact with the file system.</param> /// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param> public IniUpgradeInstaller(IMod p_modMod, IInstallLog p_ilgInstallLog, IVirtualModActivator p_ivaVirtualModActivator, TxFileManager p_tfmFileManager, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate) : base(p_modMod, p_ilgInstallLog, p_ivaVirtualModActivator, p_tfmFileManager, p_dlgOverwriteConfirmationDelegate) { OriginallyInstalledEdits = new Set <IniEdit>(); OriginallyInstalledEdits.AddRange(InstallLog.GetInstalledIniEdits(Mod)); }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_modMod">The mod being installed.</param> /// <param name="p_gmdGameMode">The current game mode.</param> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_ilgModInstallLog">The install log that tracks mod install info /// for the current game mode</param> /// <param name="p_pmgPluginManager">The plugin manager.</param> /// <param name="p_rolActiveMods">The list of active mods.</param> public ModUninstaller(IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, IInstallLog p_ilgModInstallLog, IPluginManager p_pmgPluginManager, ReadOnlyObservableList<IMod> p_rolActiveMods, ModManager p_mmModManager) { Mod = p_modMod; GameMode = p_gmdGameMode; EnvironmentInfo = p_eifEnvironmentInfo; ModInstallLog = p_ilgModInstallLog; PluginManager = p_pmgPluginManager; ActiveMods = p_rolActiveMods; m_mmModManager = p_mmModManager; }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_modMod">The mod being installed.</param> /// <param name="p_gmdGameMode">The current game mode.</param> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_ilgModInstallLog">The install log that tracks mod install info /// for the current game mode</param> /// <param name="p_pmgPluginManager">The plugin manager.</param> /// <param name="p_rolActiveMods">The list of active mods.</param> public ModDeleter(IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, IInstallLog p_ilgModInstallLog, IPluginManager p_pmgPluginManager, ReadOnlyObservableList <IMod> p_rolActiveMods) : base(p_modMod, p_gmdGameMode, p_eifEnvironmentInfo, p_ilgModInstallLog, p_pmgPluginManager, p_rolActiveMods, null) { }
/// <summary> /// Upgrade mods that have been manually replaced since the last time the mod /// manager ran. /// </summary> /// <param name="p_ilgInstallLog">The install log to use to log file installations.</param> /// <param name="p_mmgModManager">The mod manager to use to upgrade any replaced mods.</param> protected void UpgradeMismatchedVersionMods(IInstallLog p_ilgInstallLog, ModManager p_mmgModManager) { UpgradeMismatchedVersionScanner uvsScanner = new UpgradeMismatchedVersionScanner(p_ilgInstallLog, p_mmgModManager, ConfirmMismatchedVersionModUpgrade, ConfirmItemOverwrite); uvsScanner.TaskStarted += new EventHandler<EventArgs<IBackgroundTask>>(TaskSet_TaskStarted); uvsScanner.Scan(); WaitForSet(uvsScanner, false); uvsScanner.TaskStarted -= new EventHandler<EventArgs<IBackgroundTask>>(TaskSet_TaskStarted); }
/// <summary> /// Gets the installer to use to upgrade game specific values. /// </summary> /// <param name="p_modMod">The mod being upgraded.</param> /// <param name="p_ilgInstallLog">The install log to use to log the installation of the game specific values.</param> /// <param name="p_tfmFileManager">The transactional file manager to use to interact with the file system.</param> /// <returns>The installer to use to manage game specific values, or <c>null</c> if the game mode does not /// install any game specific values.</returns> /// <param name="p_futFileUtility">The file utility class.</param> /// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param> public override IGameSpecificValueInstaller GetGameSpecificValueUpgradeInstaller(IMod p_modMod, IInstallLog p_ilgInstallLog, TxFileManager p_tfmFileManager, FileUtil p_futFileUtility, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate) { return(new GamebryoGameSpecificValueInstaller(p_modMod, GameModeEnvironmentInfo, p_ilgInstallLog, p_tfmFileManager, p_futFileUtility, p_dlgOverwriteConfirmationDelegate)); }
/// <summary> /// A simple constructor that initializes the object with its dependencies. /// </summary> /// <param name="p_gmiGameModeInfo">The environment info of the current game mode.</param> /// <param name="p_modMod">The mod being installed.</param> /// <param name="p_ilgInstallLog">The install log to use to log file installations.</param> /// <param name="p_tfmFileManager">The transactional file manager to use to interact with the file system.</param> /// <param name="p_futFileUtility">The file utility class.</param> /// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param> public GamebryoGameSpecificValueUpgradeInstaller(IMod p_modMod, IGameModeEnvironmentInfo p_gmiGameModeInfo, IInstallLog p_ilgInstallLog, TxFileManager p_tfmFileManager, FileUtil p_futFileUtility, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate) :base(p_modMod, p_gmiGameModeInfo, p_ilgInstallLog, p_tfmFileManager, p_futFileUtility, p_dlgOverwriteConfirmationDelegate) { OriginallyInstalledEdits = new Set<string>(); OriginallyInstalledEdits.AddRange(InstallLog.GetInstalledGameSpecificValueEdits(Mod)); }
/// <summary> /// Initializes the singleton intances of the mod manager. /// </summary> /// <param name="p_gmdGameMode">The current game mode.</param> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_mrpModRepository">The mod repository from which to get mods and mod metadata.</param> /// <param name="p_dmrMonitor">The download monitor to use to track task progress.</param> /// <param name="p_mamMonitor">The mod activation monitor to use to track task progress.</param> /// <param name="p_frgFormatRegistry">The <see cref="IModFormatRegistry"/> that contains the list /// of supported <see cref="IModFormat"/>s.</param> /// <param name="p_mrgModRegistry">The <see cref="ModRegistry"/> that contains the list /// of managed <see cref="IMod"/>s.</param> /// <param name="p_futFileUtility">The file utility class.</param> /// <param name="p_scxUIContext">The <see cref="SynchronizationContext"/> to use to marshall UI interactions to the UI thread.</param> /// <param name="p_ilgInstallLog">The install log tracking mod activations for the current game mode.</param> /// <param name="p_pmgPluginManager">The plugin manager to use to work with plugins.</param> /// <returns>The initialized mod manager.</returns> /// <exception cref="InvalidOperationException">Thrown if the mod manager has already /// been initialized.</exception> public static ModManager Initialize(IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, IModRepository p_mrpModRepository, DownloadMonitor p_dmrMonitor, ModActivationMonitor p_mamMonitor, IModFormatRegistry p_frgFormatRegistry, ModRegistry p_mrgModRegistry, FileUtil p_futFileUtility, SynchronizationContext p_scxUIContext, IInstallLog p_ilgInstallLog, IPluginManager p_pmgPluginManager) { if (m_mmgCurrent != null) { throw new InvalidOperationException("The Mod Manager has already been initialized."); } m_mmgCurrent = new ModManager(p_gmdGameMode, p_eifEnvironmentInfo, p_mrpModRepository, p_dmrMonitor, p_mamMonitor, p_frgFormatRegistry, p_mrgModRegistry, p_futFileUtility, p_scxUIContext, p_ilgInstallLog, p_pmgPluginManager); return(m_mmgCurrent); }
/// <summary> /// A simple constructor that initializes the object with its dependencies. /// </summary> /// <param name="p_gmiGameModeInfo">The environment info of the current game mode.</param> /// <param name="p_modMod">The mod being installed.</param> /// <param name="p_ilgInstallLog">The install log to use to log file installations.</param> /// <param name="p_tfmFileManager">The transactional file manager to use to interact with the file system.</param> /// <param name="p_futFileUtility">The file utility class.</param> /// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param> public GamebryoGameSpecificValueInstaller(IMod p_modMod, IGameModeEnvironmentInfo p_gmiGameModeInfo, IInstallLog p_ilgInstallLog, TxFileManager p_tfmFileManager, FileUtil p_futFileUtility, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate) { TouchedFiles = new Set<string>(StringComparer.OrdinalIgnoreCase); Mod = p_modMod; GameModeInfo = p_gmiGameModeInfo; InstallLog = p_ilgInstallLog; TransactionalFileManager = p_tfmFileManager; FileUtility = p_futFileUtility; m_dlgOverwriteConfirmationDelegate = p_dlgOverwriteConfirmationDelegate; }
/// <summary> /// Gets the installer to use to install game specific values. /// </summary> /// <param name="p_modMod">The mod being installed.</param> /// <param name="p_ilgInstallLog">The install log to use to log the installation of the game specific values.</param> /// <param name="p_tfmFileManager">The transactional file manager to use to interact with the file system.</param> /// <returns>The installer to use to manage game specific values, or <c>null</c> if the game mode does not /// install any game specific values.</returns> /// <param name="p_futFileUtility">The file utility class.</param> /// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param> public abstract IGameSpecificValueInstaller GetGameSpecificValueInstaller(IMod p_modMod, IInstallLog p_ilgInstallLog, TxFileManager p_tfmFileManager, FileUtil p_futFileUtility, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate);
/// <summary> /// A simple constructor that initializes the object with its dependencies. /// </summary> /// <param name="p_gmiGameModeInfo">The environment info of the current game mode.</param> /// <param name="p_modMod">The mod being installed.</param> /// <param name="p_ilgInstallLog">The install log to use to log file installations.</param> /// <param name="p_pmgPluginManager">The plugin manager.</param> /// <param name="p_dfuDataFileUtility">The utility class to use to work with data files.</param> /// <param name="p_tfmFileManager">The transactional file manager to use to interact with the file system.</param> /// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param> /// <param name="p_UsesPlugins">Game using plugin or mods (True for plugins).</param> public ModFileUpgradeInstaller(IGameModeEnvironmentInfo p_gmiGameModeInfo, IMod p_modMod, IInstallLog p_ilgInstallLog, IPluginManager p_pmgPluginManager, IDataFileUtil p_dfuDataFileUtility, TxFileManager p_tfmFileManager, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate, bool p_UsesPlugins) : base(p_gmiGameModeInfo, p_modMod, p_ilgInstallLog, p_pmgPluginManager, p_dfuDataFileUtility, p_tfmFileManager, p_dlgOverwriteConfirmationDelegate, p_UsesPlugins, null) { OriginallyInstalledFiles = new Set <string>(StringComparer.OrdinalIgnoreCase); foreach (string strFile in InstallLog.GetInstalledModFiles(Mod)) { OriginallyInstalledFiles.Add(strFile.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar)); } }
/// <summary> /// A simple constructor that initializes the object with its dependencies. /// </summary> /// <param name="p_modMod">The mod being installed.</param> /// <param name="p_ilgInstallLog">The install log to use to log file installations.</param> /// <param name="p_tfmFileManager">The transactional file manager to use to interact with the file system.</param> /// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param> public IniUpgradeInstaller(IMod p_modMod, IInstallLog p_ilgInstallLog, TxFileManager p_tfmFileManager, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate) : base(p_modMod, p_ilgInstallLog, p_tfmFileManager, p_dlgOverwriteConfirmationDelegate) { OriginallyInstalledEdits = new Set<IniEdit>(); OriginallyInstalledEdits.AddRange(InstallLog.GetInstalledIniEdits(Mod)); }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_modOldMod">The mod from which to upgrade.</param> /// <param name="p_modNewMod">The mod to which to upgrade.</param> /// <param name="p_gmdGameMode">The current game mode.</param> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_futFileUtility">The file utility class.</param> /// <param name="p_scxUIContext">The <see cref="SynchronizationContext"/> to use to marshall UI interactions to the UI thread.</param> /// <param name="p_ilgModInstallLog">The install log that tracks mod install info /// for the current game mode</param> /// <param name="p_pmgPluginManager">The plugin manager.</param> /// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param> public ModUpgrader(IMod p_modOldMod, IMod p_modNewMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, FileUtil p_futFileUtility, SynchronizationContext p_scxUIContext, IInstallLog p_ilgModInstallLog, IPluginManager p_pmgPluginManager, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate) : base(p_modNewMod, p_gmdGameMode, p_eifEnvironmentInfo, p_futFileUtility, p_scxUIContext, p_ilgModInstallLog, p_pmgPluginManager, p_dlgOverwriteConfirmationDelegate, null, null) { OldMod = p_modOldMod; }
/// <summary> /// Gets the installer to use to install game specific values. /// </summary> /// <param name="p_modMod">The mod being installed.</param> /// <param name="p_ilgInstallLog">The install log to use to log the installation of the game specific values.</param> /// <param name="p_tfmFileManager">The transactional file manager to use to interact with the file system.</param> /// <returns>The installer to use to manage game specific values, or <c>null</c> if the game mode does not /// install any game specific values.</returns> /// <param name="p_futFileUtility">The file utility class.</param> /// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param> public override IGameSpecificValueInstaller GetGameSpecificValueInstaller(IMod p_modMod, IInstallLog p_ilgInstallLog, TxFileManager p_tfmFileManager, FileUtil p_futFileUtility, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate) { return null; }
/// <summary> /// Gets the installer to use to upgrade game specific values. /// </summary> /// <param name="p_modMod">The mod being upgraded.</param> /// <param name="p_ilgInstallLog">The install log to use to log the installation of the game specific values.</param> /// <param name="p_tfmFileManager">The transactional file manager to use to interact with the file system.</param> /// <returns>The installer to use to manage game specific values, or <c>null</c> if the game mode does not /// install any game specific values.</returns> /// <param name="p_futFileUtility">The file utility class.</param> /// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param> public abstract IGameSpecificValueInstaller GetGameSpecificValueUpgradeInstaller(IMod p_modMod, IInstallLog p_ilgInstallLog, TxFileManager p_tfmFileManager, FileUtil p_futFileUtility, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate);
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_modOldMod">The mod from which to upgrade.</param> /// <param name="p_modNewMod">The mod to which to upgrade.</param> /// <param name="p_gmdGameMode">The current game mode.</param> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_futFileUtility">The file utility class.</param> /// <param name="p_scxUIContext">The <see cref="SynchronizationContext"/> to use to marshall UI interactions to the UI thread.</param> /// <param name="p_ilgModInstallLog">The install log that tracks mod install info /// for the current game mode</param> /// <param name="p_pmgPluginManager">The plugin manager.</param> /// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param> public ModUpgrader(IMod p_modOldMod, IMod p_modNewMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, FileUtil p_futFileUtility, SynchronizationContext p_scxUIContext, IInstallLog p_ilgModInstallLog, IPluginManager p_pmgPluginManager, IVirtualModActivator p_ivaVirtualModActivator, IProfileManager p_ipmProfileManager, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate) : base(p_modNewMod, p_gmdGameMode, p_eifEnvironmentInfo, p_futFileUtility, p_scxUIContext, p_ilgModInstallLog, p_pmgPluginManager, p_ivaVirtualModActivator, p_ipmProfileManager, p_dlgOverwriteConfirmationDelegate, null) { OldMod = p_modOldMod; }
/// <summary> /// Gets the installer to use to upgrade game specific values. /// </summary> /// <param name="p_modMod">The mod being upgraded.</param> /// <param name="p_ilgInstallLog">The install log to use to log the installation of the game specific values.</param> /// <param name="p_tfmFileManager">The transactional file manager to use to interact with the file system.</param> /// <returns>The installer to use to manage game specific values, or <c>null</c> if the game mode does not /// install any game specific values.</returns> /// <param name="p_futFileUtility">The file utility class.</param> /// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param> public override IGameSpecificValueInstaller GetGameSpecificValueUpgradeInstaller(IMod p_modMod, IInstallLog p_ilgInstallLog, TxFileManager p_tfmFileManager, FileUtil p_futFileUtility, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate) { return new GamebryoGameSpecificValueInstaller(p_modMod, GameModeEnvironmentInfo, p_ilgInstallLog, p_tfmFileManager, p_futFileUtility, p_dlgOverwriteConfirmationDelegate); }
/// <summary> /// Gets the installer to use to upgrade game specific values. /// </summary> /// <param name="p_modMod">The mod being upgraded.</param> /// <param name="p_ilgInstallLog">The install log to use to log the installation of the game specific values.</param> /// <param name="p_tfmFileManager">The transactional file manager to use to interact with the file system.</param> /// <returns>The installer to use to manage game specific values, or <c>null</c> if the game mode does not /// install any game specific values.</returns> /// <param name="p_futFileUtility">The file utility class.</param> /// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param> public override IGameSpecificValueInstaller GetGameSpecificValueUpgradeInstaller(IMod p_modMod, IInstallLog p_ilgInstallLog, TxFileManager p_tfmFileManager, FileUtil p_futFileUtility, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate) { return(null); }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_modMod">The mod being installed.</param> /// <param name="p_gmdGameMode">The current game mode.</param> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_futFileUtility">The file utility class.</param> /// <param name="p_scxUIContext">The <see cref="SynchronizationContext"/> to use to marshall UI interactions to the UI thread.</param> /// <param name="p_ilgModInstallLog">The install log that tracks mod install info /// for the current game mode</param> /// <param name="p_pmgPluginManager">The plugin manager.</param> /// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param> /// <param name="p_rolActiveMods">The list of active mods.</param> 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<IMod> p_rolActiveMods, ModManager p_mmModManager) { Mod = p_modMod; GameMode = p_gmdGameMode; EnvironmentInfo = p_eifEnvironmentInfo; FileUtility = p_futFileUtility; UIContext = p_scxUIContext; ModInstallLog = p_ilgModInstallLog; PluginManager = p_pmgPluginManager; m_dlgOverwriteConfirmationDelegate = p_dlgOverwriteConfirmationDelegate; ActiveMods = p_rolActiveMods; m_mmModManager = p_mmModManager; }