Add --minimized command-line argument (#2817)

* Add experimental support for --minimized on Windows

* Simplify the code
This commit is contained in:
Łukasz Domeradzki
2023-02-08 16:11:50 +01:00
committed by GitHub
parent 573080e6c0
commit d3490b4e92
3 changed files with 36 additions and 2 deletions

View File

@@ -71,6 +71,7 @@ internal static class Program {
private static bool IgnoreUnsupportedEnvironment;
private static bool InputCryptkeyManually;
private static bool Minimized;
private static bool SystemRequired;
internal static async Task Exit(byte exitCode = 0) {
@@ -283,7 +284,7 @@ internal static class Program {
return false;
}
OS.CoreInit(SystemRequired);
OS.CoreInit(Minimized, SystemRequired);
Console.Title = SharedInfo.ProgramIdentifier;
ASF.ArchiLogger.LogGenericInfo(SharedInfo.ProgramIdentifier);
@@ -580,6 +581,10 @@ internal static class Program {
case "--INPUT-CRYPTKEY" when noArgumentValueNext():
InputCryptkeyManually = true;
break;
case "--MINIMIZED" when noArgumentValueNext():
Minimized = true;
break;
case "--NETWORK-GROUP" when noArgumentValueNext():
networkGroupNext = true;