cli: info

This commit is contained in:
2025-11-23 11:39:56 +01:00
parent db108fe36e
commit cbd4b1c346
2 changed files with 18 additions and 9 deletions

View File

@@ -1,5 +1,7 @@
using Castle.Core.Logging; using System.Reflection;
using Castle.Core.Logging;
using ModpackUpdater.Manager; using ModpackUpdater.Manager;
using Pilz.Extensions;
namespace ModpackUpdater.Apps.Client; namespace ModpackUpdater.Apps.Client;
@@ -15,11 +17,24 @@ public static class Program
{ {
Options = new Options(args); Options = new Options(args);
if (Options.Help) if (Options.Help)
{
DrawInfo();
Options.DrawHelp(); Options.DrawHelp();
else return;
}
if (!Options.Silent)
DrawInfo();
InstallWithoutGui(Options.UpdateOptions, Options.Silent); InstallWithoutGui(Options.UpdateOptions, Options.Silent);
} }
private static void DrawInfo()
{
Console.WriteLine("Minecraft Modpack Updater CLI");
Console.WriteLine("Version " + Assembly.GetExecutingAssembly().GetAppVersion().ToShortString());
Console.WriteLine("------------------------------");
}
private static void InstallWithoutGui(UpdateCheckOptionsAdv updateOptions, bool silent) private static void InstallWithoutGui(UpdateCheckOptionsAdv updateOptions, bool silent)
{ {
var info = ModpackInfo.TryLoad(updateOptions.ProfileFolder); var info = ModpackInfo.TryLoad(updateOptions.ProfileFolder);

View File

@@ -143,10 +143,4 @@
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Reference Include="Pilz">
<HintPath>..\..\..\.nuget\packages\pilz\2.6.1\lib\net8.0\Pilz.dll</HintPath>
</Reference>
</ItemGroup>
</Project> </Project>