Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: MainPage.PatcherOnFail action #149

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/FFXIVQuickLauncher
Submodule FFXIVQuickLauncher updated 38 files
+1 −10 src/XIVLauncher.Common.Tests/PatchAcquisitionTests.cs
+3 −3 src/XIVLauncher.Common.Unix/UnixSteam.cs
+1 −7 src/XIVLauncher.Common/Game/Patch/Acquisition/AcquisitionMethod.cs
+1 −1 src/XIVLauncher.Common/Game/Patch/Acquisition/PatchAcquisition.cs
+0 −105 src/XIVLauncher.Common/Game/Patch/Acquisition/TorrentPatchAcquisition.cs
+3 −3 src/XIVLauncher.Common/Game/Patch/PatchInstaller.cs
+21 −1 src/XIVLauncher.Common/Game/Patch/PatchList/PatchListEntry.cs
+70 −81 src/XIVLauncher.Common/Game/Patch/PatchManager.cs
+3 −4 src/XIVLauncher.Common/Patching/ZiPatch/Chunk/AddDirectoryChunk.cs
+5 −5 src/XIVLauncher.Common/Patching/ZiPatch/Chunk/ApplyFreeSpaceChunk.cs
+5 −5 src/XIVLauncher.Common/Patching/ZiPatch/Chunk/ApplyOptionChunk.cs
+3 −4 src/XIVLauncher.Common/Patching/ZiPatch/Chunk/DeleteDirectoryChunk.cs
+4 −5 src/XIVLauncher.Common/Patching/ZiPatch/Chunk/EndOfFileChunk.cs
+5 −5 src/XIVLauncher.Common/Patching/ZiPatch/Chunk/FileHeaderChunk.cs
+5 −7 src/XIVLauncher.Common/Patching/ZiPatch/Chunk/SqpkChunk.cs
+3 −3 src/XIVLauncher.Common/Patching/ZiPatch/Chunk/SqpkCommand/SqpkAddData.cs
+3 −3 src/XIVLauncher.Common/Patching/ZiPatch/Chunk/SqpkCommand/SqpkDeleteData.cs
+3 −3 src/XIVLauncher.Common/Patching/ZiPatch/Chunk/SqpkCommand/SqpkExpandData.cs
+3 −3 src/XIVLauncher.Common/Patching/ZiPatch/Chunk/SqpkCommand/SqpkFile.cs
+3 −4 src/XIVLauncher.Common/Patching/ZiPatch/Chunk/SqpkCommand/SqpkHeader.cs
+5 −4 src/XIVLauncher.Common/Patching/ZiPatch/Chunk/SqpkCommand/SqpkIndex.cs
+5 −5 src/XIVLauncher.Common/Patching/ZiPatch/Chunk/SqpkCommand/SqpkPatchInfo.cs
+5 −5 src/XIVLauncher.Common/Patching/ZiPatch/Chunk/SqpkCommand/SqpkTargetInfo.cs
+4 −5 src/XIVLauncher.Common/Patching/ZiPatch/Chunk/XXXXChunk.cs
+34 −13 src/XIVLauncher.Common/Patching/ZiPatch/Chunk/ZiPatchChunk.cs
+14 −11 src/XIVLauncher.Common/Patching/ZiPatch/Util/AdvanceOnDispose.cs
+9 −8 src/XIVLauncher.Common/Patching/ZiPatch/ZiPatchFile.cs
+1 −1 src/XIVLauncher/Resources/CHANGELOG.txt
+1 −0 src/XIVLauncher/Settings/ILauncherSettingsV3.cs
+0 −17 src/XIVLauncher/Windows/FirstTimeSetupWindow.xaml
+1 −47 src/XIVLauncher/Windows/FirstTimeSetupWindow.xaml.cs
+0 −1 src/XIVLauncher/Windows/MainWindow.xaml.cs
+1 −1 src/XIVLauncher/Windows/PatchDownloadDialog.xaml
+27 −72 src/XIVLauncher/Windows/PatchDownloadDialog.xaml.cs
+0 −2 src/XIVLauncher/Windows/SettingsControl.xaml
+1 −2 src/XIVLauncher/Windows/SettingsControl.xaml.cs
+0 −7 src/XIVLauncher/Windows/ViewModel/FirstTimeSetupViewModel.cs
+14 −19 src/XIVLauncher/Windows/ViewModel/MainWindowViewModel.cs
16 changes: 2 additions & 14 deletions src/XIVLauncher.Core/Components/MainPage/MainPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1096,24 +1096,12 @@ void UpdatePatchStatus()
return false;
}

private void PatcherOnFail(PatchManager.FailReason reason, string versionId)
private void PatcherOnFail(PatchListEntry patch, string context)
{
var dlFailureLoc = Loc.Localize("PatchManDlFailure",
"XIVLauncher could not verify the downloaded game files. Please restart and try again.\n\nThis usually indicates a problem with your internet connection.\nIf this error persists, try using a VPN set to Japan.\n\nContext: {0}\n{1}");

switch (reason)
{
case PatchManager.FailReason.DownloadProblem:
App.ShowMessageBlocking(string.Format(dlFailureLoc, "Problem", versionId), "XIVLauncher Error");
break;

case PatchManager.FailReason.HashCheck:
App.ShowMessageBlocking(string.Format(dlFailureLoc, "IsHashCheckPass", versionId), "XIVLauncher Error");
break;

default:
throw new ArgumentOutOfRangeException(nameof(reason), reason, null);
}
App.ShowMessageBlocking(string.Format(dlFailureLoc, context, patch.VersionId), "XIVLauncher Error");

Environment.Exit(0);
}
Expand Down
Loading