Compare commits

..

No commits in common. "fc6b574f47c004f2494101698ef7ee7e4d4b9705" and "291ff54101857894499e9b7b6064393a37d507cb" have entirely different histories.

4 changed files with 14 additions and 23 deletions

View File

@ -4,8 +4,8 @@
<TargetFramework>net8.0</TargetFramework>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
<Nullable>enable</Nullable>
<AssemblyVersion>2.15.4</AssemblyVersion>
<FileVersion>2.15.4</FileVersion>
<AssemblyVersion>2.15.3</AssemblyVersion>
<FileVersion>2.15.3</FileVersion>
</PropertyGroup>
<ItemGroup>
<AvaloniaResource Include="Assets\**" />

View File

@ -4,8 +4,8 @@
<TargetFramework>net8.0</TargetFramework>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
<Nullable>enable</Nullable>
<AssemblyVersion>2.15.4</AssemblyVersion>
<FileVersion>2.15.4</FileVersion>
<AssemblyVersion>2.15.3</AssemblyVersion>
<FileVersion>2.15.3</FileVersion>
</PropertyGroup>
<ItemGroup>
@ -42,6 +42,8 @@
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\PatchClient.exe" />
<EmbeddedResource Include="..\..\..\..\..\Downloads\PatchClient.exe">
<Link>Resources\PatchClient.exe</Link>
</EmbeddedResource>
</ItemGroup>
</Project>

View File

@ -483,10 +483,10 @@ namespace PatcherUtils
if (sourceFile == null)
{
patchingTokenSource.Cancel();
errorsQueue.Enqueue(new PatchMessage(
$"Failed to find matching source file for '{deltaFile.FullName}'",
PatcherExitCode.MissingFile));
patchingTokenSource.Cancel();
return;
}
@ -495,8 +495,8 @@ namespace PatcherUtils
if (!result.Item1)
{
errorsQueue.Enqueue(new PatchMessage(result.Item2, PatcherExitCode.PatchFailed));
patchingTokenSource.Cancel();
errorsQueue.Enqueue(new PatchMessage(result.Item2, PatcherExitCode.PatchFailed));
return;
}
@ -520,9 +520,9 @@ namespace PatcherUtils
}
catch (Exception ex)
{
patchingTokenSource.Cancel();
PatchLogger.LogException(ex);
errorsQueue.Enqueue(new PatchMessage(ex.Message, PatcherExitCode.PatchFailed));
patchingTokenSource.Cancel();
return;
}
@ -545,9 +545,9 @@ namespace PatcherUtils
}
catch (Exception ex)
{
patchingTokenSource.Cancel();
PatchLogger.LogException(ex);
errorsQueue.Enqueue(new PatchMessage(ex.Message, PatcherExitCode.PatchFailed));
patchingTokenSource.Cancel();
return;
}
@ -573,23 +573,12 @@ namespace PatcherUtils
if (errorsQueue.Count > 0)
{
PatchLogger.LogError($"Error queue entry count: {errorsQueue.Count}");
PatchLogger.LogError("Dequeuing errors");
PatchMessage error = null;
for (int i = 0; i < errorsQueue.Count; i++)
if (!errorsQueue.TryDequeue(out PatchMessage error))
{
if (!errorsQueue.TryDequeue(out error))
{
return new PatchMessage(
"Errors occurred during patching, but we couldn't dequeue them :(\n\nThere may be more information in the log",
PatcherExitCode.PatchFailed);
}
PatchLogger.LogError(error.Message);
return new PatchMessage("Errors occurred during patching, but we couldn't dequeue them :(\n\nThere may be more information in the log", PatcherExitCode.PatchFailed);
}
return error ?? new PatchMessage("Something went wrong :(", PatcherExitCode.PatchFailed);
return error;
}
PatchLogger.LogInfo("::: Patching Complete :::");