Пример #1
0
 public ModernForgeInstaller(CoreLocator locator, string mcVersion, string mcVersionId, string javaPath, string forgeInstallerPackagePath)
     : base(locator)
 {
     this.McVersion   = mcVersion;
     this.McVersionId = mcVersionId;
     this.JavaPath    = javaPath;
     this.ForgeInstallerPackagePath = forgeInstallerPackagePath;
 }
Пример #2
0
 public OptiFineInstaller(CoreLocator locator, string mcVersion, string mcVersionId, string javaPath, string optiFineInstallerPackagePath)
     : base(locator)
 {
     this.OptiFineInstallerPackagePath = optiFineInstallerPackagePath;
     this.McVersion   = mcVersion;
     this.McVersionId = mcVersionId;
     this.JavaPath    = javaPath;
 }
Пример #3
0
        static void Main(string[] args)
        {
            #region Forge Installer

            /*
             * var forgeInstaller = new ModernForgeInstaller
             * (new CoreLocator(System.Console.ReadLine()), "1.17.1", "1.17.1", System.Console.ReadLine(), System.Console.ReadLine());
             *
             * var result = forgeInstaller.InstallAsync().GetAwaiter().GetResult();
             * System.Console.ReadLine();
             * return;
             */
            #endregion

            #region Vanllia Installer

            //var install = new VanlliaInstaller(new CoreLocator(System.Console.ReadLine()));
            //string version = System.Console.ReadLine();
            //install.InstallAsync(version).Wait();

            //System.Console.WriteLine($"Install Version:{version} Successfully");
            //System.Console.ReadLine();

            //return;
            #endregion

            HttpHelper.SetTimeout(60000);

            System.Console.Write("Minecraft Path:");
            CoreLocator coreLocator = new CoreLocator(System.Console.ReadLine());
            System.Console.Write("Java Path:");
            string javaPath = System.Console.ReadLine();
            System.Console.Write("Version:");
            string   id   = System.Console.ReadLine();
            GameCore core = coreLocator.GetGameCoreFromId(id);

            #region Authlib-Injector

            /*
             * System.Console.WriteLine("Loading AuthlibInjector...");
             * var injector = new AuthlibInjector("https://skin.greenspray.cn/api/yggdrasil", "C:\\Users\\Admin\\AppData\\Roaming\\.hmcl\\authlib-injector.jar");
             * var vs = await injector.GetArgumentsAsync();
             */

            #endregion

            System.Console.WriteLine("Loading Authenticator...");

            #region YggdrasilAuthenticator

            /*
             *
             * System.Console.Write("Email:");
             * string email = System.Console.ReadLine();
             * System.Console.Write("Password:");
             * string password = System.Console.ReadLine();
             *
             * using var auth = new YggdrasilAuthenticator(email, password);
             * var res = (YggdrasilResponseModel)auth.AuthenticateAsync().GetAwaiter().GetResult().Item1;
             *
             */
            #endregion

            var auth = new MicrosoftAuthenticator(default, client_id, redirect_uri);
Пример #4
0
 public VanlliaInstaller(CoreLocator locator) : base(locator)
 {
 }
Пример #5
0
 public LegacyForgeInstaller(CoreLocator locator, string forgeInstallerPackagePath)
     : base(locator)
 {
     this.ForgeInstallerPackagePath = forgeInstallerPackagePath;
 }
Пример #6
0
 public InstallerBase(CoreLocator locator) => this.CoreLocator = locator;