diff --git a/src/Wizard.Application/PatchClientDownloader.cs b/src/Wizard.Application/PatchClientDownloader.cs
index 5298f1a..44f27fe 100644
--- a/src/Wizard.Application/PatchClientDownloader.cs
+++ b/src/Wizard.Application/PatchClientDownloader.cs
@@ -10,7 +10,7 @@ public PatchClientDownloader(string wizard101Version)
{
_httpClient = new HttpClient();
_httpClient.BaseAddress =
- new Uri($"http://versionec.us.wizard101.com/WizPatcher/V_{wizard101Version}/");
+ new Uri($"http://versionak.us.wizard101.com/WizPatcher/V_{wizard101Version}/");
_httpClient.Timeout = TimeSpan.FromHours(12);
}
diff --git a/src/Wizard.Application/Wizard.Application.csproj b/src/Wizard.Application/Wizard.Application.csproj
index 019fb60..2394bd3 100644
--- a/src/Wizard.Application/Wizard.Application.csproj
+++ b/src/Wizard.Application/Wizard.Application.csproj
@@ -13,7 +13,7 @@
-
+
diff --git a/src/Wizard.ConsoleInterface/Program.cs b/src/Wizard.ConsoleInterface/Program.cs
index 92e677a..98405d3 100644
--- a/src/Wizard.ConsoleInterface/Program.cs
+++ b/src/Wizard.ConsoleInterface/Program.cs
@@ -8,6 +8,7 @@
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Debug()
.WriteTo.File("logs/app.txt", rollingInterval: RollingInterval.Day)
+ .WriteTo.Console()
.CreateLogger();
try
@@ -18,7 +19,7 @@
Environment.Exit(1);
}
- Console.WriteLine("wizard - the little helper");
+ Log.Information("wizard - the little helper");
var applicationDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!;
var tempPatchFileDirectory = Path.Combine(applicationDirectory, "TempPatchFiles");
@@ -41,29 +42,31 @@
Environment.Exit(1);
}
- Console.WriteLine($"Found Wizard101 installation at location {installPath}");
- Console.WriteLine($"Wizard101 data version is: {wizard101Version}");
+ Log.Information("Found Wizard101 installation at location {InstallPath}", installPath);
+ Log.Information("Wizard101 data version is: {Wizard101Version}", wizard101Version);
directoryManipulator.DestroyGameData();
- Console.WriteLine("Deleted previously installed GameData and ObjectCache for a fresh installation.");
- Console.WriteLine("Downloading LatestFileList.bin to discover all Wizard101 files.");
+ Log.Information("Deleted previously installed GameData and ObjectCache for a fresh installation.");
+ Log.Information("Downloading LatestFileList.bin to discover all Wizard101 files.");
var patchClientDownloader = new PatchClientDownloader(wizard101Version);
await patchClientDownloader.DownloadLatestFileListAsync(tempPatchFileDirectory);
- Console.WriteLine("Downloaded LatestFileList.bin successfully!");
+ Log.Information("Downloaded LatestFileList.bin successfully!");
var latestFileListExtractor =
new LatestFileListExtractor(Path.Combine(tempPatchFileDirectory, "LatestFileList.bin"));
var filesDiscovered = await latestFileListExtractor.ExtractStringsAsync();
- Console.WriteLine($"Discovered {filesDiscovered.Count} downloadable objects from the LatestFileList.bin file.");
+ Log.Information("Discovered {FilesDiscoveredCount} downloadable objects from the LatestFileList.bin file.",
+ filesDiscovered.Count);
var additionalFilesParser = new AdditionalFilesParser(Path.Combine(applicationDirectory, "AdditionalFiles.txt"));
var additionalFiles = await additionalFilesParser.GetAdditionalFilesAsync();
- Console.WriteLine($"Discovered {additionalFiles.Count} downloadable objects from the AdditionalFiles.txt file.");
+ Log.Information("Discovered {AdditionalFilesCount} downloadable objects from the AdditionalFiles.txt file.",
+ additionalFiles.Count);
var allFiles = new List();
allFiles.AddRange(filesDiscovered);
@@ -72,30 +75,32 @@
allFiles = allFiles.Distinct().ToList();
allFiles.Sort();
- Console.WriteLine(
- $"Discovered a total of {allFiles.Count} files to download after merging and removing duplicates.");
+ Log.Information(
+ "Discovered a total of {AllFilesCount} files to download after merging and removing duplicates.",
+ allFiles.Count);
await directoryManipulator.OverrideLocalPackagesListAsync(allFiles);
- Console.WriteLine(
+ Log.Information(
"Deleted previously installed LocalPackagesList for a fresh installation and override with complete list.");
var currentFile = 1;
foreach (var file in allFiles)
{
- Console.WriteLine($"[{currentFile:D4}/{allFiles.Count:D4}] BEGIN {file}");
+ Log.Information("[{CurrentFile:D4}/{AllFilesCount:D4}] BEGIN {File}", currentFile, allFiles.Count, file);
var fileSize = await patchClientDownloader.GetFileSizeAsync(file);
- Console.WriteLine(
- $"[{currentFile:D4}/{allFiles.Count:D4}] BEGIN {file} | File size: {fileSize / (1024.0 * 1024.0):F2}MB");
+ Log.Information(
+ "[{CurrentFile:D4}/{AllFilesCount:D4}] BEGIN {File} | File size: {FileSize:F2}MB", currentFile,
+ allFiles.Count, file, fileSize / (1024.0 * 1024.0));
await patchClientDownloader.DownloadFileAsync(file, Path.Combine(installPath, "Data", "GameData"));
currentFile++;
}
- Console.WriteLine(
+ Log.Information(
"The files were successfully downloaded to the Wizard101 client. Please start up your game and enjoy!~");
}
catch (Exception ex)
diff --git a/src/Wizard.ConsoleInterface/Wizard.ConsoleInterface.csproj b/src/Wizard.ConsoleInterface/Wizard.ConsoleInterface.csproj
index b785447..e827a7a 100644
--- a/src/Wizard.ConsoleInterface/Wizard.ConsoleInterface.csproj
+++ b/src/Wizard.ConsoleInterface/Wizard.ConsoleInterface.csproj
@@ -12,8 +12,9 @@
-
-
+
+
+
diff --git a/tests/Wizard.Application.UnitTests/Wizard.Application.UnitTests.csproj b/tests/Wizard.Application.UnitTests/Wizard.Application.UnitTests.csproj
index a4126a9..a7597d1 100644
--- a/tests/Wizard.Application.UnitTests/Wizard.Application.UnitTests.csproj
+++ b/tests/Wizard.Application.UnitTests/Wizard.Application.UnitTests.csproj
@@ -10,10 +10,16 @@
-
-
-
-
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+