public Application(IMigrationLocator migrationLocator, IVersionLocator versionLocator, IMigrationStrategy migrationStrategy) { _migrationLocator = migrationLocator; _versionLocator = versionLocator; _migrationStrategy = migrationStrategy; }
/// <summary> /// 核心选项 /// </summary> /// <param name="gameRootPath">游戏根目录,默认为 ./.minecraft </param> /// <param name="javaPath">JAVA地址,默认为自动搜寻所的第一个</param> /// <param name="versionLocator">Version定位器,默认为 JVersionLoacator</param> public LauncherCoreCreationOption(string gameRootPath = null, IVersionLocator versionLocator = null) { GameRootPath = new DirectoryInfo(gameRootPath ?? ".minecraft").FullName; //JavaPath = javaPath ?? SystemTools.FindJava().FirstOrDefault(); JavaPath = MainClass.OtherJava; VersionLocator = versionLocator ?? new JVersionLocator(); if (!Directory.Exists(GameRootPath)) { Directory.CreateDirectory(GameRootPath); } }
/// <summary> /// 构造函数 /// </summary> /// <param name="launchSettings">启动设置</param> /// <param name="launcherProfileParser">Mojang官方launcher_profiles.json适配组件</param> /// <param name="versionLocator"></param> /// <param name="authResult"></param> /// <param name="rootPath"></param> /// <param name="rootVersion"></param> public DefaultLaunchArgumentParser(LaunchSettings launchSettings, ILauncherProfileParser launcherProfileParser, IVersionLocator versionLocator, AuthResult authResult, string rootPath, string rootVersion) { if (launchSettings == null || launcherProfileParser == null) { throw new ArgumentNullException(); } AuthResult = authResult; VersionLocator = versionLocator; RootPath = rootPath; LaunchSettings = launchSettings; LauncherProfileParser = launcherProfileParser; VersionInfo = LaunchSettings.VersionLocator.GetGame(LaunchSettings.Version); GameProfile = LauncherProfileParser.GetGameProfile(LaunchSettings.GameName); ClassPath = string.Join(string.Empty, VersionInfo.Libraries.Select(l => $"{GamePathHelper.GetLibraryPath(launchSettings.GameResourcePath, l.Path.Replace('/', '\\'))};")); ClassPath += string.IsNullOrEmpty(rootVersion) ? GamePathHelper.GetGameExecutablePath(rootPath, launchSettings.Version) : GamePathHelper.GetGameExecutablePath(rootPath, rootVersion); LastAuthResult = LaunchSettings.Authenticator.GetLastAuthResult(); }
public static LauncherCoreCreationOption Create(string gameRootPath = null, string javaPath = null, IVersionLocator versionLocator = null) { return(new LauncherCoreCreationOption(gameRootPath, javaPath, versionLocator)); }
public MigrationRunner(IMigrationLocator migrationLocator, IVersionLocator versionLocator) { _migrationLocator = migrationLocator; _versionLocator = versionLocator; }
public static LauncherCoreCreationOption Create(string gameRootPath = null, string javaPath = null, IVersionLocator versionLocator = null) { return new LauncherCoreCreationOption(gameRootPath, javaPath, versionLocator); }
/// <summary> /// 核心选项 /// </summary> /// <param name="gameRootPath">游戏根目录,默认为 ./.minecraft </param> /// <param name="javaPath">JAVA地址,默认为自动搜寻所的第一个</param> /// <param name="versionLocator">Version定位器,默认为 JVersionLoacator</param> public LauncherCoreCreationOption(string gameRootPath = null, string javaPath = null, IVersionLocator versionLocator = null) { GameRootPath = new DirectoryInfo(gameRootPath ?? ".minecraft").FullName; JavaPath = javaPath ?? SystemTools.FindJava().FirstOrDefault(); VersionLocator = versionLocator ?? new JVersionLocator(); if (!Directory.Exists(GameRootPath)) { Directory.CreateDirectory(GameRootPath); } }
public Application(IMongoRegistrator mongoRegistrator, IMigrationLocator migrationLocator, IVersionLocator versionLocator) { _mongoRegistrator = mongoRegistrator; _migrationLocator = migrationLocator; _versionLocator = versionLocator; }