cli: info
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
@@ -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>
|
||||||
Reference in New Issue
Block a user