mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-06 17:10:13 +00:00
Misc
This commit is contained in:
@@ -168,13 +168,15 @@ namespace ArchiSteamFarm {
|
|||||||
Logging.InitLoggers();
|
Logging.InitLoggers();
|
||||||
ASF.ArchiLogger.LogGenericInfo("ASF V" + SharedInfo.Version);
|
ASF.ArchiLogger.LogGenericInfo("ASF V" + SharedInfo.Version);
|
||||||
|
|
||||||
await InitServices().ConfigureAwait(false);
|
await InitGlobalConfigAndLanguage().ConfigureAwait(false);
|
||||||
|
|
||||||
if (!Runtime.IsRuntimeSupported) {
|
if (!Runtime.IsRuntimeSupported) {
|
||||||
ASF.ArchiLogger.LogGenericError(Strings.WarningRuntimeUnsupported);
|
ASF.ArchiLogger.LogGenericError(Strings.WarningRuntimeUnsupported);
|
||||||
await Task.Delay(10 * 1000).ConfigureAwait(false);
|
await Task.Delay(10 * 1000).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await InitGlobalDatabaseAndServices().ConfigureAwait(false);
|
||||||
|
|
||||||
// If debugging is on, we prepare debug directory prior to running
|
// If debugging is on, we prepare debug directory prior to running
|
||||||
if (GlobalConfig.Debug) {
|
if (GlobalConfig.Debug) {
|
||||||
if (Directory.Exists(SharedInfo.DebugDirectory)) {
|
if (Directory.Exists(SharedInfo.DebugDirectory)) {
|
||||||
@@ -207,7 +209,7 @@ namespace ArchiSteamFarm {
|
|||||||
ASF.InitFileWatcher();
|
ASF.InitFileWatcher();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static async Task InitServices() {
|
private static async Task InitGlobalConfigAndLanguage() {
|
||||||
string globalConfigFile = Path.Combine(SharedInfo.ConfigDirectory, SharedInfo.GlobalConfigFileName);
|
string globalConfigFile = Path.Combine(SharedInfo.ConfigDirectory, SharedInfo.GlobalConfigFileName);
|
||||||
|
|
||||||
GlobalConfig = GlobalConfig.Load(globalConfigFile);
|
GlobalConfig = GlobalConfig.Load(globalConfigFile);
|
||||||
@@ -244,7 +246,9 @@ namespace ArchiSteamFarm {
|
|||||||
float translationCompleteness = currentResourceSetCount / (float) defaultResourceSetCount;
|
float translationCompleteness = currentResourceSetCount / (float) defaultResourceSetCount;
|
||||||
ASF.ArchiLogger.LogGenericInfo(string.Format(Strings.TranslationIncomplete, CultureInfo.CurrentCulture.Name, translationCompleteness.ToString("P1")));
|
ASF.ArchiLogger.LogGenericInfo(string.Format(Strings.TranslationIncomplete, CultureInfo.CurrentCulture.Name, translationCompleteness.ToString("P1")));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static async Task InitGlobalDatabaseAndServices() {
|
||||||
string globalDatabaseFile = Path.Combine(SharedInfo.ConfigDirectory, SharedInfo.GlobalDatabaseFileName);
|
string globalDatabaseFile = Path.Combine(SharedInfo.ConfigDirectory, SharedInfo.GlobalDatabaseFileName);
|
||||||
|
|
||||||
if (!File.Exists(globalDatabaseFile)) {
|
if (!File.Exists(globalDatabaseFile)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user