mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-12 22:50:39 +00:00
Misc
This commit is contained in:
18
ArchiSteamFarm/Localization/Strings.Designer.cs
generated
18
ArchiSteamFarm/Localization/Strings.Designer.cs
generated
@@ -1413,6 +1413,15 @@ namespace ArchiSteamFarm.Localization {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Please review our privacy policy section on the wiki if you're concerned about what ASF is in fact doing!.
|
||||
/// </summary>
|
||||
internal static string WarningPrivacyPolicy {
|
||||
get {
|
||||
return ResourceManager.GetString("WarningPrivacyPolicy", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ASF detected unsupported runtime version, program might NOT run correctly in current environment. You're running it at your own risk without support!.
|
||||
/// </summary>
|
||||
@@ -1493,5 +1502,14 @@ namespace ArchiSteamFarm.Localization {
|
||||
return ResourceManager.GetString("WCFStarting", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to It looks like it's your first launch of the program, welcome!.
|
||||
/// </summary>
|
||||
internal static string Welcome {
|
||||
get {
|
||||
return ResourceManager.GetString("Welcome", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -682,4 +682,10 @@ StackTrace:
|
||||
<value>Initializing {0}...</value>
|
||||
<comment>{0} will be replaced by service name that is being initialized</comment>
|
||||
</data>
|
||||
<data name="WarningPrivacyPolicy" xml:space="preserve">
|
||||
<value>Please review our privacy policy section on the wiki if you're concerned about what ASF is in fact doing!</value>
|
||||
</data>
|
||||
<data name="Welcome" xml:space="preserve">
|
||||
<value>It looks like it's your first launch of the program, welcome!</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -162,16 +162,16 @@ namespace ArchiSteamFarm {
|
||||
|
||||
if (!Runtime.IsRuntimeSupported) {
|
||||
ArchiLogger.LogGenericError(Strings.WarningRuntimeUnsupported);
|
||||
Thread.Sleep(10000);
|
||||
await Task.Delay(10 * 1000).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
InitServices();
|
||||
await InitServices().ConfigureAwait(false);
|
||||
|
||||
// If debugging is on, we prepare debug directory prior to running
|
||||
if (GlobalConfig.Debug) {
|
||||
if (Directory.Exists(SharedInfo.DebugDirectory)) {
|
||||
Directory.Delete(SharedInfo.DebugDirectory, true);
|
||||
Thread.Sleep(1000); // Dirty workaround giving Windows some time to sync
|
||||
await Task.Delay(1000).ConfigureAwait(false); // Dirty workaround giving Windows some time to sync
|
||||
}
|
||||
|
||||
Directory.CreateDirectory(SharedInfo.DebugDirectory);
|
||||
@@ -195,22 +195,28 @@ namespace ArchiSteamFarm {
|
||||
ASF.InitFileWatcher();
|
||||
}
|
||||
|
||||
private static void InitServices() {
|
||||
private static async Task InitServices() {
|
||||
string globalConfigFile = Path.Combine(SharedInfo.ConfigDirectory, SharedInfo.GlobalConfigFileName);
|
||||
|
||||
GlobalConfig = GlobalConfig.Load(globalConfigFile);
|
||||
if (GlobalConfig == null) {
|
||||
ArchiLogger.LogGenericError(string.Format(Strings.ErrorGlobalConfigNotLoaded, globalConfigFile));
|
||||
Thread.Sleep(5000);
|
||||
await Task.Delay(5 * 1000).ConfigureAwait(false);
|
||||
Exit(1);
|
||||
}
|
||||
|
||||
string globalDatabaseFile = Path.Combine(SharedInfo.ConfigDirectory, SharedInfo.GlobalDatabaseFileName);
|
||||
|
||||
if (!File.Exists(globalDatabaseFile)) {
|
||||
ArchiLogger.LogGenericInfo(Strings.Welcome);
|
||||
ArchiLogger.LogGenericWarning(Strings.WarningPrivacyPolicy);
|
||||
await Task.Delay(15 * 1000).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
GlobalDatabase = GlobalDatabase.Load(globalDatabaseFile);
|
||||
if (GlobalDatabase == null) {
|
||||
ArchiLogger.LogGenericError(string.Format(Strings.ErrorDatabaseInvalid, globalDatabaseFile));
|
||||
Thread.Sleep(5000);
|
||||
await Task.Delay(5 * 1000).ConfigureAwait(false);
|
||||
Exit(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user