/// <summary> /// A simple construtor that initializes the object with the reqruied dependencies. /// </summary> /// <param name="p_gmiGameModeInfo">The environment info of the current game mode.</param> /// <param name="p_futFileUtility">The file utility class.</param> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> public ModBuilder(IGameModeEnvironmentInfo p_gmiGameModeInfo, IEnvironmentInfo p_eifEnvironmentInfo, FileUtil p_futFileUtility) { GameModeInfo = p_gmiGameModeInfo; EnvironmentInfo = p_eifEnvironmentInfo; FileUtility = p_futFileUtility; OverallProgressMaximum = 4; }
/// <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_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_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 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> /// 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 the given values. /// </summary> /// <param name="p_gmiGameModeInfo">The environment info of the current game mode.</param> /// <param name="p_futFileUtility">The file utility class.</param> public SDPArchives(IGameModeEnvironmentInfo p_gmiGameModeInfo, FileUtil p_futFileUtility) { m_gmiGameModeInfo = p_gmiGameModeInfo; m_futFileUtility = p_futFileUtility; }
/// <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> /// 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> /// 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; }