functional
Some checks failed
Build Go/Fyne App for macOS ARM64 / build (pull_request) Has been cancelled
Some checks failed
Build Go/Fyne App for macOS ARM64 / build (pull_request) Has been cancelled
This commit is contained in:
@@ -106,6 +106,17 @@ func updateEpochStatus() {
|
||||
}
|
||||
}
|
||||
|
||||
// Check for Epoch-specific files
|
||||
epochPatchesApplied := false
|
||||
stats, err := epoch.Update(paths.EpochPath, false, true, true)
|
||||
if err != nil {
|
||||
debug.Printf("Failed to get download Epoch patches: %v", err)
|
||||
}
|
||||
if stats.Outdated == 0 {
|
||||
debug.Println("Nothing is outdated")
|
||||
epochPatchesApplied = true
|
||||
}
|
||||
|
||||
// Check if patched files have the correct size (matches bundled versions)
|
||||
winerosettaDllCorrectSize := utils.CompareFileWithBundledResource(winerosettaDllPath, "winerosetta/winerosetta.dll")
|
||||
d3d9DllCorrectSize := utils.CompareFileWithBundledResource(d3d9DllPath, "winerosetta/d3d9.dll")
|
||||
@@ -116,24 +127,22 @@ func updateEpochStatus() {
|
||||
utils.DirExists(rosettaX87DirPath) && utils.PathExists(rosettaX87ExePath) &&
|
||||
utils.PathExists(libRuntimeRosettaX87Path) && dllsFileValid &&
|
||||
winerosettaDllCorrectSize && d3d9DllCorrectSize &&
|
||||
rosettaX87CorrectSize && libRuntimeRosettaX87CorrectSize {
|
||||
rosettaX87CorrectSize && libRuntimeRosettaX87CorrectSize && epochPatchesApplied {
|
||||
paths.PatchesAppliedEpoch = true
|
||||
}
|
||||
|
||||
// Check for Epoch-specific files, set PatchesAppliedEpoch to false if not updated
|
||||
stats, err := epoch.Update(paths.EpochPath, false, true, true)
|
||||
if err != nil {
|
||||
paths.PatchesAppliedEpoch = false
|
||||
debug.Printf("Failed to get download Epoch patches: %v", err)
|
||||
}
|
||||
if stats.Outdated > 0 {
|
||||
paths.PatchesAppliedEpoch = false
|
||||
}
|
||||
}
|
||||
|
||||
epochPathLabel.Refresh()
|
||||
|
||||
if paths.PatchesAppliedEpoch {
|
||||
if paths.DownloadingPatches {
|
||||
epochStatusLabel.Segments = []widget.RichTextSegment{&widget.TextSegment{Text: "Downloading...", Style: widget.RichTextStyle{ColorName: theme.ColorNamePrimary}}}
|
||||
if patchEpochButton != nil {
|
||||
patchEpochButton.Disable()
|
||||
}
|
||||
if unpatchEpochButton != nil {
|
||||
unpatchEpochButton.Disable()
|
||||
}
|
||||
} else if paths.PatchesAppliedEpoch {
|
||||
epochStatusLabel.Segments = []widget.RichTextSegment{&widget.TextSegment{Text: "Patched", Style: widget.RichTextStyle{ColorName: theme.ColorNameSuccess}}}
|
||||
if patchEpochButton != nil {
|
||||
patchEpochButton.Disable()
|
||||
|
Reference in New Issue
Block a user