install keys
This commit is contained in:
@@ -62,7 +62,13 @@ public static class Program
|
||||
// Migrate
|
||||
var newConfig = Settings.Get<AppConfig>();
|
||||
newConfig.LastMinecraftProfilePath = legacyConfig.LastMinecraftProfilePath;
|
||||
newConfig.LastConfigFilePath = legacyConfig.LastConfigFilePath;
|
||||
|
||||
if (ModpackInfo.TryLoad(legacyConfig.LastMinecraftProfilePath) is ModpackInfo info)
|
||||
{
|
||||
#pragma warning disable CS0612 // Typ oder Element ist veraltet
|
||||
info.ConfigUrl = legacyConfig.ConfigFilePath;
|
||||
#pragma warning restore CS0612 // Typ oder Element ist veraltet
|
||||
}
|
||||
|
||||
// Ensure save settings
|
||||
settingsManager.Save();
|
||||
@@ -75,6 +81,14 @@ public static class Program
|
||||
{
|
||||
var info = ModpackInfo.TryLoad(updateOptions.ProfileFolder);
|
||||
var config = ModpackConfig.LoadFromUrl(CheckModpackConfigUrl(updateOptions.ModpackConfig, info));
|
||||
|
||||
// Check features
|
||||
if (!string.IsNullOrWhiteSpace(updateOptions.ExtrasKey))
|
||||
info.ExtrasKey = updateOptions.ExtrasKey;
|
||||
if (!string.IsNullOrWhiteSpace(info.ExtrasKey))
|
||||
updateOptions.IncludeExtras = AppFeatures.AllowExtras.IsEnabled(new AllowExtrasFeatureContext(info, config));
|
||||
|
||||
// Check for update
|
||||
var installer = new ModpackInstaller(config, info);
|
||||
var result = installer.Check(updateOptions).Result;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user