Esempio n. 1
0
        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.");
        }
Esempio n. 2
0
 public FactorioModsComAggregator(ModDirectoryManager localManager, ModDirectoryManager fmmManager)
 {
     this.fmmConverter = new CombinedFmmConverter(new List <IFmmConverter>()
     {
         new FmmIgnorer(),
         new FmmSpecialCases(localManager),
         new FmmDownloader(fmmManager)
     });
 }
Esempio n. 3
0
 public ModListView()
 {
     InitializeComponent();
     DataContext         = this;
     modDirectoryManager = new ModDirectoryManager();
     if (ModListBox.HasItems)
     {
         ModListBox.SelectedIndex = 0;
     }
     ModListBox.AllowDrop = true;
     profilesManager      = new ProfilesManager();
     SetProfilesOptions();
     OriginalBannerSource = ModBannerImg.Source;
 }
Esempio n. 4
0
 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";
 }
Esempio n. 5
0
 public FmmDownloader(ModDirectoryManager fmmManager)
 {
     this.fmmManager = fmmManager;
 }
Esempio n. 6
0
 public GithubAggregator(ModDirectoryManager modDirectoryManager, GithubRepositoriesDataProvider githubRepositoriesDataProvider, string accessToken)
 {
     this.githubRepositoriesDataProvider = githubRepositoriesDataProvider;
     this.modDirectoryManager            = modDirectoryManager;
     this.accessToken = accessToken;
 }
Esempio n. 7
0
 public LocalRepositoryAggregator(ModDirectoryManager localManager)
 {
     this.localManager = localManager;
 }
Esempio n. 8
0
 public FmmSpecialCases(ModDirectoryManager localManager)
 {
     this.localManager = localManager;
 }