mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
Misc
This commit is contained in:
@@ -58,6 +58,7 @@ namespace ArchiSteamFarm {
|
|||||||
private static readonly TaskCompletionSource<byte> ShutdownResetEvent = new TaskCompletionSource<byte>();
|
private static readonly TaskCompletionSource<byte> ShutdownResetEvent = new TaskCompletionSource<byte>();
|
||||||
|
|
||||||
private static bool ShutdownSequenceInitialized;
|
private static bool ShutdownSequenceInitialized;
|
||||||
|
private static bool SystemRequired;
|
||||||
|
|
||||||
internal static async Task Exit(byte exitCode = 0) {
|
internal static async Task Exit(byte exitCode = 0) {
|
||||||
if (exitCode != 0) {
|
if (exitCode != 0) {
|
||||||
@@ -198,6 +199,8 @@ namespace ArchiSteamFarm {
|
|||||||
ParsePostInitArgs(args);
|
ParsePostInitArgs(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OS.Init(SystemRequired);
|
||||||
|
|
||||||
await ASF.CheckAndUpdateProgram().ConfigureAwait(false);
|
await ASF.CheckAndUpdateProgram().ConfigureAwait(false);
|
||||||
|
|
||||||
await ASF.InitBots().ConfigureAwait(false);
|
await ASF.InitBots().ConfigureAwait(false);
|
||||||
@@ -429,7 +432,6 @@ namespace ArchiSteamFarm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool cryptKeyNext = false;
|
bool cryptKeyNext = false;
|
||||||
bool systemRequired = false;
|
|
||||||
|
|
||||||
foreach (string arg in args) {
|
foreach (string arg in args) {
|
||||||
switch (arg) {
|
switch (arg) {
|
||||||
@@ -456,10 +458,10 @@ namespace ArchiSteamFarm {
|
|||||||
ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningDeprecated, "--service", "--no-restart --process-required --system-required"));
|
ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningDeprecated, "--service", "--no-restart --process-required --system-required"));
|
||||||
RestartAllowed = false;
|
RestartAllowed = false;
|
||||||
ProcessRequired = true;
|
ProcessRequired = true;
|
||||||
systemRequired = true;
|
SystemRequired = true;
|
||||||
break;
|
break;
|
||||||
case "--system-required" when !cryptKeyNext:
|
case "--system-required" when !cryptKeyNext:
|
||||||
systemRequired = true;
|
SystemRequired = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (cryptKeyNext) {
|
if (cryptKeyNext) {
|
||||||
@@ -472,8 +474,6 @@ namespace ArchiSteamFarm {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
OS.Init(systemRequired);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void ParsePreInitArgs(IReadOnlyCollection<string> args) {
|
private static void ParsePreInitArgs(IReadOnlyCollection<string> args) {
|
||||||
|
|||||||
Reference in New Issue
Block a user