Exemple #1
0
        public async Task <Process> CreateProcessAsync(MLaunchOption option)
        {
            checkLaunchOption(option);
            var launch = new MLaunch(option);

            return(await Task.Run(launch.GetProcess).ConfigureAwait(false));
        }
Exemple #2
0
        public Process CreateProcess(MLaunchOption option)
        {
            checkLaunchOption(option);
            var launch = new MLaunch(option);

            return(launch.GetProcess());
        }
Exemple #3
0
        public Process Launch(string versionName, MLaunchOption option)
        {
            Process process = CreateProcess(versionName, option);

            process.Start();
            return(process);
        }
Exemple #4
0
        public async Task <Process> LaunchAsync(string versionName, MLaunchOption option)
        {
            Process process = await CreateProcessAsync(versionName, option)
                              .ConfigureAwait(false);

            process.Start();
            return(process);
        }
Exemple #5
0
        public Process CreateProcess(string mcversion, string forgeversion, MLaunchOption option)
        {
            CheckAndDownload(GetVersion(mcversion));

            var versionName = CheckForge(mcversion, forgeversion, option.JavaPath);

            return(CreateProcess(versionName, option));
        }
Exemple #6
0
 private void checkLaunchOption(MLaunchOption option)
 {
     if (option.Path == null)
     {
         option.Path = MinecraftPath;
     }
     if (!string.IsNullOrEmpty(option.JavaPath) && option.StartVersion != null)
     {
         option.StartVersion.JavaBinaryPath = option.JavaPath;
     }
 }
Exemple #7
0
        public Process CreateProcess(MVersion version, MLaunchOption option)
        {
            option.StartVersion = version;

            if (this.FileDownloader != null)
            {
                CheckAndDownload(option.StartVersion);
            }

            return(CreateProcess(option));
        }
Exemple #8
0
        public async Task <Process> CreateProcessAsync(MVersion version, MLaunchOption option)
        {
            option.StartVersion = version;

            if (this.FileDownloader != null)
            {
                await CheckAndDownloadAsync(option.StartVersion).ConfigureAwait(false);
            }

            return(await CreateProcessAsync(option).ConfigureAwait(false));
        }
Exemple #9
0
        public Process CreateProcess(string mcversion, string forgeversion, MLaunchOption option)
        {
            if (string.IsNullOrEmpty(option.JavaPath))
            {
                option.JavaPath = CheckJRE();
            }

            CheckGameFiles(GetVersion(mcversion), false);

            var versionName = CheckForge(mcversion, forgeversion, option.JavaPath);

            UpdateVersions();

            return(CreateProcess(versionName, option));
        }
Exemple #10
0
        public Process CreateProcess(MLaunchOption option)
        {
            if (option.Path == null)
            {
                option.Path = MinecraftPath;
            }

            if (string.IsNullOrEmpty(option.JavaPath))
            {
                option.JavaPath = CheckJRE();
            }

            var launch = new MLaunch(option);

            return(launch.GetProcess());
        }
Exemple #11
0
 public MLaunch(MLaunchOption option)
 {
     option.CheckValid();
     LaunchOption       = option;
     this.minecraftPath = option.GetMinecraftPath();
 }
 public MLaunch(MLaunchOption option)
 {
     option.CheckValid();
     LaunchOption       = option;
     this.MinecraftPath = option.Path;
 }
Exemple #13
0
 public MLaunch(MLaunchOption option)
 {
     option.CheckValid();
     LaunchOption   = option;
     this.Minecraft = option.StartProfile.Minecraft;
 }
Exemple #14
0
 public Process CreateProcess(string versionname, MLaunchOption option)
 {
     option.StartVersion = GetVersion(versionname);
     // CheckGameFiles(option.StartVersion);
     return(CreateProcess(option));
 }
Exemple #15
0
 public MNative(MLaunchOption launchOption)
 {
     this.LaunchOption = launchOption;
 }
Exemple #16
0
 public Process CreateProcess(string versionName, MLaunchOption option)
 => CreateProcess(GetVersion(versionName), option);
Exemple #17
0
        public async Task <Process> CreateProcessAsync(string versionName, MLaunchOption option)
        {
            var version = await GetVersionAsync(versionName).ConfigureAwait(false);

            return(await CreateProcessAsync(version, option).ConfigureAwait(false));
        }