static void Main(string[] args) { IUser user = new ConsoleUser(false); repoPath = args[0]; repoUrlPrefix = args[1]; githubAccessToken = args[2]; Directory.CreateDirectory(Path.Combine(repoPath, "cache")); NetFileCache netFileCache = new NetFileCache(Path.Combine(repoPath, "cache")); CombinedModFileNormalizer modFileNormalizer = new CombinedModFileNormalizer(new IModFileNormalizer[] { new RarToZipNormalizer(), new SevenZipToZipNormalizer(), new ModZipRootNormalizer() }); ModDirectoryManager manualModDirectoryManager = new ModDirectoryManager(repoUrlPrefix, repoPath, "mods", modFileNormalizer, netFileCache); ModDirectoryManager githubModsDirectoryManager = new ModDirectoryManager(repoUrlPrefix, repoPath, "mods-github", modFileNormalizer, netFileCache); CombinedCfanAggregator combinedAggregator = new CombinedCfanAggregator(new ICfanAggregator[] { new LocalRepositoryAggregator(manualModDirectoryManager), new GithubAggregator(githubModsDirectoryManager, new GithubRepositoriesDataProvider(), githubAccessToken), new FactorioComAggregator(), }); var cfanJsons = combinedAggregator.getAllCfanJsons(user).ToList(); cfanJsons.Where(p => !CfanJson.requiresFactorioComAuthorization(p)).ToList().ForEach(p => saveCfanJson(user, p)); cfanJsons.ForEach(p => saveCfanJson(user, p, v2: true)); createFinalRepositoryTarGz(user); createFinalRepositoryTarGz(user, v2: true); user.RaiseMessage("Done."); }
public FactorioModsComAggregator(ModDirectoryManager localManager, ModDirectoryManager fmmManager) { this.fmmConverter = new CombinedFmmConverter(new List <IFmmConverter>() { new FmmIgnorer(), new FmmSpecialCases(localManager), new FmmDownloader(fmmManager) }); }
public ModListView() { InitializeComponent(); DataContext = this; modDirectoryManager = new ModDirectoryManager(); if (ModListBox.HasItems) { ModListBox.SelectedIndex = 0; } ModListBox.AllowDrop = true; profilesManager = new ProfilesManager(); SetProfilesOptions(); OriginalBannerSource = ModBannerImg.Source; }
public ModListView() { InitializeComponent(); DataContext = this; modDirectoryManager = new ModDirectoryManager(); if (ModListBox.HasItems) { ModListBox.SelectedIndex = 0; } ModListBox.AllowDrop = true; profilesManager = new ProfilesManager(); SetProfilesOptions(); OriginalBannerSource = ModBannerImg.Source; LanguageManager.Instance.LanguageChanged += LanguageChanged; activeMods = "500"; }
public FmmDownloader(ModDirectoryManager fmmManager) { this.fmmManager = fmmManager; }
public GithubAggregator(ModDirectoryManager modDirectoryManager, GithubRepositoriesDataProvider githubRepositoriesDataProvider, string accessToken) { this.githubRepositoriesDataProvider = githubRepositoriesDataProvider; this.modDirectoryManager = modDirectoryManager; this.accessToken = accessToken; }
public LocalRepositoryAggregator(ModDirectoryManager localManager) { this.localManager = localManager; }
public FmmSpecialCases(ModDirectoryManager localManager) { this.localManager = localManager; }